/* หน้ารอคิวเข้าเกม · นับถอยหลัง · ปิดปรับปรุง (client/queue-screen.js · ใบ obt-queue-1110)
   ชั้น System (--z-sys) — ทับหน้าเข้าเกมและตัวเกม · สีชุดเดียวกับหน้าเข้าเกม (ครีม/น้ำตาล/ทอง/teal) · ภาพ: แบนเนอร์ OBT + ปริกกี้
   ขนาดตัวหนังสือ/ปุ่มใช้ตัวแปรกลาง ui-scale.css (fallback = ค่าเดียวกัน) */
#queue-screen {
  --qs-cream: #fffaf0; --qs-card: #fdf8ee; --qs-line: #eadcc0; --qs-ink: #5b3a1a; --qs-sub: #8a7454; --qs-gold: #e8b64a; --qs-teal: #2f6f73;
  position: fixed; inset: 0; z-index: var(--z-sys, 500);
  display: flex; overflow: auto;   /* การ์ด margin:auto = พอดีจออยู่กลาง · สูงกว่าจอเริ่มจากบนแล้วเลื่อนได้ (ไม่ถูกตัดหัว) */
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #bfe0ef url('assets/ui/login-bg.jpg') center 40% / cover no-repeat;
  color: var(--qs-ink); font-family: var(--font-body, system-ui, sans-serif);
}
#queue-screen[hidden] { display: none; }
#queue-screen::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(255, 244, 214, .5), rgba(46, 78, 96, .5)); pointer-events: none; }
#queue-screen .qs-card {
  position: relative; width: min(100%, 460px); margin: auto; flex: none; border-radius: 22px; overflow: hidden;
  background: var(--qs-card); border: 2px solid var(--qs-line);
  box-shadow: 0 14px 40px rgba(40, 30, 10, .35), inset 0 0 0 3px rgba(255, 255, 255, .6);
}
#queue-screen .qs-art { position: relative; aspect-ratio: 16 / 7; overflow: hidden; background: #f3d9a0; }
#queue-screen .qs-hero { width: 100%; height: 100%; object-fit: cover; object-position: 80% 42%; display: block; }
#queue-screen .qs-art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(to top, var(--qs-card), rgba(253, 248, 238, 0)); }
#queue-screen .qs-logo { position: absolute; left: 14px; top: 12px; width: 38%; max-width: 170px; height: auto; filter: drop-shadow(0 2px 4px rgba(60, 40, 10, .35)); }
#queue-screen .qs-body { position: relative; padding: 0 18px 16px; margin-top: -14px; }
#queue-screen .qs-head { display: flex; align-items: center; gap: 10px; }
#queue-screen .qs-mascot { width: 72px; height: 72px; flex: none; object-fit: contain; margin-top: -26px; }
#queue-screen .qs-title { margin: 0; font: 800 var(--fs-title, 20px)/1.25 var(--font-head, inherit); color: var(--qs-ink); text-wrap: balance; }
#queue-screen .qs-sub { margin: 3px 0 0; font-size: var(--fs-sm, 14px); line-height: 1.4; color: var(--qs-sub); }

#queue-screen .qs-main { margin-top: 12px; display: grid; gap: 10px; }
#queue-screen .qs-clock { text-align: center; padding: 8px 10px 10px; border-radius: 16px; background: linear-gradient(#fff6dc, #ffe9b0); border: 1.5px solid var(--qs-gold); }
#queue-screen .qs-clock small { display: block; font-size: var(--fs-sm, 14px); color: var(--qs-sub); }
#queue-screen .qs-cd { display: block; font: 800 40px/1.1 var(--font-head, inherit); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--qs-ink); }
#queue-screen .qs-stats { display: grid; grid-template-columns: 1.15fr 1fr 1.25fr; gap: 8px; }
#queue-screen .qs-stat { display: grid; align-content: center; justify-items: center; gap: 2px; min-height: 68px; padding: 8px 6px; border-radius: 14px; background: var(--qs-cream); border: 1.5px solid var(--qs-line); text-align: center; }
#queue-screen .qs-stat small { font-size: var(--fs-xs, 12px); color: var(--qs-sub); line-height: 1.2; }
#queue-screen .qs-stat b { font: 800 var(--fs-name, 18px)/1.15 var(--font-head, inherit); font-variant-numeric: tabular-nums; }
#queue-screen .qs-stat.big { background: var(--qs-teal); border-color: #245659; color: #fff; }
#queue-screen .qs-stat.big small { color: #cfeceb; }
#queue-screen .qs-stat.big b { font-size: 34px; color: #ffe9a8; }
#queue-screen[data-st="count"] .qs-stat.big b { font-size: 26px; }

