/* ==========================================================================
   ۱. متغیرهای اصلی، پالت‌های رنگی و حالت شب/روز
   ========================================================================== */
:root {
  --violet: #a24dff;
  --soft: #c9a2ff;
  --rose: #ff5fa8;
  --violet2: #7a2fe0;
  --gold: #ffd36e;
  --vrgb: 162, 77, 255;
  --srgb: 201, 162, 255;
  --rrgb: 255, 95, 168;
  --v2rgb: 122, 47, 224;
  --gl: #1c0f3d;
  --h1: 270;
  --h2: 330;
  --text: #ebe4f7;
  --muted: #9a90b0;
  --line: rgba(var(--srgb), 0.18);
  --card: rgba(255, 255, 255, 0.045);
  --glow: 0 0 18px rgba(var(--vrgb), 0.5), 0 0 44px rgba(var(--vrgb), 0.2);
  --b1: #0b0719;
  --b2: #05030b;
  --vig: rgba(2, 1, 6, 0.72);
  --prgb: 10, 6, 22;
  --dlg: #0f0a1f;
  --dlg2: #1b1038;
  --dlgrgb: 15, 10, 31;
  --inp: rgba(0, 0, 0, 0.38);
  --ratec: #ffd0e6;
}

html[data-theme="orange"] {
  --violet: #ff8a1f;
  --soft: #ffc48a;
  --rose: #ff5a5f;
  --violet2: #d9640a;
  --vrgb: 255, 138, 31;
  --srgb: 255, 196, 138;
  --rrgb: 255, 90, 95;
  --v2rgb: 217, 100, 10;
  --gl: #3a1a08;
  --h1: 28;
  --h2: 355;
}

html[data-theme="green"] {
  --violet: #2fd47c;
  --soft: #9af0c0;
  --rose: #19c3c3;
  --violet2: #16965a;
  --vrgb: 47, 212, 124;
  --srgb: 154, 240, 192;
  --rrgb: 25, 195, 195;
  --v2rgb: 22, 150, 90;
  --gl: #0a2e1d;
  --h1: 150;
  --h2: 178;
}

html[data-theme="blue"] {
  --violet: #3a8bff;
  --soft: #9cc4ff;
  --rose: #38d6ff;
  --violet2: #2563eb;
  --vrgb: 58, 139, 255;
  --srgb: 156, 196, 255;
  --rrgb: 56, 214, 255;
  --v2rgb: 37, 99, 235;
  --gl: #0d1f45;
  --h1: 215;
  --h2: 190;
}

html[data-theme="red"] {
  --violet: #ff3b5c;
  --soft: #ffa0b0;
  --rose: #ff8a3d;
  --violet2: #c81e3c;
  --vrgb: 255, 59, 92;
  --srgb: 255, 160, 176;
  --rrgb: 255, 138, 61;
  --v2rgb: 200, 30, 60;
  --gl: #3a0a14;
  --h1: 350;
  --h2: 20;
}

html[data-mode="light"] {
  color-scheme: light;
  --text: #231a3a;
  --muted: #6a6080;
  --card: rgba(255, 255, 255, 0.78);
  --b1: #f8f4ff;
  --b2: #ece5f8;
  --vig: rgba(255, 255, 255, 0.5);
  --prgb: 255, 255, 255;
  --dlg: #ffffff;
  --dlg2: #efe9fa;
  --dlgrgb: 255, 255, 255;
  --inp: rgba(255, 255, 255, 0.92);
  --ratec: #c2185b;
  --srgb: var(--v2rgb);
  --soft: rgb(var(--v2rgb));
}

/* ==========================================================================
   ۲. تنظیمات پایه، ریست و اسکرول‌بار
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: var(--b2);
  -webkit-tap-highlight-color: transparent;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

a {
  color: var(--soft);
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  margin: 4px 0;
  border-radius: 999px;
  border: 1px solid rgba(var(--srgb), 0.16);
  background: rgba(7, 5, 13, 0.85);
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(7, 5, 13, 0.9);
  background: linear-gradient(180deg, var(--rose), var(--violet) 55%, var(--violet2));
  box-shadow: 0 0 10px rgba(var(--vrgb), 0.65);
}

::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.2);
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--violet) rgba(7, 5, 13, 0.9);
  }
}

/* ==========================================================================
   ۳. جلوه‌های پس‌زمینه (Background FX & Motes)
   ========================================================================== */
.bgfx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, var(--gl), transparent 70%),
    linear-gradient(180deg, var(--b1), var(--b2));
}

.bgfx::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(var(--v2rgb), 0.18),
    transparent 28%,
    rgba(var(--rrgb), 0.12),
    transparent 55%,
    rgba(58, 123, 255, 0.12),
    transparent 80%
  );
  filter: blur(50px);
  animation: spin 75s linear infinite;
}

.bgfx i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  transition: translate 0.9s ease-out;
  animation: dr 24s ease-in-out infinite alternate;
}

.bgfx i:nth-child(1) {
  width: 44vw;
  height: 44vw;
  background: var(--violet2);
  top: -12vw;
  right: -10vw;
}

.bgfx i:nth-child(2) {
  width: 36vw;
  height: 36vw;
  background: var(--rose);
  opacity: 0.15;
  bottom: -12vw;
  left: -8vw;
  animation-delay: -8s;
}

.bgfx i:nth-child(3) {
  width: 28vw;
  height: 28vw;
  background: #3a7bff;
  opacity: 0.12;
  top: 40%;
  left: 35%;
  animation-delay: -14s;
}

.bgfx::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, var(--vig) 100%);
}

html[data-mode="light"] .bgfx {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(var(--vrgb), 0.2), transparent 70%),
    linear-gradient(180deg, var(--b1), var(--b2));
}

html[data-mode="light"] .bgfx i {
  opacity: 0.2;
}

#mote {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.ss {
  position: fixed;
  width: 130px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, transparent, #fff);
  rotate: -35deg;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  animation: shoot 1.3s ease-out forwards;
}

@keyframes dr {
  to { transform: translate(5vw, 4vh) scale(1.12); }
}

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

@keyframes shoot {
  20% { opacity: 0.9; }
  to { opacity: 0; translate: -340px 240px; }
}

/* ==========================================================================
   ۴. ساختار کلی، هدر و ناوبری بالا
   ========================================================================== */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.4rem 3rem;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  gap: 0.6rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-taste {
  font-size: 0.82rem;
  padding: 0.22rem 0.85rem;
  border-color: rgba(var(--vrgb), 0.45);
  background: rgba(var(--vrgb), 0.12);
}

