/* Restore Old Photos App — app-level styles
 * Extends UENI tokens with a warmer, photography-forward palette and
 * slightly larger type/hit-targets for a 40+ audience.
 */

:root {
  /* Warm sepia accents layered on top of UENI tokens */
  --sepia-ink:      #2A1F15;         /* deep brown for display type */
  --sepia-1:        #6B4A2B;         /* mid sepia */
  --sepia-2:        #A07650;         /* soft sepia */
  --sepia-paper:    #F6EFE4;         /* warm canvas */
  --sepia-paper-2:  #EFE4D1;         /* warm card */
  --sepia-line:     #E6D8C2;         /* warm divider */
  --cream:          #FBF6EC;
  --sepia-shadow:   0 10px 30px -12px rgba(74, 45, 20, 0.28);
  --sepia-shadow-sm:0 3px 9px 0 rgba(200, 170, 130, 0.35);

  /* Slightly larger base for older users */
  --text-body:  17px;
  --text-btn:   17px;
  --tap-min:    56px;
}

* { box-sizing: border-box; }

html, body {
  background: #000;
  color: var(--ink-1);
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#root {
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top, #2a2218 0%, #0f0c08 60%, #000 100%);
}

/* ─── Phone viewport ─────────────────────────────────────────── */

.app-viewport {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--sepia-paper);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7);
}

@media (min-width: 500px) {
  .app-viewport {
    min-height: min(932px, 100vh);
    max-height: 932px;
    border-radius: 42px;
    margin: max(24px, 2vh) auto;
    box-shadow:
      0 40px 100px -30px rgba(0,0,0,.8),
      0 0 0 10px #1a140d,
      0 0 0 11px #3a2e1f;
  }
}

/* Screen — fills remainder below any fixed chrome */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

/* Status bar (purely decorative) */
.statusbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 0 32px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--sepia-ink);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.statusbar.on-dark { color: #fff; }
.statusbar .sb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}
.statusbar .sb-right svg { display: block; }

/* App header */
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 14px;
  flex-shrink: 0;
}
.appbar .wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--sepia-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.appbar .wordmark .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-orange) 0%, #B85A1A 100%);
  display: grid; place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255,74,0,.35);
}
.appbar .icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  display: grid; place-items: center;
  color: var(--sepia-ink);
  font-size: 20px;
  cursor: pointer;
}
.appbar .icon-btn:hover { background: rgba(0,0,0,.05); }

/* Body scroll region */
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 120px; /* room for tabbar */
}

/* ─── Tab bar ─────────────────────────────────────────────────── */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 12px 26px;
  background: rgba(246,239,228, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--sepia-line);
  display: flex;
  justify-content: space-around;
  z-index: 10;
}
.tabbar .tab {
  flex: 1;
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  color: var(--muted-1);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.03em;
  cursor: pointer;
  min-height: var(--tap-min);
}
.tabbar .tab .ic { font-size: 22px; line-height: 1; }
.tabbar .tab.active { color: var(--brand-orange); }
.tabbar .tab.active .ic { transform: scale(1.05); }

/* ─── Buttons ─────────────────────────────────────────────────── */

.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-btn);
  line-height: 1;
  border-radius: 50px;
  padding: 18px 28px;
  min-height: var(--tap-min);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(255, 74, 0, 0.5);
}
.btn-primary:hover { background: var(--brand-orange-hover); }

.btn-ghost {
  background: transparent;
  color: var(--sepia-ink);
  border: 1.5px solid var(--sepia-line);
}
.btn-ghost:hover { background: rgba(0,0,0,.03); }

.btn-dark {
  background: var(--sepia-ink);
  color: #fff;
}
.btn-dark:hover { background: #000; }

.btn-block { width: 100%; }

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.card-flat {
  background: var(--sepia-paper-2);
  border-radius: 16px;
  padding: 18px;
}

/* ─── Inputs ──────────────────────────────────────────────────── */
.input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  min-height: var(--tap-min);
}
.input:focus { outline: none; border-color: var(--brand-orange); }

