@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-thin.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/yekanbakh-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IranNastaliq";
  src: url("../fonts/irannastaliq.woff2") format("woff2"),
       url("../fonts/irannastaliq.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Custom Tavazo Yalda Scrollbars (No Raw Browser Default Scrollbars) */
html,
body {
  scrollbar-width: thin;
  scrollbar-color: #5f0e1f #efe8df;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html::-webkit-scrollbar-button,
body::-webkit-scrollbar-button,
.fth-game-root *::-webkit-scrollbar-button,
.fth-figma-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #efe8df;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #5f0e1f;
  border-radius: 999px;
  border: 2px solid #efe8df;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: #7c1429;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner {
  background: #efe8df;
}

/* Global scroll lock when fullscreen game or Hafez modal is open */
html.fth-scroll-locked,
body.fth-scroll-locked {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.fth-scroll-locked #wpadminbar {
  display: none !important;
}

.fth-portal-host {
  position: relative;
  width: 0 !important;
  height: 0 !important;
  z-index: 2147483000;
}

.fth-game-root,
.fth-game-root * {
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 234, 224, 0.5) rgba(255, 255, 255, 0.08);
}

.fth-game-root *::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.fth-game-root *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.fth-game-root *::-webkit-scrollbar-thumb {
  background: rgba(244, 234, 224, 0.48);
  border-radius: 999px;
  border: 1.5px solid transparent;
  background-clip: content-box;
}

.fth-game-root *::-webkit-scrollbar-thumb:hover {
  background: #f4eae0;
  border: 1px solid transparent;
  background-clip: content-box;
}

.fth-game-root {
  --fth-crimson: #5f0e1f;
  --fth-crimson-dark: #49050f;
  --fth-crimson-deep: #32040b;
  --fth-oat: #f4eae0;
  --fth-oat-hover: #ebe0d4;
  --fth-zinc-900: #18181b;
  --fth-zinc-800: #27272a;
  --fth-zinc-600: #52525b;
  --fth-zinc-300: #d4d4d8;
  --fth-zinc-200: #e4e4e7;
  --fth-zinc-100: #f4f4f5;
  --fth-gold: #efce9b;
  --fth-emerald: #1f6b4b;

  font-family: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #ffffff;
  width: 100%;
  box-sizing: border-box;
}

.fth-game-root[data-game-lang="fa"] {
  font-family: "IRANSansX", "YekanBakh", Tahoma, system-ui, sans-serif;
}

.fth-game-root *,
.fth-game-root *::before,
.fth-game-root *::after {
  box-sizing: border-box;
}

.fth-game-root [hidden] {
  display: none !important;
}

/* =========================================================
   FIGMA DOUBLE BANNER SECTION (Desktop + Tablet + Stacked Mobile)
   ========================================================= */
