/* =====================================================================
   TEDY UX V52 — functional-layer CSS (loaded last, so ties resolve here).
   Scope: cosmetic + touch behaviour only. No data, no ordering logic.

   Why this file exists (from the owner's two recordings of 2026-11-22):
   1. In the installed app and in Samsung Internet the gold looked dull and
      slightly brown while Chrome looked bright. Cause: the previous layer
      applied an extra warm/brown radial wash for
      (display-mode: standalone) / (prefers-color-scheme: dark), so the very
      same page rendered differently per shell. This layer removes that wash
      and re-states one black canvas and one gold recipe everywhere.
   2. Dragging inside the photo area did not scroll the page (only the edges
      did). The marker kept touch-action:none. It now allows vertical panning
      and starts dragging after a short hold instead.
   3. Small touch targets and dead-end pages (comparison) were raised/fixed.
   ===================================================================== */

:root { --t-black52:#040302; --t-gold-hi:#fff6d8; --t-gold-mid:#ffd87f; --t-gold-low:#c9962f; }

/* ---------------------------------------------------------------------
   1) One canvas for Chrome, Samsung Internet and the installed app.
   ------------------------------------------------------------------- */
/* R76: same author palette in all display modes. */

/* ---------------------------------------------------------------------
   2) Gold quality: more stops + a 1px dither weave so gradients do not
      band or look muddy on AMOLED phone screens.
   ------------------------------------------------------------------- */
#page-home.home-page #exploreProducts.gold-btn,
.page-heading h1, #catalogTitle, #detailName, #orderPageTitle,
#page-ai-design .page-heading h1, #page-budget-advisor .page-heading h1 {
  background-image: linear-gradient(100deg,
    #b6842c 0%, #d9a944 9%, #f0cc6d 19%, #ffe9a6 29%, #fffbe8 40%,
    #ffe9a6 52%, #f0cc6d 63%, #d9a944 76%, #e8bd57 88%, #c8952f 100%) !important;
  background-size: 260% 100% !important;
}

/* metallic gold action for the new header install button */
.header-install {
  display:inline-flex !important; align-items:center; justify-content:center; gap:6px;
  justify-self:start; width:max-content; max-width:min(58vw,248px);
  min-height:44px; padding:8px 12px; border-radius:12px;
  font-size:13px; font-weight:900; letter-spacing:.01em; line-height:1.15;
  text-decoration:none; white-space:nowrap;
  color:#1a1204;
  border:1px solid rgba(255,232,168,.92);
  background:linear-gradient(135deg,#ffe9a6,#d8a83f 45%,#f7dc93 70%,#b98a2e);
  box-shadow:0 2px 10px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.45);
  -webkit-tap-highlight-color:transparent; touch-action:manipulation;
}
.header-install:hover, .header-install:focus-visible { filter:brightness(1.08); }
.header-install:active { transform:translateY(1px); }
.header-install[data-state="ready"]::after { content:" ⬇"; font-size:12px; }
.header-install[data-state="installed"] {
  background:linear-gradient(135deg,#2b2416,#12100a); color:#ffe9a6;
  border-color:rgba(255,222,126,.55);
}
.header-install-state {
  font-size:11px; color:#ffe9a6; max-width:38vw; line-height:1.25;
  text-align:right; overflow-wrap:anywhere;
}

/* ---------------------------------------------------------------------
   3) Room preview: scrolling works everywhere; the marker drags on hold.
   ------------------------------------------------------------------- */
.camera-stage { touch-action:pan-y !important; }
#page-room #cameraStage,
#page-room #cameraEmpty,
#page-room #roomPhoto,
#page-room #cameraVideo,
#page-room #productOverlay,
#page-room #redMarker { touch-action:pan-y !important; }
#page-room #redMarker.is-dragging { cursor:grabbing; touch-action:none !important; }
#page-room .red-marker .red-handle {
  pointer-events:auto !important; touch-action:none !important;
  position:absolute !important; top:-40px !important; left:50% !important;
  transform:translateX(-50%);
  min-height:36px; padding:8px 14px; font-size:12px; font-weight:800;
  border-radius:12px; border:1px solid rgba(255,232,168,.9);
  background:linear-gradient(135deg,#ffe9a6,#c9962f); color:#191104;
  box-shadow:0 4px 14px rgba(0,0,0,.65);
}
#page-room .camera-empty p { font-size:15px; }
#page-room .camera-stage .camera-empty { cursor:pointer; }

/* resume chip (state-loss recovery) */
.room-resume-chip {
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:60; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  padding:10px 12px; border-radius:14px;
  background:linear-gradient(180deg,rgba(30,22,5,.98),rgba(8,6,2,.98));
  border:1px solid rgba(255,222,126,.8);
  box-shadow:0 14px 30px rgba(0,0,0,.8);
  color:#ffeec2; font-size:13px; line-height:1.4;
}
.room-resume-chip b { color:#fff3c4; }
.room-resume-chip .gold-btn { min-height:40px; padding:8px 14px; font-size:13px; }
.room-resume-dismiss {
  min-width:40px; min-height:40px; border-radius:10px; font-size:15px;
  background:transparent; color:#ffe9a6; border:1px solid rgba(255,222,126,.45);
}

/* ---------------------------------------------------------------------
   4) Catalog sort control + compare page never a dead end.
   ------------------------------------------------------------------- */
.catalog-tools { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
#productSearch { flex:1 1 190px; min-width:0; min-height:46px; }
#catalogSort {
  flex:0 1 auto; min-height:46px; padding:9px 12px; border-radius:11px;
  font:inherit; font-size:13px; font-weight:800; color:#ffe9a6;
  background:#0d0a04; border:1px solid rgba(255,222,126,.72);
}
#catalogSort:focus-visible { outline:2px solid rgba(255,226,152,.9); outline-offset:2px; }
#catalogCount { flex:0 0 auto; }
.compare-actions { margin:12px 0 14px; }
.compare-actions .gold-btn { min-height:46px; }

/* ---------------------------------------------------------------------
   5) AI design photo picker: an explicit button (the native
      "Choose file" control was unresponsive in Samsung Internet).
   ------------------------------------------------------------------- */
.a11y-file {
  position:absolute !important; width:1px; height:1px; opacity:0;
  margin:0; padding:0; overflow:hidden; border:0;
}
.tedy-design-photo-picker {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:2px;
}
.tedy-design-photo-picker .file-btn { min-height:48px; flex:1 1 180px; }
.tedy-design-photo-name {
  flex:0 1 auto; min-width:0; font-size:12px; color:#ffe9a6;
  overflow-wrap:anywhere; line-height:1.4;
}
.tedy-design-photo small { display:block; }

/* ---------------------------------------------------------------------
   6) Basic touch ergonomics (44px targets) on the elements the recordings
      showed as hard to hit.
   ------------------------------------------------------------------- */
.menu-btn, .icon-btn, .back-btn, .drawer-link, .room-placement-controls button {
  min-height:44px;
}
.drawer-link { display:flex; align-items:center; gap:10px; }
#appInstallDrawer {
  justify-content:center; text-align:center; font-weight:900;
  border:1px solid rgba(255,222,126,.75); color:#1a1204;
  background:linear-gradient(135deg,#ffe9a6,#d8a83f 45%,#f7dc93 70%,#b98a2e) !important;
}

/* keep everything readable when motion is reduced */
@media (prefers-reduced-motion: reduce) {
  .header-install, #exploreProducts.gold-btn, .page-heading h1, #catalogTitle { animation:none !important; }
}
