/* Trial-web — black stage + purple→blue→teal duotone chrome */

:root {
  --dt-purple: #6d28d9;
  --dt-indigo: #4f46e5;
  --dt-blue: #2563eb;
  --dt-teal: #0d9488;
  --chrome-grad: linear-gradient(165deg, var(--dt-purple) 0%, var(--dt-indigo) 34%, var(--dt-blue) 58%, var(--dt-teal) 100%);
  --chrome-frost: rgba(255, 255, 255, 0.14);
  --chrome-ring: rgba(255, 255, 255, 0.88);
  --bg: #000;
  --text: #fff;
  --phone-w: 390px;
  --shell-w-landscape-wide: 820px;
  --yellow-ref: #ffd400;
  /* --bottom-stack-h is set on #app (see .phone-shell) so the rail can grow the stack */
  --font-scale: 1;
  --sheet-input-font-size: 12.5px;
  --tablet-ui: 1;
  --menu-muted: #c8c8c8;
  --app-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 768px) and (min-height: 500px) {
  :root { --tablet-ui: 1.58; }
}
@media (min-width: 1024px) and (min-height: 600px) {
  :root { --tablet-ui: 1.28; }
}
@media (min-width: 1280px) {
  :root { --tablet-ui: 1.06; }
}
@media (min-width: 1600px) {
  :root { --tablet-ui: 1; }
}

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

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #000;
  font-family: var(--app-font);
  overscroll-behavior: none;
  overscroll-behavior-x: none;
}

body {
  display: block;
}

body:focus {
  outline: none;
}

.phone-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  background: #000;
  color: var(--text);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --bottom-stack-h: 76px;
}

.phone-shell.wardrobe-feed-mode {
  --bottom-stack-h: calc(10px + env(safe-area-inset-bottom, 0px));
}

/* Boot splash — replace splash.jpg in the Trial-web folder. */
.trial-splash {
  position: absolute;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0c;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.38s ease-out, visibility 0.38s ease-out;
}

.trial-splash[hidden] {
  display: none !important;
}

.trial-splash.trial-splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.trial-splash__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trial-splash__img[hidden] {
  display: none !important;
}

.trial-splash-duotone {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--chrome-grad);
}

.trial-splash-blur {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(44, 86, 190, 0.24) 0%, rgba(10, 10, 14, 0.42) 100%);
  backdrop-filter: blur(28px) saturate(1.14);
  -webkit-backdrop-filter: blur(28px) saturate(1.14);
}

.trial-splash--image .trial-splash-duotone,
.trial-splash--image .trial-splash-blur,
.trial-splash--image .trial-splash-logo {
  display: none;
}

.trial-splash-logo {
  position: relative;
  z-index: 2;
  width: min(42vw, 168px);
  height: min(42vw, 168px);
  object-fit: contain;
  display: block;
}

.trial-splash-logo[hidden] {
  display: none !important;
}

.trial-splash--img-missing .trial-splash__img {
  opacity: 0;
}

.trial-splash--img-missing:not(.trial-splash--image) {
  background: var(--chrome-grad);
}

/* Greeting screen after splash — replace greeting.jpg (9:16 portrait works best). */
.trial-greeting {
  position: absolute;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0c;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease-out, visibility 0.32s ease-out;
}

.trial-greeting.trial-greeting--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.trial-greeting__img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.trial-greeting--img-missing .trial-greeting__img {
  opacity: 0;
}

.trial-greeting--img-missing {
  background: var(--chrome-grad);
}

.phone-shell.trial-boot-active .stage,
.phone-shell.trial-boot-active .top-chrome,
.phone-shell.trial-boot-active .category-wrap,
.phone-shell.trial-boot-active .forme-choices-banner,
.phone-shell.trial-boot-active .shell-bottom-accent {
  visibility: hidden;
}

/*
 * Typing alignment: WebKit often centers `type="search"` text; some iOS builds
 * center number fields. Force left for all editable fields in the app shell.
 */
.phone-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="file"]):not([type="hidden"]):not([type="image"]),
.phone-shell textarea,
.phone-shell select {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  unicode-bidi: isolate;
}

.phone-shell input[type="search"] {
  -webkit-appearance: none !important;
  appearance: none !important;
}

.phone-shell input[type="search"]::-webkit-search-decoration,
.phone-shell input[type="search"]::-webkit-search-cancel-button,
.phone-shell input[type="search"]::-webkit-search-results-button,
.phone-shell input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.phone-shell input::placeholder,
.phone-shell textarea::placeholder {
  text-align: left !important;
}

/* Cover the Trial logo/header completely while browsing My wardrobe (overlay stacks above .top-chrome). */
.phone-shell.wardrobe-feed-mode .top-chrome {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Search-as-category: slim header row (same back control as Wardrobe feed). Hidden must win when [hidden]. */
#exploreBrowseChrome[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#exploreBrowseChrome:not([hidden]) {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  border: none;
  background: transparent;
}

#exploreBrowseChrome:not([hidden]) .explore-browse-chrome-inner {
  width: 100%;
  padding-block: 0 2px;
  padding-inline: 0;
  pointer-events: auto;
}

.explore-browse-chrome-row {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  display: flex;
}

.explore-browse-title-line {
  flex: 1 1 auto;
  min-width: 0;
  font-size: calc(14px * var(--font-scale));
  font-weight: 650;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-shell.explore-browse-feed-mode .header-row {
  display: none !important;
}

#likesPageChrome[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#likesPageChrome:not([hidden]) {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  border: none;
  background: transparent;
}

#likesPageChrome:not([hidden]) .explore-browse-chrome-inner {
  width: 100%;
  padding-block: 0 2px;
  padding-inline: 0;
  pointer-events: auto;
}

.phone-shell.explore-browse-feed-mode #categoryWrap,
.phone-shell.explore-browse-feed-mode .shell-bottom-accent,
.phone-shell.explore-browse-feed-mode #formeChoicesBanner {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.phone-shell.explore-browse-feed-mode .catalog-peek {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Search results: keep main viewer clear (no frosted overlay on the feed). */
.phone-shell.explore-browse-feed-mode .chrome-body.chrome-body--overlay {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.phone-shell.explore-browse-feed-mode #exploreBrowseChrome:not([hidden]) .explore-browse-chrome-inner {
  padding-block: 2px 4px;
}

/* Hidden must win over .wardrobe-chrome { display:flex } inside the injected bar. */
#wardrobeFeedShellBar[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Slim wardrobe strip — teak “cupboard”: thin carved cap + faint wood frame outline */
#wardrobeFeedShellBar:not([hidden]) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 2px 0 4px;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
  border: none;
  box-shadow: none;
}

#wardrobeFeedShellBar .wardrobe-teak-cupboard {
  width: 100%;
  padding-top: calc(3px + env(safe-area-inset-top, 0px));
  padding-inline: 10px;
  pointer-events: auto;
  filter: none;
}

/* No brown/teak decorative strip — it read as overlapping the outfit UI. */
#wardrobeFeedShellBar .wardrobe-teak-carved-cap {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  overflow: hidden;
}

/* No frame box behind feed header — only ← + title, background visible through. */
#wardrobeFeedShellBar .wardrobe-teak-frame {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  background-color: transparent;
  background-image: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

#wardrobeFeedShellBar .wardrobe-chrome-row--feed-head {
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

#wardrobeFeedShellBar .wardrobe-top-title {
  flex: 0 1 auto;
  min-width: 0;
  text-align: left;
}

#wardrobeFeedShellBar .wardrobe-feed-shell-inner {
  width: 100%;
}

@media (orientation: landscape) {
  html,
  body {
    background: #111;
  }
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .phone-shell {
    width: min(100vw, var(--phone-w));
    max-width: min(100vw, var(--phone-w));
    height: min(100vh, 100dvh, 844px);
    min-height: 0;
    border-radius: 26px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  }
}

@media (orientation: landscape) and (min-width: 1100px) {
  .phone-shell {
    width: min(100vw, var(--shell-w-landscape-wide));
    max-width: min(100vw, var(--shell-w-landscape-wide));
    height: min(100vh, 100dvh, 960px);
  }
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #000;
  font-family: var(--app-font);
  touch-action: auto;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
}