.fth-banner-section {
  width: 100%;
  background: linear-gradient(90deg, #460305 0%, #4b0d0c 50%, #511813 100%);
}

.fth-banner-desktop {
  display: block;
  width: 100%;
  background: linear-gradient(90deg, #460305 0%, #4b0d0c 50%, #511813 100%);
  overflow: hidden;
}

.fth-banner-desktop-inner {
  position: relative;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 1440 / 363;
  container-type: inline-size;
  overflow: hidden;
}

.fth-banner-desktop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
}

@media (min-width: 1441px) {
  .fth-banner-desktop-img {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  }
}

.fth-banner-col {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: 0;
}

/* Anchored strictly inside the empty velvet zones of Figma node 425:20394 (1440x363) */
.fth-banner-col--hafez {
  left: 22.6%;
  width: 26.15%;
}

.fth-banner-col--game {
  left: 72.2%;
  width: 24%;
}

.fth-game-root[dir="ltr"] .fth-banner-col {
  align-items: flex-end;
  text-align: right;
}

.fth-game-root[dir="ltr"] .fth-banner-col--hafez,
html[dir="ltr"] .fth-game-root .fth-banner-col--hafez {
  left: 26.8%;
  width: 22.8%;
}

.fth-game-root[dir="ltr"] .fth-banner-col--game,
html[dir="ltr"] .fth-game-root .fth-banner-col--game {
  left: 76.2%;
  width: 21.8%;
}

.fth-banner-title {
  margin: 0;
  font-size: clamp(16px, 1.67cqw, 24px);
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
}

.fth-banner-desc {
  margin: 0;
  font-size: clamp(12px, 1.18cqw, 17px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--fth-zinc-300);
  white-space: pre-line;
}

.fth-pill-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(104px, 9.17cqw, 132px);
  height: clamp(28px, 2.22cqw, 32px);
  padding: 0 20px;
  margin-top: clamp(10px, 1.11cqw, 16px);
  border: 0;
  border-radius: 200px;
  background: var(--fth-oat);
  color: var(--fth-zinc-800);
  font-family: inherit;
  font-size: clamp(12px, 0.98cqw, 14px);
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.fth-pill-cta:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.fth-pill-cta:active {
  transform: scale(0.98);
}

.fth-banner-mobile {
  display: none;
}

@media (max-width: 1023px) {
  .fth-banner-desktop {
    display: none;
  }

  .fth-banner-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #460305;
  }

  .fth-mob-card {
    position: relative;
    width: 100%;
    min-height: 196px;
    background-color: #460305;
    overflow: hidden;
    container-type: inline-size;
  }

  .fth-mob-card--hafez {
    aspect-ratio: 1774 / 887;
  }

  .fth-mob-card--game {
    aspect-ratio: 395 / 197;
  }

  .fth-mob-bg-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .fth-mob-bg-img {
    position: absolute;
    max-width: none;
    pointer-events: none;
    user-select: none;
  }

  /* Exact Figma 642:14951 image crop offsets */
  .fth-mob-bg-img--hafez {
    height: 100%;
    left: -1.08%;
    top: 0;
    width: 102.65%;
    object-fit: cover;
    object-position: left center;
  }

  .fth-mob-bg-img--game {
    height: 107.47%;
    left: -19.55%;
    top: -5.84%;
    width: 119.52%;
    object-fit: cover;
    object-position: left center;
  }

  /* Text stays anchored on right half (44.5%..calc(100%-14px)) across both RTL & LTR */
  .fth-mob-card-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 44.5%;
    right: 16px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: start;
    gap: 2px;
    padding: 10px 0;
  }

  .fth-game-root[dir="ltr"] .fth-mob-card-content {
    left: 48%;
    right: 18px;
    align-items: flex-end;
    text-align: right;
    gap: 4px;
  }

  .fth-mob-card-title {
    margin: 0;
    font-size: clamp(15px, 4.4cqw, 18px);
    font-weight: 700;
    line-height: 1.45;
    color: #ffffff;
  }

  .fth-mob-card-desc {
    margin: 0;
    font-size: clamp(11px, 3.05cqw, 12.6px);
    font-weight: 400;
    line-height: 1.35;
    color: var(--fth-zinc-300);
    white-space: pre-line;
  }

  .fth-pill-cta--mob {
    min-width: 132px;
    height: 32px;
    padding: 0 20px;
    font-size: 13.5px;
    margin-top: clamp(8px, 3.2cqw, 14px);
  }

  /* LTR (EN/DE): prevent left-aligned copy & CTA from overlapping artwork or clipping vertically */
  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card {
    display: flex;
    align-items: center;
    aspect-ratio: auto;
    min-height: clamp(206px, 50vw, 250px);
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-bg-img--hafez {
    left: -6%;
    width: 107%;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-bg-img--game {
    left: -25.5%;
    width: 126%;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(70, 3, 5, 0) 41%, rgba(70, 3, 5, 0.72) 52%, rgba(70, 3, 5, 0.92) 64%);
    pointer-events: none;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card-content {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 2;
    width: 100%;
    padding: 18px 16px 18px 49.5%;
    align-items: flex-end;
    text-align: right;
    gap: 4px;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card-title {
    font-size: clamp(14.5px, 3.9cqw, 18px);
    line-height: 1.32;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card-desc {
    font-size: clamp(11px, 2.8cqw, 13px);
    line-height: 1.38;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-pill-cta--mob {
    min-width: 118px;
    height: 32px;
    padding: 0 18px;
    font-size: 13px;
    margin-top: 10px;
  }
}

@media (min-width: 680px) and (max-width: 1023px) {
  .fth-banner-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .fth-mob-card:first-child {
    border-inline-end: 1px solid rgba(239, 206, 155, 0.16);
  }

  .fth-mob-card-content {
    left: 43%;
    right: 14px;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card {
    min-height: clamp(204px, 27vw, 250px);
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card-content {
    left: auto;
    right: auto;
    padding: 16px 14px 16px 48.5%;
  }
}

@media (max-width: 365px) {
  .fth-mob-card {
    aspect-ratio: auto;
    min-height: 192px;
  }

  .fth-mob-card-content {
    left: 43%;
    right: 12px;
  }

  :is(.fth-game-root[dir="ltr"], html[dir="ltr"] .fth-game-root) .fth-mob-card-content {
    left: auto;
    right: auto;
    padding: 16px 12px 16px 47.5%;
  }

  .fth-mob-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(70, 3, 5, 0) 36%, rgba(70, 3, 5, 0.72) 56%, rgba(70, 3, 5, 0.9) 100%);
    pointer-events: none;
  }
}

/* =========================================================
   FULLSCREEN YALDA OVERLAY (Desktop Sidebar + Mobile Game HUD)
   ========================================================= */
.fth-fullscreen-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: radial-gradient(circle at 50% 42%, #650e20 0%, #3d0511 64%, #1f0208 100%);
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Festive Yalda Ambient Gold & Ruby Bokeh */
.fth-yalda-ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.fth-bokeh {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 206, 155, 0.24) 0%, rgba(239, 206, 155, 0) 70%);
  opacity: 0.42;
  animation: fth-bokeh-float 9s ease-in-out infinite;
}

.fth-bokeh--1 { width: 160px; height: 160px; top: -40px; left: 8%; animation-delay: 0s; }
.fth-bokeh--2 { width: 220px; height: 220px; bottom: -60px; right: 12%; background: radial-gradient(circle, rgba(168, 25, 49, 0.36) 0%, rgba(168, 25, 49, 0) 72%); animation-delay: -2.2s; }
.fth-bokeh--3 { width: 110px; height: 110px; top: 18%; right: 24%; animation-delay: -4.1s; }
.fth-bokeh--4 { width: 130px; height: 130px; bottom: 22%; left: 16%; animation-delay: -5.8s; }
.fth-bokeh--5 { width: 84px; height: 84px; top: 44%; left: 4%; background: radial-gradient(circle, rgba(253, 231, 194, 0.2) 0%, transparent 70%); animation-delay: -1.4s; }
.fth-bokeh--6 { width: 96px; height: 96px; top: 12%; left: 52%; animation-delay: -6.9s; }

@keyframes fth-bokeh-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.32; }
  50% { transform: translate3d(10px, -12px, 0) scale(1.1); opacity: 0.56; }
}

.fth-fullscreen-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.fth-fullscreen-overlay.is-landscape-rotated .fth-fullscreen-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

.fth-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2147483050 !important;
}

/* Main Desktop Split Shell */
.fth-main-layout {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding: 0;
  gap: 0;
}

/* Always-Visible Pure-Icon Yalda Rail (Side on Desktop/Landscape, Bottom on Portrait Tablet) */
.fth-sidebar {
  flex: 0 0 208px;
  width: 208px;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding:
    max(14px, env(safe-area-inset-top))
    12px
    max(14px, env(safe-area-inset-bottom))
    12px;
  border-radius: 0;
  background: linear-gradient(175deg, rgba(68, 8, 22, 0.97) 0%, rgba(26, 3, 8, 0.99) 100%);
  border-inline-end: 1.5px solid rgba(239, 206, 155, 0.34);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 240, 214, 0.14);
  backdrop-filter: blur(12px);
}

.fth-sidebar-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 248, 236, 0.08);
  border: 1px solid rgba(239, 206, 155, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 245, 225, 0.1);
}

