/* ===================== تلویزیون (رابط ۱۰ فوتی) ===================== */
body[data-page^="tv"] { background: #070605; color: #f5efe4; overflow: hidden; }
body[data-page="tv-board"].is-idle { cursor: none; }
.tv { position: relative; isolation: isolate; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(1rem, 3vw, 3rem) clamp(1rem, 5vw, 5rem); gap: var(--space-6); }
.tv__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.tv__bg span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); animation: mesh 22s ease-in-out infinite alternate; }
.tv__bg span:nth-child(1) { background: radial-gradient(circle, rgb(210 165 76 / 0.35), transparent 65%); top: -30%; inset-inline-end: -10%; }
.tv__bg span:nth-child(2) { background: radial-gradient(circle, rgb(110 60 20 / 0.4), transparent 65%); bottom: -40%; inset-inline-start: -10%; animation-delay: -8s; }
.tv__bg span:nth-child(3) { background: radial-gradient(circle, rgb(80 50 110 / 0.22), transparent 65%); top: 30%; inset-inline-start: 30%; animation-delay: -14s; }
@keyframes mesh { 50% { transform: translate3d(6%, 5%, 0) scale(1.12); } }
.tv__top { display: flex; align-items: center; justify-content: space-between; }
.tv__brand { display: flex; align-items: center; gap: var(--space-3); font-size: clamp(1rem, 0.6rem + 1vw, 1.6rem); }
.tv__brand svg { width: 2.2em; height: 2.2em; }
.tv__brand small { color: #8a7f6d; font-size: 0.6em; }
.tv__clock { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); font-weight: 800; font-variant-numeric: tabular-nums; color: #d9cbb0; }
.tv__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 5rem); align-items: center; }
@media (max-width: 900px) { .tv__pair { grid-template-columns: minmax(0, 1fr); } body[data-page^="tv"] { overflow: auto; } }
.tv__info h1 { font-size: clamp(1.8rem, 1rem + 3vw, 3.8rem); line-height: 1.25; margin-bottom: var(--space-8); }
.tv__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-5); }
.tv__steps li { display: flex; gap: var(--space-4); align-items: center; }
.tv__steps li > span { flex: none; width: clamp(2.6rem, 2rem + 1.5vw, 3.6rem); aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px; background: rgb(210 165 76 / 0.12); border: 1px solid rgb(210 165 76 / 0.35); color: #f0cf86; font-weight: 900; font-size: clamp(1.1rem, 0.8rem + 0.8vw, 1.6rem); }
.tv__steps b { display: block; font-size: clamp(1.05rem, 0.8rem + 0.8vw, 1.6rem); }
.tv__steps small { color: #a39784; font-size: clamp(0.85rem, 0.7rem + 0.4vw, 1.1rem); }
.tv__codebox { container-type: inline-size; min-width: 0; display: grid; justify-items: center; gap: var(--space-6); padding: clamp(1.5rem, 3vw, 3.5rem); border-radius: 40px; background: linear-gradient(rgb(22 19 15 / 0.85), rgb(14 12 9 / 0.85)) padding-box, linear-gradient(135deg, rgb(240 207 134 / 0.7), rgb(240 207 134 / 0.05) 40%, rgb(240 207 134 / 0.5)) border-box; border: 1.5px solid transparent; box-shadow: 0 60px 120px -40px #000; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tv__code { display: flex; gap: clamp(0.3rem, 1.6cqi, 1rem); direction: ltr; perspective: 800px; }
.tv__digit { width: clamp(2.2rem, 12cqi, 7.5rem); aspect-ratio: 0.78; display: grid; place-items: center; border-radius: clamp(14px, 1.6vw, 26px); background: linear-gradient(180deg, #221d16, #110e0a); border: 1px solid rgb(255 255 255 / 0.08); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 20px 40px -20px #000; font-size: clamp(1.6rem, 9cqi, 6rem); font-weight: 900; color: #f6dfa4; text-shadow: 0 0 30px rgb(240 207 134 / 0.35); font-variant-numeric: tabular-nums; }
.tv__digit:nth-child(3) { margin-inline-end: clamp(0.4rem, 3cqi, 1.6rem); }
.tv__digit.is-flip { animation: flip 600ms var(--motion-ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes flip { from { transform: rotateX(-90deg); opacity: 0; } }
.tv__meta { display: flex; align-items: center; gap: var(--space-8); }
.tv__ring .ring-fg { stroke: #f0cf86; }
.tv__ring strong { font-size: 1.4rem; color: #f5efe4; }
.tv__ring.is-low .ring-fg { stroke: #ff8a7e; }
.tv__qr { padding: 10px; border-radius: 16px; }
.tv__qr svg { width: 110px; height: 110px; }
.tv__status { display: flex; align-items: center; gap: var(--space-3); font-size: clamp(1rem, 0.8rem + 0.6vw, 1.4rem); color: #d9cbb0; margin: 0; }
.tv__pulse { width: 14px; height: 14px; border-radius: 50%; background: #f0cf86; box-shadow: 0 0 0 0 rgb(240 207 134 / 0.6); animation: tvpulse 1.6s infinite; }
@keyframes tvpulse { 70% { box-shadow: 0 0 0 16px rgb(240 207 134 / 0); } 100% { box-shadow: 0 0 0 0 rgb(240 207 134 / 0); } }
.tv .btn--lg { font-size: 1.1rem; min-height: 60px; }
.tv .btn:focus-visible { outline: 4px solid #f0cf86; outline-offset: 4px; }
.tv__foot { color: #6f6555; text-align: center; font-size: 0.95rem; margin: 0; }
.tv__done { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: var(--space-4); background: rgb(7 6 5 / 0.92); animation: fade-in 400ms; }
.tv__done-icon { width: 160px; height: 160px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgb(95 211 147 / 0.25), transparent 70%); color: #5fd393; animation: pop 700ms var(--motion-spring); }
.tv__done-icon .icon { width: 100px; height: 100px; }
.tv__done h2 { font-size: clamp(2rem, 1rem + 4vw, 4.5rem); }
.tv__done p { color: #b6aa96; font-size: 1.3rem; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }

/* ---------- نمایشگر (منوبُرد و سفارش آماده) ---------- */
.tvb { min-height: 100dvh; padding: clamp(1rem, 2.5vw, 2.5rem); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
.tvb > *, .tvb [data-board] { min-width: 0; }
.tvb__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: clamp(1rem, 2vw, 2rem); }
.tvb__brand { display: flex; align-items: center; gap: var(--space-4); }
.tvb__brand .m-brand__logo { display: grid; place-items: center; background: linear-gradient(135deg, #f6dfa4, #d2a54c 45%, #9d7428); color: #1b1408; font-weight: 900; width: clamp(3rem, 2rem + 2vw, 4.5rem); height: auto; aspect-ratio: 1; font-size: clamp(1.4rem, 1rem + 1vw, 2.2rem); border-radius: 20px; }
.tvb__brand h2 { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); margin: 0; }
.tvb__brand small { color: #a39784; font-size: clamp(0.9rem, 0.7rem + 0.5vw, 1.2rem); }
.tvb__menu { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 2fr); gap: clamp(1rem, 2vw, 2.5rem); min-height: 0; }
@media (max-width: 900px) { .tvb__menu { grid-template-columns: minmax(0, 1fr); } }
.tvb__hero { position: relative; border-radius: 36px; overflow: hidden; background: #15120e; display: grid; align-content: end; padding: clamp(1.2rem, 2.5vw, 2.5rem); min-height: 50vh; isolation: isolate; }
.tvb__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 14s ease-in-out infinite alternate; }
.tvb__hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(7 6 5 / 0.95), rgb(7 6 5 / 0.25) 55%, transparent); }
@keyframes kenburns { to { transform: scale(1.12) translate(-2%, -2%); } }
.tvb__hero .lx-pill { justify-self: start; }
.tvb__hero h3 { font-size: clamp(1.8rem, 1rem + 3vw, 4rem); margin: 0; }
.tvb__hero p { color: #d9cbb0; font-size: clamp(1rem, 0.8rem + 0.6vw, 1.4rem); }
.tvb__hero strong { font-size: clamp(1.6rem, 1rem + 2vw, 3rem); color: #f6dfa4; }
.tvb__cat { display: grid; align-content: start; gap: clamp(0.5rem, 1vw, 1rem); }
.tvb__cat-title { display: flex; align-items: center; gap: var(--space-3); font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); margin: 0 0 var(--space-2); color: #f0cf86; }
.tvb__row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; padding: clamp(0.6rem, 1vw, 1rem) clamp(0.8rem, 1.2vw, 1.4rem); border-radius: 22px; background: rgb(255 255 255 / 0.03); border: 1px solid rgb(255 255 255 / 0.06); animation: fade-up 600ms var(--motion-ease-out) both; animation-delay: var(--d); }
.tvb__row img { width: clamp(3rem, 2rem + 2.5vw, 5.5rem); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; }
.tvb__row b { display: block; font-size: clamp(1.05rem, 0.8rem + 0.9vw, 1.8rem); }
.tvb__row small { color: #a39784; font-size: clamp(0.8rem, 0.65rem + 0.4vw, 1.1rem); }
.tvb__row em { font-style: normal; font-size: clamp(1.1rem, 0.8rem + 1vw, 1.9rem); font-weight: 900; color: #f6dfa4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tvb__row.is-out { opacity: 0.45; } .tvb__row.is-out em { text-decoration: line-through; }
.tvb__dots { display: flex; gap: 8px; justify-content: center; margin-top: var(--space-4); }
.tvb__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.2); transition: width 300ms, background-color 300ms; }
.tvb__dots i.is-on { width: 34px; border-radius: 6px; background: #f0cf86; }
.tvb__ticker { margin-top: var(--space-4); overflow: hidden; border-radius: 16px; background: rgb(210 165 76 / 0.1); border: 1px solid rgb(210 165 76 / 0.25); padding-block: var(--space-3); }
.tvb__ticker div { display: flex; gap: var(--space-12); width: max-content; animation: marquee 30s linear infinite; font-size: clamp(1rem, 0.8rem + 0.6vw, 1.4rem); color: #f0cf86; font-weight: 700; }
@keyframes marquee { to { transform: translateX(50%); } }
.tvb__ready { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(1rem, 2vw, 2.5rem); min-height: 0; }
@media (max-width: 900px) { .tvb__ready { grid-template-columns: minmax(0, 1fr); } }
.tvb__col { border-radius: 36px; padding: clamp(1rem, 2vw, 2rem); background: rgb(255 255 255 / 0.03); border: 1px solid rgb(255 255 255 / 0.07); display: grid; align-content: start; gap: var(--space-4); }
.tvb__col--ready { background: linear-gradient(160deg, rgb(95 211 147 / 0.12), rgb(95 211 147 / 0.02)); border-color: rgb(95 211 147 / 0.35); }
.tvb__col h3 { display: flex; align-items: center; gap: var(--space-3); font-size: clamp(1.4rem, 1rem + 1.6vw, 2.8rem); margin: 0; }
.tvb__col--ready h3 { color: #5fd393; }
.tvb__nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(7rem, 4rem + 7vw, 12rem), 1fr)); gap: clamp(0.6rem, 1vw, 1rem); }
.tvb__num { display: grid; place-items: center; aspect-ratio: 1.6; border-radius: 24px; background: rgb(255 255 255 / 0.05); font-size: clamp(1.7rem, 0.8rem + 2.3vw, 4rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.tvb__col--ready .tvb__num { background: rgb(95 211 147 / 0.16); color: #c9f6da; border: 1px solid rgb(95 211 147 / 0.4); }
.tvb__num.is-new { animation: pop 700ms var(--motion-spring), glow 1.2s 3; }
@keyframes glow { 50% { box-shadow: 0 0 0 10px rgb(95 211 147 / 0.25); } }
.tvb__empty { color: #6f6555; font-size: 1.3rem; }
.tvb__identify { position: fixed; inset: 0; z-index: 99; display: grid; place-content: center; justify-items: center; gap: var(--space-4); background: rgb(210 165 76 / 0.92); color: #1b1408; font-size: 2.4rem; font-weight: 900; animation: fade-in 300ms; }
.tvb__identify .icon { width: 160px; height: 160px; }
.tvb__off { display: grid; place-content: center; justify-items: center; gap: var(--space-4); min-height: 90dvh; text-align: center; }
.tvb__off .icon { width: 90px; height: 90px; color: #ff8a7e; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { .tv__bg span, .tvb__hero img, .tvb__ticker div, .tvb__row, .tv__digit.is-flip, .tv__pulse { animation: none !important; } }
[data-lite="true"] .tv__bg { display: none; }