/* ─── Utility ─────────────────────────────────────────────────── */
.eyebrow-warm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-orange);
}
.title-display {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--sepia-ink);
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.body-warm {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink-3);
  font-size: var(--text-body);
  line-height: 1.5;
}

/* ─── Onboarding ──────────────────────────────────────────────── */
.onboarding {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--sepia-paper);
}
.onboarding .hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 20px;
  min-height: 0;
}
.onboarding .hero::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 60%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,74,0,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 10%, rgba(160,118,80,.15) 0%, transparent 50%);
}

.polaroid {
  position: relative;
  background: #fdfaf2;
  padding: 14px 14px 52px;
  box-shadow:
    0 1px 0 rgba(0,0,0,.05),
    0 12px 30px -8px rgba(40,25,10,.35);
  border: 1px solid #ece2cd;
}
.polaroid .poi-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #222;
  overflow: hidden;
}
.polaroid .poi-caption {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 20px;
  color: var(--sepia-1);
}

/* Onboarding slides indicator */
.dots { display: flex; justify-content: center; gap: 8px; margin: 16px 0 8px; }
.dots .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grey-light);
  transition: width 0.25s, background 0.25s;
}
.dots .dot.active { width: 24px; background: var(--brand-orange); }

/* ─── Home ────────────────────────────────────────────────────── */
.home-hero {
  margin: 0 20px 16px;
  padding: 22px 20px 24px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, #3A2817 0%, #1C120A 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sepia-shadow);
}
.home-hero::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,147,58,.35) 0%, transparent 70%);
  border-radius: 50%;
}
.home-hero h2 {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.home-hero p {
  font-size: 15px;
  font-weight: 300;
  color: rgba(255,255,255,.75);
  line-height: 1.45;
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

/* Big action buttons for home */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 20px 24px;
}
.action-tile {
  background: #fff;
  border: 0;
  border-radius: 20px;
  padding: 22px 16px 20px;
  text-align: left;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 130px;
  font-family: var(--font-display);
  transition: transform 0.15s, box-shadow 0.15s;
}
.action-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px 0 rgba(227,222,214,.8); }
.action-tile .at-ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,74,0,.1);
  color: var(--brand-orange);
  display: grid; place-items: center;
  font-size: 22px;
}
.action-tile.dark .at-ic {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.action-tile .at-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--sepia-ink);
  line-height: 1.2;
}
.action-tile .at-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted-1);
  margin-top: 4px;
}
.action-tile.dark {
  background: var(--sepia-ink);
}
.action-tile.dark .at-label { color: #fff; }
.action-tile.dark .at-sub { color: rgba(255,255,255,.6); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 20px 12px;
}
.section-head h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--sepia-ink);
}
.section-head .see-all {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--brand-orange);
  background: none; border: 0; cursor: pointer;
}

/* Recent strip */
.recent-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 20px 24px;
  scrollbar-width: none;
}
.recent-strip::-webkit-scrollbar { display: none; }
.recent-card {
  flex: 0 0 150px;
  border-radius: 14px;
  overflow: hidden;
  background: #2a1f15;
  aspect-ratio: 3/4;
  position: relative;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.recent-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-card .rc-date {
  position: absolute;
  bottom: 10px; left: 12px; right: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.recent-card .rc-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 8px;
  background: rgba(255,255,255,.92);
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--brand-orange);
  text-transform: uppercase;
}

/* Home alt: feed layout */
.feed {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feed-item {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.feed-item .fi-img {
  width: 100%;
  aspect-ratio: 16/11;
  background: #222;
  position: relative;
  overflow: hidden;
}
.feed-item .fi-meta {
  padding: 14px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-item .fi-meta .fi-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--sepia-ink);
}
.feed-item .fi-meta .fi-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted-1);
  margin-top: 2px;
}