.fth-sidebar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.fth-sidebar-head .fth-yalda-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fth-sidebar-instruction {
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(239, 206, 155, 0.18);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  color: #fdebd0;
  text-align: center;
}

.fth-yalda-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 5px rgba(73, 5, 15, 0.24));
}

.fth-progress-counter {
  font-size: 14px;
  font-weight: 900;
  color: #fde7c2;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.fth-mini-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.fth-mini-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #efce9b, #fff2d8);
  transition: width 0.3s ease;
}

.fth-sidebar-list-wrap {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  scrollbar-color: rgba(239, 206, 155, 0.48) rgba(255, 255, 255, 0.06);
}

.fth-sidebar-list-wrap::-webkit-scrollbar {
  width: 4px;
}

.fth-sidebar-list-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.fth-sidebar-list-wrap::-webkit-scrollbar-thumb {
  background: rgba(239, 206, 155, 0.48);
  border-radius: 999px;
}

.fth-sidebar-foot {
  flex: 0 0 auto;
  padding-top: 2px;
}

.fth-sidebar-gift-btn {
  width: 100%;
  height: 40px;
  padding: 0 10px !important;
  font-size: 13px !important;
  justify-content: center;
}

/* =========================================================
   HIGH-CONTRAST FLOATING CORNER HUD (Accessible for All Ages)
   ========================================================= */
.fth-floating-hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.fth-hud-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.fth-hud-end {
  margin-inline-start: auto;
}

.fth-hud-gift-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  border: 2px solid #fff9ee;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff6e6 0%, #efce9b 100%);
  color: #49050f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.56);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.fth-hud-gift-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.fth-zoom-group {
  display: inline-flex;
  align-items: center;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.96);
  border: 2px solid #efce9b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
  overflow: hidden;
  direction: ltr;
}

.fth-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #49050f;
  font-family: inherit;
  line-height: 1;
  min-width: 34px;
  height: 100%;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.fth-zoom-btn:hover {
  background: rgba(95, 14, 31, 0.1);
}

.fth-zoom-reset {
  border-inline: 1px solid rgba(95, 14, 31, 0.18);
  color: #49050f;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fth-zoom-reset.is-active {
  background: #5f0e1f;
  color: #fff8ec;
}

.fth-hud-glass-btn,
.fth-hud-close-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #efce9b;
  background: rgba(255, 248, 236, 0.96);
  color: #49050f;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(10px);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fth-hud-glass-btn:hover,
.fth-hud-close-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
  border-color: #fff3db;
}

.fth-hud-glass-btn.is-active {
  background: #5f0e1f;
  color: #fff8ec;
  border-color: #efce9b;
}

.fth-hud-glass-btn.is-muted {
  background: rgba(255, 248, 236, 0.72);
  color: #7c3b46;
  border-color: rgba(239, 206, 155, 0.65);
}

/* Explicit Desktop vs Mobile Zoom Visibility Rules */
.fth-fullscreen-overlay:not(.is-mobile-layout) .fth-mobile-zoom-btn {
  display: none !important;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-desktop-zoom-group {
  display: none !important;
}

.fth-zoom-badge {
  font-size: 11px;
  font-weight: 800;
  direction: ltr;
}

/* =========================================================
   COMPACT SETTINGS POPOVER (Sound, Language & Test Tools)
   ========================================================= */
.fth-settings-layer {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(16, 2, 6, 0.24);
}

.fth-settings-popover {
  position: absolute;
  top: max(52px, calc(env(safe-area-inset-top) + 46px));
  inset-inline-end: max(10px, env(safe-area-inset-right));
  width: min(278px, calc(100vw - 20px));
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--fth-zinc-900);
  border: 1px solid #e6d6c3;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.44);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fth-modal-in 0.18s ease-out;
}

.fth-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0e8df;
}

.fth-settings-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--fth-crimson-deep);
}

.fth-settings-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.fth-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fth-settings-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #3f3f46;
}

.fth-settings-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #d9cbb8;
  background: var(--fth-oat);
  color: var(--fth-crimson-deep);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fth-settings-sound-btn.is-muted {
  background: #f4f4f5;
  border-color: #e4e4e7;
  color: #71717a;
}

.fth-lang-switcher {
  display: inline-flex;
  height: 32px;
  padding: 3px;
  border-radius: 999px;
  background: #f5eee6;
  border: 1px solid #e3d6c5;
  direction: ltr;
}

.fth-lang-btn {
  border: 0;
  background: transparent;
  color: #52525b;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 0 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.fth-lang-btn.is-active {
  background: var(--fth-crimson);
  color: #ffffff;
}

.fth-settings-foot {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid #f0e8df;
}

.fth-settings-guide-btn {
  background: #fff6e8;
  border-color: #e4c391;
}

.fth-settings-tools-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e3d6c5;
  background: #faf6f1;
  color: var(--fth-crimson-deep);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.fth-settings-tools-btn:hover {
  background: #f2e8dc;
}

/* =========================================================
   CENTER SCENE STAGE (Maximized Viewport Fit)
   ========================================================= */
.fth-stage-wrap {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-stage-wrap {
  padding: 0;
}

.fth-scene-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 1.5px solid rgba(239, 206, 155, 0.32);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.54);
  background: #1a0409;
  cursor: crosshair;
  touch-action: none;
  flex-shrink: 0;
}

.fth-scene-viewport.is-zoomed {
  cursor: grab;
}

.fth-scene-viewport.is-zoomed:active {
  cursor: grabbing;
}

.fth-scene-viewport.is-rotated .fth-found-pin-tag {
  display: none;
}

.fth-scene-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 0.16s ease-out;
  will-change: transform;
}

.fth-scene-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.fth-scene-viewport.is-scene-loading .fth-scene-img {
  opacity: 0;
}

.fth-scene-loader {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: radial-gradient(circle at 50% 50%, rgba(61, 5, 17, 0.78) 0%, rgba(26, 4, 9, 0.94) 100%);
  color: #fdebd0;
  pointer-events: none;
}

.fth-scene-loader-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(239, 206, 155, 0.24);
  border-top-color: #efce9b;
  border-inline-end-color: rgba(255, 248, 236, 0.75);
  animation: fth-spin 0.8s linear infinite;
}