.gear {
  opacity: 0.35;
  transition: 0.3s;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
}

.gear:hover {
  opacity: 1;
}

.hero {
  text-align: center;
  padding: 1.3rem 0 1rem;
}

.hero > * {
  animation: rise 0.85s both;
}

.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }

.logo {
  display: block;
  width: 82px;
  height: 82px;
  margin: 0 auto 0.3rem;
  filter: drop-shadow(0 0 22px rgba(var(--vrgb), 0.6));
  animation: lf 6s ease-in-out infinite alternate;
}

@keyframes lf {
  to { transform: translateY(-7px); }
}

.kick {
  color: var(--rose);
  letter-spacing: 0.25em;
  font-size: 0.78rem;
}

.hero h1 {
  font-size: clamp(1.95rem, 4.4vw, 3.1rem);
  line-height: 1.35;
  margin: 0.15rem 0;
  background: linear-gradient(100deg, var(--rose), var(--violet) 35%, var(--soft) 55%, var(--rose) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sh 8s linear infinite;
  filter: drop-shadow(0 0 20px rgba(var(--vrgb), 0.45));
}

html[data-mode="light"] .hero h1 {
  filter: none;
}

@keyframes sh {
  to { background-position: -250% 0; }
}

.lead {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 500px;
  margin: 0 auto;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.stats span {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.12rem 0.78rem;
  font-size: 0.8rem;
  backdrop-filter: blur(6px);
}

/* ==========================================================================
   ۵. سرتیتر بخش‌ها، دکمه‌ها و کنترل‌های فرم
   ========================================================================== */
.sh-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 1.8rem 0 0.85rem;
  flex-wrap: wrap;
}

.sh {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.22rem;
  margin: 0;
  flex: 1;
  min-width: 180px;
}

section > .sh {
  margin: 1.8rem 0 0.85rem;
}

.sh::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.sh small {
  order: 3;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.m-select {
  width: auto;
  min-width: 165px;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--prgb), 0.85);
}

.chip,
.btn {
  font: inherit;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.chip:hover,
.btn:hover {
  border-color: var(--violet);
  box-shadow: 0 0 14px rgba(var(--vrgb), 0.4);
}

.chip:active,
.btn:active {
  transform: scale(0.95);
}

.chip.on,
.btn.pri {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  border-color: transparent;
  color: #fff;
}

.btn {
  padding: 0.42rem 1.2rem;
}

.btn.danger,
.chip.danger {
  border-color: #ff5f7a;
  color: #ff9aab;
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

input,
textarea,
select {
  font: inherit;
  color: var(--text);
  background: var(--inp);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.42rem 0.8rem;
  width: 100%;
  transition: 0.2s;
}

select option {
  background: var(--dlg);
  color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  border-color: var(--violet);
  box-shadow: 0 0 12px rgba(var(--vrgb), 0.38);
}

/* ==========================================================================
   ۶. اسلایدر افقی (تازه‌ها و برگزیده‌ها) با لبه‌های بلور و دکمه‌ی اسکرول
   ========================================================================== */
.showcase-sec {
  position: relative;
}

.rail-box {
  position: relative;
  margin: 0 -0.25rem;
}

.rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.4rem 0.3rem 1rem;
  scroll-padding-inline: 0.3rem;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail > .card {
  flex: 0 0 232px;
  width: 232px;
  scroll-snap-align: start;
}

/* لبه‌ی بلور: فقط وقتی در آن سمت محتوای بیشتری هست دیده می‌شود */
.rail-edge {
  position: absolute;
  top: 0.4rem;
  bottom: 1rem;
  width: 76px;
  z-index: 5;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.rail-edge.on {
  opacity: 1;
  visibility: visible;
}

.rail-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.rail-edge.r {
  right: 0;
}

.rail-edge.l {
  left: 0;
}

.rail-edge.r::before {
  background: linear-gradient(to left, rgba(var(--prgb), 0.78), transparent);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent);
  mask-image: linear-gradient(to left, #000 30%, transparent);
}

.rail-edge.l::before {
  background: linear-gradient(to right, rgba(var(--prgb), 0.78), transparent);
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent);
  mask-image: linear-gradient(to right, #000 30%, transparent);
}

.rail-btn {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(var(--srgb), 0.45);
  background: rgba(var(--prgb), 0.88);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 16px rgba(var(--vrgb), 0.35);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.rail-edge.on .rail-btn {
  pointer-events: auto;
}

.rail-btn:hover {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  border-color: transparent;
  color: #fff;
  transform: scale(1.08);
}

.rail-btn:active {
  transform: scale(0.94);
}

.rail-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- برترین‌های ماه ---- */
.m-select {
  width: auto;
  min-width: 150px;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--prgb), 0.85);
}

.mo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.spot {
  position: relative;
  isolation: isolate;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 110, 0.5);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 211, 110, 0.12);
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: linear-gradient(160deg, #2a1450, #0d0820);
  transition: transform 0.25s ease, box-shadow 0.3s;
}

.spot:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55), 0 0 36px rgba(255, 211, 110, 0.22);
}

.spot > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.spot .sp-ico {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: center;
  font-size: 4.4rem;
  opacity: 0.55;
}

.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 3, 11, 0) 22%, rgba(5, 3, 11, 0.94) 100%);
}

.sp-body {
  width: 100%;
  padding: 1.1rem 1.25rem 1.2rem;
}

.sp-crown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffe38a;
  border: 1px solid rgba(255, 211, 110, 0.6);
  background: rgba(40, 24, 4, 0.7);
  border-radius: 999px;
  padding: 0 0.7rem;
}

.sp-title {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0.4rem 0 0.1rem;
  color: #fff;
}

.sp-sub {
  font-size: 0.84rem;
  color: #d8cfea;
}

.sp-sum {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.8;
  color: #e8e0f5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-rate {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffd0e6;
}

.mo-grid.solo {
  grid-template-columns: minmax(0, 1fr);
}