/* ─── Capture viewfinder ──────────────────────────────────────── */
.capture-root {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.capture-root .appbar { background: transparent; color: #fff; }
.capture-root .appbar .wordmark { color: #fff; }
.capture-root .appbar .icon-btn { color: #fff; }
.capture-root .appbar .icon-btn:hover { background: rgba(255,255,255,.1); }

.viewfinder {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0a0806;
}
.viewfinder .vf-photo {
  position: absolute;
  width: 68%;
  max-width: 320px;
  aspect-ratio: 4/5;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-2.5deg);
  background: #fff;
  padding: 10px 10px 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.viewfinder .vf-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Detection rectangle */
.detector {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.detector svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.detector .corner {
  position: absolute;
  width: 32px; height: 32px;
  border: 3px solid var(--brand-orange);
}
.detector .corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.detector .corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.detector .corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.detector .corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

.vf-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,74,0,.92);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}
.vf-label .pulse {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.vf-hint {
  position: absolute;
  bottom: 20px;
  left: 20px; right: 20px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(255,255,255,.72);
  line-height: 1.4;
  z-index: 3;
}

.capture-controls {
  padding: 20px 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
}
.shutter {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #fff;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.12s;
}
.shutter:active { transform: scale(0.94); }
.shutter::after {
  content: '';
  width: 60px; height: 60px;
  background: #fff;
  border-radius: 50%;
  transition: background 0.12s;
}
.shutter.rec::after { background: var(--brand-orange); }

.side-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  display: grid; place-items: center;
  font-size: 20px;
  cursor: pointer;
}
.side-btn:hover { background: rgba(255,255,255,.22); }

/* ─── Processing screen ──────────────────────────────────────── */
.processing-root {
  background:
    radial-gradient(ellipse at 50% 20%, #3a2817 0%, #0f0a06 75%);
  color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.processing-root .statusbar { color: #fff; }

.proc-photo-wrap {
  padding: 36px 40px 24px;
  display: grid;
  place-items: center;
}
.proc-photo {
  position: relative;
  width: 75%;
  aspect-ratio: 4/5;
  background: #111;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}
.proc-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.proc-photo .proc-mask {
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Scan line */
.scanline {
  position: absolute; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(255,147,58,.12) 40%,
    rgba(255,74,0,.6) 50%,
    rgba(255,147,58,.12) 60%,
    transparent);
  animation: scanmove 2.2s linear infinite;
}
@keyframes scanmove {
  0%   { top: -80px; }
  100% { top: 100%; }
}
.scanline::before {
  content: '';
  position: absolute; left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--brand-orange);
  box-shadow: 0 0 14px 2px rgba(255,74,0,.8);
}

/* Linear bar variant */
.proc-bar-wrap {
  padding: 0 28px;
  margin-top: 8px;
}
.proc-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.proc-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #FF933A 0%, #FF4A00 100%);
  border-radius: 999px;
  transition: width 0.3s ease-out;
}

/* Steps checklist */
.proc-steps {
  padding: 24px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.proc-step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.45);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  transition: color 0.25s;
}
.proc-step.active { color: #fff; }
.proc-step.done { color: rgba(255,255,255,.9); }
.proc-step .ps-ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.25s;
}
.proc-step.active .ps-ic {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
  animation: stepspin 1s linear infinite;
}
.proc-step.done .ps-ic {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.3);
  color: #4BD762;
}
@keyframes stepspin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}
.proc-step .ps-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}

.proc-footer {
  padding: 24px 28px 40px;
  text-align: center;
}
.proc-footer .proc-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  margin-bottom: 6px;
}
.proc-footer .proc-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  color: rgba(255,255,255,.6);
}

/* ─── Results screen (before/after) ──────────────────────────── */
.results-root {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--sepia-paper);
  min-height: 0;
}
.results-stage {
  flex: 1;
  padding: 4px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

/* Slider compare */
.compare-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(40,25,10,.35);
  background: #111;
  user-select: none;
  touch-action: none;
}
.compare-slider img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.compare-slider .cs-after-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 50%);
}
.compare-slider .cs-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.35);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 5;
}
.compare-slider .cs-handle::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06);
}
.compare-slider .cs-handle::after {
  content: '⟷';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: var(--sepia-ink);
  font-weight: 700;
  z-index: 1;
}
.compare-slider .cs-label {
  position: absolute;
  top: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 4;
}
.compare-slider .cs-label.before { left: 14px; }
.compare-slider .cs-label.after { right: 14px; background: var(--brand-orange); }