.fth-scene-loader-text {
  font-size: 13px;
  font-weight: 700;
  color: #fdebd0;
  text-align: center;
}

.fth-markers-layer,
.fth-effects-layer,
.fth-hitboxes-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Found item pin */
.fth-found-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.fth-found-pin-ring {
  display: block;
  width: clamp(28px, 3.2vw, 44px);
  height: clamp(28px, 3.2vw, 44px);
  border-radius: 50%;
  border: 2.5px solid var(--fth-oat);
  background: radial-gradient(circle, rgba(244, 234, 224, 0.26) 0%, rgba(244, 234, 224, 0) 70%);
  box-shadow: 0 0 14px rgba(244, 234, 224, 0.72);
  animation: fth-pop-in 0.35s cubic-bezier(0.22, 1.28, 0.36, 1);
}

.fth-found-pin-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1f6b4b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.fth-found-pin-tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.88);
  color: var(--fth-oat);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.16s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.fth-found-pin:hover .fth-found-pin-tag {
  opacity: 1;
}

@keyframes fth-pop-in {
  0% {
    transform: scale(0.35);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Tap burst / miss ripple */
.fth-click-fx {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.fth-click-fx.is-hit,
.fth-click-fx.is-pulse {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid var(--fth-oat);
  animation: fth-ripple-out 0.65s ease-out forwards;
}

.fth-click-fx.is-miss {
  color: #fca5a5;
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  animation: fth-miss-float 0.65s ease-out forwards;
}

@keyframes fth-ripple-out {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

@keyframes fth-miss-float {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -95%) scale(1.25);
    opacity: 0;
  }
}

/* Hitbox calibration debug boxes */
.fth-debug-box {
  position: absolute;
  border: 2px dashed #5ce69d;
  background: rgba(92, 230, 157, 0.16);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.fth-debug-box span {
  background: rgba(0, 0, 0, 0.8);
  color: #5ce69d;
  font-size: 10px;
  padding: 1px 4px;
  font-family: ui-monospace, monospace;
}

/* Floating Toast inside Scene */
.fth-toast {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100% - 28px);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(24, 24, 27, 0.9);
  color: #ffffff;
  border: 1px solid rgba(239, 206, 155, 0.35);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fth-toast.is-hit {
  background: rgba(31, 107, 75, 0.94);
  border-color: #9ce6bf;
}

.fth-toast.is-miss {
  background: rgba(95, 14, 31, 0.94);
  border-color: #fda4af;
}

/* =========================================================
   PURE-ICON OBJECT TILES (Zero Text, Crossed Out When Found)
   ========================================================= */
.fth-checklist {
  list-style: none;
  margin: auto 0;
  padding: 0;
  flex: 0 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.fth-item {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 48%, rgba(255, 245, 224, 0.2) 0%, rgba(255, 248, 236, 0.08) 58%, rgba(22, 2, 7, 0.28) 100%);
  border: 1.5px solid rgba(239, 206, 155, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 240, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.24);
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.fth-item-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fth-item-thumb.is-loading {
  background: linear-gradient(110deg, rgba(255, 245, 224, 0.04) 24%, rgba(239, 206, 155, 0.2) 50%, rgba(255, 245, 224, 0.04) 76%);
  background-size: 200% 100%;
  animation: fth-shimmer 1.25s ease-in-out infinite;
}

.fth-item-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  margin-left: -12px;
  border-radius: 50%;
  border: 2.5px solid rgba(239, 206, 155, 0.24);
  border-top-color: #efce9b;
  border-inline-end-color: rgba(255, 248, 236, 0.72);
  animation: fth-spin 0.78s linear infinite;
  pointer-events: none;
}

.fth-item-thumb.is-loaded .fth-item-loader,
.fth-item-thumb.is-error .fth-item-loader {
  display: none;
}

.fth-item-thumb img {
  width: 86%;
  height: 86%;
  max-width: 68px;
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}

.fth-item-thumb.is-loading img {
  opacity: 0;
  transform: scale(0.84);
}

.fth-item-thumb.is-loaded img {
  opacity: 1;
  transform: scale(1);
}

.fth-item.is-found {
  background: rgba(24, 92, 63, 0.42);
  border-color: rgba(134, 239, 172, 0.68);
}

.fth-item.is-found .fth-item-thumb img,
.fth-item.is-found .fth-item-thumb.is-loaded img {
  opacity: 0.42;
  filter: grayscale(0.25) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.fth-item-slash {
  position: absolute;
  top: 50%;
  left: 12%;
  right: 12%;
  height: 2.5px;
  border-radius: 999px;
  background: #efce9b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) rotate(-24deg);
  pointer-events: none;
}

.fth-item-check {
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #2d8a61;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.fth-item.just-found {
  animation: fth-row-pop 0.4s ease;
}

@keyframes fth-row-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* =========================================================
   FIGMA-STYLE CLEAN WHITE MODALS (Prize, Hafez & Tools)
   ========================================================= */
.fth-modal-backdrop,
.fth-tools-backdrop,
.fth-hafez-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483020;
  background: rgba(15, 3, 6, 0.74);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fth-modal-backdrop:not(.is-backdrop-guarded) {
  cursor: pointer;
}

.fth-modal-backdrop.is-backdrop-guarded {
  cursor: default;
}

.fth-modal-backdrop > * {
  cursor: auto;
}

.fth-fullscreen-shell .fth-modal-backdrop,
.fth-fullscreen-shell .fth-tools-backdrop {
  position: absolute;
}

.fth-figma-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  padding: 0;
  background: #ffffff;
  color: var(--fth-zinc-900);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.46);
  animation: fth-modal-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.fth-figma-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 6px 8px 10px 8px;
  padding: 8px 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 14, 31, 0.55) #f4eae0;
}

.fth-modal-scroll-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fth-modal-scroll-wrap .fth-figma-scroll {
  margin: 4px 0 8px;
  padding: 8px 20px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.fth-modal-scroll-wrap .fth-figma-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.fth-scroll-rail {
  position: absolute;
  top: 8px;
  bottom: 12px;
  inset-inline-end: 7px;
  width: 6px;
  border-radius: 999px;
  background: #efe3d4;
  box-shadow: inset 0 0 0 1px rgba(95, 14, 31, 0.12);
  pointer-events: none;
  z-index: 4;
}

.fth-scroll-thumb {
  display: block;
  width: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c1429 0%, #5f0e1f 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.05s linear;
}

.fth-scroll-cue {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid #efce9b;
  background: rgba(95, 14, 31, 0.94);
  color: #fff8ec;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
  animation: fth-cue-idle 2.2s ease-in-out infinite;
}

.fth-scroll-cue.is-first-bounce {
  background: linear-gradient(180deg, #fff5e2 0%, #efce9b 100%);
  color: #49050f;
  border-color: #5f0e1f;
  animation: fth-cue-bounce 0.72s ease-in-out 5;
}

.fth-scroll-cue-hand {
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

@keyframes fth-cue-idle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(2px); }
}

@keyframes fth-cue-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  45% { transform: translateX(-50%) translateY(-7px) scale(1.05); }
}

/* Simple Single-Line Validity Note Inside Prize Modal */
.fth-validity-note {
  margin: 0 auto 12px;
  padding: 9px 14px;
  border-radius: 12px;
  background: #faf5ef;
  border: 1px solid #eadcc9;
  font-size: 13px;
  font-weight: 700;
  color: var(--fth-crimson-deep);
}

.fth-figma-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.fth-figma-scroll::-webkit-scrollbar-track {
  background: #f4eae0;
  border-radius: 999px;
}

.fth-figma-scroll::-webkit-scrollbar-thumb {
  background: rgba(95, 14, 31, 0.72);
  border-radius: 999px;
}

.fth-figma-scroll::-webkit-scrollbar-thumb:hover {
  background: #5f0e1f;
}

@keyframes fth-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fth-figma-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--fth-zinc-200);
  margin: 0;
}