#queue-screen .qs-ahead { border-radius: 14px; background: var(--qs-cream); border: 1.5px solid var(--qs-line); padding: 8px 12px; }
#queue-screen .qs-ahead.qs-first { text-align: center; font-size: var(--fs-sm, 14px); line-height: 1.45; color: var(--qs-teal); font-weight: 700; padding: 12px; }
#queue-screen .qs-ahead-h { font-size: var(--fs-xs, 12px); color: var(--qs-sub); margin-bottom: 4px; }
#queue-screen .qs-ahead ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#queue-screen .qs-ahead li { display: flex; align-items: center; gap: 10px; padding: 3px 6px; border-radius: 9px; font-size: var(--fs-sm, 14px); }
#queue-screen .qs-ahead li b { flex: none; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--qs-sub); }
#queue-screen .qs-ahead li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#queue-screen .qs-ahead li.me { background: #fff1c9; font-weight: 800; }
#queue-screen .qs-ahead li.me b { color: var(--qs-ink); }

#queue-screen .qs-go { display: grid; place-items: center; padding: 18px 0 8px; }
#queue-screen .qs-go i { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #eadcc0; border-top-color: var(--qs-teal); animation: qsSpin .8s linear infinite; }
@keyframes qsSpin { to { rotate: 360deg; } }

#queue-screen .qs-keep { margin: 12px 0 0; padding: 9px 12px; border-radius: 12px; background: #eaf6f1; border: 1.5px dashed #9fcdbd; color: #2b5f55; font-size: var(--fs-sm, 14px); line-height: 1.45; text-align: center; }
#queue-screen .qs-net { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: #fff0e0; border: 1.5px solid #f0b987; color: #8a4a12; font-size: var(--fs-sm, 14px); line-height: 1.4; text-align: center; }
#queue-screen .qs-keep[hidden], #queue-screen .qs-net[hidden] { display: none; }
#queue-screen .qs-foot { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
#queue-screen .qs-foot button {
  flex: 1 1 150px; min-height: var(--btn-h, 44px); padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--qs-line); background: #fff; color: var(--qs-ink); font: 700 var(--fs-sm, 14px)/1.2 var(--font-head, inherit);
}
#queue-screen .qs-foot button:hover { background: #fff6dc; }
#queue-screen .qs-foot .qs-leave { color: var(--qs-sub); }
#queue-screen .qs-foot .qs-leave.armed { background: #ffe2d6; border-color: #e59a7c; color: #9a3412; }
#queue-screen[data-st="go"] .qs-foot, #queue-screen[data-st="go"] .qs-keep { display: none; }
#queue-screen:is([data-st="maint"], [data-st="busy"], [data-st="go"]) .qs-sound { display: none; }