/* Full-bleed under floating chrome — image starts at top of stage */
.trial-main {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  flex: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  pointer-events: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.stage-flex-grow {
  flex: 1;
  min-height: 0;
  pointer-events: none;
  z-index: 8;
}

/*
 * Hollow duotone ring: gradient only on a masked band (Safari-safe).
 * A full-box background on the wrapper always reads “filled” behind a transparent button.
 */
.chrome-outline-wrap {
  --chrome-ring-w: 2px;
  display: inline-flex;
  align-items: stretch;
  justify-content: stretch;
  flex-shrink: 0;
  box-sizing: border-box;
  position: relative;
  border: none;
  background: none;
  border-radius: 999px;
  isolation: isolate;
}

.chrome-outline-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: var(--chrome-ring-w);
  box-sizing: border-box;
  background: var(--chrome-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.chrome-outline-wrap > * {
  position: relative;
  z-index: 1;
}

/* Header + side rail: neutral frost ring (not loud purple/blue duotone). */
.top-chrome .chrome-outline-wrap::before,
.viewer-fabRail .chrome-outline-wrap::before {
  padding: 1.5px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.12) 52%,
    rgba(200, 206, 218, 0.22) 100%
  );
}

.chrome-outline-wrap--logo {
  border-radius: 14px;
}

/* Same translucent plate as `.viewer-floatCard` — duotone ring muted above for `.top-chrome`. */
.chrome-outline-wrap--logo .logo-btn {
  background: rgba(12, 12, 16, 0.025);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* Header logo: visible violet / cool-white duotone ring (must beat generic chrome rule). */
.top-chrome .chrome-outline-wrap--logo::before {
  padding: 2px;
  background: linear-gradient(
    125deg,
    rgba(168, 140, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.55) 42%,
    rgba(94, 60, 200, 0.9) 100%
  );
}

/* Explore: thin but readable duotone outline */
.top-chrome .chrome-outline-wrap--explore::before {
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(200, 190, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(124, 79, 224, 0.75) 100%
  );
}

.chrome-outline-wrap--explore {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.chrome-outline-wrap--about {
  display: block;
  width: 100%;
  margin-top: 14px;
  border-radius: 14px;
}

.chrome-outline-wrap--about .menu-about-inner {
  margin-top: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  background-color: transparent;
  background-image: none;
  -webkit-appearance: none;
  appearance: none;
}

.chrome-outline-wrap--icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.chrome-outline-wrap--try {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.viewer-action-inner {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  color: #fff;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.viewer-action-inner svg {
  width: 21px;
  height: 21px;
  display: block;
}

#viewerEmojiBtn.viewer-action-inner.viewer-emoji-btn-svg {
  font-size: 0;
  line-height: 0;
  display: grid;
  place-items: center;
}

#viewerEmojiBtn.viewer-action-inner.viewer-emoji-btn-svg .chrome-icon-outline {
  width: 23px;
  height: 23px;
}

.viewer-action-inner--try {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.viewer-floatCard .viewer-action-inner,
.viewer-floatCard .chrome-outline-wrap {
  pointer-events: auto;
}

/* Two equal CTA cells: emoji + share, then full-width try */
.viewer-floatCard .viewer-actions-top .chrome-outline-wrap--icon {
  width: 34px;
  height: 34px;
  max-width: 34px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ——— Floating header over the image ——— */
.top-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.status {
  height: calc(0.5in * 0.85);
  flex-shrink: 0;
  width: 100%;
  background: var(--chrome-grad);
  pointer-events: none;
}

/* ── Carousel “story” segments: status strip → segments → chrome row ───────── */
.viewer-angle-bars-slot {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 7px calc(14px + env(safe-area-inset-left, 0px)) 6px calc(14px + env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.12) 72%, transparent 100%);
}

.viewer-angle-bars-slot[hidden] {
  display: none !important;
}

.viewer-story-seg {
  flex: 1;
  height: 4px;
  min-width: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.35);
}

.viewer-story-seg.is-done .viewer-story-fill {
  transform: scaleX(1);
}

.viewer-story-seg.is-ahead .viewer-story-fill {
  transform: scaleX(0);
}

.viewer-story-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(196, 181, 253, 0.92),
    rgba(147, 197, 253, 0.98),
    rgba(153, 246, 228, 0.9)
  );
  box-shadow: 0 0 6px rgba(147, 197, 253, 0.45);
  will-change: transform;
}

.viewer-story-seg.is-current .viewer-story-fill {
  transform: scaleX(1);
}

.top-chrome .chrome-body,
.top-chrome .header-row,
.top-chrome .logo-btn,
.top-chrome .chrome-outline-wrap,
.top-chrome .explore-btn {
  pointer-events: auto;
}

.chrome-body.chrome-body--overlay {
  flex-shrink: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: transparent;
  border: none;
}

.header-row {
  min-height: 0;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  gap: 14px;
}

.wardrobe-chrome {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.wardrobe-chrome.wardrobe-chrome--compact {
  gap: 0;
  padding-top: 0;
}

/* Same width as .wardrobe-top-back so the title stays centered */
.wardrobe-header-balance {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  visibility: hidden;
  pointer-events: none;
}

.wardrobe-chrome-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wardrobe-top-back {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(12, 12, 16, 0.36);
  color: #f4f4f8;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  place-items: center;
}

.wardrobe-top-title {
  flex: 1;
  margin: 0;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  text-align: center;
  color: #f4f4f8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.wardrobe-top-add {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: none;
  background: rgba(12, 12, 16, 0.36);
  color: #f4f4f8;
  font-size: calc(14px * var(--font-scale));
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.wardrobe-chrome-search-wrap {
  display: block;
  width: 100%;
}

.header-railToggle {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  margin-left: auto;
  margin-right: 2px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  background: rgba(12, 12, 16, 0.32);
  cursor: pointer;
  pointer-events: auto;
}
.header-railToggle {
  display: none;
}

.header-railToggle-line {
  display: block;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--dt-indigo) 0%, var(--dt-blue) 52%, var(--dt-teal) 100%);
  box-shadow: 0 0 0 1px var(--dt-indigo), 0 0 0 2px var(--dt-teal);
}

.header-railToggle[aria-expanded="true"] .header-railToggle-line {
  box-shadow: 0 0 0 1px var(--dt-indigo), 0 0 0 2px var(--dt-teal), 0 0 10px rgba(99, 102, 241, 0.4);
}

.logo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 500;
  font-size: calc(17px * var(--font-scale));
  min-height: 50px;
  min-width: 0;
  cursor: pointer;
  font-family: inherit;
  color: #f4f4f8;
  border: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 14px rgba(0, 0, 0, 0.45);
}

.logo-btn-burger {
  font-size: 1.35em;
  line-height: 1;
  flex-shrink: 0;
  color: #f4f4f8;
  opacity: 0.95;
  display: grid;
  place-items: center;
}

.logo-btn-burger .chrome-icon-outline {
  width: 18px;
  height: 18px;
}

.logo-btn-img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 8px;
}

.logo-btn-name {
  min-width: 0;
}

.explore-btn {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 50%;
  color: #f4f4f8;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  border: none;
  background: transparent;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  /* Avoid filter here — Safari/WebKit compositing turns child <img> into a flat block. */
  filter: none;
}

.explore-btn svg {
  width: 26px;
  height: 26px;
  display: block;
}

.explore-btn .explore-compass-img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  object-position: center center;
  /* Transparent B&W asset: lighten for dark chrome; avoid drop-shadow (reads as dirty square). */
  filter: invert(1);
  opacity: 0.98;
  -webkit-user-drag: none;
  image-rendering: -webkit-optimize-contrast;
}

.trial-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.photo-strip {
  padding: 4px 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
}