.fth-figma-head-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fth-figma-head-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--fth-zinc-900);
}

.fth-figma-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--fth-zinc-200);
  color: var(--fth-zinc-800);
}

.fth-figma-head-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--fth-crimson);
  background: var(--fth-oat);
  padding: 4px 10px;
  border-radius: 999px;
}

.fth-circle-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--fth-zinc-100);
  color: var(--fth-zinc-800);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.fth-circle-close:hover {
  background: var(--fth-zinc-200);
}

/* Figma Action Buttons */
.fth-figma-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.fth-figma-btn:active {
  transform: scale(0.98);
}

.fth-figma-btn--primary {
  background: var(--fth-crimson);
  color: #ffffff;
}

.fth-figma-btn--primary:hover {
  background: #480a16;
}

.fth-figma-btn--soft {
  background: var(--fth-oat);
  color: var(--fth-zinc-800);
}

.fth-figma-btn--soft:hover {
  background: var(--fth-oat-hover);
}

/* Hafez Fortune Modal (Figma Desktop 714:31865 & Mobile 716:32731) */
.fth-hafez-modal {
  max-width: 560px;
  width: 100%;
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  box-shadow:
    0 1px 1.5px rgba(0, 0, 0, 0.05),
    0 28px 64px rgba(0, 0, 0, 0.44);
}

.fth-hafez-grab {
  display: none;
}

.fth-hafez-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.fth-hafez-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fth-hafez-icon-pill {
  width: 40px;
  height: 39px;
  border: 0;
  border-radius: 200px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.fth-hafez-icon-pill:hover {
  background: #e9e9ec;
  transform: rotate(-6deg);
}

.fth-hafez-icon-pill.is-loading {
  cursor: progress;
  opacity: 0.72;
}

.fth-hafez-icon-pill.is-loading img {
  animation: fth-spin 0.9s linear infinite;
}

.fth-hafez-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #14201f;
}

.fth-hafez-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 100px;
  background: #f3f4f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.fth-hafez-close:hover {
  background: #e5e7eb;
}

.fth-hafez-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fth-hafez-card {
  position: relative;
  min-height: 300px;
  border-radius: 12px;
  background: #f7f7f7;
  border: 1px solid #e3e8ef;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 78px 20px 26px;
  text-align: center;
}

.fth-hafez-parchment {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
  pointer-events: none;
}

.fth-hafez-logo {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 40px;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

.fth-hafez-verse,
.fth-hafez-verse .fth-hafez-line {
  font-family: "IranNastaliq", "YekanBakh", serif;
  font-size: clamp(34px, 5.2vw, 42px);
  font-weight: 400;
}

.fth-hafez-verse {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  direction: rtl;
  margin: 0;
  width: 100%;
  color: #18181b;
}

.fth-hafez-verse.is-revealed {
  animation: fth-fal-reveal 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.fth-hafez-line {
  margin: 0;
  line-height: 1.5;
  direction: rtl;
}

.fth-hafez-loader {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 8px 4px;
}

.fth-hafez-loader-ring {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 248, 238, 0.92);
  border: 1.5px solid rgba(196, 139, 59, 0.38);
  box-shadow: 0 8px 20px rgba(90, 12, 23, 0.14);
}

.fth-hafez-loader-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #5a0c17;
  border-inline-end-color: #c48b3b;
  animation: fth-spin 0.85s linear infinite;
}

.fth-hafez-loader-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: fth-loader-pulse 1.25s ease-in-out infinite;
}

.fth-hafez-loader-title {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #5a0c17;
}

.fth-hafez-loader-sub {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #52525b;
}

.fth-hafez-loader-skel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(260px, 88%);
  margin-top: 4px;
}

.fth-hafez-loader-skel span {
  display: block;
  height: 12px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(196, 139, 59, 0.14) 25%, rgba(196, 139, 59, 0.32) 50%, rgba(196, 139, 59, 0.14) 75%);
  background-size: 200% 100%;
  animation: fth-shimmer 1.15s ease-in-out infinite;
}

.fth-hafez-loader-skel span:nth-child(2) {
  width: 82%;
}

.fth-hafez-loader-skel span:nth-child(3) {
  width: 68%;
}