/* นับถอยหลัง: มีนาฬิกาเพิ่มอีกแถว — ย่อภาพหัว · นาฬิกาแถวเดียว · รายชื่อ 2 คอลัมน์ ให้พอดีจอโดยไม่เลื่อน */
#queue-screen:is([data-st="count"], [data-st="maint"]) .qs-clock { display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 6px 10px 8px; }
#queue-screen[data-st="count"] .qs-art { aspect-ratio: 16 / 6; }
#queue-screen[data-st="count"] .qs-ahead ol { grid-template-columns: 1fr 1fr; column-gap: 8px; }
#queue-screen .qs-body:has(.qs-net:not([hidden])) .qs-keep { display: none; }   /* หลุดอยู่ = ป้ายสีส้มบอกเวลาที่เหลือแทน */
@media (max-height: 800px) and (min-width: 561px) and (min-height: 521px) { #queue-screen .qs-art { aspect-ratio: 16 / 5.5; } }

/* มือถือแนวนอน / จอเตี้ย: ภาพไปอยู่ซ้าย เนื้อหาอยู่ขวา — ไม่ต้องเลื่อน */
@media (max-height: 520px) and (min-width: 560px) {
  #queue-screen { padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  #queue-screen .qs-card { width: min(100%, 760px); display: grid; grid-template-columns: 36% 1fr; }
  #queue-screen[data-st="count"] .qs-art { aspect-ratio: auto; }
  #queue-screen[data-st="count"] .qs-ahead { display: none; }   /* แนวนอนเตี้ย: นับถอยหลัง + ลำดับพอ (รายชื่อโชว์ตอนเข้าคิวจริง) */
  #queue-screen .qs-sub { font-size: var(--fs-xs, 12px); }
  #queue-screen .qs-ahead { padding: 5px 10px; }
  #queue-screen .qs-ahead-h { display: none; }
  #queue-screen .qs-foot button { min-height: 40px; }
  #queue-screen .qs-art { aspect-ratio: auto; height: 100%; min-height: 100%; }
  #queue-screen .qs-hero { position: absolute; inset: 0; object-position: 72% 50%; }
  #queue-screen .qs-art::after { inset: 0 0 0 auto; width: 30%; height: auto; background: linear-gradient(to left, var(--qs-card), rgba(253, 248, 238, 0)); }
  #queue-screen .qs-logo { width: 62%; top: auto; bottom: 10px; left: 10px; }   /* มุมบนซ้ายเป็นที่ของปุ่มเต็มจอ */
  #queue-screen .qs-body { margin-top: 0; padding: 8px 12px 8px 6px; }
  #queue-screen .qs-mascot { width: 52px; height: 52px; margin-top: 0; }
  #queue-screen .qs-title { font-size: var(--fs-name, 18px); }
  #queue-screen .qs-main { margin-top: 8px; gap: 6px; }
  #queue-screen .qs-stat { min-height: 54px; padding: 5px; }
  #queue-screen .qs-stat.big b { font-size: 26px; }
  #queue-screen .qs-cd { font-size: 28px; }
  #queue-screen .qs-clock { padding: 4px 8px 6px; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
  #queue-screen .qs-ahead ol { grid-template-columns: 1fr 1fr; column-gap: 8px; }
  #queue-screen .qs-keep { margin-top: 6px; padding: 5px 10px; font-size: var(--fs-xs, 12px); }
  #queue-screen .qs-net { margin-top: 6px; padding: 5px 10px; font-size: var(--fs-xs, 12px); }
  #queue-screen .qs-foot { margin-top: 6px; }
}
/* มือถือแนวตั้งแคบ */
@media (max-width: 400px) {
  #queue-screen .qs-body { padding: 0 12px 12px; }
  #queue-screen .qs-stats { gap: 6px; }
  #queue-screen .qs-stat.big b { font-size: 30px; }
  #queue-screen .qs-cd { font-size: 34px; }
  #queue-screen .qs-mascot { width: 60px; height: 60px; }
}

/* ── รอบ 2 (เจ้าของ 10 พ.ย.) ─────────────────────────────────────────────── */
/* ปุ่มเต็มจอของหน้าเข้าเกมทับมุมการ์ดในแนวนอน → ซ่อนระหว่างหน้านี้เปิด (queue-screen.js ใส่ html.qs-on) */
html.qs-on :is(#fs-login, #fs-tip) { display: none !important; }

/* จอคอม ≥1280: การ์ด/ตัวอักษรใหญ่ขึ้น อ่านได้จากระยะนั่งปกติ (มือถือ/แท็บเล็ตแคบไม่โดนกฎนี้) */
@media (min-width: 1280px) and (min-height: 700px) {
  #queue-screen { --fs-xs: 14px; --fs-sm: 16px; --fs-name: 22px; --fs-title: 26px; }
  #queue-screen .qs-card { width: clamp(560px, 44vw, 640px); border-radius: 26px; }
  #queue-screen .qs-body { padding: 0 26px 22px; }
  #queue-screen .qs-logo { max-width: 220px; left: 20px; top: 16px; }
  #queue-screen .qs-mascot { width: 92px; height: 92px; margin-top: -34px; }
  #queue-screen .qs-main { margin-top: 14px; gap: 12px; }
  #queue-screen .qs-stats { gap: 10px; }
  #queue-screen .qs-stat { min-height: 96px; border-radius: 18px; }
  #queue-screen .qs-stat.big b { font-size: 58px; line-height: 1; }
  #queue-screen[data-st="count"] .qs-stat.big b { font-size: 44px; }
  #queue-screen .qs-cd { font-size: 54px; }
  #queue-screen .qs-ahead { padding: 10px 16px; border-radius: 18px; }
  #queue-screen .qs-ahead ol { grid-template-columns: 1fr 1fr; column-gap: 12px; }
  #queue-screen .qs-ahead li { padding: 4px 8px; font-size: 17px; }
  #queue-screen .qs-ahead.qs-first { padding: 16px; }
  #queue-screen .qs-keep, #queue-screen .qs-net { padding: 11px 14px; border-radius: 14px; }
  #queue-screen .qs-foot button { min-height: 50px; font-size: 16px; }
}
/* คอมจอเตี้ย (1366×768): ย่อภาพหัว ให้พอดีจอไม่ต้องเลื่อน */
@media (min-width: 1280px) and (min-height: 700px) and (max-height: 860px) {
  #queue-screen .qs-art { aspect-ratio: 16 / 5; }
  #queue-screen[data-st="count"] .qs-art { aspect-ratio: 16 / 4; }
  #queue-screen .qs-stat { min-height: 84px; }
}

/* ป้ายสถานะบนหน้าแรก ก่อนกดเข้าเกม (queue-screen.js paintBanner · GET /queue-status) */
#queue-banner {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 8px 12px; border-radius: 14px; text-align: left;
  background: linear-gradient(#fff6dc, #ffe9b0); border: 1.5px solid #e8b64a; color: #5b3a1a;
}
#queue-banner[hidden] { display: none; }
#queue-banner[data-kind="maint"] { background: linear-gradient(#fff4e8, #ffe2c8); border-color: #f0b987; }
#queue-banner[data-kind="wait"] { background: linear-gradient(#f1faf6, #dff1ea); border-color: #9fcdbd; }
#queue-banner img { width: 46px; height: 46px; flex: none; object-fit: contain; }
#queue-banner div { min-width: 0; flex: 1; }
#queue-banner .qb-title { display: block; font: 800 var(--fs-body, 16px)/1.25 var(--font-head, inherit); }
#queue-banner .qb-text { display: block; margin-top: 1px; font-size: var(--fs-sm, 14px); line-height: 1.35; color: #8a7454; }
#queue-banner .qb-clock { flex: none; font: 800 var(--fs-hero, 24px)/1 var(--font-head, inherit); font-variant-numeric: tabular-nums; }
#queue-banner .qb-clock:empty { display: none; }

/* ── รางวัลรอคิว · คลิป · เตรียมเกม (queue-extras.js · ใบ queue-reward-1116) ── เซิร์ฟปิด = ไม่มี .qs-x / .qx-on (หน้าเดิมทุกพิกเซล)
   ลำดับความเด่น: เลขคิว > รางวัล > คลิป > เตรียมเกม — กล่องพื้นครีมบาง ไม่มีสีทึบแข่งกับช่องลำดับสี teal */
#queue-screen .qs-x { display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
#queue-screen .qs-x[hidden] { display: none; }
#queue-screen .qs-x section { border-radius: 14px; background: var(--qs-cream); border: 1.5px solid var(--qs-line); padding: 8px 10px; min-width: 0; }
#queue-screen .qs-x section[hidden] { display: none; }
#queue-screen .qx-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--fs-sm, 14px); line-height: 1.3; }
#queue-screen .qx-h b { font-weight: 800; white-space: nowrap; }
#queue-screen .qx-h a { color: var(--qs-teal); font-size: var(--fs-xs, 12px); font-weight: 700; text-decoration: none; white-space: nowrap; padding: 6px 0; margin: -6px 0; }
#queue-screen .qx-t { font-size: var(--fs-xs, 12px); color: var(--qs-sub); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* บันได: 5 จุดเรียงแถว · เส้นจากจุดแรกถึงจุดสุดท้าย เติมตาม --fill */
#queue-screen .qx-steps { --fill: 0; position: relative; list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
#queue-screen .qx-steps::before, #queue-screen .qx-steps::after { content: ''; position: absolute; top: 17px; left: 10%; height: 4px; border-radius: 2px; }
#queue-screen .qx-steps::before { right: 10%; background: #eadcc0; }
#queue-screen .qx-steps::after { width: calc(80% * var(--fill)); background: var(--qs-gold); }
#queue-screen .qx-steps li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; min-width: 0; }
#queue-screen .qx-ic { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid #eadcc0; }
#queue-screen .qx-ic img { width: 28px; height: 28px; object-fit: contain; opacity: .55; filter: saturate(.6); }
#queue-screen .qx-steps small { font-size: var(--fs-xs, 12px); color: var(--qs-sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
#queue-screen .qx-steps li.done .qx-ic { border-color: var(--qs-gold); background: #fff6dc; }
#queue-screen .qx-steps li.done .qx-ic img { opacity: 1; filter: none; }
#queue-screen .qx-steps li.done .qx-ic::after { content: '✓'; position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--qs-teal); color: #fff; font: 800 11px/16px system-ui, sans-serif; text-align: center; }
#queue-screen .qx-steps li.next .qx-ic { border-color: var(--qs-teal); box-shadow: 0 0 0 3px rgba(47, 111, 115, .18); }
#queue-screen .qx-steps li.next .qx-ic img { opacity: .9; filter: none; }
#queue-screen .qx-steps li.next small { color: var(--qs-teal); font-weight: 800; }
#queue-screen .qx-next { margin: 6px 0 0; display: grid; gap: 1px; font-size: var(--fs-xs, 12px); line-height: 1.35; color: var(--qs-sub); text-align: center; text-wrap: balance; }
#queue-screen .qx-next b { color: var(--qs-ink); font-weight: 700; }
#queue-screen .qx-next small { font-size: var(--fs-xs, 12px); }
#queue-screen .qx-next small:empty { display: none; }
#queue-screen .qx-rw.got .qx-steps { opacity: .45; }
#queue-screen .qx-rw.got .qx-next b { color: var(--qs-teal); }
/* คลิป: ภาพปก + ชื่อ · กดแล้วเป็น iframe 16:9 */
#queue-screen .qx-hb { display: flex; gap: 6px; flex: none; }
#queue-screen .qx-hb button { min-height: 40px; margin: -8px 0 -6px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--qs-line); background: #fff; color: var(--qs-ink); font: 700 var(--fs-xs, 12px)/1 var(--font-head, inherit); cursor: pointer; white-space: nowrap; }
#queue-screen .qx-hb .qx-close { color: #9a3412; }
#queue-screen .qx-clip .qx-h { align-items: center; min-height: 28px; }
#queue-screen .qx-item { margin-top: 6px; }
#queue-screen .qx-chan { display: inline-block; margin-top: 2px; padding: 6px 0 0; color: var(--qs-teal); font-size: var(--fs-xs, 12px); font-weight: 700; text-decoration: none; }
#queue-screen .qx-play { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
#queue-screen .qx-th { position: relative; flex: none; width: 104px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #2b2b2b; }
#queue-screen .qx-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
#queue-screen .qx-th i { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #c4302b; font: 800 15px/34px system-ui, sans-serif; font-style: normal; text-align: center; padding-left: 3px; box-sizing: border-box; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
#queue-screen .qx-cap { display: grid; gap: 2px; min-width: 0; }
#queue-screen .qx-cap b { font-size: var(--fs-sm, 14px); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#queue-screen .qx-cap small { font-size: var(--fs-xs, 12px); color: var(--qs-sub); line-height: 1.3; }
#queue-screen .qx-frame { margin-top: 6px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
#queue-screen .qx-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
/* เตรียมเกม: แถบบางบรรทัดเดียว */
#queue-screen .qx-pre { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: var(--fs-xs, 12px); color: var(--qs-sub); }
#queue-screen .qx-pre[hidden] { display: none; }
#queue-screen .qx-pre span { flex: none; white-space: nowrap; }
#queue-screen .qx-pre i { flex: 1; height: 5px; border-radius: 3px; background: #eadcc0; overflow: hidden; }
#queue-screen .qx-pre b { display: block; height: 100%; width: 0; background: var(--qs-teal); transition: width .4s; }

/* มือถือแนวตั้ง: รายชื่อข้างหน้าเหลือ 3 แถว (ที่ให้รางวัล/คลิป) */
@media (max-width: 559px) {
  #queue-screen .qs-card.qx-on .qs-ahead li:nth-last-child(n+4) { display: none; }
  #queue-screen[data-st="count"] .qs-card.qx-on .qs-ahead { display: none; }   /* นับถอยหลัง: นาฬิกา + ลำดับพอ (เหมือนแนวนอน) */
  #queue-screen .qs-card.qx-on .qs-sub { font-size: var(--fs-xs, 12px); }
  #queue-screen .qx-ic { width: 34px; height: 34px; }
  #queue-screen .qx-ic img { width: 26px; height: 26px; }
  #queue-screen .qx-steps::before, #queue-screen .qx-steps::after { top: 15px; }
  #queue-screen .qx-th { width: 96px; }
  #queue-screen .qx-cap small { display: none; }
  #queue-screen .qx-chan { display: none; }   /* แนวตั้ง: ที่ไม่พอ — ลิงก์ช่องอยู่บนคอม/แนวนอน */
  #queue-screen .qs-card.qx-on .qs-art { aspect-ratio: 16 / 5; }
  #queue-screen .qs-card.qx-on .qs-keep { margin-top: 8px; padding: 6px 10px; font-size: var(--fs-xs, 12px); }
}
/* มือถือแนวนอน / จอเตี้ย: ซ่อนภาพหัว · เนื้อหาซ้าย + รางวัล/คลิปขวา */
@media (max-height: 520px) and (min-width: 560px) {
  #queue-screen .qs-card.qx-on { width: min(100%, 840px); grid-template-columns: 1fr; }
  #queue-screen .qs-card.qx-on .qs-art { display: none; }
  #queue-screen .qs-card.qx-on .qs-body { padding: 8px 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); column-gap: 12px; align-items: start;
    grid-template-areas: "head x" "main x" "keep x" "net x" "foot x" ". x"; grid-template-rows: auto auto auto auto auto 1fr; }
  #queue-screen .qs-card.qx-on .qs-head { grid-area: head; }
  #queue-screen .qs-card.qx-on .qs-main { grid-area: main; }
  #queue-screen .qs-card.qx-on .qs-keep { grid-area: keep; }
  #queue-screen .qs-card.qx-on .qs-net { grid-area: net; }
  #queue-screen .qs-card.qx-on .qs-foot { grid-area: foot; }
  #queue-screen .qs-card.qx-on .qs-x { grid-area: x; margin-top: 0; gap: 6px; }
  #queue-screen .qs-x section { padding: 6px 8px; }
  #queue-screen .qx-ic { width: 32px; height: 32px; }
  #queue-screen .qx-ic img { width: 24px; height: 24px; }
  #queue-screen .qx-steps::before, #queue-screen .qx-steps::after { top: 14px; }
  #queue-screen .qx-th { width: 92px; }
  #queue-screen .qx-cap small { display: none; }
  #queue-screen .qx-next small { display: none; }
  /* เล่นคลิปอยู่: บันไดย่อเหลือหัว+บรรทัดถัดไป ให้คลิปพอดีจอเตี้ย */
  #queue-screen .qs-x.qx-playing .qx-steps { display: none; }
  #queue-screen .qs-x.qx-playing .qx-pre { display: none; }
}
/* คอม: การ์ดกว้าง 2 คอลัมน์ — คิวซ้าย (เด่นเท่าเดิม) · รางวัล/คลิปขวา */
@media (min-width: 900px) and (min-height: 521px) {
  #queue-screen .qs-card.qx-on { width: min(100%, 960px); }
  #queue-screen .qs-card.qx-on .qs-art { aspect-ratio: 16 / 4; }
  #queue-screen .qs-card.qx-on .qs-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 20px; align-items: start;
    grid-template-areas: "head head" "main x" "keep x" "net x" "foot x" ". x"; grid-template-rows: auto auto auto auto auto 1fr; }
  #queue-screen .qs-card.qx-on .qs-head { grid-area: head; }
  #queue-screen .qs-card.qx-on .qs-main { grid-area: main; }
  #queue-screen .qs-card.qx-on .qs-keep { grid-area: keep; }
  #queue-screen .qs-card.qx-on .qs-net { grid-area: net; }
  #queue-screen .qs-card.qx-on .qs-foot { grid-area: foot; }
  #queue-screen .qs-card.qx-on .qs-x { grid-area: x; margin-top: 12px; }
}
@media (min-width: 1280px) and (min-height: 700px) {
  #queue-screen .qs-card.qx-on { width: min(100%, 1120px); }
  #queue-screen .qs-card.qx-on .qs-body { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 26px; }
  #queue-screen .qs-card.qx-on .qs-x { margin-top: 14px; gap: 12px; }
  #queue-screen .qs-x section { padding: 12px 14px; border-radius: 18px; }
  #queue-screen .qx-h { font-size: var(--fs-body, 16px); }
  #queue-screen .qx-ic { width: 48px; height: 48px; }
  #queue-screen .qx-ic img { width: 36px; height: 36px; }
  #queue-screen .qx-steps::before, #queue-screen .qx-steps::after { top: 22px; }
  #queue-screen .qx-th { width: 136px; }
}