.photo-strip-label {
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  color: var(--menu-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.photo-slots {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.photo-slot {
  flex: 1;
  max-width: calc(33.333% - 7px);
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  border: 2px dashed rgba(200, 208, 218, 0.45);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.photo-slot.has-image {
  border-style: solid;
  border-color: rgba(200, 208, 218, 0.65);
  padding: 0;
}

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

.photo-slot .slot-hint {
  font-size: calc(11px * var(--font-scale));
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 0 4px;
  line-height: 1.2;
}

.photo-slot .slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.photo-slot.has-image .slot-remove {
  display: flex;
}

.row-section {
  margin-top: 6px;
  padding: 0 0 8px;
  scroll-margin-top: 12px;
}

.row-title {
  margin: 14px 16px 6px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.row-section:first-of-type .row-title {
  margin-top: 12px;
}

.row-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 0 16px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.row-scroll::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 auto;
  width: 118px;
  cursor: pointer;
}

.product-poster {
  width: 118px;
  height: 168px;
  border-radius: 8px;
  background: linear-gradient(145deg, #2a2a2a, #121212);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.product-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-meta {
  margin-top: 6px;
  font-size: calc(13px * var(--font-scale) * var(--tablet-ui));
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-sub {
  font-size: calc(11px * var(--font-scale));
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.empty-hint {
  padding: 24px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: calc(14px * var(--font-scale));
  line-height: 1.45;
  max-width: 280px;
  margin: 0 auto;
}

/* ——— Bottom category bar: clear strip; each tab is its own glass bubble ——— */
.category-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  z-index: 40;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: rgba(12, 12, 16, 0.38);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 6px);
  /* Do not clip tab capsule rings (they extend past the hit target). */
  overflow: visible;
  pointer-events: none;
}

.category-scroll {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 34px;
  padding: 12px 12px 5px 12px;
  padding-inline-end: max(24px, calc(16px + env(safe-area-inset-right, 0px)));
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  overscroll-behavior-x: none;
  scrollbar-width: none;
  pointer-events: auto;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

/* Collapsible: first titles per catalog category + import hint (above category bar). */
.catalog-peek {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  z-index: 38;
  margin: 0;
  pointer-events: auto;
  border-radius: 10px;
  background: rgba(10, 10, 14, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 8px;
}

.catalog-peek-sum {
  cursor: pointer;
  font-size: calc(11px * var(--font-scale));
  color: rgba(255, 255, 255, 0.78);
  list-style-position: outside;
}

.catalog-peek-body {
  margin: 8px 0 4px;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: calc(10px * var(--font-scale));
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.68);
  max-height: min(240px, 30vh);
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Duo-tone accent under the tab row (inside bottom chrome), above home-area padding — not over tab labels */
.category-wrap::after {
  display: none;
}

.tab {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: calc(16px * var(--font-scale) * var(--tablet-ui));
  padding: 4.6px 8.9px;
  border-radius: 999px;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.tab:focus {
  outline: none;
}

.tab:focus-visible {
  outline: none;
}

/* Outline-only capsule: thin duotone ring for clear selected state. */
.tab-duotone-outline {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.tab.active .tab-duotone-outline,
.tab:focus-visible .tab-duotone-outline {
  opacity: 1;
  box-shadow: none;
}

/* Stack the active/focused tab above neighbors so the capsule ring is not covered. */
.tab.active,
.tab:focus-visible {
  z-index: 2;
  box-shadow:
    0 0 0 1px var(--dt-indigo),
    0 0 0 2px var(--dt-teal);
}

.tab .tab-label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.tab.active {
  color: #fff;
  font-weight: 600;
}

.tab.active .tab-label {
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

/* Visible “bubble” is `.tab.active` box-shadow — pulse that (label stays still; no sideways tab motion). */
@keyframes shimmer-sweep {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes tab-category-bubble-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px var(--dt-indigo),
      0 0 0 2px var(--dt-teal);
  }
  30% {
    box-shadow:
      0 0 0 2px rgba(165, 180, 252, 0.98),
      0 0 0 5px rgba(45, 212, 191, 0.75),
      0 0 16px rgba(99, 102, 241, 0.5);
  }
  55% {
    box-shadow:
      0 0 0 1px var(--dt-indigo),
      0 0 0 4px rgba(45, 212, 191, 0.9);
  }
}

.tab.tab--bounce.active {
  animation: tab-category-bubble-pulse 0.82s ease-in-out 1 forwards;
}

/* ——— Explore bottom sheet (search + recent + trending) ——— */
.explore-sheet {
  position: absolute;
  inset: 0;
  z-index: 75;
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 1;
  transition: visibility 0s linear 0.38s;
}

.explore-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.explore-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.explore-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-height: min(88vh, 720px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transform: translate3d(0, 105%, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.explore-sheet.open .explore-panel {
  transform: translate3d(0, 0, 0);
}

.wardrobe-sheet {
  position: absolute;
  inset: 0;
  z-index: 76;
  display: block;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.wardrobe-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.wardrobe-dim {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.56);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.wardrobe-panel {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: none;
  border-radius: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(0, 0, 0, 0.25);
  background-image: none;
  backdrop-filter: blur(40px) saturate(1.06);
  -webkit-backdrop-filter: blur(40px) saturate(1.06);
  transform: translate3d(0, 0, 0);
  transition: opacity 0.2s ease;
  overflow-y: auto;
}

.wardrobe-sheet:not(.open) .wardrobe-panel { opacity: 0; }

.wardrobe-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
}

.wardrobe-panel-head-start {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.wardrobe-title {
  margin: 0;
  font-size: calc(18px * var(--font-scale));
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.wardrobe-back-btn,
.wardrobe-add-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  min-height: 34px;
  padding: 0 10px;
  font-family: inherit;
  cursor: pointer;
}

.wardrobe-search-wrap { display: block; margin-bottom: 10px; }
.wardrobe-empty {
  margin: 8px 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.wardrobe-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.wardrobe-add-sheet {
  position: absolute;
  inset: 0;
  z-index: 82;
  display: block;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}

.wardrobe-add-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.wardrobe-add-dim {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.58);
  backdrop-filter: blur(32px) saturate(155%);
  -webkit-backdrop-filter: blur(32px) saturate(155%);
}

.wardrobe-add-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 -20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(44px) saturate(190%);
  -webkit-backdrop-filter: blur(44px) saturate(190%);
  padding: 10px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate3d(0, 105%, 0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.wardrobe-add-sheet.open .wardrobe-add-panel { transform: translate3d(0, 0, 0); }

.wardrobe-add-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  margin: 0 auto 8px;
  background: rgba(255, 255, 255, 0.3);
}

.wardrobe-add-title {
  margin: 0 0 10px;
  text-align: center;
  font-size: calc(16px * var(--font-scale));
}

.wardrobe-add-preview {
  width: min(240px, 68vw);
  margin: 0 auto 10px;
  aspect-ratio: 9 / 16;
  min-height: 180px;
  max-height: 42vh;
  height: auto;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.wardrobe-add-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.wardrobe-add-pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.wardrobe-add-pick-btn,
.wardrobe-add-secondary,
.wardrobe-add-primary {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-family: inherit;
}

.wardrobe-add-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.wardrobe-add-field select,
.wardrobe-add-field input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
  min-height: 36px;
  padding: 8px 10px;
  font-family: inherit;
  text-align: left !important;
  direction: ltr;
}

.wardrobe-add-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.shop-web-sheet {
  position: absolute;
  inset: 0;
  z-index: 95;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.28s;
}

.shop-web-sheet.open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s linear 0s;
}

.shop-web-dim {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.62);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.shop-web-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(52px + env(safe-area-inset-top, 0px));
  z-index: 2;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: none;
  background: rgba(16, 18, 24, 0.72);
  box-shadow:
    0 -12px 40px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  transform: translate3d(0, 106%, 0);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-web-sheet.open .shop-web-panel {
  transform: translate3d(0, 0, 0);
}

.shop-web-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 12px 10px calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.shop-web-head-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

@media (min-width: 400px) {
  .shop-web-head-start {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}

.shop-web-external-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(147, 197, 253, 0.45);
  background: rgba(37, 99, 235, 0.3);
  color: rgba(239, 246, 255, 0.98);
  font-size: calc(12.5px * var(--font-scale));
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: filter 0.12s ease, transform 0.1s ease;
}

.shop-web-external-btn:active {
  filter: brightness(0.95);
  transform: scale(0.98);
}

.shop-web-title {
  margin: 0;
  font-size: calc(16px * var(--font-scale));
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.shop-web-close {
  min-width: 40px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.shop-web-iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  background: #0c0e12;
}

.shop-web-hint {
  margin: 0 12px 10px calc(14px + env(safe-area-inset-left, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
  font-size: calc(12.8px * var(--font-scale));
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.74);
}

.shop-web-hint strong {
  color: rgba(248, 250, 255, 0.96);
}

.wardrobe-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 8px;
  font-family: inherit;
}

.wardrobe-item-thumb {
  width: 40px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 auto;
}

.wardrobe-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wardrobe-item-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wardrobe-item-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
}

/* ——— Try: pick my photo (2–3 options) ——— */
.try-pick-photo-sheet {
  position: absolute;
  inset: 0;
  z-index: 79;
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 1;
  transition: visibility 0s linear 0.38s;
}

.try-pick-photo-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.try-pick-photo-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.try-pick-photo-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-height: min(58vh, 420px);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: none;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: rgba(18, 18, 24, 0.94);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  transform: translate3d(0, 105%, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.try-pick-photo-sheet.open .try-pick-photo-panel {
  transform: translate3d(0, 0, 0);
}

.try-pick-photo-panel-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto 10px;
}

.try-pick-photo-title {
  margin: 0 0 6px;
  text-align: center;
  font-size: calc(17px * var(--font-scale));
  font-weight: 700;
  color: #fff;
}

.try-pick-photo-sub {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.52);
}

.try-pick-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 4px;
}

.try-pick-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  margin: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #fff;
  -webkit-appearance: none;
  appearance: none;
}

.try-pick-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.try-pick-tile:focus-visible {
  outline: 2px solid var(--dt-teal);
  outline-offset: 2px;
}

/* ——— My photos (device-only localStorage) ——— */
.user-photos-sheet {
  position: absolute;
  inset: 0;
  z-index: 78;
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 1;
  transition: visibility 0s linear 0.38s;
}

.user-photos-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.user-photos-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.user-photos-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  max-height: min(60vh, 480px);
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: none;
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  transform: translate3d(0, 105%, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.user-photos-sheet.open .user-photos-panel {
  transform: translate3d(0, 0, 0);
}

.user-photos-panel-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 0 auto 10px;
}

.user-photos-panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 0 6px;
  padding-inline: 44px;
}

.user-photos-panel-title {
  margin: 0;
  text-align: center;
  font-size: calc(17px * var(--font-scale));
  font-weight: 700;
  color: #fff;
}

.user-photos-camera-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f4f8;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.user-photos-camera-btn:focus-visible {
  outline: 2px solid var(--dt-teal);
  outline-offset: 2px;
}

.user-photos-hint {
  margin: 0 0 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.5);
}

.user-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-bottom: 4px;
}

.user-photos-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  margin: 0;
  padding: 0;
}

.user-photos-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.user-photos-tile--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(12, 12, 16, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.user-photos-tile--add .user-photos-tile-glyph {
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.user-photos-tile--add .user-photos-tile-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.user-photos-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  z-index: 1;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* Explore sheet content: reuse menu Choices search row + submenu title weight. */

.explore-panel .explore-panel-drag.menu-panel-handle {
  margin-bottom: 4px;
}

.explore-panel .explore-panel-visible-title.menu-sheet-title {
  display: block !important;
  margin: 0 0 10px;
  text-align: center;
  font-size: calc(22px * var(--font-scale));
  font-weight: 740;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.96);
}

/* Explore sheet: grey fill inside, duotone ring only (no extra white border). */
.explore-sheet-search-outline {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  border-radius: 12px;
  --chrome-ring-w: 1.5px;
}

.explore-sheet-search-outline::before {
  background: var(--chrome-grad);
  opacity: 0.92;
}

.explore-panel .choices-search-wrap.explore-sheet-search {
  display: flex;
  margin: 0;
  width: 100%;
  gap: 8px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: rgba(108, 112, 122, 0.42);
}

.explore-panel .choices-search-wrap.explore-sheet-search--grey {
  background: rgba(108, 112, 122, 0.42);
}

.explore-panel .explore-sheet-search input.trial-sheet-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.explore-search-send-outline {
  --chrome-ring-w: 1.5px;
  flex-shrink: 0;
  border-radius: 999px;
}

.explore-search-send-outline::before {
  background: var(--chrome-grad);
  opacity: 0.9;
}

.explore-search-send-outline .explore-search-send {
  margin: 2px;
}

.explore-panel .choices-search-wrap .choices-search-input,
.explore-panel .explore-sheet-search input.trial-sheet-input {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
}

.explore-panel .explore-sheet-search input.trial-sheet-input::placeholder {
  color: rgba(255, 255, 255, 0.52) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.52);
  opacity: 1;
}

.explore-search-send {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  border-radius: 999px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.explore-search-send:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.75);
  outline-offset: 2px;
}

.explore-search-send:active {
  opacity: 0.86;
}

.explore-panel .explore-search-input-reset {
  color: rgba(255, 255, 255, 0.96);
}

.explore-section-heading-nudge {
  margin-top: 4px;
}

.explore-section {
  margin-bottom: 14px;
}

.explore-recent.explore-trending {
  margin-bottom: 0;
}

.explore-panel .explore-recent .choices-bubble-chip {
  position: relative;
  border: none;
  background: transparent;
  isolation: isolate;
}

.explore-panel .explore-recent .choices-bubble-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  box-sizing: border-box;
  background: var(--chrome-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.explore-empty-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.explore-trending {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.explore-panel .explore-trending .choices-bubble-chip {
  position: relative;
  border: none;
  background: transparent;
  isolation: isolate;
}

.explore-panel .explore-trending .choices-bubble-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  box-sizing: border-box;
  background: var(--chrome-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.explore-panel .explore-recent .choices-bubble-chip:active,
.explore-panel .explore-trending .choices-bubble-chip:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Duo-tone line at physical bottom (below nav / category bar), inside stage */
.shell-bottom-accent {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px; /* Match `.category-wrap { bottom: 3px; }` gap thickness exactly. */
  z-index: 39;
  pointer-events: none;
  background: var(--chrome-grad);
  opacity: 0.94;
}

/* ——— Menu sheet: blur-only dim (no dark wash) + light glass panel ——— */
.menu-sheet {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 1;
  transition: visibility 0s linear 0.38s;
}

.menu-sheet.open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.menu-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.menu-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 720px);
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  transform: translate3d(0, 105%, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.menu-sheet.open .menu-panel:not([hidden]) {
  transform: translate3d(0, 0, 0);
}

/* Settings menu: white, readable type on light glass — all panels (incl. My choices, More, sub-pages). */
.menu-sheet .menu-panel {
  color: #fff;
}

.menu-sheet .menu-panel button,
.menu-sheet .menu-panel label,
.menu-sheet .menu-panel p,
.menu-sheet .menu-panel span,
.menu-sheet .menu-panel .choices-lead,
.menu-sheet .menu-panel .choices-subtext,
.menu-sheet .menu-panel .choices-cost-labels,
.menu-sheet .menu-panel .choices-cost-labels span {
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-sheet .menu-panel .choices-tab {
  color: #fff;
  font-weight: 500;
}

.menu-sheet .menu-panel .choices-tab.is-active {
  color: #fff;
  font-weight: 500;
}

.menu-sheet .menu-panel .choices-chip {
  color: #fff;
  font-weight: 500;
}

.menu-sheet .menu-panel .choices-chip.is-active {
  color: #fff;
  font-weight: 600;
  background: rgba(109, 40, 217, 0.45);
  border-color: rgba(168, 140, 255, 0.95);
  box-shadow: 0 0 12px rgba(109, 40, 217, 0.4);
}

.menu-sheet .menu-panel .choices-bubble-chip {
  color: #fff;
  font-weight: 500;
}

.menu-panel--sub {
  z-index: 3;
  padding-top: 16px;
}

.menu-panel-handle {
  width: 56px;
  height: 36px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  background: transparent;
}

.menu-panel-handle::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.menu-panel-handle:active {
  cursor: grabbing;
}

.menu-sheet-title {
  display: none;
}

.menu-panel--sub .menu-sheet-title {
  display: block;
  margin: 0 0 4px;
  font-family: var(--app-font), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(22px * var(--font-scale));
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.choices-lead {
  margin: 0 0 16px;
  font-family: var(--app-font), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.74);
}

.choices-bubble-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  margin-top: -4px;
}

.choices-bubble-strip--length {
  margin-bottom: 18px;
}

.choices-bubble-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.95);
  font-size: calc(13px * var(--font-scale));
  font-family: var(--app-font), system-ui, sans-serif;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.choices-bubble-chip:active {
  background: rgba(255, 255, 255, 0.1);
}

.choices-price-single.menu-select-wrap {
  width: 100%;
}

.menu-field-label {
  font-size: calc(17px * var(--font-scale));
  font-weight: 500;
  color: #fff;
  margin: 16px 0 10px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  font-size: calc(15px * var(--font-scale));
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-toggle {
  width: 20px;
  height: 20px;
  accent-color: var(--dt-indigo);
  flex-shrink: 0;
}

.menu-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.menu-range {
  flex: 1;
  accent-color: var(--dt-blue);
}

.menu-range-val {
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  color: #fff;
  min-width: 44px;
  text-align: right;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-select-wrap {
  display: block;
  margin-bottom: 4px;
}

/*
 * Choices text fields use `.trial-sheet-input` only — do NOT use `.menu-select` on <input>.
 * Inline search rows use `.trial-ltr`.
 */
.trial-ltr {
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

label.choices-field-wrap .trial-sheet-input,
input.trial-sheet-input,
input.wardrobe-chrome-search {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(0, 0, 0, 0.25);
  background-image: none !important;
  color: #fff;
  font-size: var(--sheet-input-font-size, 12.5px);
  font-family: inherit;
  line-height: 1.35;
  letter-spacing: normal;
  appearance: none !important;
  -webkit-appearance: none !important;
  text-align: left !important;
  text-align-last: left !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

.trial-sheet-input::placeholder,
.trial-ltr::placeholder {
  text-align: left !important;
}

.trial-sheet-input[type="number"]::-webkit-inner-spin-button,
.trial-sheet-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0;
}

.trial-sheet-input[type="number"] {
  -moz-appearance: textfield;
}

/* Country dropdown — only `.menu-select` consumer in markup. */
select.menu-select {
  width: 100%;
  padding: 12px 36px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: calc(15px * var(--font-scale));
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  text-align: left !important;
  direction: ltr !important;
  unicode-bidi: isolate !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ccc' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Strong anchor via `#app` (same element as `.phone-shell`) for menu / sheet fields. */
#app textarea,
#app select:not([multiple]),
#app input[type="text"],
#app input[type="number"],
#app input[type="search"] {
  text-align: left !important;
  unicode-bidi: isolate !important;
  direction: ltr !important;
}

.menu-myspace-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.menu-myspace-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  overflow: visible;
}

.menu-pill--grow {
  flex: 1 1 0;
  min-width: 0;
}

.choices-subtext {
  font-size: calc(13px * var(--font-scale));
  line-height: 1.42;
}

.choices-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.choices-apply.menu-half-btn {
  flex: 1 1 auto;
  min-height: 44px;
}

.choices-reset.menu-pill {
  flex: 0 0 auto;
  border-style: dashed;
  opacity: 0.92;
}

.choices-more-link.menu-block-btn {
  margin-bottom: 10px;
}

.choices-more-legal-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.choices-more-legal-row .menu-half-btn {
  flex: 1 1 0;
  margin: 0;
}

.chrome-icon-outline {
  display: block;
  vertical-align: middle;
  color: inherit;
  opacity: 0.93;
}

button .chrome-icon-outline {
  margin: auto;
}

.menu-pill {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
  font-size: calc(15px * var(--font-scale));
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-profile-wrap {
  position: relative;
  flex: 0 0 auto;
}

.menu-profile-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  font-family: inherit;
}

.menu-profile-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 160px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(22, 20, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.menu-profile-pop[hidden] {
  display: none !important;
}

.menu-profile-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 6px;
  border: none;
  background: none;
  color: #fff;
  font-size: calc(14px * var(--font-scale));
  cursor: pointer;
  font-family: inherit;
}

.menu-profile-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 0;
}

.menu-profile-row {
  font-size: calc(13px * var(--font-scale));
  color: rgba(255, 255, 255, 0.75);
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
}

.menu-profile-meta {
  color: rgba(255, 255, 255, 0.45);
}

.menu-block-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
  font-size: calc(15px * var(--font-scale));
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-legal-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.menu-half-btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  font-size: calc(13px * var(--font-scale));
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-footer-copy {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: calc(11px * var(--font-scale));
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-sub-back {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-sub-text {
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
  line-height: 1.5;
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.menu-sub-text strong,
.menu-sub-text code {
  color: #fff;
  font-weight: 500;
}

/* ——— News-style vertical feed (one tab = one category) ——— */
.feed-panel {
  padding: 0 0 24px;
}

.feed-panel-title {
  margin: 8px 16px 12px;
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feed-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 16px 8px;
}

.feed-item {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feed-item.is-active {
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.feed-item-media {
  width: 100%;
  aspect-ratio: 400 / 560;
  max-height: min(52vh, 420px);
  background: #141414;
  overflow: hidden;
}

.feed-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-item-body {
  padding: 12px 14px 14px;
}

.feed-item-title {
  margin: 0;
  font-size: calc(17px * var(--font-scale) * var(--tablet-ui));
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.feed-item-sub {
  margin: 6px 0 0;
  font-size: calc(13px * var(--font-scale));
  color: rgba(255, 255, 255, 0.6);
}

.feed-item--trial .feed-item-body {
  padding-bottom: 16px;
}

/* ——— Single-image viewer ——— */
.feed-panel--viewer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
}

.feed-panel--empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.feed-panel--empty-dark {
  background: #08080a;
  min-height: 100%;
}

.feed-panel--empty-dark .empty-hint {
  color: rgba(255, 255, 255, 0.72);
  max-width: 320px;
}

.feed-panel--empty-viewer {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.feed-panel--trials-empty {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Howdoilook empty: same duotone as app chrome, full-bleed blur, no “text box” */
.howdoi-hero {
  position: relative;
  flex: 1;
  min-height: min(360px, 55dvh);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  color: #fff;
  touch-action: none;
  overflow: hidden;
  border-radius: 0;
}

.howdoi-hero-duotone {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--chrome-grad);
}

.howdoi-hero-blurlayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(44, 86, 190, 0.22) 0%, rgba(22, 42, 96, 0.26) 100%);
  backdrop-filter: blur(26px) saturate(1.12);
  -webkit-backdrop-filter: blur(26px) saturate(1.12);
}

.howdoi-hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 192px 22px 87px;
  gap: 18px;
}

.howdoi-quote {
  margin: 4px 0 0;
  max-width: 20em;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.howdoi-start-btn {
  width: min(360px, 96%);
  min-height: 72px;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  padding: 18px 22px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(12, 12, 16, 0.4);
  box-shadow: 0 0 0 2px var(--dt-indigo), 0 0 0 4px var(--dt-teal);
  -webkit-appearance: none;
  appearance: none;
}

.trials-empty-lead {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.trials-empty-boxes {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex: 1;
  min-height: 120px;
  align-items: stretch;
}

.trials-empty-box {
  flex: 1;
  min-width: 0;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.viewer-stage--empty {
  flex: 1;
  min-height: min(360px, 55dvh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  touch-action: none;
}

.feed-panel-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
  padding: 6px 14px 4px;
}

.feed-panel-badge--overlay {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 6;
  padding: 4px 10px;
  margin: 0;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
}

.viewer-trial-pending {
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 4;
  transform: translateX(-50%);
  max-width: 88%;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: calc(14px * var(--font-scale));
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  pointer-events: none;
}

.viewer-photo-zoom-host {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: auto;
  touch-action: none;
  background: #0a0a0c;
}
/* Shimmer only while a new URL is still loading (not on every tab swipe). */
.viewer-photo-zoom-host.viewer-photo--loading {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: shimmer-sweep 1.8s infinite linear;
}

.viewer-stage {
  position: relative;
  flex: 1;
  min-height: min(280px, 42dvh);
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #050508;
  border: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Position/size applied in JS (`applyViewerImageLayout`) — same math as LNutes-web `.bg > img` + `applyBgImageLayout` (no transform centering). */
.viewer-img {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: block;
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: none;
  transform: translateX(-50%);
  background: #0a0a0c;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto;
}

.viewer-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  max-width: 120px;
  z-index: 40;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

.viewer-hit--left {
  left: 0;
}

.viewer-hit--right {
  right: 0;
}

.viewer-hit:disabled {
  opacity: 0.18;
  cursor: default;
  pointer-events: none;
}

.app-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 120;
  max-width: min(88vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(12, 12, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.viewer-dots,
.viewer-floatCard-dots {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  pointer-events: none;
  margin-top: 6px;
}

.viewer-floatCard-dots {
  padding-top: 4px;
}

.viewer-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.viewer-dot.is-on {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.viewer-nextRail {
  position: absolute;
  left: 6px;
  right: 12px;
  bottom: calc(-10px + var(--bottom-stack-h));
  z-index: 45;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  pointer-events: auto;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  background: rgba(12, 12, 16, 0.14);
}

.viewer-nextRail--inCard {
  flex-shrink: 0;
}

.viewer-nextRail-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.viewer-nextRail-scroll::-webkit-scrollbar {
  display: none;
}

.viewer-nextRail--collapsed .viewer-nextRail-scroll {
  max-width: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.viewer-nextRail-btn {
  flex: 0 0 auto;
  width: 52px;
  height: 68px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: shimmer-sweep 1.4s infinite linear;
  box-shadow: none;
}
/* Once the image inside has loaded, the shimmer is hidden by the image covering it */

.viewer-nextRail-btn--current {
  border: 1px solid rgba(186, 168, 255, 0.65);
  box-shadow:
    0 0 0 1px rgba(124, 79, 224, 0.85),
    0 0 10px rgba(124, 79, 224, 0.45),
    inset 0 0 2px rgba(255, 255, 255, 0.25);
}

.viewer-nextRail-btn--fallback {
  display: grid;
  place-items: center;
}

.viewer-nextRail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.viewer-nextRail-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.72);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accordion: same outer box as every viewer card (left 12px / right 66px from base rule). Row + gap only — avoids per-card dock/fit-content clipping. */
.viewer-floatCard.viewer-floatCard--withAccordion {
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
}

.viewer-floatCard.viewer-floatCard--withAccordion .viewer-floatCard-accordionBtn {
  display: none !important;
}

.viewer-floatCard-accordionBtn {
  margin-left: -3mm;
  flex: 0 0 24px;
  width: 24px;
  min-height: 36px;
  align-self: stretch;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  touch-action: manipulation;
  padding: 0;
}

.viewer-floatCard-accordionBtn::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 14px;
  transform: translateX(-50%);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}

.viewer-floatCard-accordionBtn:focus-visible {
  outline: 2px solid rgba(128, 208, 255, 0.55);
  outline-offset: 1px;
}

.viewer-floatCard-accordionPanel {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Ensure JS `hidden` attribute always wins over panel display rule. */
.viewer-floatCard-accordionPanel[hidden] {
  display: none !important;
}

.viewer-floatCard--collapsed.viewer-floatCard--withAccordion {
  max-height: none;
  width: 30px;
  right: 14px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible;
}

.viewer-floatCard--collapsed.viewer-floatCard--withAccordion .viewer-floatCard-accordionBtn {
  width: 30px;
  min-height: 40px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 2px var(--dt-indigo),
    0 0 0 4px var(--dt-teal);
}

.viewer-floatCard--collapsed.viewer-floatCard--withAccordion .viewer-floatCard-accordionBtn::before {
  display: none;
}

.viewer-floatCard {
  position: absolute;
  left: 12px;
  right: 66px;
  bottom: calc(-6px + var(--bottom-stack-h));
  z-index: 46;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px 16px 14px;
  border-radius: 18px;
  background: rgba(12, 12, 16, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
  /* Exact match behavior with category bar: tint only, no backdrop blur. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-height: min(40vh, 280px);
  text-align: left !important;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.viewer-stage.viewer-stage--rail-open .viewer-floatCard {
  bottom: calc(76px + var(--bottom-stack-h));
}

.viewer-floatCard.viewer-floatCard--nodesc {
  max-height: min(22vh, 178px);
  padding-top: 4px;
  padding-bottom: 2px;
}

.viewer-floatCard.viewer-floatCard--nodesc .viewer-floatCard-footerRow {
  margin-top: 2px;
  padding-bottom: 6px;
}

.viewer-floatCard-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  text-align: left !important;
  direction: ltr;
}

/* Reference layout: title block, then description; icons only on .viewer-fabRail */
.viewer-floatCard-main.viewer-floatCard-main--ref {
  width: 100%;
  padding-top: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  gap: 0;
}

.viewer-ref-head {
  grid-row: 1;
  width: 100%;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#viewerStage .viewer-floatCard .viewer-ref-title {
  margin: 0;
  padding: 0;
  font-size: calc(17px * var(--font-scale) * var(--tablet-ui));
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #fff;
  text-align: left !important;
}

#viewerStage .viewer-floatCard .viewer-ref-title-name {
  font-weight: 500;
  background: var(--chrome-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

#viewerStage .viewer-floatCard .viewer-ref-title-sep {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.45);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.45);
  background: none;
}

/* Wardrobe feed: title one line + ellipsis */
#viewerStage.viewer-stage--wardrobe .viewer-floatCard .viewer-ref-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#viewerStage .viewer-floatCard .viewer-ref-title--combo {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

#viewerStage .viewer-floatCard .viewer-ref-title-desc {
  font-size: calc(14px * var(--font-scale) * var(--tablet-ui));
  font-weight: 400;
  line-height: 1.45;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
  letter-spacing: 0;
}

#viewerStage .viewer-floatCard .viewer-ref-title--combo.has-more:not(.is-expanded)::after {
  content: "...";
  position: absolute;
  right: 0;
  bottom: 0;
  padding-left: 10px;
  background: linear-gradient(90deg, rgba(12, 12, 16, 0) 0%, rgba(12, 12, 16, 0.38) 30%, rgba(12, 12, 16, 0.38) 100%);
}

#viewerStage .viewer-floatCard .viewer-ref-title--combo.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.viewer-meta-split {
  grid-row: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  margin-top: 14px;
  padding-top: 4px;
  padding-bottom: 2px;
  box-sizing: border-box;
  pointer-events: auto;
}

.viewer-meta-label {
  flex: 0 0 30%;
  min-width: 0;
  max-width: 30%;
  align-self: center;
  text-align: left;
}

.viewer-meta-brand {
  display: inline-block;
  max-width: 100%;
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.viewer-meta-brand.viewer-label-chip {
  margin: 0;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: calc(11px * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

#viewerStage .viewer-meta-brand.viewer-label-chip.is-active {
  background: rgba(109, 40, 217, 0.42) !important;
  border: 1.5px solid rgba(168, 140, 255, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.35),
    0 2px 10px rgba(109, 40, 217, 0.45) !important;
  color: #fff !important;
  font-weight: 650 !important;
  text-decoration: none;
}

.viewer-meta-label:empty {
  min-height: 1.15em;
}

.viewer-meta-cost {
  display: block;
  font-size: calc(12px * var(--font-scale));
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.viewer-meta-tags {
  flex: 0 0 70%;
  min-width: 0;
  max-width: 70%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.viewer-meta-tags .viewer-tags-bottom {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  padding: 3px 4px 4px 2px;
  margin: 0;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.viewer-meta-tags .viewer-tags-bottom::-webkit-scrollbar {
  display: none;
}

/* Flat chips — not heavy “pill boxes” beside copy */
.viewer-meta-tags .viewer-tag {
  flex-shrink: 0 !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  border-radius: 5px !important;
  padding: 3px 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

#viewerStage .viewer-meta-tags .viewer-tag.is-active {
  background: rgba(109, 40, 217, 0.42) !important;
  border: 1.5px solid rgba(168, 140, 255, 0.92) !important;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.35),
    0 2px 10px rgba(109, 40, 217, 0.45) !important;
  color: #fff !important;
  font-weight: 650 !important;
}

/* Tags: start at left of tag lane; scroll horizontally for overflow */
#viewerStage .viewer-meta-tags .viewer-tags-bottom {
  justify-content: flex-start !important;
  align-items: center !important;
  align-content: center !important;
  text-align: left !important;
  white-space: nowrap !important;
}

#viewerStage .viewer-meta-split {
  flex-direction: row !important;
}

.viewer-floatCard-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  position: relative;
  margin-top: 0;
  padding-top: 6px;
  pointer-events: auto;
  width: 100%;
  text-align: left !important;
}

.viewer-copy-col {
  flex: 1 1 auto;
  max-width: 100%;
  min-width: 0;
  position: relative;
}

.viewer-copy-col::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  border-radius: 999px;
  opacity: 0.36;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.45) 0%, rgba(37, 99, 235, 0.38) 45%, rgba(13, 148, 136, 0.4) 100%);
}

.viewer-copy-col--stack::after {
  display: none;
}

.viewer-copy-col--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  text-align: left !important;
  direction: ltr;
}

.viewer-reaction-zone {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: flex-end;
  vertical-align: bottom;
}

.viewer-fabRail .viewer-reaction-zone {
  position: relative;
}

.viewer-emoji-pop.viewer-reaction-strip {
  position: absolute;
  right: calc(100% + 12px);
  left: auto;
  bottom: 0;
  margin-bottom: 0;
  padding: 6px 8px;
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  max-width: min(92vw, 420px);
  border-radius: 16px;
  background: rgba(12, 14, 20, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 28;
  pointer-events: auto;
  display: flex;
}

.viewer-stage.viewer-stage--rail-open .viewer-emoji-pop.viewer-reaction-strip {
  bottom: 0;
}

.viewer-emoji-pop[hidden] {
  display: none !important;
}

.viewer-reaction-item {
  flex: 0 1 auto;
  min-width: 40px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  color: #fff;
  background: rgba(8, 10, 16, 0.38);
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.viewer-reaction-emoji {
  font-size: 20px;
  line-height: 1;
}

.viewer-reaction-ico {
  display: grid;
  place-items: center;
  line-height: 0;
}

.viewer-reaction-ico .chrome-icon-outline {
  width: 21px;
  height: 21px;
  color: rgba(255, 255, 255, 0.94);
}

.viewer-reaction-num {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

.viewer-reaction-item:active {
  background: rgba(79, 70, 229, 0.28);
  border-color: rgba(255, 255, 255, 0.32);
}

.viewer-floatCard .viewer-title--overlay {
  margin: 0;
  padding: 0;
  font-size: calc(14px * var(--font-scale) * var(--tablet-ui));
  line-height: 1.2;
  font-weight: 700;
  text-align: left !important;
  text-align-last: left !important;
  unicode-bidi: isolate;
  width: 100%;
  align-self: flex-start;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  text-overflow: clip;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.viewer-floatCard .viewer-title--overlay::-webkit-scrollbar {
  display: none;
}

.viewer-snippet-wrap {
  position: relative;
  margin-top: 4px;
  padding-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.viewer-snippet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  width: 100%;
  font-size: calc(11px * var(--font-scale));
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.32;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.viewer-snippet.is-expanded {
  -webkit-line-clamp: 3;
}

.viewer-snippet-more {
  position: absolute;
  right: 0;
  bottom: 0.08em; /* line 2, aligned with last line of clamped text */
  padding: 0;
  border: none;
  background: linear-gradient(90deg, rgba(12, 12, 16, 0) 0, rgba(12, 12, 16, 0.96) 10px);
  padding-left: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.32;
  white-space: nowrap;
  pointer-events: auto;
}

.viewer-tags {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.03em;
  margin-left: auto;
}

.viewer-try-rect {
  width: 100%;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(12, 12, 16, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
}

.chrome-outline-wrap--try-rect {
  width: 100%;
  height: auto;
  border-radius: 10px;
  align-items: stretch;
  justify-content: stretch;
}

.viewer-action-inner--try-bubble {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.viewer-action-inner--try-bubble.is-try-busy,
.viewer-action-inner--try-bubble:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.viewer-like-btn.is-liked,
.viewer-like-btn.is-active,
.viewer-like-btn[aria-pressed="true"] {
  color: #fff;
}

.viewer-mychoices-btn.is-active,
.viewer-mychoices-btn[aria-pressed="true"] {
  color: #fff;
}

.viewer-mychoices-btn[aria-pressed="true"] .chrome-icon-outline,
.viewer-mychoices-btn.is-active .chrome-icon-outline {
  filter: drop-shadow(0.85px 0 0 rgba(109, 40, 217, 0.84)) drop-shadow(1.6px 0 0 rgba(37, 99, 235, 0.62));
}

.viewer-like-btn .chrome-icon-like-filled {
  opacity: 1;
}



.viewer-like-btn[aria-pressed="true"] {
  text-shadow: 0 0 0 transparent;
}

.viewer-like-btn .chrome-icon-like-outline {
  opacity: 1;
}

.viewer-like-btn .chrome-icon-like-filled {
  opacity: 1;
  transform: scale(1.03);
  filter: drop-shadow(0.9px 0 0 rgba(109, 40, 217, 0.78)) drop-shadow(1.7px 0 0 rgba(37, 99, 235, 0.58));
}

.viewer-trial-pending-msg {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.viewer-trial-disclaimer {
  margin: 0;
  max-width: 280px;
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.viewer-trial-disclaimer--ready {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 88px;
  z-index: 4;
  pointer-events: none;
}

.viewer-trial-pending--failed .viewer-trial-pending-msg {
  color: #ffb4b4;
}

.menu-likes-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 42vh;
  overflow-y: auto;
}

.menu-like-row {
  display: grid;
  grid-template-columns: 48px 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-like-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
}

.menu-like-thumb--empty {
  display: block;
  min-height: 64px;
}

.menu-like-ico svg {
  width: 22px;
  height: 22px;
}

.likes-page-panel {
  min-height: 100%;
  padding: 8px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.likes-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.likes-page-row {
  display: grid;
  grid-template-columns: 52px 28px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.likes-page-row:active {
  background: rgba(255, 255, 255, 0.12);
}

.likes-page-empty {
  margin: 24px 8px;
  text-align: center;
  font-size: calc(14px * var(--font-scale));
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}

.menu-like-title {
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
}

/* Legacy — not used on Howdoilook anymore */
.viewer-buy-big {
  display: none;
}

.viewer-fabRail--trials .viewer-buy-compact {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
}

.viewer-fabRail {
  position: absolute;
  right: 14px;
  bottom: calc(82px + var(--bottom-stack-h));
  z-index: 47;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.viewer-rail-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

#viewerDescToggleBtn.viewer-action-inner {
  font-size: 0;
  line-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
}

#viewerDescToggleBtn.viewer-action-inner .chrome-icon-outline {
  width: 22px;
  height: 22px;
  display: block;
  color: rgba(255, 255, 255, 0.98);
}

.viewer-fabRail .chrome-outline-wrap--icon {
  width: 36px;
  height: 36px;
  max-width: 36px;
  border-radius: 999px;
}

.viewer-fabRail .chrome-outline-wrap--icon > .viewer-action-inner:not(.viewer-action-inner--rail),
.viewer-fabRail .chrome-outline-wrap--try > .viewer-action-inner {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.viewer-fabRail .chrome-outline-wrap--icon .viewer-action-inner--rail {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.viewer-fabRail .chrome-outline-wrap--icon {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

#viewerOwnedBtn.viewer-action-inner {
  font-size: 0;
  line-height: 0;
  display: grid;
  place-items: center;
}

#viewerOwnedBtn.viewer-action-inner .chrome-icon-outline {
  width: 21px;
  height: 21px;
}

.viewer-fabRail .chrome-outline-wrap--try {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.42)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

/* Try on: brighter ring so the bubble reads clearly over the photo */
.viewer-fabRail .chrome-outline-wrap--try::before {
  padding: 2px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(180, 200, 255, 0.55) 38%,
    rgba(140, 220, 210, 0.65) 100%
  );
}

.viewer-fabRail .chrome-outline-wrap--try > .viewer-action-inner {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.45);
}

.viewer-action-inner--rail {
  font-size: 16px;
}

.viewer-fabRail #viewerRailToggleInline.is-active,
.viewer-fabRail #viewerRailToggleInline[aria-expanded="true"],
.viewer-fabRail #viewerDescToggleBtn[aria-expanded="true"],
.viewer-fabRail #viewerEmojiBtn.is-active,
.viewer-fabRail #viewerEmojiBtn[aria-expanded="true"],
.viewer-fabRail #viewerOwnedBtn[aria-pressed="true"],
.viewer-fabRail #viewerLikeBtn.is-active,
.viewer-fabRail #viewerLikeBtn[aria-pressed="true"],
.viewer-fabRail #viewerMyChoicesBtn.is-active,
.viewer-fabRail #viewerMyChoicesBtn[aria-pressed="true"],
.viewer-fabRail .chrome-outline-wrap--icon > .viewer-action-inner:is(:active):not(#viewerRailToggleInline),
.viewer-fabRail #viewerWardrobeFabAddBtn.viewer-action-inner:is(:active),
.viewer-fabRail .chrome-outline-wrap--try > .viewer-action-inner:is(:active) {
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.42) 0%, rgba(13, 148, 136, 0.36) 100%) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
}

/* Like + My choices (on): violet–teal ring so active state survives fast viewer updates and busy backgrounds. */
.viewer-fabRail .chrome-outline-wrap--icon:has(#viewerLikeBtn.is-active)::before,
.viewer-fabRail .chrome-outline-wrap--icon:has(#viewerLikeBtn[aria-pressed="true"])::before,
.viewer-fabRail .chrome-outline-wrap--icon:has(#viewerMyChoicesBtn.is-active)::before,
.viewer-fabRail .chrome-outline-wrap--icon:has(#viewerMyChoicesBtn[aria-pressed="true"])::before {
  padding: 2px;
  background: linear-gradient(
    145deg,
    rgba(168, 140, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.42) 48%,
    rgba(45, 212, 191, 0.78) 100%
  );
}

.viewer-cardToggle {
  position: absolute;
  left: 4px;
  bottom: calc(19px + var(--bottom-stack-h));
  z-index: 47;
  width: 16px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(79, 70, 229, 0.32) 0%, rgba(13, 148, 136, 0.3) 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}


.viewer-stage.viewer-stage--rail-open .viewer-cardToggle {
  bottom: calc(101px + var(--bottom-stack-h));
}

.viewer-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.viewer-floatCard .viewer-title-row {
  justify-content: flex-start !important;
  text-align: left !important;
}

.viewer-tag {
  border: 1px solid rgba(128, 208, 255, 0.35);
  background: rgba(13, 18, 28, 0.26);
  color: rgba(222, 243, 255, 0.92);
  border-radius: 999px;
  padding: 3px 10px;
  min-height: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.15;
}

.viewer-tag.is-active {
  border-color: transparent;
  background: rgba(20, 18, 34, 0.76);
  box-shadow:
    0 0 0 2px var(--dt-indigo),
    0 0 0 4px var(--dt-teal),
    0 0 10px rgba(79, 70, 229, 0.45);
  color: #fff;
}
.viewer-floatCard.viewer-floatCard--hidden {
  transform: translateX(-104%);
  opacity: 0.08;
}

/* Hard overrides to ensure latest viewer UI always applies */
.viewer-fabRail {
  bottom: calc(82px + var(--bottom-stack-h)) !important;
  right: 14px !important;
  align-items: flex-end !important;
}

.viewer-floatCard {
  right: 66px !important;
  text-align: left !important;
  direction: ltr !important;
}

/* Legacy meta row (still used if reintroduced elsewhere) */
.viewer-floatCard-footerRow {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-bottom: 10px;
  width: 100%;
  text-align: left !important;
}

.viewer-brand-wrap {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 52%;
  text-align: left !important;
}

.viewer-brand-wrap .viewer-brand {
  display: inline-block;
  text-align: left !important;
  width: auto;
}

.viewer-tags-wrap {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  padding-bottom: 3px;
  text-align: right;
}

.viewer-tags-wrap .viewer-tags-bottom {
  justify-content: flex-end;
}

.viewer-brand-wrap::-webkit-scrollbar,
.viewer-tags-wrap::-webkit-scrollbar {
  display: none;
}

.viewer-brand {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.viewer-brand-placeholder {
  display: inline-block;
  min-width: 1px;
  opacity: 0;
  pointer-events: none;
}

.viewer-tags-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  white-space: nowrap;
  pointer-events: auto;
  padding: 2px 0 4px;
}

.viewer-actions-cluster {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.viewer-hint--overlay {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.viewer-meta {
  flex-shrink: 0;
  margin-top: 0;
  padding: 10px 14px 10px;
  background: #08080a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.viewer-meta-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.viewer-meta-main {
  flex: 1;
  min-width: 0;
}

.viewer-title {
  margin: 0;
  font-size: calc(19px * var(--font-scale) * var(--tablet-ui));
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.viewer-hint {
  margin: 10px 0 0;
  font-size: calc(11px * var(--font-scale));
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.35;
}

.try-btn--fab {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.05;
  display: grid;
  place-items: center;
  text-align: center;
  color: #101018;
  background-image: linear-gradient(#f2f2f8, #e4e4ec), var(--chrome-grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  touch-action: none;
}

.try-btn--fab:active {
  filter: brightness(0.94);
}

/* ── Viewer dots overlay ─────────────────────────────────────────────── */
.viewer-dots--overlay {
  position: absolute;
  bottom: calc(90px + var(--bottom-stack-h, 0px));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
  z-index: 20;
}

/* ── Choices panel redesign ──────────────────────────────────────────── */
.choices-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0 12px;
  margin: 0 0 14px;
}

.choices-search-icon { flex-shrink: 0; color: rgba(255,255,255,0.45); }

.choices-search-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  padding: 11px 0 !important;
}

/* --- Choices tab buttons (replaces old accordion) --- */
.choices-tab-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
}

.choices-tab {
  flex: 1;
  padding: 9px 0;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  font-size: calc(13px * var(--font-scale));
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.choices-tab.is-active {
  background: #7c4fe0;
  border-color: #7c4fe0;
  color: #fff;
}

.choices-tab-panel {
  padding: 4px 2px 8px;
}

.choices-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choices-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  font-size: calc(12px * var(--font-scale));
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.choices-chip.is-active {
  background: rgba(109, 40, 217, 0.45);
  border-color: rgba(168, 140, 255, 0.95);
  box-shadow: 0 0 12px rgba(109, 40, 217, 0.38);
  color: #fff;
  font-weight: 600;
}

.choices-chip:active { filter: brightness(1.15); }

.choices-cost-labels {
  display: flex;
  justify-content: space-between;
  font-size: calc(12px * var(--font-scale));
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
}

/* Dual-handle slider: two range inputs overlaid on the same track */
.choices-dual-slider {
  position: relative;
  height: 36px;
  margin: 4px 0 2px;
}
.choices-dual-slider input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
  outline: none;
}
/* Background track (full width, shown behind fill) */
.choices-dual-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.18);
  border-radius: 2px;
}
/* Coloured fill between min and max thumb */
.choices-dual-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #7c4fe0;
  border-radius: 2px;
  pointer-events: none;
}
/* Make thumbs interactive */
.choices-range--min,
.choices-range--max {
  pointer-events: none;
}
.choices-range--min::-webkit-slider-thumb,
.choices-range--max::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #7c4fe0;
  pointer-events: all;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.choices-range--min::-moz-range-thumb,
.choices-range--max::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #7c4fe0;
  pointer-events: all;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* "Because you chose" banner below category header */
.forme-choices-banner {
  text-align: center;
  font-size: calc(11px * var(--font-scale));
  color: rgba(255,255,255,0.55);
  padding: 2px 16px 4px;
  letter-spacing: 0.02em;
  font-style: italic;
}