.fth-hafez-share-block.is-loading {
  opacity: 0.48;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

@keyframes fth-fal-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   GAME ENTRY SPLASH LOADER (~1s smooth intro)
   ========================================================= */
.fth-game-loader {
  position: absolute;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 42%, #6d1024 0%, #440613 62%, #1d0207 100%);
  opacity: 1;
  transition: opacity 0.28s ease;
}

.fth-game-loader.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.fth-game-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 340px;
  width: 100%;
}

.fth-game-loader-ring {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 245, 228, 0.08);
  border: 2px solid rgba(239, 206, 155, 0.28);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.fth-game-loader-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #efce9b;
  border-inline-end-color: rgba(239, 206, 155, 0.55);
  animation: fth-spin 0.9s linear infinite;
}

.fth-game-loader-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: scale(1.25);
  animation: fth-loader-pulse 1.2s ease-in-out infinite;
}

.fth-game-loader-title {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 800;
  color: #fff6e6;
}

.fth-game-loader-sub {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(253, 235, 208, 0.84);
}

.fth-game-loader-bar {
  width: 210px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin-top: 4px;
}

.fth-game-loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #efce9b 0%, #fff3dc 100%);
  animation: fth-loader-fill 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fth-spin {
  to { transform: rotate(360deg); }
}

@keyframes fth-loader-pulse {
  0%, 100% { transform: scale(1.2); }
  50% { transform: scale(1.34); }
}

@keyframes fth-loader-fill {
  0% { width: 8%; }
  100% { width: 100%; }
}

.fth-fal-share-card {
  position: relative;
  width: 1200px;
  height: 1500px;
  background: linear-gradient(155deg, #fdf4ec 0%, #f4d9c8 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 84px 92px;
  box-sizing: border-box;
  font-family: "Quicksand", "IRANSansX", system-ui, sans-serif;
  color: #18181b;
}

.fth-fal-share-card[data-game-lang="fa"] {
  font-family: "IRANSansX", "YekanBakh", Tahoma, sans-serif;
}

.fth-fal-share-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  pointer-events: none;
}

.fth-fal-share-card__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 44px;
  border: 3px solid rgba(185, 124, 87, 0.55);
  background: rgba(255, 252, 248, 0.78);
  padding: 68px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-sizing: border-box;
}

.fth-fal-share-card__logo-row img {
  height: 92px;
  width: auto;
  display: block;
  object-fit: contain;
}

.fth-fal-share-card__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.fth-fal-share-card__title-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.fth-fal-share-card__title-svg svg {
  width: 280px;
  height: auto;
  display: block;
}

.fth-fal-share-card__poem {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 980px;
  direction: rtl;
}

.fth-fal-share-card__line {
  margin: 0;
  font-family: "IranNastaliq", "YekanBakh", serif;
  font-size: 78px;
  font-weight: 400;
  line-height: 1.5;
  color: #14201f;
  direction: rtl;
}

.fth-fal-share-card__footer {
  font-family: "Quicksand", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #5a0c17;
  opacity: 0.88;
}

.fth-hafez-share-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fth-hafez-divider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.fth-hafez-share-heading {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #52525c;
  white-space: nowrap;
}

.fth-hafez-divider-line {
  flex: 1 0 0;
  height: 1px;
  background: #f4f4f5;
}

.fth-hafez-share-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  gap: 10px 6px;
}

.fth-share-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.fth-share-circle {
  width: 52px;
  height: 52px;
  border-radius: 100px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.fth-share-item:hover .fth-share-circle {
  background: #e9e9ec;
  transform: translateY(-2px);
}

.fth-share-circle img {
  width: auto;
  height: auto;
  display: block;
}

.fth-share-label {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #71717b;
  white-space: nowrap;
}

.fth-share-item--mob {
  display: none;
}

.fth-hafez-copied-status {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--fth-emerald);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 5px 12px;
  margin-top: -8px;
}

@media (max-width: 639px) {
  .fth-hafez-backdrop {
    align-items: flex-end;
    padding: 12px 16px 16px;
  }

  .fth-hafez-modal {
    max-width: 440px;
    padding: 12px 16px 16px;
    border-radius: 16px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }

  .fth-hafez-grab {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 100px;
    background: #d0d2d2;
    box-shadow:
      inset 0.25px 0.25px 0.5px rgba(255, 255, 255, 0.7),
      inset -0.25px -0.25px 0.5px rgba(0, 0, 0, 0.25);
    margin: 0 auto 14px;
  }

  .fth-hafez-head {
    margin-bottom: 8px;
  }

  .fth-hafez-close {
    width: 28px;
    height: 28px;
    padding: 6px;
  }

  .fth-hafez-body {
    gap: 16px;
  }

  .fth-hafez-card {
    min-height: 280px;
    padding: 66px 16px 20px;
  }

  .fth-hafez-logo {
    top: 20px;
    width: 50px;
    height: 34px;
  }

  .fth-hafez-verse,
  .fth-hafez-verse .fth-hafez-line {
    font-size: clamp(28px, 6.8vw, 35px);
    line-height: 1.5;
  }

  .fth-share-item--desk {
    display: none;
  }

  .fth-share-item--mob {
    display: inline-flex;
  }

  .fth-share-circle {
    width: 48px;
    height: 48px;
  }
}

/* Confirmation Prize Modal — Figma Node 962:27794 */
.fth-figma-modal.fth-prize-modal {
  max-width: 540px;
  background: #f3e0cc;
  border-radius: 16px;
  padding: 0;
  box-shadow:
    0 1px 1.5px rgba(0, 0, 0, 0.05),
    0 28px 64px rgba(0, 0, 0, 0.48);
}

.fth-prize-modal-scroll {
  overflow-y: auto;
  max-height: calc(100dvh - 32px);
  padding: 16px;
}

.fth-figma962-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.fth-figma962-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.fth-figma962-stars {
  width: 48px;
  height: 48px;
  border-radius: 200px;
  background: #e5d7c4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fth-figma962-titles {
  flex: 1 1 0;
  min-width: 0;
  text-align: start;
}

.fth-figma962-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #14201f;
}