.mo-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mo-row {
  display: grid;
  grid-template-columns: 30px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  flex: 1;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.mo-row:hover {
  border-color: var(--violet);
  transform: translateX(-3px);
  box-shadow: 0 0 18px rgba(var(--vrgb), 0.25);
}

.mo-rk {
  font-weight: 800;
  font-size: 1.1rem;
  text-align: center;
  color: var(--soft);
}

.mo-th {
  width: 68px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1450, #0d0820);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

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

.mo-tx {
  min-width: 0;
}

.mo-tx b {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mo-tx small {
  color: var(--muted);
  font-size: 0.74rem;
}

.mo-rt {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ratec);
  white-space: nowrap;
}

/* ==========================================================================
   ۷. نوار ابزار کلکسیون: جستجوی دوحالته، دسته‌ها و منوهای کشویی
   ========================================================================== */
.tools {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(var(--prgb), 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.q-row {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
  gap: 0.55rem;
}

.q-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.q-wrap input {
  padding-inline-end: 2.3rem;
}

.q-clear {
  position: absolute;
  inset-inline-end: 0.4rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(var(--srgb), 0.16);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  padding: 0;
}

.q-clear:hover {
  color: #fff;
  background: var(--rose);
}

.type-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.05rem 0.05rem 0.15rem;
  -webkit-overflow-scrolling: touch;
}

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

.type-row .chip {
  flex: none;
  white-space: nowrap;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.tools input,
.tools select {
  font-size: 0.86rem;
  padding: 0.42rem 0.75rem;
  border-radius: 11px;
  margin: 0;
  min-width: 0;
  text-overflow: ellipsis;
}

.tools select {
  appearance: none;
  -webkit-appearance: none;
  padding-left: 1.9rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%);
  background-position: 18px 55%, 13px 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.res-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 34px;
  margin: 0.7rem 0.1rem 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.res-line .chip {
  font-size: 0.78rem;
  padding: 0.08rem 0.7rem;
}

/* ==========================================================================
   ۸. کارت‌ها، گرید مَیسونری، صفحه‌بندی بلور ۱۰تایی و تایل‌های ذائقه
   ========================================================================== */
.mas {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.mas.na .card {
  animation: none;
}

.mas .col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-out, box-shadow 0.3s, border-color 0.3s;
  animation: rise 0.5s both;
  animation-delay: calc(var(--n, 0) * 40ms);
  outline: none;
}

.card:focus-visible {
  border-color: var(--violet);
  box-shadow: 0 0 0 2px rgba(var(--vrgb), 0.55);
}

.card:not(.nt) {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.card:not(.nt):hover {
  transform: perspective(900px) translateY(-4px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: var(--violet);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), var(--glow);
}

.card:not(.nt)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.14), transparent 55%);
}

.card:not(.nt):hover::before {
  opacity: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes imgIn {
  from {
    opacity: 0;
  }
}

/* ناحیه‌ی تصویر: نسبت ابعاد از روی w/h واقعی عکس محاسبه می‌شود، پس هیچ پرشی در چیدمان نداریم */
.im {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1450, #0d0820);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  flex: none;
}

.im::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
  background-size: 200% 100%;
  animation: phShimmer 2.2s linear infinite;
}

@keyframes phShimmer {
  to {
    background-position: -200% 0;
  }
}

.im img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: imgIn 0.45s ease both;
  transition: transform 0.5s ease;
}

.card:hover .im img {
  transform: scale(1.05);
}

.tag,
.rate,
.stt,
.nw,
.m-rank {
  position: absolute;
  z-index: 3;
  background: rgba(7, 5, 13, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.58rem;
  font-size: 0.7rem;
  line-height: 1.68;
  color: #ebe4f7;
}

.tag {
  top: 0.45rem;
  right: 0.45rem;
}

.rate {
  top: 0.45rem;
  left: 0.45rem;
  border-color: var(--rose);
  color: #ffd0e6;
  font-weight: 700;
}

.stt {
  bottom: 0.45rem;
  right: 0.45rem;
}

.nw {
  bottom: 0.45rem;
  left: 0.45rem;
  border-color: var(--gold);
  color: var(--gold);
}

.m-rank {
  bottom: 0.45rem;
  left: 0.45rem;
  font-weight: 700;
  border-color: var(--gold);
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 211, 110, 0.35), rgba(162, 77, 255, 0.55));
}

.meta {
  padding: 0.6rem 0.78rem 0.7rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.meta b {
  display: block;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta small {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-hit {
  font-size: 0.74rem;
  color: var(--soft);
  background: rgba(var(--vrgb), 0.11);
  border-right: 2px solid var(--violet);
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  margin-top: 0.3rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.story-hit mark {
  background: rgba(var(--rrgb), 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* ---- ادامه دادن: ۱۰ اثر، پیش‌نمایش بلور، دکمه ---- */
.more-wrap {
  position: relative;
  margin-top: 0.7rem;
}

.tz {
  display: grid;
  grid-template-columns: repeat(var(--tn, 5), minmax(0, 1fr));
  gap: 0.85rem;
  max-height: 180px;
  overflow: hidden;
  filter: blur(7px) saturate(1.15);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(180deg, #000 5%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 5%, transparent 92%);
}

.tz .card {
  animation: none;
  transform: none !important;
}

.more-ov {
  position: relative;
  z-index: 3;
  margin-top: -78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1rem 0.6rem;
  text-align: center;
}

.more-info {
  font-size: 0.8rem;
  color: var(--soft);
  background: rgba(var(--prgb), 0.88);
  border: 1px solid var(--line);
  padding: 0.12rem 0.85rem;
  border-radius: 999px;
}

.more-bar {
  display: block;
  width: min(220px, 70%);
  height: 4px;
  border-radius: 9px;
  background: rgba(var(--srgb), 0.18);
  overflow: hidden;
}

.more-bar b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  transition: width 0.4s ease;
}

.more-btn {
  font-size: 0.95rem;
  padding: 0.55rem 1.9rem;
  box-shadow: 0 8px 28px rgba(var(--vrgb), 0.5);
}

.empty .btn {
  margin-top: 0.7rem;
}

/* ---- تایل‌های «درباره‌ی ذائقه‌ی من» در صفحه‌ی اصلی ---- */
.tg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

.tc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  min-width: 0;
}

.tc h4 {
  color: var(--soft);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.tc .big {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.tc .big small {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.tc small {
  color: var(--muted);
}

.tp {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.18rem 0;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.tp:hover span {
  color: var(--soft);
}

.tp span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tp em {
  font-style: normal;
  color: var(--ratec);
  white-space: nowrap;
}

.gb {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.8rem;
  margin: 0.3rem 0;
}

.gb span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gb i {
  display: block;
  height: 8px;
  border-radius: 9px;
  background: rgba(var(--srgb), 0.14);
  overflow: hidden;
}

.gb i b {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  transform-origin: right;
  animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.gb em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.tcta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.tcta .btn {
  font-size: 0.95rem;
  padding: 0.5rem 1.6rem;
}

/* ==========================================================================
   ۱۰. یادداشت‌ها، دیالوگ سینمایی جزئیات و فوتر
   ========================================================================== */
.ngrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.nt {
  padding: 0.9rem 1rem;
}

.nt .who {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.45rem;
}

.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: var(--glow);
  color: #fff;
}

.who small {
  color: var(--muted);
  display: block;
  line-height: 1.3;
}

.nt h3 {
  font-size: 0.98rem;
  color: var(--soft);
}

.nt p {
  white-space: pre-wrap;
  margin: 0.2rem 0 0.3rem;
  font-size: 0.88rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2.8rem 0;
  width: 100%;
  grid-column: 1 / -1;
}

footer {
  text-align: center;
  color: var(--soft);
  opacity: 0.5;
  margin-top: 2.8rem;
  letter-spacing: 0.6em;
}

dialog {
  margin: auto;
  max-width: 740px;
  width: 92%;
  max-height: 92vh;
  overflow: auto;
  background: var(--dlg);
  color: var(--text);
  border: 1px solid var(--violet);
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 0 60px rgba(var(--vrgb), 0.5);
}

dialog[open] {
  animation: pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

dialog::backdrop {
  background: rgba(2, 1, 6, 0.82);
  backdrop-filter: blur(5px);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.95);
  }
}

.cine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.bgb {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.4);
  opacity: 0.6;
  transform: scale(1.2);
  z-index: -2;
}

.cine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--dlgrgb), 0.1), rgba(var(--dlgrgb), 0.92) 55%);
  z-index: -1;
}

.cine .mh {
  background: transparent;
  padding: 0.8rem 0.8rem 0;
}

.cine .mh img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.7);
}

.db {
  padding: 1rem 1.3rem 1.4rem;
}

.db h2 {
  font-size: 1.4rem;
  line-height: 1.45;
}

.db h4 {
  color: var(--soft);
  margin-top: 1rem;
}

.db p {
  white-space: pre-wrap;
}

.sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.rb {
  display: block;
  height: 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.4rem 0;
  overflow: hidden;
}

.rb b,
.pg b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  box-shadow: var(--glow);
  transform-origin: right;
  animation: grow 1s cubic-bezier(0.2, 0.8, 0.3, 1) 0.2s both;
}