/* Side-by-side */
.compare-sidebyside {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.compare-sidebyside .sbs-col {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 24px -8px rgba(40,25,10,.35);
}
.compare-sidebyside .sbs-col img { width: 100%; height: 100%; object-fit: cover; display: block; }
.compare-sidebyside .sbs-tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,.7);
  color: #fff;
}
.compare-sidebyside .sbs-col.after .sbs-tag { background: var(--brand-orange); }

/* Tap-to-reveal (press and hold) */
.compare-tap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(40,25,10,.35);
  background: #111;
  cursor: pointer;
  user-select: none;
}
.compare-tap img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s;
}
.compare-tap .ct-hint {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 9px 16px;
  border-radius: 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
  pointer-events: none;
  transition: opacity 0.18s;
}
.compare-tap .ct-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--brand-orange);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.compare-tap.pressed .ct-tag,
.compare-tap.pressed .ct-hint { opacity: 0; }

/* Result adjustments tray */
.results-adjust {
  padding: 12px 20px 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.results-adjust::-webkit-scrollbar { display: none; }
.adj-chip {
  flex: 0 0 auto;
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--sepia-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  min-height: 44px;
}
.adj-chip.active {
  background: var(--sepia-ink);
  color: #fff;
}
.adj-chip .chip-ic {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-size: 14px;
}
.adj-chip .chip-tog {
  width: 32px; height: 18px;
  border-radius: 999px;
  background: var(--grey-light);
  position: relative;
  transition: background 0.18s;
}
.adj-chip .chip-tog::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.18s;
}
.adj-chip.on .chip-tog { background: var(--brand-orange); }
.adj-chip.on .chip-tog::after { left: 16px; }

/* Results action row */
.results-actions {
  padding: 0 20px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--sepia-paper);
}
.results-actions .btn-primary { flex: 1; }

