/* شاشة التلفاز — عرض كبير */
html.qtv-html, .qtv-body { height: 100%; margin: 0; overflow: hidden; }
.qtv {
    height: 100vh; height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: 0; overflow: hidden;
}
/* يُقاس المحتوى ثم يُكبَّر/يُصغَّر بالـ JS ليملأ الشاشة كاملاً دون تمرير أو إخفاء */
.qtv-stage {
    width: 100%; max-width: 1400px;
    transform-origin: center center;
    will-change: transform;
}

.qtv-loader { text-align: center; color: var(--qonline-muted); }
.qtv-loader__icon { font-size: 80px; animation: qtv-pulse 1.4s ease-in-out infinite; }
.qtv-loader__text { margin-top: 16px; font-size: 1.4rem; }
@keyframes qtv-pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

/* ===== اقتران ===== */
.qtv-pair { text-align: center; }
.qtv-pair__brand { color: var(--qonline-sky); font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.qtv-pair__title { font-size: clamp(1.8rem, 4vw, 3.2rem); margin: 0 0 24px; }
.qtv-qr {
    display: inline-block; background: #fff; padding: 18px; border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.qtv-qr canvas, .qtv-qr img { display: block; }
.qtv-pair__hint { color: var(--qonline-muted); font-size: clamp(1rem, 1.6vw, 1.4rem); margin: 24px auto 16px; max-width: 640px; }
.qtv-reset { width: auto; }
.qtv-selecting { text-align: center; }
.qtv-selecting__pulse { display: flex; justify-content: center; gap: 16px; margin: 26px 0 18px; }
.qtv-selecting__pulse span {
    width: clamp(14px, 1.8vw, 24px); height: clamp(14px, 1.8vw, 24px);
    border-radius: 999px; background: var(--qonline-sky); opacity: .35;
    animation: qtv-selecting 1.1s ease-in-out infinite;
}
.qtv-selecting__pulse span:nth-child(2) { animation-delay: .14s; }
.qtv-selecting__pulse span:nth-child(3) { animation-delay: .28s; }
@keyframes qtv-selecting { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-9px); } }