@keyframes grow {
  from { transform: scaleX(0); }
}

.pg {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.3rem;
}

.pg i {
  flex: 1;
  height: 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.pg small {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.gen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0.45rem 0;
}

.gen span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.65rem;
  font-size: 0.76rem;
  color: var(--soft);
}

.acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.7rem 0;
}

.nvr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.x {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 5, 13, 0.75);
}

.sim {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.sm {
  display: block;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  color: var(--text);
  transition: 0.2s;
}

.sm:hover {
  border-color: var(--violet);
  transform: translateY(-3px);
}

.sm img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.sm .ph {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  font-size: 2rem;
  background: linear-gradient(160deg, #2a1450, #0d0820);
}

.sm b {
  display: block;
  font-size: 0.76rem;
  padding: 0.3rem 0.5rem;
  line-height: 1.4;
}

.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.rv.vis {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   ۱۱. انیمیشن اینترو (Intro SVG)
   ========================================================================== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  direction: ltr;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 80%, #2f1763, #0a0618 72%);
  transition: opacity 0.7s;
}

#intro.out {
  opacity: 0;
  pointer-events: none;
}

#intro svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 62% 78%;
  animation: cam 10s ease-in-out both;
}

#intro svg * {
  transform-box: fill-box;
}

.p1 { animation: pa 10s linear both; }
.p2 { animation: pb 10s linear both; }
.moon { animation: mo 6s ease-in-out infinite alternate; }
.walk { animation: wk 3.4s cubic-bezier(0.3, 0.6, 0.4, 1) both; }
.bob { animation: bb 0.283s ease-in-out 12; }
.lg { transform-origin: 50% 0; animation: sw 0.55s ease-in-out 6; }
.lg.b { animation-delay: -0.275s; }
.cape { transform-origin: 100% 0; animation: cp 0.55s ease-in-out 6; }
.arm { transform-origin: 50% 0; animation: ar 1s ease-out 3.6s both; }
.head { transform-origin: 50% 100%; animation: hd 1s ease 3.6s both; }
.ey { transform-origin: 50% 50%; animation: bl 3s infinite; }
.joy { animation: hp 0.45s ease-out 5.4s 2; }
.chest { transform-origin: 50% 100%; animation: wg 0.5s ease 3.9s; }
.lid { transform-origin: 100% 100%; animation: op 1.2s cubic-bezier(0.3, 1.6, 0.5, 1) 4.4s both; }
.gl { opacity: 0; animation: fi 1.2s ease-out 4.6s forwards; }
.ring { transform-origin: 50% 50%; opacity: 0; animation: rg 1.2s ease-out 4.6s both; }
.gem { opacity: 0; transform-origin: 50% 50%; animation: gu 2s cubic-bezier(0.2, 0.8, 0.3, 1) 5s forwards, fo 0.4s ease 6.8s forwards; }
.sp { transform-origin: 50% 50%; animation: spn 1s ease-in-out 5.4s 2; }
.ray { opacity: 0; animation: ry 1.6s ease-out 4.6s forwards; }
.ic { opacity: 0; transform-origin: 50% 50%; animation: fl 2.4s cubic-bezier(0.2, 0.8, 0.3, 1) var(--d) forwards, fo 0.4s ease 6.6s forwards; }
.st { animation: tw 3s ease-in-out infinite alternate; }
.ff { animation: ffl 4s ease-in-out infinite alternate; filter: drop-shadow(0 0 4px #ffd36e); }

.flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 24%, #fff, rgba(255, 211, 110, 0.7) 30%, transparent 65%);
  opacity: 0;
  animation: fh 1s ease-out 6.8s both;
}

.it {
  position: absolute;
  left: 0;
  right: 0;
  top: 4%;
  text-align: center;
  direction: rtl;
  opacity: 0;
  animation: tt 1.4s ease-out 7s forwards;
  pointer-events: none;
}

.it .lg2 {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 26px rgba(255, 211, 110, 0.55));
}

.it h2 {
  font-size: clamp(2rem, 7vw, 3.8rem);
  line-height: 1.5;
  background: linear-gradient(90deg, #ffd36e, var(--rose), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.it p {
  color: var(--soft);
}

#skip {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.75;
}