/* Export sheet */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: #fff;
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 14px 24px 32px;
  animation: slideUp 0.25s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--grey-light);
  margin: 0 auto 16px;
}
.sheet h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--sepia-ink);
  margin-bottom: 4px;
}
.sheet .sub {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--muted-1);
  font-size: 14px;
  margin-bottom: 20px;
}
.export-list { display: flex; flex-direction: column; gap: 6px; }
.export-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 8px;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  min-height: var(--tap-min);
  font-family: var(--font-display);
}
.export-row:hover { background: var(--surface-off); }
.export-row .er-ic {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 20px;
}
.export-row .er-ic.photos { background: linear-gradient(135deg, #f857a6, #ff5858); }
.export-row .er-ic.icloud { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.export-row .er-ic.wa { background: #25D366; }
.export-row .er-ic.msg { background: linear-gradient(135deg, #34c759, #2dbd50); }
.export-row .er-ic.mail { background: linear-gradient(135deg, #6e8efb, #a777e3); }
.export-row .er-ic.print { background: var(--sepia-ink); }
.export-row .er-ic.copy { background: var(--muted-1); }
.export-row .er-text { flex: 1; }
.export-row .er-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--sepia-ink);
}
.export-row .er-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--muted-1);
  margin-top: 1px;
}
.export-row .er-arrow { color: var(--grey-mid); font-size: 16px; }

/* Saved confirmation */
.saved-check {
  position: absolute;
  inset: 0;
  background: rgba(42,31,21,.85);
  display: grid; place-items: center;
  z-index: 200;
  animation: fadeIn 0.2s;
}
.saved-card {
  background: #fff;
  padding: 28px 32px;
  border-radius: 24px;
  text-align: center;
  animation: slideUp 0.3s both;
}
.saved-card .check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #4BD762;
  color: #fff;
  display: grid; place-items: center;
  font-size: 34px;
  margin: 0 auto 14px;
  animation: pop 0.35s cubic-bezier(.3,1.4,.5,1);
}
@keyframes pop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}
.saved-card h3 { font-family: var(--font-display); font-size: 20px; color: var(--sepia-ink); margin-bottom: 4px; font-weight: 800; }
.saved-card p { font-family: var(--font-body); font-size: 14px; color: var(--muted-1); font-weight: 300; }

/* ─── Gallery ─────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px 24px;
}
.gallery-tile {
  aspect-ratio: 3/4;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  position: relative;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-tile .gt-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.65));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
}
.gallery-tile .gt-date {
  font-weight: 300;
  font-size: 11px;
  opacity: 0.85;
  font-family: var(--font-body);
}

/* Month section */
.gallery-month {
  padding: 20px 20px 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-1);
}

.gallery-empty {
  text-align: center;
  padding: 60px 40px;
  color: var(--muted-2);
}
.gallery-empty .ge-ic {
  width: 80px; height: 80px;
  border-radius: 24px;
  background: rgba(255,74,0,.08);
  color: var(--brand-orange);
  display: grid; place-items: center;
  margin: 0 auto 16px;
  font-size: 34px;
}

/* ─── Account screen ─────────────────────────────────────────── */
.account-header {
  padding: 20px 20px 12px;
  text-align: center;
}
.avatar-big {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF933A, #FF4A00);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  margin: 0 auto 10px;
  box-shadow: 0 12px 24px -8px rgba(255,74,0,.4);
}

.setting-group {
  margin: 16px 20px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-height: var(--tap-min);
  cursor: pointer;
  background: #fff;
  border: 0;
  width: 100%;
  text-align: left;
}
.setting-row + .setting-row { border-top: 1px solid var(--sepia-line); }
.setting-row:hover { background: var(--surface-off); }
.setting-row .sr-ic {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.setting-row .sr-label {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--sepia-ink);
}
.setting-row .sr-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12px;
  color: var(--muted-1);
  margin-top: 2px;
}
.setting-row .sr-val {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted-1);
}
.setting-row .sr-arrow { color: var(--grey-mid); font-size: 16px; }

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,74,0,.12);
  color: var(--brand-orange);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Storage bar */
.storage-card {
  margin: 16px 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #3A2817 0%, #1c130b 100%);
  color: #fff;
  border-radius: 18px;
}
.storage-card .sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.storage-card h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}
.storage-card .sc-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}
.storage-card .sc-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
  margin-bottom: 8px;
}
.storage-card .sc-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #FF933A, #FF4A00);
  border-radius: 999px;
}
.storage-card .sc-stats {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255,255,255,.7);
}

/* Upload/library picker (home trigger) */
.picker-card {
  margin: 0 20px 20px;
  padding: 18px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

/* Import picker grid shown over home */
.import-sheet .import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
}
.import-tile {
  aspect-ratio: 1;
  background: #222;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.import-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.import-tile .import-glyph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e9ddc8, #ccb997);
  color: rgba(42,31,21,.35);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
}

/* Banner atop home (new user tip) */
.tip-banner {
  margin: 0 20px 16px;
  padding: 14px 16px;
  background: rgba(255,74,0,.08);
  border: 1px solid rgba(255,74,0,.2);
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.tip-banner .tb-ic {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--brand-orange);
  color: #fff;
  display: grid; place-items: center;
  font-size: 16px;
}
.tip-banner .tb-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--sepia-ink);
  font-weight: 400;
  line-height: 1.4;
}
.tip-banner .tb-text b { font-weight: 700; font-family: var(--font-display); }

/* Small helpers */
.spacer-16 { height: 16px; }
.spacer-24 { height: 24px; }
.spacer-32 { height: 32px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Override Tweaks panel position to not collide with phone */
.twk-panel { bottom: 20px !important; }