/* ===== لوبي ===== */
.qtv-lobby { display: flex; gap: 5vw; align-items: center; justify-content: center; flex-wrap: wrap; }
.qtv-lobby__main { text-align: center; }
.qtv-lobby__title { font-size: clamp(2rem, 4.5vw, 3.6rem); margin: 0 0 8px; }
.qtv-lobby__sub { color: var(--qonline-muted); font-size: clamp(1rem, 1.8vw, 1.5rem); margin: 0 0 20px; }
.qtv-code { font-size: clamp(1.2rem, 2vw, 1.8rem); margin-top: 18px; }
.qtv-code b { color: var(--qonline-gold); letter-spacing: 4px; }
.qtv-lobby__side { min-width: 280px; }
.qtv-side__title { font-size: clamp(1.2rem, 2vw, 1.8rem); margin: 0 0 14px; color: var(--qonline-sky); }
.qtv-playerlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.qtv-playerlist li {
    background: var(--qonline-surface); border: 1px solid var(--qonline-border);
    border-radius: 14px; padding: 14px 20px; font-size: clamp(1.1rem, 1.8vw, 1.6rem); font-weight: 700;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.qtv-pl__name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qtv-host { font-size: .7em; background: rgba(56,189,248,.18); color: #bae6fd; padding: 3px 10px; border-radius: 999px; margin-right: 8px; }
.qtv-kick {
    flex: 0 0 auto; width: 1.9em; height: 1.9em; border-radius: 50%;
    border: 1px solid rgba(248,113,113,.5); background: rgba(248,113,113,.14); color: #fca5a5;
    font-size: .8em; font-weight: 900; cursor: pointer; line-height: 1; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.qtv-kick:hover { background: rgba(248,113,113,.3); color: #fff; transform: scale(1.08); }
.qtv-kick:active { transform: scale(.96); }

/* ===== شريط التحكّم (ابدأ من جديد) ===== */
.qtv-controls { position: fixed; top: 18px; left: 18px; z-index: 30; }
.qtv-ctrlbtn {
    background: rgba(15,23,42,.78); color: var(--qonline-text);
    border: 1px solid var(--qonline-border); border-radius: 999px;
    padding: 10px 18px; font-size: clamp(.9rem, 1.4vw, 1.1rem); font-weight: 700;
    cursor: pointer; backdrop-filter: blur(6px); transition: background .15s, transform .1s;
}
.qtv-ctrlbtn:hover { background: rgba(30,41,59,.95); }
.qtv-ctrlbtn:active { transform: scale(.97); }

/* ===== نافذة التأكيد (بديل window.confirm لمتصفحات التلفاز) ===== */
.qtv-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2,6,23,.72); backdrop-filter: blur(4px); padding: 4vw;
}
.qtv-modal__box {
    background: #142038; border: 1px solid var(--qonline-border); border-radius: 22px;
    padding: clamp(24px, 4vw, 48px); max-width: 760px; width: 100%; text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.qtv-modal__msg { font-size: clamp(1.3rem, 2.6vw, 2.2rem); font-weight: 800; line-height: 1.5; margin-bottom: clamp(20px, 3vw, 36px); }
.qtv-modal__btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.qtv-modal__btn {
    border-radius: 14px; padding: clamp(12px, 1.8vw, 18px) clamp(24px, 3.5vw, 44px);
    font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 800; cursor: pointer;
    border: 1px solid var(--qonline-border); transition: transform .1s, filter .15s;
}
.qtv-modal__btn:active { transform: scale(.96); }
.qtv-modal__yes { background: var(--qonline-gold, #fbbf24); color: #1a1300; border-color: transparent; }
.qtv-modal__yes:hover { filter: brightness(1.08); }
.qtv-modal__no { background: rgba(148,163,184,.16); color: var(--qonline-text); }
.qtv-modal__no:hover { background: rgba(148,163,184,.28); }
.qtv-modal__btn:focus { outline: 3px solid var(--qonline-sky, #38bdf8); outline-offset: 2px; }
.qtv-waiting { color: var(--qonline-muted); font-size: clamp(1rem, 1.6vw, 1.4rem); margin-top: 18px; }

/* ===== مقدمة ===== */
.qtv-intro { text-align: center; }
.qtv-intro__icon { font-size: clamp(60px, 10vw, 140px); }
.qtv-intro__label { color: var(--qonline-muted); font-size: clamp(1.1rem, 2vw, 1.6rem); }
.qtv-intro__name { font-size: clamp(2.4rem, 7vw, 6rem); font-weight: 900; color: var(--qonline-gold); margin: 8px 0; }
.qtv-intro__hint { color: var(--qonline-text); font-size: clamp(1.2rem, 2.4vw, 2rem); }

/* ===== المؤقّت ===== */
.qtv-timer {
    display: inline-block; min-width: 1.6em; text-align: center;
    font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 900;
    background: rgba(255,255,255,.07); border: 1px solid var(--qonline-border);
    border-radius: 18px; padding: 6px 22px; margin-top: 16px;
}
.qtv-timer.is-urgent { color: #fca5a5; border-color: rgba(248,113,113,.6); animation: qtv-blink .8s steps(2) infinite; }
@keyframes qtv-blink { 50% { opacity: .4; } }

/* ===== مرحلة الأسئلة ===== */
.qtv-asking { text-align: center; }
.qtv-asking__top { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 22px; }
.qtv-subject { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--qonline-muted); }
.qtv-subject b { color: var(--qonline-gold); }
.qtv-qprog { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--qonline-muted); }
.qtv-bigcard {
    background: linear-gradient(160deg, #1b2a4a, #142038);
    border: 1px solid var(--qonline-border); border-radius: 28px;
    padding: clamp(28px, 5vw, 70px) clamp(20px, 4vw, 60px);
    max-width: 1100px; margin: 0 auto; box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.qtv-bigcard__emoji { font-size: clamp(70px, 12vw, 160px); }
.qtv-bigcard__q { font-size: clamp(1.8rem, 4.5vw, 4rem); font-weight: 900; line-height: 1.4; margin-top: 18px; }
.qtv-answered { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--qonline-muted); margin-top: 22px; }
.qtv-dots { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.qtv-dot {
    background: var(--qonline-surface); border: 1px solid var(--qonline-border);
    border-radius: 999px; padding: 8px 18px; font-size: clamp(.95rem, 1.5vw, 1.3rem);
    opacity: .55; transition: all .2s ease;
}
.qtv-dot.is-done { opacity: 1; background: rgba(74,222,128,.16); border-color: rgba(74,222,128,.45); color: #bbf7d0; }
.qtv-dot.is-subject { border-color: var(--qonline-gold); }

/* ===== النتيجة ===== */
.qtv-ended { text-align: center; }
.qtv-ended__icon { font-size: clamp(60px, 9vw, 120px); }
.qtv-ended__title { font-size: clamp(1.8rem, 4vw, 3.4rem); margin: 6px 0 26px; }
.qtv-ranking { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.qtv-ranking li {
    display: flex; align-items: center; gap: 18px;
    background: var(--qonline-surface); border: 1px solid var(--qonline-border);
    border-radius: 16px; padding: 16px 26px; font-size: clamp(1.2rem, 2.2vw, 1.9rem);
}
.qtv-ranking li.is-top { background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.45); }
.qtv-rank__pos { min-width: 1.6em; font-weight: 900; }
.qtv-rank__name { flex: 1; text-align: right; font-weight: 800; }
.qtv-rank__score { font-weight: 900; color: var(--qonline-gold); }
.qtv-ended__hint { color: var(--qonline-muted); font-size: clamp(1rem, 1.6vw, 1.4rem); margin-top: 26px; }

/* ===== من الجاسوس — تلفاز ===== */
.qtv-pair__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.qtv-sound { width: auto; }

.qtv-spytv { text-align: center; width: 100%; }
.qtv-spytv__head { margin-bottom: 18px; }
.qtv-spytv__title { font-size: clamp(1.8rem, 4vw, 3.4rem); margin: 0 0 12px; }
.qtv-spytv__sub { color: var(--qonline-muted); font-size: clamp(1.1rem, 2vw, 1.7rem); margin: 10px 0; }
.qtv-spytv__sub b { color: var(--qonline-gold); }
.qtv-spytv__badge {
    display: inline-block; background: rgba(250,204,21,.18); color: #fde68a;
    border-radius: 999px; padding: 6px 20px; font-size: clamp(1rem, 1.6vw, 1.4rem); margin-bottom: 12px;
}
.qtv-spytv__bigemoji { font-size: clamp(70px, 11vw, 150px); }
.qtv-spytv__center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.qtv-spytv__ready, .qtv-spytv__foot { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--qonline-muted); margin-top: 14px; }

/* تصويت الصنف */
.qtv-catgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 22px); max-width: 1100px; margin: 0 auto; }
.qtv-cat {
    position: relative; background: var(--qonline-surface); border: 2px solid var(--qonline-border);
    border-radius: 20px; padding: clamp(14px, 2vw, 28px) 10px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.qtv-cat__emoji { font-size: clamp(40px, 6vw, 80px); }
.qtv-cat__label { font-size: clamp(1.1rem, 2vw, 1.8rem); font-weight: 800; }
.qtv-cat__votes {
    position: absolute; top: -14px; inset-inline-start: -14px;
    background: var(--qonline-sky); color: #0b1020; font-weight: 900;
    min-width: 40px; height: 40px; line-height: 40px; border-radius: 999px;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem); box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

/* التنقلات */
.qtv-spytv__turnbar {
    font-size: clamp(1.2rem, 2.2vw, 1.9rem); color: var(--qonline-sky); font-weight: 800;
    margin-bottom: 20px; display: flex; gap: 24px; align-items: center; justify-content: center;
}
.qtv-spytv__ask { font-size: clamp(2rem, 5vw, 4.4rem); font-weight: 900; line-height: 1.3; }
.qtv-spytv__asker { color: var(--qonline-gold); }
.qtv-spytv__target { color: var(--qonline-sky); }
.qtv-spytv__arrow { color: var(--qonline-muted); font-size: .7em; }
.qtv-spytv__players { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.qtv-spytv__pl {
    background: var(--qonline-surface); border: 2px solid var(--qonline-border);
    border-radius: 999px; padding: 10px 24px; font-size: clamp(1rem, 1.6vw, 1.4rem); opacity: .7;
}
.qtv-spytv__pl.is-asker { border-color: var(--qonline-gold); opacity: 1; background: rgba(251,191,36,.14); }
.qtv-spytv__pl.is-target { border-color: var(--qonline-sky); opacity: 1; background: rgba(56,189,248,.14); }
.qtv-spytv__pl.is-voted { opacity: 1; background: rgba(74,222,128,.16); border-color: rgba(74,222,128,.45); }
.qtv-spytv__pl.is-out { opacity: .3; text-decoration: line-through; }

/* طلب الإنهاء */
.qtv-spytv__endreq {
    background: rgba(250,204,21,.10); border: 2px solid rgba(250,204,21,.4);
    border-radius: 24px; padding: clamp(20px, 3vw, 44px); max-width: 1000px; margin: 0 auto;
}

/* النتيجة */
.qtv-spytv__revealword { font-size: clamp(1.6rem, 3.4vw, 3rem); margin: 14px 0; }
.qtv-spytv__revealword b { color: var(--qonline-gold); }
.qtv-spytv__cat { color: var(--qonline-muted); font-size: .65em; }
.qtv-spytv__rolelist { list-style: none; padding: 0; margin: 24px auto 0; max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.qtv-spytv__rolelist li {
    display: flex; align-items: center; gap: 16px;
    background: var(--qonline-surface); border: 1px solid var(--qonline-border);
    border-radius: 16px; padding: 14px 24px; font-size: clamp(1.1rem, 2vw, 1.7rem);
}
.qtv-spytv__rolelist li.is-spy { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.1); }
.qtv-spytv__rolelist li.is-winner { box-shadow: 0 0 0 2px rgba(251,191,36,.5) inset; }
.qtv-spytv__roleicon { font-size: 1.6em; }
.qtv-spytv__rolename { flex: 1; text-align: right; font-weight: 800; }
.qtv-spytv__roletag { color: #fca5a5; font-weight: 800; }
.qtv-spytv__wintag { font-size: 1.4em; }

/* ===== درب القضية — بطاقات Phaser ===== */
.qtv-party {
    width: min(1540px, 96vw);
    display: grid;
    grid-template-columns: minmax(720px, 1fr) minmax(300px, 360px);
    gap: clamp(18px, 2.6vw, 38px);
    align-items: stretch;
}
.qtv-party__board {
    min-height: min(76vh, 760px);
    background:
        radial-gradient(circle at 18% 16%, rgba(56,189,248,.16), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(250,204,21,.12), transparent 32%),
        rgba(15,23,42,.72);
    border: 1px solid var(--qonline-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0,0,0,.42);
}
.qtv-party__board canvas { display: block; width: 100%; height: 100%; }
.qtv-party__side {
    background: rgba(15,23,42,.84);
    border: 1px solid var(--qonline-border);
    border-radius: 24px;
    padding: clamp(22px, 2.6vw, 36px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}
.qtv-party__kicker {
    color: var(--qonline-sky);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 900;
}
.qtv-party__side h1 {
    margin: 8px 0 18px;
    font-size: clamp(1.8rem, 3.4vw, 3.2rem);
    line-height: 1.25;
}
.qtv-party__turn,
.qtv-party__progress {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    font-size: clamp(1rem, 1.7vw, 1.35rem);
}
.qtv-party__turn b { color: #fde68a; }
.qtv-party__current {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(250,204,21,.14);
    border: 1px solid rgba(250,204,21,.32);
    color: #fde68a;
    font-weight: 900;
}
.qtv-party__current span { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1; }
.qtv-party__current b { font-size: clamp(1rem, 1.55vw, 1.24rem); overflow-wrap: anywhere; }
.qtv-party__current.is-empty {
    width: 88px;
    height: 88px;
    justify-content: center;
    font-size: 42px;
    background: rgba(255,255,255,.08);
    color: #f8fafc;
}
.qtv-party__event {
    color: #cbd5e1;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    line-height: 1.7;
    min-height: 3em;
}
.qtv-party__rank {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 10px;
}
.qtv-party__rank li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(30,41,59,.88);
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}
.qtv-party__rank li.is-top { border-color: rgba(250,204,21,.55); background: rgba(250,204,21,.12); }
.qtv-party__rank span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}
.qtv-party__rank b { color: #fde68a; font-weight: 900; }
.qtv-party-cards {
    height: 100%;
    min-height: 520px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 20px);
    padding: clamp(18px, 2vw, 30px);
}
.qtv-party-card {
    position: relative;
    min-width: 0;
    min-height: 170px;
    padding: clamp(14px, 1.7vw, 22px);
    border-radius: 20px;
    background: linear-gradient(155deg, rgba(29,78,216,.88), rgba(15,23,42,.92));
    border: 2px solid rgba(226,232,240,.16);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 7px;
    text-align: center;
    box-shadow: 0 16px 42px rgba(0,0,0,.28);
}
.qtv-party-card.is-hidden {
    background:
        linear-gradient(135deg, rgba(125,211,252,.18), transparent 32%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, rgba(255,255,255,.02) 10px 20px),
        linear-gradient(155deg, rgba(30,41,59,.98), rgba(2,6,23,.96));
    border-color: rgba(125,211,252,.28);
}
.qtv-party-card:nth-child(2) { background: linear-gradient(155deg, rgba(15,118,110,.9), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(3) { background: linear-gradient(155deg, rgba(190,18,60,.88), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(4) { background: linear-gradient(155deg, rgba(109,40,217,.88), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(5) { background: linear-gradient(155deg, rgba(180,83,9,.9), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(6) { background: linear-gradient(155deg, rgba(4,120,87,.9), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(7) { background: linear-gradient(155deg, rgba(51,65,85,.96), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(8) { background: linear-gradient(155deg, rgba(159,18,57,.9), rgba(15,23,42,.92)); }
.qtv-party-card:nth-child(9) { background: linear-gradient(155deg, rgba(21,94,117,.9), rgba(15,23,42,.92)); }
.qtv-party-card.is-hidden:nth-child(n) {
    background:
        linear-gradient(135deg, rgba(125,211,252,.18), transparent 32%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, rgba(255,255,255,.02) 10px 20px),
        linear-gradient(155deg, rgba(30,41,59,.98), rgba(2,6,23,.96));
}
.qtv-party-card.is-picked {
    background: rgba(30,41,59,.86);
    border-color: rgba(250,204,21,.36);
}
.qtv-party-card.is-current {
    border-color: rgba(253,230,138,.9);
    box-shadow: 0 0 0 4px rgba(250,204,21,.18), 0 20px 52px rgba(0,0,0,.34);
}
.qtv-party-card__num {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(2,6,23,.32);
    color: #fff;
    font-weight: 900;
}
.qtv-party-card__emoji { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
.qtv-party-card__title {
    max-width: 100%;
    color: #f8fafc;
    font-size: clamp(1.05rem, 1.7vw, 1.46rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.qtv-party-card__meta,
.qtv-party-card__win {
    max-width: 100%;
    color: #dbeafe;
    font-size: clamp(.82rem, 1.15vw, 1.02rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.qtv-party-card__win {
    color: #fde68a;
    font-weight: 900;
}
.qtv-party-choice {
    width: min(1180px, 94vw);
    text-align: center;
}
.qtv-party-choice__card {
    max-width: 860px;
    margin: 0 auto 24px;
    padding: clamp(26px, 4vw, 58px);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(45,212,191,.2), transparent 40%),
        linear-gradient(155deg, rgba(43,22,63,.92), rgba(15,118,110,.88));
    border: 1px solid rgba(153,246,228,.28);
    box-shadow: 0 28px 80px rgba(0,0,0,.42);
}
.qtv-party-choice__emoji {
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 1;
    margin-bottom: 12px;
}
.qtv-party-choice__card h1 {
    margin: 6px 0 12px;
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}
.qtv-party-choice__card p {
    margin: 0;
    color: #dbeafe;
    font-size: clamp(1.1rem, 2vw, 1.65rem);
    font-weight: 800;
}
.qtv-party-choice__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}
.qtv-party-choice__opt {
    min-height: 150px;
    padding: clamp(18px, 2.4vw, 30px);
    border-radius: 24px;
    background: rgba(15,23,42,.78);
    border: 1px solid rgba(226,232,240,.18);
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
}
.qtv-party-choice__opt span {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1;
}
.qtv-party-choice__opt b {
    color: #f8fafc;
    font-size: clamp(1.25rem, 2.2vw, 1.85rem);
}
.qtv-party-choice__opt small {
    color: #cbd5e1;
    font-size: clamp(.9rem, 1.35vw, 1.08rem);
    line-height: 1.5;
    max-width: 34ch;
}
.qtv-party-result .qtv-timer { margin-bottom: 18px; }
.qtv-party-minicases {
    width: min(1280px, 94vw);
    text-align: center;
}
.qtv-party-minicases__card {
    max-width: 1050px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 54px);
    border-radius: 26px;
    background: linear-gradient(155deg, rgba(15,118,110,.86), rgba(30,41,59,.92));
    border: 1px solid rgba(226,232,240,.18);
    box-shadow: 0 28px 78px rgba(0,0,0,.42);
}
.qtv-party-minicases__emoji {
    font-size: clamp(56px, 8vw, 110px);
    line-height: 1;
}
.qtv-party-minicases__card h1 {
    margin: 8px 0 16px;
    font-size: clamp(1.7rem, 3.5vw, 3.4rem);
}
.qtv-party-minicases__card p {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(1.35rem, 2.5vw, 2.4rem);
    line-height: 1.65;
    font-weight: 900;
}
.qtv-party-minicases__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 24px);
    max-width: 1050px;
    margin: 20px auto 0;
}
.qtv-party-minicases__opt {
    min-height: 96px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: clamp(14px, 2vw, 24px);
    border-radius: 18px;
    background: rgba(15,23,42,.78);
    border: 1px solid rgba(226,232,240,.2);
    color: #e2e8f0;
    text-align: right;
    font-size: clamp(1.1rem, 1.9vw, 1.8rem);
    font-weight: 900;
    line-height: 1.45;
}
.qtv-party-minicases__opt span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 1000;
}

/* ===== الشهود — تلفاز ===== */
.qtv-witnesses { width: 100%; text-align: center; }
.qtv-witnesses__layout {
    display: grid;
    grid-template-columns: minmax(360px, 1.2fr) minmax(320px, .8fr);
    gap: clamp(18px, 3vw, 44px);
    align-items: center;
    width: min(1500px, 94vw);
    margin: 0 auto;
}
.qtv-witnesses__imagewrap {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--qonline-border);
    border-radius: 28px;
    padding: clamp(10px, 1.4vw, 18px);
    box-shadow: 0 28px 80px rgba(0,0,0,.42);
}
.qtv-witnesses__image {
    display: block;
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 20px;
}
.qtv-witnesses__side {
    text-align: right;
    background: rgba(15,23,42,.78);
    border: 1px solid var(--qonline-border);
    border-radius: 24px;
    padding: clamp(22px, 3vw, 42px);
}
.qtv-witnesses__badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(251,191,36,.16);
    border: 1px solid rgba(251,191,36,.35);
    color: #fde68a;
    font-weight: 900;
    margin-bottom: 14px;
}
.qtv-witnesses__title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.25;
}
.qtv-witnesses__story,
.qtv-witnesses__hint {
    color: var(--qonline-muted);
    font-size: clamp(1rem, 1.7vw, 1.45rem);
    line-height: 1.8;
}
.qtv-witnesses__timer { margin-top: 20px; }
.qtv-witnesses__asking .qtv-bigcard { max-width: 1160px; }
.qtv-witnesses__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 1000px;
    margin: 18px auto 0;
}
.qtv-witnesses__opt {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(15,23,42,.7);
    border: 1px solid var(--qonline-border);
    font-size: clamp(1rem, 1.7vw, 1.45rem);
    font-weight: 800;
    text-align: right;
}
.qtv-witnesses__opt span {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--qonline-sky);
    color: #07111f;
    font-weight: 900;
}
.qtv-witnesses__perfect {
    display: inline-block;
    margin: 0 auto 18px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.35);
    color: #bbf7d0;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
}
.qtv-ranking li.is-perfect {
    border-color: rgba(34,197,94,.45);
    background: rgba(34,197,94,.11);
}
@media (max-aspect-ratio: 4/3) {
    .qtv-witnesses__layout { grid-template-columns: 1fr; }
    .qtv-witnesses__side { text-align: center; }
    .qtv-witnesses__image { max-height: 56vh; }
}

/* ============================ مِهنة — تلفاز ============================ */
.qtv-mihna {
    --mihna-tv-gold: #f2c56d;
    --mihna-tv-ink: #091014;
    width: min(94vw, 1680px);
    min-height: min(92vh, 980px);
    padding: clamp(18px, 2.2vw, 38px);
    border-radius: clamp(24px, 3vw, 48px);
    background:
        radial-gradient(circle at 10% 10%, rgba(180,119,41,.2), transparent 34%),
        radial-gradient(circle at 92% 88%, rgba(32,122,102,.15), transparent 30%),
        linear-gradient(145deg, #111b20, #080d10);
    border: 1px solid rgba(242,197,109,.2);
    box-shadow: 0 42px 100px rgba(0,0,0,.44), inset 0 1px rgba(255,255,255,.04);
    color: #f7f3e9;
    overflow: hidden;
}

.qtv-mihna__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.qtv-mihna__top span,
.qtv-mihna__turnhead small {
    color: var(--mihna-tv-gold);
    font-weight: 900;
    font-size: clamp(.9rem, 1.4vw, 1.3rem);
}

.qtv-mihna__top h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 6rem);
    line-height: .95;
    letter-spacing: -.04em;
}

.qtv-mihna__round {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(242,197,109,.1);
    border: 1px solid rgba(242,197,109,.28);
    color: #d4dadd;
    font-weight: 800;
}

.qtv-mihna__round b { color: var(--mihna-tv-gold); font-size: 1.4em; }

.qtv-mihna__director {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
    margin: clamp(14px, 2vh, 24px) 0;
    padding: clamp(12px, 1.6vw, 22px);
    border-radius: 20px;
    background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.075);
}

.qtv-mihna__mic { font-size: clamp(2rem, 3.5vw, 4rem); }
.qtv-mihna__director small { color: var(--mihna-tv-gold); font-weight: 900; }
.qtv-mihna__director p { margin: 4px 0 0; color: #d8e0e2; font-size: clamp(1rem, 1.65vw, 1.65rem); line-height: 1.65; }
.qtv-mihna__director .qtv-sound { white-space: nowrap; }

.qtv-mihna__intro,
.qtv-mihna__reveal,
.qtv-mihna__ended {
    max-width: 1180px;
    margin: clamp(14px, 3vh, 36px) auto 0;
    text-align: center;
}

.qtv-mihna__hero { font-size: clamp(4rem, 8vw, 8rem); line-height: 1; filter: drop-shadow(0 18px 30px rgba(242,197,109,.15)); }
.qtv-mihna__intro h2,
.qtv-mihna__reveal h2,
.qtv-mihna__ended h2,
.qtv-mihna__turnhead h2 { margin: 8px 0; font-size: clamp(2.2rem, 4.6vw, 5rem); line-height: 1.1; }
.qtv-mihna__intro > p,
.qtv-mihna__reveal > p,
.qtv-mihna__ended > p { color: #b8c4c7; font-size: clamp(1rem, 1.6vw, 1.55rem); }

.qtv-mihna__rules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 20px);
    margin: clamp(18px, 3vh, 32px) auto;
}

.qtv-mihna__rules div {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: clamp(14px, 1.7vw, 24px);
    border-radius: 18px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
    font-size: clamp(.95rem, 1.5vw, 1.5rem);
    font-weight: 800;
}

.qtv-mihna__rules b {
    flex: 0 0 auto;
    display: grid;
    place-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--mihna-tv-gold);
    color: #281b0b;
}

.qtv-mihna__timer {
    width: clamp(82px, 8vw, 128px);
    height: clamp(82px, 8vw, 128px);
    margin: 12px auto;
    border: 4px solid rgba(242,197,109,.65);
    background: radial-gradient(circle, rgba(242,197,109,.15), transparent 70%);
}

.qtv-mihna__timer span { color: var(--mihna-tv-gold); font-size: clamp(2rem, 4vw, 4rem); }
.qtv-mihna__skip { color: #91a1a5 !important; font-size: clamp(.85rem, 1.2vw, 1.2rem) !important; }

.qtv-mihna__ready {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    margin: 14px auto;
}
.qtv-mihna__ready b { color: var(--mihna-tv-gold); font-size: clamp(3rem, 6vw, 6rem); }
.qtv-mihna__ready span { color: #c1cbcd; font-size: clamp(1rem, 1.7vw, 1.6rem); }

.qtv-mihna__turnhead {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    margin: 8px 0 16px;
}
.qtv-mihna__turnhead > div:first-child { text-align: right; }
.qtv-mihna__turnhead p { margin: 0; color: #aab8bc; font-size: clamp(1rem, 1.5vw, 1.45rem); }
.qtv-mihna__turnhead > div:last-child { text-align: center; color: #b4c0c3; }

.qtv-mihna__cards {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: clamp(7px, .9vw, 14px);
    margin: 12px 0 18px;
}
.qtv-mihna__cards.count-2 { grid-template-columns: repeat(2, minmax(0, 240px)); justify-content: center; }
.qtv-mihna__cards.count-3 { grid-template-columns: repeat(3, minmax(0, 230px)); justify-content: center; }
.qtv-mihna__cards.count-4 { grid-template-columns: repeat(4, minmax(0, 220px)); justify-content: center; }
.qtv-mihna__cards.count-5 { grid-template-columns: repeat(5, minmax(0, 210px)); justify-content: center; }
.qtv-mihna__cards.count-6 { grid-template-columns: repeat(6, minmax(0, 200px)); justify-content: center; }
.qtv-mihna__cards.count-7 { grid-template-columns: repeat(7, minmax(0, 190px)); justify-content: center; }

.qtv-mihna__card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border-radius: clamp(10px, 1.2vw, 18px);
    border: 2px solid rgba(255,255,255,.12);
    background: #10191e;
    box-shadow: 0 14px 30px rgba(0,0,0,.28);
    transition: transform .25s ease, opacity .25s ease;
}
.qtv-mihna__card img,
.qtv-mihna__fallback { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.qtv-mihna__fallback { display: grid; place-content: center; font-size: 4rem; }
.qtv-mihna__card.is-picked { opacity: .55; filter: saturate(.65); }
.qtv-mihna__card.is-active { opacity: 1; filter: none; transform: translateY(-10px) scale(1.035); border-color: var(--mihna-tv-gold); box-shadow: 0 20px 46px rgba(242,197,109,.25); }
.qtv-mihna__number {
    position: absolute; inset-inline-start: 9px; top: 9px; width: 32px; height: 32px;
    display: grid; place-content: center; border-radius: 50%; background: rgba(5,9,11,.84); color: var(--mihna-tv-gold); font-weight: 900;
}
.qtv-mihna__owner {
    position: absolute; inset-inline: 7px; top: 7px; padding: 7px;
    border-radius: 10px; background: rgba(5,9,11,.9); text-align: center;
}
.qtv-mihna__owner span { display: block; color: #b8c4c7; font-size: clamp(.6rem, .8vw, .8rem); }
.qtv-mihna__owner strong { display: block; color: var(--mihna-tv-gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.72rem, 1.05vw, 1.1rem); }

.qtv-mihna__players {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 9px;
}
.qtv-mihna__player {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 10px 13px;
    border-radius: 13px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
}
.qtv-mihna__player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 900; }
.qtv-mihna__player b,
.qtv-mihna__player small { color: #9eabad; font-size: .8em; }
.qtv-mihna__player.is-current { border-color: rgba(242,197,109,.62); background: rgba(242,197,109,.1); }
.qtv-mihna__player.is-ready small { color: #8fe0aa; }
.qtv-mihna__player.is-left { opacity: .4; text-decoration: line-through; }
.qtv-mihna__player.is-eliminated { border-color: rgba(244,105,95,.35); background: rgba(142,45,39,.18); }
.qtv-mihna__final { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; text-align: right; }
.qtv-mihna__final section { padding: 16px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); }
.qtv-mihna__final h3 { margin: 0 0 10px; color: var(--mihna-tv-gold); }
.qtv-mihna__final ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qtv-mihna__final li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 10px; background: rgba(0,0,0,.18); }
.qtv-mihna__final b { color: #d8e0e2; }

.qtv-mihna__ended ol { list-style: none; max-width: 900px; margin: 20px auto; padding: 0; display: grid; gap: 9px; }
.qtv-mihna__ended li { display: flex; justify-content: space-between; gap: 15px; padding: 13px 18px; border-radius: 13px; background: rgba(255,255,255,.045); font-size: clamp(1rem, 1.4vw, 1.4rem); }
.qtv-mihna__ended li.is-winner { border: 1px solid rgba(242,197,109,.55); color: var(--mihna-tv-gold); background: rgba(242,197,109,.1); }

@media (max-aspect-ratio: 4/3) {
    .qtv-mihna__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .qtv-mihna__rules { grid-template-columns: 1fr; }
    .qtv-mihna__director { grid-template-columns: auto 1fr; }
    .qtv-mihna__director .qtv-sound { grid-column: 1 / -1; justify-self: center; }
}

.qtv-voice-notice {
    position: fixed;
    z-index: 99999;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom));
    width: max-content;
    max-width: min(90vw, 760px);
    padding: 12px 18px;
    border: 1px solid rgba(248, 113, 113, .55);
    border-radius: 14px;
    background: rgba(69, 10, 10, .94);
    color: #fff;
    font-weight: 900;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity .2s ease, transform .2s ease;
}

.qtv-voice-notice.is-showing {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== مفتّش الأغذية — تلفاز ===== */
.qtv-cooking { width: min(1280px, 96vw); }
.qtv-cooking__layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(360px, .9fr);
    gap: clamp(20px, 3vw, 44px);
    align-items: center;
}
.qtv-cooking__imagewrap {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--qonline-border);
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.qtv-cooking__image {
    display: block;
    width: 100%;
    height: min(68vh, 660px);
    object-fit: cover;
}
.qtv-cooking__fallback {
    height: min(68vh, 660px);
    display: grid;
    place-items: center;
    font-size: clamp(90px, 14vw, 190px);
}
.qtv-cooking__side {
    text-align: right;
    background: rgba(15,23,42,.78);
    border: 1px solid var(--qonline-border);
    border-radius: 24px;
    padding: clamp(22px, 3vw, 42px);
}
.qtv-cooking__badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(34,197,94,.14);
    border: 1px solid rgba(34,197,94,.34);
    color: #bbf7d0;
    font-weight: 900;
    margin-bottom: 14px;
}
.qtv-cooking__title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4.8vw, 4.8rem);
    line-height: 1.18;
}
.qtv-cooking__desc,
.qtv-cooking__hint {
    color: var(--qonline-muted);
    font-size: clamp(1rem, 1.7vw, 1.5rem);
    line-height: 1.8;
}
.qtv-cooking__timer { margin-top: 20px; }
.qtv-cooking__submitted {
    margin: 18px 0 12px;
    font-size: clamp(1.1rem, 2vw, 1.7rem);
    color: var(--qonline-gold);
    font-weight: 900;
}
.qtv-cooking__correct {
    max-width: 920px;
    margin: 22px auto 0;
    padding: 16px 22px;
    border-radius: 18px;
    background: rgba(15,23,42,.78);
    border: 1px solid var(--qonline-border);
    color: var(--qonline-text);
    font-size: clamp(1rem, 1.7vw, 1.45rem);
    line-height: 1.8;
}
.qtv-rank__name small {
    color: #bbf7d0;
    font-size: .62em;
}
@media (max-aspect-ratio: 4/3) {
    .qtv-cooking__layout { grid-template-columns: 1fr; }
    .qtv-cooking__side { text-align: center; }
    .qtv-cooking__image { height: 50vh; }
    .qtv-cooking__fallback { height: 50vh; }
}

/* ============================ مداقش — تلفاز ============================ */
.qtv-madaqesh {
    --mq-tv-green: #0f513f;
    --mq-tv-ink: #f8fafc;
    --mq-tv-muted: rgba(226, 232, 240, .78);
    --mq-tv-gold: #f7c66a;
    width: min(1540px, 96vw);
    min-height: min(860px, 94vh);
    display: grid;
    gap: clamp(14px, 2vw, 26px);
    color: var(--mq-tv-ink);
}

.qtv-madaqesh__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qtv-madaqesh__kicker {
    color: var(--mq-tv-muted);
    font-size: clamp(1rem, 1.6vw, 1.45rem);
    font-weight: 800;
}

.qtv-madaqesh h1 {
    margin: 0;
    font-size: clamp(4rem, 9vw, 8.8rem);
    line-height: .92;
    letter-spacing: 0;
}

.qtv-madaqesh__target {
    min-width: clamp(160px, 18vw, 260px);
    padding: clamp(14px, 2vw, 24px);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15,81,63,.92), rgba(22,59,82,.92));
    border: 1px solid rgba(247,198,106,.34);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.34);
}

.qtv-madaqesh__target span {
    display: block;
    color: var(--mq-tv-muted);
    font-size: clamp(.9rem, 1.3vw, 1.25rem);
}

.qtv-madaqesh__target b {
    display: block;
    color: var(--mq-tv-gold);
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: 1;
}

.qtv-madaqesh__director {
    display: grid;
    gap: 10px;
    padding: clamp(18px, 2.4vw, 32px);
    border-radius: 22px;
    background: rgba(15, 23, 42, .76);
    border: 1px solid var(--qonline-border);
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}

.qtv-madaqesh__badge {
    width: max-content;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(247, 198, 106, .14);
    border: 1px solid rgba(247, 198, 106, .32);
    color: var(--mq-tv-gold);
    font-weight: 900;
    font-size: clamp(.9rem, 1.2vw, 1.2rem);
}

.qtv-madaqesh__line {
    font-size: clamp(1.8rem, 3.6vw, 4.2rem);
    line-height: 1.35;
    font-weight: 900;
}

.qtv-madaqesh__status {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(12px, 1.7vw, 20px);
}

.qtv-madaqesh__status > div {
    min-width: 0;
    padding: clamp(14px, 2vw, 22px);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--qonline-border);
    text-align: center;
}

.qtv-madaqesh__status span {
    display: block;
    color: var(--mq-tv-muted);
    font-size: clamp(.9rem, 1.25vw, 1.15rem);
}

.qtv-madaqesh__status b {
    display: block;
    margin-top: 4px;
    color: var(--mq-tv-gold);
    font-size: clamp(1.6rem, 3vw, 3.2rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.qtv-madaqesh__players {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: clamp(10px, 1.5vw, 16px);
}

.qtv-madaqesh__player {
    min-height: 138px;
    display: grid;
    gap: 8px;
    align-content: space-between;
    padding: clamp(14px, 1.7vw, 22px);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(226,232,240,.18);
    box-shadow: 0 18px 44px rgba(0,0,0,.24);
}

.qtv-madaqesh__player.is-turn {
    border-color: rgba(247,198,106,.72);
    box-shadow: 0 0 0 2px rgba(247,198,106,.22), 0 18px 44px rgba(0,0,0,.24);
}

.qtv-madaqesh__player.is-boss {
    background: linear-gradient(135deg, rgba(15,81,63,.78), rgba(184,135,45,.28));
}

.qtv-madaqesh__player.is-left {
    opacity: .48;
}

.qtv-madaqesh__pname {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.2rem, 2.1vw, 2.2rem);
    font-weight: 900;
}

.qtv-madaqesh__balance {
    color: var(--mq-tv-gold);
    font-size: clamp(2.4rem, 5vw, 5rem);
    line-height: 1;
    font-weight: 1000;
}

.qtv-madaqesh__tags {
    min-height: 34px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.qtv-madaqesh__tags span {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(248,250,252,.12);
    color: #fff;
    font-weight: 900;
    font-size: clamp(.76rem, 1vw, .95rem);
}

.qtv-madaqesh__reveal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(10px, 1.5vw, 16px);
}

.qtv-madaqesh__hand {
    display: grid;
    gap: 12px;
    padding: clamp(14px, 1.8vw, 22px);
    border-radius: 18px;
    background: rgba(15,23,42,.78);
    border: 1px solid var(--qonline-border);
}

.qtv-madaqesh__hand.is-winner {
    border-color: rgba(247,198,106,.75);
}

.qtv-madaqesh__hand b {
    display: block;
    font-size: clamp(1.2rem, 2vw, 2rem);
}

.qtv-madaqesh__hand span {
    color: var(--mq-tv-muted);
    font-size: clamp(.9rem, 1.2vw, 1.15rem);
}

.qtv-madaqesh__cards {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qtv-madaqesh__card {
    width: clamp(58px, 5.6vw, 88px);
    aspect-ratio: 5 / 7;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15,23,42,.16);
    color: #111827;
    font-size: clamp(1.1rem, 2vw, 1.8rem);
    font-weight: 1000;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

.qtv-madaqesh__card.is-red {
    color: #b4232e;
}

@media (max-aspect-ratio: 4/3) {
    .qtv-madaqesh__top,
    .qtv-madaqesh__status {
        grid-template-columns: 1fr;
    }
    .qtv-madaqesh__top {
        display: grid;
    }
}