@keyframes cam { to { transform: scale(1.12); } }
@keyframes pa { to { transform: translateX(-30px); } }
@keyframes pb { to { transform: translateX(-80px); } }
@keyframes mo { to { opacity: 0.75; } }
@keyframes wk { from { transform: translateX(-140px); opacity: 0; } 8% { opacity: 1; } to { transform: translateX(410px); opacity: 1; } }
@keyframes bb { 50% { transform: translateY(-3px); } }
@keyframes sw { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-26deg); } 75% { transform: rotate(26deg); } }
@keyframes cp { 50% { transform: rotate(9deg) scaleX(1.1); } }
@keyframes ar { to { transform: rotate(-85deg); } }
@keyframes hd { to { transform: rotate(9deg); } }
@keyframes bl { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes hp { 50% { transform: translateY(-20px); } }
@keyframes wg { 20% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } 80% { transform: rotate(-2deg); } }
@keyframes op { to { transform: rotate(68deg); } }
@keyframes fi { to { opacity: 1; } }
@keyframes rg { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(7); } }
@keyframes gu { 0% { opacity: 1; transform: translateY(34px) scale(0.6); } 100% { opacity: 1; transform: translateY(-185px) scale(2.2); } }
@keyframes spn { 50% { transform: scaleX(0.08); } }
@keyframes fo { to { opacity: 0; } }
@keyframes ry { to { opacity: 0.65; } }
@keyframes fl { 0% { opacity: 0; transform: translate(0, 0) scale(0.2); } 15% { opacity: 1; } 100% { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); } }
@keyframes tw { from { opacity: 0.2; } to { opacity: 1; } }
@keyframes ffl { 0% { opacity: 0; transform: translate(0, 0); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -34px); } }
@keyframes fh { 25% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes tt { from { opacity: 0; transform: translateY(16px) scale(0.9); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

/* ==========================================================================
   ۱۲. پنل مدیریت (admin.html)
   ========================================================================== */
.adm {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.2rem;
  align-items: start;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(8px);
}

.panel h2 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.panel label {
  display: block;
  margin: 0.7rem 0 0.2rem;
  color: var(--soft);
  font-size: 0.9rem;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.drop {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 0.6rem;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
  background: rgba(0, 0, 0, 0.25);
}

.drop:hover,
.drop.ov {
  border-color: var(--violet);
  box-shadow: var(--glow);
}

.drop #ph {
  padding: 1.4rem 0.5rem;
  color: var(--muted);
}

.drop small {
  display: block;
  font-size: 0.75rem;
}

.drop img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
}

.tagbox {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--inp);
}

.tagbox input {
  border: 0;
  background: none;
  box-shadow: none !important;
  flex: 1;
  min-width: 110px;
  padding: 0.1rem 0.4rem;
}

.tagbox .chip {
  padding: 0 0.7rem;
  font-size: 0.8rem;
}

.sug {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.sug .chip {
  font-size: 0.75rem;
  padding: 0 0.6rem;
  opacity: 0.75;
}

.rr {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.rr input {
  padding: 0;
  flex: 1;
  accent-color: var(--violet);
}

.rr output {
  min-width: 90px;
  color: var(--ratec);
}

.chk {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.chk input {
  width: auto;
}

.cnt {
  float: left;
  color: var(--muted);
  font-size: 0.75rem;
}

.eb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--rose);
  background: rgba(var(--rrgb), 0.1);
  border-radius: 12px;
  padding: 0.3rem 0.8rem;
  margin: 0.5rem 0;
}

.sv {
  position: sticky;
  bottom: 0.6rem;
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(var(--prgb), 0.85);
  backdrop-filter: blur(10px);
}

#list {
  max-height: 72vh;
  overflow: auto;
  padding-left: 0.3rem;
}

.li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.li img,
.li .th {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
  background: var(--dlg2);
  display: grid;
  place-items: center;
}

.li .t {
  flex: 1;
  min-width: 0;
}

.li .t b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#msg {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dlg2);
  border: 1px solid var(--violet);
  box-shadow: var(--glow);
  border-radius: 999px;
  padding: 0.4rem 1.3rem;
  display: none;
  z-index: 200;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.panel .seg label {
  display: block;
  margin: 0;
  position: relative;
  cursor: pointer;
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.seg span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.9rem;
  font-size: 0.88rem;
  background: var(--card);
  transition: 0.2s;
}

.seg input:checked + span {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 14px rgba(var(--vrgb), 0.45);
}

.upbox {
  margin-top: 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--violet);
  border-radius: 14px;
  background: rgba(var(--prgb), 0.9);
  box-shadow: var(--glow);
}

.upt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 0.4rem;
  color: var(--soft);
}

.upt b {
  color: #fff;
  font-size: 0.9rem;
}

.upbar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.upbar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  transition: width 0.2s ease;
}

/* ==========================================================================
   ۱۳. انتخاب‌گر تم و موزیک‌پلیر (Mini & Expanded Player)
   ========================================================================== */
#thw {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 65;
}

#thb {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  background: rgba(var(--prgb), 0.85);
  backdrop-filter: blur(8px);
  box-shadow: var(--glow);
}

#thp {
  position: absolute;
  bottom: 3.2rem;
  left: 0;
  z-index: 30;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(var(--prgb), 0.94);
  backdrop-filter: blur(14px);
  box-shadow: var(--glow);
  animation: pop 0.25s both;
}

#thp .r {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--c);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 10px var(--c);
  transition: 0.2s;
}

.dot.on {
  border-color: var(--text);
  transform: scale(1.18);
}

/* موزیک‌پلیر */
body.hp {
  padding-bottom: 104px;
}

html.plx {
  overflow: hidden;
}

html.plx #thw {
  display: none;
}

#pl {
  position: fixed;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, 94vw);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 0 0.6rem 0.45rem;
  border: 1px solid var(--violet);
  border-radius: 18px;
  background: rgba(var(--prgb), 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--glow);
  direction: rtl;
  overflow: hidden;
  touch-action: none;
}

.grab {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 16px;
  cursor: pointer;
  flex: none;
}

.grab i {
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 9px;
  background: rgba(var(--srgb), 0.5);
  transition: width 0.25s, background 0.25s;
}

#pl:hover .grab i {
  width: 54px;
  background: var(--violet);
}

