/* ชวนเพื่อนด้วยลิงก์ (ใบ invite-link-1017) — แท็บ "ชวนเพื่อน" ในหน้าต่างผู้เล่น (invite-tab.js) + แถบ "X ชวนคุณมา" หน้าล็อกอิน (invite.js)
   อยู่ในโครง Screen Shell ของหน้าต่างผู้เล่นเดิม · ไม่มี position/z-index เอง · เนื้อในปรับตามความกว้างจริง (container query) */
.sx-tabs { grid-template-columns: repeat(5, 1fr); }
.sx-tabs button[data-t="invite"].on { background: linear-gradient(#f2cb6a, #e8b64a); border-color: #b9954a; color: #4a3512; box-shadow: 0 2px 0 #9a7a2e; }
.sx-tabs button[data-t="invite"] i .ui-ic { width: 26px; height: 26px; }

.iv { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 14px; color: #4a3b26; }
.iv h4 { margin: 0 0 6px; font: 700 15px/1.3 var(--font-head); color: #2f6f73; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.iv small { color: #7a6a4c; font-size: 13px; line-height: 1.4; }
.iv-gem { display: inline-flex; align-items: center; gap: 2px; color: #2f6f73; font-weight: 800; }
.iv-gem .ui-ic { width: 1.05em; height: 1.05em; }
.iv section { background: #fffaf0; border: 1px solid #e3d4ae; border-radius: 14px; padding: 10px 12px; }

.iv-hero { background: linear-gradient(135deg, #fff6dc, #fdf0cf) !important; border-color: #e8b64a !important; display: flex; flex-direction: column; gap: 8px; }
.iv-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.iv-title > div { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; }
.iv-title b { font: 700 17px/1.3 var(--font-head); color: #4a3512; }
.iv-promo { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #2f6f73; color: #fffdf6; font: 700 13px/1.2 var(--font-head); }
.iv-link { display: flex; gap: 8px; }
.iv-link input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #c9b88e; border-radius: 10px; background: #fff; color: #2f6f73; font: 700 15px/1 ui-monospace, monospace; }
.iv-share { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-share .sx-btn, .iv-link .sx-btn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.iv-share .sx-btn { flex: 1 1 110px; justify-content: center; }
.iv-share .iv-line { background: #06c755; border-color: #05a648; color: #fff; }
.iv-share .iv-fb { background: #1877f2; border-color: #1464cc; color: #fff; }
.iv-share .iv-ms { background: linear-gradient(90deg, #0a7cff, #a033ff); border-color: #6d4ad8; color: #fff; }
.iv-share .iv-line:hover, .iv-share .iv-fb:hover, .iv-share .iv-ms:hover { filter: brightness(1.06); background-color: inherit; }
.iv-lock { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f6efdd; color: #6b5a3a; font-weight: 700; }

.iv-cols { display: grid; grid-template-columns: 1fr; gap: 10px; }
@container (min-width: 620px) { .iv-cols { grid-template-columns: 1.25fr 1fr; } }
.iv-steps ol { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.iv-steps li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 6px 8px; border-radius: 10px; background: #fbf5e7; }
.iv-when { font-weight: 700; }
.iv-who { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.iv-who s { color: #a8987a; font-size: 12px; }
.iv-ms-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.iv-m { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 10px; background: #fbf5e7; border: 1px dashed #d8c69c; font-size: 13px; }
.iv-m b { font: 700 14px/1.2 var(--font-head); color: #4a3512; }
.iv-m.got { background: #eaf6ee; border-style: solid; border-color: #8cc79e; }
.iv-m > i { position: absolute; top: 6px; right: 6px; }

.iv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.iv-list li { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 10px; background: #fbf5e7; border: 1px solid #eadcb8; }
.iv-list li.void { opacity: .6; }
.iv-f { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.iv-f b { font-weight: 800; }
.iv-f em { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 999px; background: #f0e3c2; color: #7a6a4c; }
.iv-sts { display: flex; gap: 4px; flex-wrap: wrap; }
.iv-st { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 999px; font: 700 12px/1.4 var(--font-head); font-style: normal; background: #efe6d0; color: #8a7a5c; }
.iv-st .ui-ic { width: 1em; height: 1em; }
.iv-st.ok { background: #d9f0e0; color: #2b7a46; }
.iv-st.wait { background: #fff0c8; color: #8a6a12; }
.iv-st.cap, .iv-st.void { background: #f6e2dc; color: #a04a36; }
.iv-tot { font: 600 13px/1.2 var(--font-body, inherit); color: #6b5a3a; }
.iv-none { margin: 0; color: #7a6a4c; }
.iv-me { display: flex; gap: 10px; align-items: flex-start; background: #fdf1f5 !important; border-color: #efc1d2 !important; }
.iv-me > div { display: flex; flex-direction: column; gap: 4px; }
/* affiliate-1110: มาจากลิงก์พันธมิตร + ช่องกรอกโค้ด (เฉพาะบัญชีใหม่ที่ยังไม่ผูก) */
.iv-via { background: #eef7f3 !important; border-color: #b9dccf !important; }
.iv-code { display: flex; flex-direction: column; gap: 8px; }
.iv-code label { display: flex; flex-direction: column; gap: 2px; }
.iv-code label small { color: #6b5a3a; }
.iv-code input { text-transform: uppercase; letter-spacing: .08em; }
.iv-rules summary { cursor: pointer; font-weight: 700; color: #2f6f73; min-height: 32px; display: flex; align-items: center; }
.iv-rules ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: #6b5a3a; line-height: 1.5; }

html.touch-ui.land .iv { gap: 8px; padding: 8px 10px 12px; }
html.touch-ui.land .iv-title b { font-size: 16px; }
@media (max-width: 640px) { .sx-tabs button[data-t="invite"] i .ui-ic { width: 22px; height: 22px; } }

/* หน้าล็อกอิน: "🎁 X ชวนคุณมาเล่น" — แถบเล็กใต้คำโปรย ไม่บังปุ่ม */
#login .l-inv { display: flex; align-items: center; gap: 8px; margin: 2px auto 8px; padding: 6px 12px; max-width: 420px; border-radius: 12px;
  background: #fff6dc; border: 1px solid #e8b64a; color: #4a3512; font-size: 14px; line-height: 1.35; text-align: left; }
#login .l-inv .li-ic { font-size: 20px; }
#login .l-inv small { display: block; color: #7a6a4c; font-size: 12.5px; }
html.touch-ui.land #login .l-inv { margin: 0 auto 6px; padding: 4px 10px; font-size: 13px; }