.fth-figma962-sub {
  margin: 2px 0 0;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.5;
  color: #666e6d;
}

.fth-figma962-close {
  width: 32px;
  height: 32px;
  border-radius: 100px;
  background: #e5d7c4;
  border: 1px solid #d9c9b1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.fth-figma962-close:hover {
  background: #dac8b0;
  transform: scale(1.04);
}

.fth-figma962-dashed {
  width: 100%;
  border: 2px dashed #d7cec4;
  border-radius: 8px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.fth-figma962-gift-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fth-figma962-gift-label {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #18181b;
}

.fth-figma962-gift-name {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #71717b;
}

.fth-figma962-code-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 302px;
}

.fth-figma962-ticket {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  background: #e5d7c4;
  border: 1px solid #d9c9b1;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 1px 1.5px rgba(44, 54, 53, 0.03);
}

.fth-figma962-ticket-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fth-figma962-code {
  background: transparent;
  padding: 0;
  font-family: "Quicksand", ui-monospace, Consolas, monospace;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: #52525c;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fth-figma962-copy {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: #e5d7c4;
  border: 1px solid #d9c9b1;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.fth-figma962-copy:hover {
  background: #dbc9b0;
}

.fth-figma962-copy:active {
  transform: scale(0.96);
}

.fth-figma962-copy.is-copied {
  background: #d7f3e3;
  border-color: #6bc497;
}

.fth-figma962-copy-toast {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fth-emerald);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 3px 12px;
}

.fth-figma962-err {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #7f1d1d;
}

.fth-figma962-rules {
  background: rgba(255, 250, 245, 0.78);
  border: 1px solid #d9c9b1;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #3f3f46;
  text-align: start;
}

.fth-figma962-rules ul {
  margin: 0 0 10px;
  padding-inline-start: 18px;
}

.fth-figma962-cart-link,
.fth-figma962-cart-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #5a0c17;
  background: transparent;
  color: #5a0c17;
  text-decoration: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.fth-figma962-cart-link:hover,
.fth-figma962-cart-link:focus-visible {
  background: #5a0c17;
  color: #ffffff;
  text-decoration: none;
}

.fth-figma962-cart-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  flex-shrink: 0;
  animation: fth-spin 0.72s linear infinite;
}

.fth-figma962-cart-link.is-loading {
  opacity: 0.85;
  pointer-events: none;
}

.fth-figma962-cart-link.is-loading .fth-figma962-cart-spinner {
  display: inline-block;
}

.fth-figma962-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: 48px;
}

.fth-figma962-btn {
  flex: 1 0 0;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.fth-figma962-btn:active {
  transform: scale(0.98);
}

.fth-figma962-btn--primary {
  background: #5a0c17;
  color: #ffffff;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
}

.fth-figma962-btn--primary:hover {
  background: #480912;
}

.fth-figma962-btn--soft {
  background: #efdac4;
  color: #52525c;
}

.fth-figma962-btn--soft:hover {
  background: #e5cdb4;
}

@media (max-width: 520px) {
  .fth-figma962-dashed {
    padding: 22px 14px;
  }

  .fth-figma962-sub {
    font-size: 14px;
  }

  .fth-figma962-actions {
    height: auto;
    flex-direction: row;
  }

  .fth-figma962-btn {
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Instant Prize Unlock Loading State inside Figma Card */
.fth-figma962-stars.is-spinning {
  position: relative;
}

.fth-figma962-stars.is-spinning::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #5a0c17;
  border-inline-end-color: rgba(90, 12, 23, 0.45);
  animation: fth-spin 0.85s linear infinite;
}

.fth-figma962-dashed--loading {
  gap: 14px;
  min-height: 156px;
}

.fth-prize-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #decbb7;
  border-top-color: #5a0c17;
  animation: fth-spin 0.8s linear infinite;
}

.fth-prize-skel-line {
  border-radius: 10px;
  background: linear-gradient(90deg, #e5d7c4 25%, #efe4d5 50%, #e5d7c4 75%);
  background-size: 200% 100%;
  animation: fth-shimmer 1.15s ease-in-out infinite;
}

.fth-prize-skel-line--sm {
  width: 140px;
  height: 16px;
}

.fth-prize-skel-line--ticket {
  width: min(280px, 100%);
  height: 48px;
}

@keyframes fth-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Legacy Congratulations classes preserved cleanly */
.fth-modal-inner {
  text-align: center;
}

.fth-prize-art {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  padding: 8px;
  border-radius: 18px;
  background: var(--fth-oat);
}

.fth-prize-art svg {
  width: 100%;
  height: 100%;
}

.fth-prize-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--fth-crimson);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
}

.fth-modal-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: var(--fth-zinc-900);
}

.fth-modal-subtitle {
  margin: 3px 0 10px;
  font-size: 13px;
  color: var(--fth-zinc-600);
}

.fth-gift-announcement {
  background: var(--fth-oat);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.fth-gift-label {
  display: block;
  font-size: 12px;
  color: var(--fth-zinc-600);
}

.fth-gift-name {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--fth-crimson);
  margin: 2px 0 4px;
}

.fth-gift-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--fth-zinc-800);
  line-height: 1.45;
}

.fth-voucher-box {
  background: #fafafa;
  border: 1.5px dashed var(--fth-crimson);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.fth-voucher-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fth-zinc-600);
  margin-bottom: 6px;
}

.fth-voucher-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fth-voucher-code {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--fth-zinc-900);
  color: var(--fth-oat);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  direction: ltr;
}

.fth-copy-btn {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--fth-crimson);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fth-copy-btn.is-copied {
  background: var(--fth-emerald);
}

.fth-terms-card {
  text-align: start;
  background: var(--fth-zinc-100);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fth-zinc-800);
  margin-bottom: 10px;
}

.fth-terms-card h4 {
  margin: 0 0 4px;
  font-size: 12.5px;
  color: var(--fth-zinc-900);
}

.fth-terms-card ul {
  margin: 0;
  padding-inline-start: 16px;
}

.fth-terms-card p {
  margin: 0;
}