.plr {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.pcv {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  background: linear-gradient(160deg, #2a1450, #0d0820);
}

.pcv img,
.pxc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pt {
  flex: 1;
  min-width: 0;
  text-align: right;
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.pt b,
.pt small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pt b {
  font-size: 0.9rem;
  line-height: 1.5;
}

.pt small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.pc {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  direction: ltr;
  flex: none;
}

.chip.pb {
  min-width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 50%;
}

.chip.pp {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  border-color: transparent;
  color: #fff;
}

.chip.pb.on {
  background: linear-gradient(135deg, var(--violet), var(--rose));
  border-color: transparent;
  color: #fff;
}

.chv {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sk {
  position: relative;
  flex: 1;
  height: 26px;
  direction: ltr;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.sk::before,
.sk i {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 9px;
}

.sk::before {
  right: 0;
  background: rgba(var(--srgb), 0.2);
}

.sk .bf {
  width: var(--b, 0%);
  background: rgba(var(--srgb), 0.38);
}

.sk .pr {
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--violet), var(--rose));
  box-shadow: var(--glow);
}

.sk u {
  position: absolute;
  top: 50%;
  left: var(--p, 0%);
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px var(--violet);
  text-decoration: none;
}

.mk {
  height: 18px;
  flex: none;
  margin: 0 -0.2rem;
}

.mk::before,
.mk i {
  height: 3px;
  margin-top: -1.5px;
}

.mk u {
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  opacity: 0;
  transition: opacity 0.2s;
}

.mk:hover u {
  opacity: 1;
}

#pex {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: rgba(2, 1, 6, 0.6);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0s 0.35s;
}

#pex.on {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s;
}

.pxp {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(560px, 100%);
  height: 100dvh;
  max-height: 920px;
  display: flex;
  flex-direction: column;
  background: var(--dlg);
  color: var(--text);
  border: 1px solid var(--violet);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 0 60px rgba(var(--vrgb), 0.5);
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}

#pex.on .pxp {
  transform: none;
}

.pxbg {
  position: absolute;
  inset: -40px;
  z-index: -2;
  background-size: cover;
  background-position: center;
  filter: blur(38px) saturate(1.4);
  opacity: 0.6;
  transform: scale(1.2);
}

.pxp::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(var(--dlgrgb), 0.15), rgba(var(--dlgrgb), 0.92) 60%);
}

.pxh {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.8rem;
  color: var(--muted);
  font-size: 0.85rem;
  touch-action: none;
  cursor: grab;
}

.pxm {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.pxh [data-a="col"] .chv {
  transform: rotate(180deg);
}

.pxs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1.1rem 1.4rem;
}

.pxc {
  width: min(56vw, 250px, 32vh);
  aspect-ratio: 1;
  margin: 0.2rem auto 0.8rem;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 4rem;
  background: linear-gradient(160deg, #2a1450, #0d0820);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6), var(--glow);
}

.pxi {
  text-align: center;
  margin-bottom: 0.4rem;
}

.pxi h3 {
  font-size: 1.2rem;
  line-height: 1.5;
}

.pxi .pts {
  color: var(--muted);
  font-size: 0.85rem;
}

#vis {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0.2rem 0;
}

.skr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  direction: ltr;
  font-size: 0.8rem;
  color: var(--muted);
}

.skr span {
  flex: none;
  width: 3rem;
  text-align: center;
}

.pc.xl {
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  margin: 0.3rem 0;
}

.pc.xl .pp {
  width: 58px;
  height: 58px;
  font-size: 1.4rem;
}

.px2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  direction: ltr;
  margin: 0.3rem 0 0.8rem;
}

#vol {
  flex: 1;
  max-width: 170px;
  width: auto;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--violet);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.4rem 0;
}

.pls {
  display: flex;
  gap: 0.5rem;
  margin: 0.3rem 0 0.5rem;
}

#lyr {
  white-space: pre-wrap;
  line-height: 2;
  padding: 0.6rem 0.4rem;
  unicode-bidi: plaintext;
}

.tk {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  cursor: pointer;
  direction: rtl;
}

.tk:hover,
.tk.on {
  background: rgba(var(--vrgb), 0.2);
}

.tk img,
.tk .pth {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--dlg2);
}

.tk .pn {
  flex: none;
  width: 1.6rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.tk .tn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wv {
  display: none;
  flex: none;
  width: 1.6rem;
  height: 16px;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}

.wv i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(0deg, var(--violet), var(--rose));
  transform-origin: bottom;
  animation: wv 0.9s ease-in-out infinite alternate;
}

.wv i:nth-child(2) { animation-delay: -0.3s; }
.wv i:nth-child(3) { animation-delay: -0.6s; }

@keyframes wv {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

body.pplay .tk.on .wv {
  display: flex;
}

body.pplay .tk.on .pn {
  display: none;
}

/* ==========================================================================
   ۹. صفحه‌ی «اطلس ذائقه» (taste.php): سبک و روان، بدون انیمیشن بی‌پایان
   ========================================================================== */
.taste-hero {
  padding-bottom: 0.4rem;
}

.taste-hero .lead {
  max-width: 640px;
  line-height: 2;
}

.lead b {
  color: var(--soft);
}

.ptags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.ptags span {
  border: 1px solid rgba(var(--vrgb), 0.45);
  background: rgba(var(--vrgb), 0.12);
  border-radius: 999px;
  padding: 0.1rem 0.8rem;
  font-size: 0.8rem;
}

.t-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.t-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--violet), var(--rose));
}

.kpi-card span {
  font-size: 0.76rem;
  color: var(--muted);
}

.kpi-card strong {
  font-size: 1.7rem;
  line-height: 1.5;
  color: var(--text);
}

.kpi-card small {
  font-size: 0.72rem;
  color: var(--soft);
}

.t-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.t-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem 1.1rem;
  min-width: 0;
}

.t-panel.span2 {
  grid-column: 1 / -1;
}

.t-ph {
  margin-bottom: 0.7rem;
}

.t-ph h3 {
  font-size: 1.02rem;
  line-height: 1.6;
}

.t-ph small {
  color: var(--muted);
  font-size: 0.78rem;
}

.cv-box {
  position: relative;
  width: 100%;
  height: 300px;
}

.cv-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cv-box.sq {
  width: min(100%, 250px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
}

.cv-box.tl {
  height: 220px;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
}

.donut-center strong {
  font-size: 1.8rem;
  line-height: 1.3;
}

.donut-center small {
  color: var(--muted);
  font-size: 0.74rem;
}

.t-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.leg-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
}

.leg-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.leg-item em {
  font-style: normal;
  color: var(--ratec);
  min-width: 3.2rem;
  text-align: left;
}

.t-gbars {
  margin-top: 0.7rem;
}

.sub-h {
  margin: 1rem 0 0.2rem;
  color: var(--soft);
  font-size: 0.9rem;
}

/* هیستوگرام */
.hist {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0.35rem;
  height: 190px;
  align-items: end;
}

.h-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 0.25rem;
  text-align: center;
}

.h-val {
  font-size: 0.72rem;
  color: var(--soft);
  min-height: 1.1em;
}

.h-bar-w {
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.h-bar {
  display: block;
  width: 100%;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--rose), var(--violet));
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 45ms);
  box-shadow: 0 0 12px rgba(var(--vrgb), 0.35);
}

.vis .h-bar,
.hist.vis .h-bar {
  transform: scaleY(1);
}

.h-lbl {
  font-size: 0.68rem;
  color: var(--muted);
}

/* وضعیت تماشا */
.watch-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.ws-pill {
  border: 1px solid var(--line);
  background: rgba(var(--srgb), 0.06);
  border-radius: 14px;
  padding: 0.55rem 0.4rem;
  text-align: center;
}

.ws-pill b {
  display: block;
  font-size: 1.25rem;
}

.ws-pill small {
  color: var(--muted);
  font-size: 0.72rem;
}

.ep-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  margin: 0.45rem 0;
}

.ep-row i {
  display: block;
  height: 8px;
  border-radius: 9px;
  background: rgba(var(--srgb), 0.14);
  overflow: hidden;
}

.ep-row i b {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--violet), var(--rose));
  transform-origin: right;
  animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.ep-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

/* بینش‌های خودکار */
.ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}

.ins {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: rgba(var(--srgb), 0.05);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}

.ins > span {
  font-size: 1.5rem;
  line-height: 1.3;
}

.ins b {
  display: block;
  font-size: 0.88rem;
  color: var(--soft);
}

.ins small {
  color: var(--text);
  opacity: 0.85;
  font-size: 0.82rem;
  line-height: 1.8;
}

/* اثر هر ماه */
.mw-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
}

.mw-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(var(--srgb), 0.05);
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.mw-item:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
}