.fth-out-of-stock-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.fth-sim-footnote {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--fth-zinc-600);
}

.fth-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.fth-modal-actions .fth-figma-btn {
  flex: 1 1 140px;
}

/* Tools Drawer */
.fth-tools-drawer {
  max-width: 440px;
  text-align: start;
}

.fth-tools-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--fth-zinc-200);
  padding: 14px 20px 12px;
  margin: 0;
}

.fth-tools-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--fth-zinc-900);
}

.fth-tools-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--fth-zinc-600);
}

.fth-tool-section {
  margin-bottom: 14px;
}

.fth-tool-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--fth-zinc-900);
}

.fth-stock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fth-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--fth-zinc-100);
  font-size: 12.5px;
}

.fth-stock-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fth-stock-input {
  width: 66px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #d4d4d8;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
}

.fth-radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.fth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.fth-coord-readout {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--fth-zinc-600);
}

.fth-coord-readout code {
  background: var(--fth-zinc-100);
  padding: 2px 6px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}

.fth-tool-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fth-tool-actions .fth-figma-btn {
  width: 100%;
}

/* =========================================================
   MOBILE & TABLET ALWAYS-VISIBLE PURE-ICON STRIP (.is-mobile-layout)
   ========================================================= */
.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar {
  flex: 0 0 144px;
  width: 144px;
  padding: 6px 6px;
  gap: 5px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-head {
  gap: 3px;
  padding: 5px 6px;
  border-radius: 10px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-top-row {
  gap: 4px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-head .fth-yalda-emblem svg {
  width: 15px;
  height: 15px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-progress-counter {
  font-size: 12px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-track {
  height: 3.5px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-instruction {
  padding-top: 4px;
  font-size: 10px;
  line-height: 1.32;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-list-wrap {
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-checklist--sidebar {
  height: 100%;
  max-height: 296px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-item {
  aspect-ratio: auto;
  height: 100%;
  padding: 4px;
  border-radius: 11px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-item-thumb img {
  width: 84%;
  height: 84%;
  max-width: 44px;
  max-height: 44px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-item-loader {
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border-width: 2px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-item-check {
  top: 2px;
  inset-inline-end: 2px;
  width: 14px;
  height: 14px;
  font-size: 8.5px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-sidebar-gift-btn {
  height: 32px;
  font-size: 11px !important;
  padding: 0 6px !important;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-floating-hud {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  gap: 6px;
}

.fth-fullscreen-overlay.is-mobile-layout .fth-hud-glass-btn,
.fth-fullscreen-overlay.is-mobile-layout .fth-hud-close-btn {
  width: 36px;
  height: 36px;
}

/* Portrait Tablet / Tall Rectangular Viewports: Bottom Horizontal 1x8 Icon Strip */
.fth-fullscreen-overlay.is-bottom-rail .fth-main-layout {
  flex-direction: column-reverse;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar {
  width: 100% !important;
  height: auto;
  flex: 0 0 auto !important;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 14px max(12px, env(safe-area-inset-bottom));
  gap: 8px;
  border-inline-end: 0;
  border-top: 1.5px solid rgba(239, 206, 155, 0.36);
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-head {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  gap: 12px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-top-row {
  width: auto;
  gap: 8px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-track {
  width: 84px;
  flex: 0 0 84px;
  height: 5px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-instruction {
  border-top: 0;
  padding-top: 0;
  font-size: 13px;
  margin-inline-start: auto;
  text-align: end;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-list-wrap {
  flex: 0 0 auto;
  overflow: hidden;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-checklist--sidebar {
  margin: 0;
  height: auto;
  max-height: none;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: none;
  gap: 8px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-item {
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 76px;
  padding: 5px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-item-thumb img {
  max-width: 54px;
  max-height: 54px;
}

.fth-fullscreen-overlay.is-bottom-rail .fth-sidebar-foot {
  padding-top: 0;
  align-self: center;
  min-width: 180px;
}

/* Unified Rotated Portrait-to-Landscape Mobile Mode */
.fth-fullscreen-overlay.is-landscape-rotated .fth-floating-hud {
  top: 8px;
  left: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-bottom));
}

.fth-fullscreen-overlay.is-landscape-rotated .fth-toast {
  top: 50px;
}

[dir="ltr"] .fth-fullscreen-overlay.is-landscape-rotated .fth-sidebar {
  padding-inline-start: max(10px, env(safe-area-inset-top));
}

[dir="rtl"] .fth-fullscreen-overlay.is-landscape-rotated .fth-sidebar {
  padding-inline-end: max(10px, env(safe-area-inset-top));
}

.fth-fullscreen-overlay.is-landscape-rotated .fth-settings-popover {
  top: 48px;
  inset-inline-end: max(12px, env(safe-area-inset-bottom));
  max-height: calc(100% - 58px);
  overflow-y: auto;
}

.fth-fullscreen-overlay.is-landscape-rotated .fth-modal-backdrop,
.fth-fullscreen-overlay.is-landscape-rotated .fth-tools-backdrop {
  padding: 10px max(12px, env(safe-area-inset-bottom)) 10px max(12px, env(safe-area-inset-top));
}

.fth-fullscreen-overlay.is-landscape-rotated .fth-figma-modal {
  max-height: calc(100% - 8px);
  max-width: 500px;
}

@media (max-height: 680px) {
  .fth-fullscreen-overlay:not(.is-mobile-layout) .fth-sidebar {
    gap: 7px;
    padding: 10px;
  }

  .fth-fullscreen-overlay:not(.is-mobile-layout) .fth-sidebar-head {
    padding: 8px 9px;
    gap: 5px;
  }

  .fth-fullscreen-overlay:not(.is-mobile-layout) .fth-checklist {
    gap: 6px;
  }

  .fth-fullscreen-overlay:not(.is-mobile-layout) .fth-item {
    padding: 5px;
    border-radius: 13px;
  }
}

.fth-scene-loader.is-failed .fth-scene-loader-spinner,
.fth-scene-retry[hidden] {
  display: none;
}

.fth-scene-retry {
  pointer-events: auto;
  padding: 0.5em 0.8em;
  cursor: pointer;
}