.mw-th {
  width: 62px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1450, #0d0820);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

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

.mw-tx {
  min-width: 0;
}

.mw-tx small {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
}

.mw-tx b {
  display: block;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-rt {
  color: var(--ratec);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.t-more {
  display: flex;
  justify-content: center;
  margin-top: 0.8rem;
}

/* تالار شاهکارها */
.hof-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.hof-card {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.3s;
}

.hof-card:hover {
  transform: translateY(-4px);
  border-color: var(--violet);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), var(--glow);
}

.hof-card img,
.hof-ph {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hof-ph {
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  background: linear-gradient(160deg, #2a1450, #0d0820);
}

.hof-rank {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  background: rgba(7, 5, 13, 0.82);
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.hof-meta {
  padding: 0.45rem 0.6rem 0.55rem;
}

.hof-meta b {
  display: block;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hof-meta small {
  color: var(--muted);
  font-size: 0.72rem;
}

/* ==========================================================================
   ۱۴. واکنش‌گرایی (موبایل، تبلت) و بهینه‌سازی سرعت
   ========================================================================== */
@media (max-width: 1000px) {
  .t-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hof-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .adm,
  .t-grid {
    grid-template-columns: 1fr;
  }

  .mo-grid {
    grid-template-columns: 1fr;
  }

  .spot {
    min-height: 280px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .wrap {
    padding: 0.6rem 0.75rem 2.6rem;
  }

  .hero {
    padding: 1rem 0 0.75rem;
  }

  .logo {
    width: 68px;
    height: 68px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6.6vw, 2.1rem);
  }

  .lead {
    font-size: 0.83rem;
  }

  .stats span {
    font-size: 0.73rem;
    padding: 0.08rem 0.58rem;
  }

  .sh-row {
    margin: 1.35rem 0 0.65rem;
    gap: 0.45rem;
  }

  .sh {
    font-size: 1.08rem;
    min-width: 0;
  }

  .m-select {
    min-width: 128px;
    font-size: 0.76rem;
    padding: 0.24rem 0.6rem;
  }

  /* اسلایدر: کارت و نیمه‌ی کارت بعدی دیده شود تا کاربر بفهمد می‌شود کشید */
  .rail {
    gap: 0.65rem;
    padding: 0.25rem 0.2rem 0.75rem;
  }

  .rail > .card {
    flex-basis: min(196px, 60vw);
    width: min(196px, 60vw);
  }

  .rail-edge {
    width: 52px;
  }

  .rail-btn {
    width: 36px;
    height: 36px;
  }

  .rail-btn svg {
    width: 19px;
    height: 19px;
  }

  /* نوار ابزار */
  .tools {
    padding: 0.6rem;
    border-radius: 14px;
    gap: 0.5rem;
  }

  .q-row {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0.4rem;
  }

  .filter-row {
    gap: 0.4rem;
  }

  .tools input,
  .tools select {
    font-size: 0.8rem;
    padding: 0.4rem 0.55rem;
  }

  .tools select {
    padding-left: 1.55rem;
    background-position: 14px 55%, 9px 55%;
  }

  /* کلکسیون ۲ ستونی */
  .mas,
  .mas .col {
    gap: 0.6rem;
  }

  .tz {
    gap: 0.6rem;
    max-height: 150px;
  }

  .card {
    border-radius: 13px;
  }

  .tag,
  .rate,
  .stt,
  .nw,
  .m-rank {
    font-size: 0.63rem;
    padding: 0 0.42rem;
    line-height: 1.55;
  }

  .meta {
    padding: 0.45rem 0.55rem 0.55rem;
  }

  .meta b {
    font-size: 0.82rem;
  }

  .meta small {
    font-size: 0.7rem;
  }

  .more-ov {
    margin-top: -70px;
  }

  .more-btn {
    width: 100%;
    max-width: 300px;
    font-size: 0.88rem;
  }

  .mo-row {
    grid-template-columns: 24px 58px minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.45rem 0.55rem;
  }

  .mo-th {
    width: 58px;
    height: 44px;
  }

  .sp-title {
    font-size: 1.2rem;
  }

  .spot {
    min-height: 250px;
  }

  .gb {
    grid-template-columns: 74px minmax(0, 1fr) auto;
  }

  /* صفحه‌ی ذائقه */
  .t-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .kpi-card strong {
    font-size: 1.45rem;
  }

  .t-panel {
    padding: 0.85rem 0.8rem 0.95rem;
    border-radius: 16px;
  }

  .cv-box {
    height: 270px;
  }

  .cv-box.tl {
    height: 190px;
  }

  .hof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .mw-list {
    grid-template-columns: 1fr;
  }

  .row2 {
    grid-template-columns: 1fr;
  }

  dialog {
    width: 95%;
    max-height: 88dvh;
    border-radius: 16px;
  }

  .db {
    padding: 0.8rem 0.95rem 1.1rem;
  }

  .acts .btn {
    flex: 1 1 auto;
    font-size: 0.82rem;
    padding: 0.35rem 0.8rem;
  }

  #pl {
    left: auto;
    right: 0.5rem;
    bottom: 1rem;
    width: min(640px, calc(100vw - 74px));
    transform: none;
  }

  .xb {
    display: none;
  }

  /* سبک‌سازی پس‌زمینه روی موبایل برای FPS بهتر */
  .bgfx::before {
    animation: none;
    filter: blur(40px);
  }

  .bgfx i {
    filter: blur(60px);
    animation: none;
  }

  .bgfx i:nth-child(3) {
    display: none;
  }
}

@media (max-width: 440px) {
  #pl [data-a="prev"] {
    display: none;
  }

  .q-row {
    grid-template-columns: 1fr;
  }

  .hist {
    gap: 0.2rem;
  }

  .h-lbl {
    font-size: 0.6rem;
  }

  .ep-row {
    grid-template-columns: 62px minmax(0, 1fr) auto;
  }
}

/* صفحه‌ی ذائقه: پس‌زمینه ثابت و ساده تا اسکرول و نمودارها روان بمانند */
.taste-page .bgfx::before {
  animation: none;
}

.taste-page .bgfx i {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01s !important;
    animation-delay: 0s !important;
    transition-duration: 0.01s !important;
    scroll-behavior: auto !important;
  }

  .card:not(.nt) {
    transform: none !important;
  }

  .rv {
    opacity: 1;
    transform: none;
  }

  .bgfx::before {
    animation: none;
  }

  .h-bar {
    transform: scaleY(1);
  }
}
/* ==========================================================================
   اصلاح: نمایش کامل تصویر (بدون برش) روی همه‌ی کارت‌ها و اثر ماه
   ========================================================================== */
.im {
  background-image: var(--bg, linear-gradient(160deg, #2a1450, #0d0820));
  background-size: cover;
  background-position: center;
}

.im::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(7, 5, 13, 0.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.im img {
  object-fit: contain;
}

.spot {
  display: block;
  min-height: 0;
  color: var(--text);
  background: var(--card);
}

.spot::after {
  display: none;
}

.sp-im {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg, linear-gradient(160deg, #2a1450, #0d0820)) center / cover;
}

.sp-im::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 13, 0.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.sp-im img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sp-im .sp-ico {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 4rem;
  opacity: 0.6;
}

.sp-im .sp-crown {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
}

.spot .sp-title {
  color: var(--text);
}

.spot .sp-sub {
  color: var(--muted);
}

.spot .sp-sum {
  color: var(--text);
  opacity: 0.85;
}

.spot .sp-rate {
  color: var(--ratec);
}

/* ==========================================================================
   اصلاح ۲: اسنپ کامل کارت‌ها در اسلایدر + ردیف‌های بزرگ‌تر برترین‌های ماه
   ========================================================================== */
.rail {
  scroll-snap-type: x mandatory;
}

.rail > .card {
  scroll-snap-align: start;
}

.mo-row {
  grid-template-columns: 128px minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.5rem;
}

.mo-th {
  position: relative;
  width: 128px;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg, linear-gradient(160deg, #2a1450, #0d0820)) center / cover;
}

.mo-th::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 13, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.mo-th img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mo-th em {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 1.8rem;
}

.mo-rk {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  z-index: 2;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(7, 5, 13, 0.85);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.8rem;
}

.mo-tx b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
}

.mo-tx small {
  display: block;
}

.mo-rt {
  background: rgba(var(--rrgb), 0.14);
  border: 1px solid var(--rose);
  border-radius: 999px;
  padding: 0 0.6rem;
  color: #ffd0e6;
}

@media (max-width: 720px) {
  .mo-row {
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 0.6rem;
  }

  .mo-th {
    width: 104px;
    height: auto;
  }
}

/* ==========================================================================
   اصلاح ۳: کارت بعد از اسکرول وسط بیاید و زیر سایه‌ی بلور لبه نیفتد
   ========================================================================== */
.rail {
  scroll-padding-inline-start: 76px;
}

@media (max-width: 720px) {
  .rail {
    scroll-padding-inline-start: 52px;
  }
}

/* ==========================================================================
   اصلاح ۴: رنگ پلیر از روی کاور، انیمیشن تعویض آهنگ، ژانرهای پلیر
   ========================================================================== */
#pl,
#pex {
  --pa: var(--violet);
  --pb: var(--rose);
  --par: var(--vrgb);
}

#pl {
  border-color: var(--pa);
  box-shadow: 0 0 22px rgba(var(--par), 0.45);
}

.pxp {
  border-color: var(--pa);
  box-shadow: 0 0 60px rgba(var(--par), 0.5);
}

.pxp::after {
  background: linear-gradient(180deg, rgba(var(--par), 0.2), rgba(var(--dlgrgb), 0.92) 60%);
}

#pl .chip.pp,
#pex .chip.pp,
#pl .chip.pb.on,
#pex .chip.pb.on {
  background: linear-gradient(135deg, var(--pa), var(--pb));
  border-color: transparent;
}

#pl .sk .pr,
#pex .sk .pr {
  background: linear-gradient(90deg, var(--pa), var(--pb));
  box-shadow: 0 0 12px rgba(var(--par), 0.6);
}

#pl .sk u,
#pex .sk u {
  box-shadow: 0 0 10px var(--pa);
}

.pxc {
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6), 0 0 44px rgba(var(--par), 0.45);
}

#pex .tk:hover,
#pex .tk.on {
  background: rgba(var(--par), 0.2);
}

#pex .wv i {
  background: linear-gradient(0deg, var(--pa), var(--pb));
}

#pex #vol {
  accent-color: var(--pa);
}

#pex .pgc.on {
  background: linear-gradient(135deg, var(--pa), var(--pb));
  border-color: transparent;
}

.pgn {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0.3rem 0 0.5rem;
  padding: 0.1rem 0.05rem;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.pgn::-webkit-scrollbar {
  display: none;
}

.pgn .chip {
  flex: none;
  white-space: nowrap;
  font-size: 0.8rem;
}

@keyframes pxIn {
  from {
    opacity: 0;
    transform: translateX(calc(var(--dx, 1) * -42px)) scale(0.9);
  }
}

@keyframes pxTx {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes pxBg {
  from {
    opacity: 0;
  }
}

.swap .pxc > img,
.swap .pxc > .pph {
  animation: pxIn 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.swap .pxi {
  animation: pxTx 0.45s ease both;
}

.swap .pxbg {
  animation: pxBg 0.7s ease both;
}

.swap .pcv,
.swap .pt {
  animation: pxTx 0.35s ease both;
}
