/* โหมดย้อนยุค: หน้า "เล่าเรื่อง" ที่ฝังเป็น STEP 2 ในหน้าบทหนัง — หน้าตาเดียวกับหน้าเล่าเรื่อง/ตั้งชื่อเรื่องตัวล่าสุด
   (กฎหน้าตาคัดมาจาก 146 แล้วเปลี่ยนเป็น [data-emb] · เลย์เอาต์จัดใหม่ให้พอดีคอลัมน์) */
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb]>.aipg{max-width:none;margin:0;padding:0!important;background:none!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb]>.aipg::before,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb]>.aipg::after{display:none!important}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] h2,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tpdeck{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgrid{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;background:none;border:0;box-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlright{flex:none;width:100%;padding:16px 15px 17px;border-radius:14px}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft{display:block}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft>label{margin:16px 0 7px!important}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft>label:first-child{margin-top:0!important}
/* เดิมตัวเลือกความยาวถูกซ่อนทั้งปุ่ม +/− และชิป → เปิดชิปความยาวกลับมาเหมือนหน้าเล่าเรื่อง */
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft>.tlmin+.tlchips{display:flex}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvpick{width:100%}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tpdeck{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc{background:linear-gradient(180deg,#232326 0%,#161618 100%);border:1px solid rgba(255,255,255,.09);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.4),0 22px 40px -16px rgba(0,0,0,.85);box-sizing:border-box}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc::before,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc::after{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc>label{display:block;margin:16px 0 7px;padding:0;font-size:11.5px;font-weight:700;letter-spacing:.07em;color:#a3a3ab;background:none;border:0;text-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc>label:first-child{margin-top:0}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc>label::before,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc>label::after{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlchips{gap:6px}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlchip,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft .tlchip{min-height:36px;height:auto;padding:7px 13px;border-radius:12px;font-size:13.5px;font-weight:600;line-height:1.2;color:#cfc6b8;background:rgba(255,255,255,.05);background-image:none;border:1px solid rgba(255,255,255,.12);box-shadow:none;text-shadow:none;transform:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlchip:hover,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft .tlchip:hover{color:#fff;border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.09)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlchip.on,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlleft .tlchip.on{color:#fff;font-weight:700;background:linear-gradient(rgba(255,90,74,.3),rgba(255,90,74,.16));border-color:#ff5a4a;box-shadow:0 0 0 1px rgba(255,90,74,.35),0 6px 16px -6px rgba(255,90,74,.5)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlchip::after{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc input[type=text],#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc input[type=number],#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvcur{background:#0b0b0d;background-image:none;color:#f2f2f4;border:1px solid rgba(255,255,255,.09);border-radius:10px;box-shadow:inset 0 2px 7px rgba(0,0,0,.75),0 1px 0 rgba(255,255,255,.05);text-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc input[type=text]{padding:10px 13px;font-size:13.5px}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc input[type=text]::placeholder{color:#77777f}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc input:focus,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc textarea:focus{outline:none;border-color:rgba(255,90,74,.6)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvcur:hover{border-color:rgba(255,255,255,.22)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlc textarea,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] #aiTlTx{background:#0b0b0d;background-image:none;color:#f2f2f4;border:1px solid rgba(255,255,255,.09);border-radius:12px;box-shadow:inset 0 2px 7px rgba(0,0,0,.75);font-size:14.5px;line-height:1.75;padding:12px 14px;text-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] #aiTlTx::placeholder{color:#8a8a92}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlact{gap:10px;padding:0;background:none;border:0;box-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn{min-height:46px;height:auto;padding:0 20px;border-radius:12px;font-size:15px;font-weight:700;color:#f2f2f4;background:rgba(255,255,255,.08);background-image:none;border:1px solid rgba(255,255,255,.14);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 4px 12px -6px rgba(0,0,0,.7);text-shadow:none;transform:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo:hover:not(:disabled),#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn:hover:not(:disabled){background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.24);transform:translateY(-1px)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo.tlmain{color:#f3ebe1;background:linear-gradient(180deg,#f2453f 0%,#d62d2a 100%);border-color:rgba(255,255,255,.22);box-shadow:0 8px 20px -8px rgba(240,70,62,.75),inset 0 1px 0 rgba(255,255,255,.28)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo.tlmain:hover:not(:disabled){background:linear-gradient(180deg,#f65650 0%,#e0342f 100%)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo:active:not(:disabled),#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn:active:not(:disabled){transform:scale(.97)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo::after,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn::after{display:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn{display:flex;align-items:center;justify-content:center;gap:8px}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlep{border-radius:12px;background:rgba(255,255,255,.05);background-image:none;border:1px solid rgba(255,255,255,.12);color:#cfc6b8;box-shadow:none;text-shadow:none}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlep.on{color:#fff;background:linear-gradient(rgba(255,90,74,.3),rgba(255,90,74,.16));border-color:#ff5a4a}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvlist{background:#141416;background-image:none;border:1px solid rgba(255,255,255,.14);border-radius:14px;color:#f2f2f4;box-shadow:0 16px 36px rgba(0,0,0,.65)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvgh{color:#8c8c94;font-weight:600}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvitem{border-radius:10px;color:#f2f2f4}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvitem:hover{background:rgba(255,255,255,.06)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvitem.on{background:rgba(255,90,74,.14)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlvitem small{color:#9a9aa2}
/* ในโหมดย้อนยุค ปุ่มหลักคือ "สร้างไฟล์เสียง" (เจนสคริปต์อยู่ที่ STEP 1) → ปุ่มแดงแบบเดียวกับหน้าอื่น */
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo.pri{color:#f3ebe1;background:linear-gradient(180deg,#f2453f 0%,#d62d2a 100%);border-color:rgba(255,255,255,.22);box-shadow:0 8px 20px -8px rgba(240,70,62,.75),inset 0 1px 0 rgba(255,255,255,.28)}
#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo.pri:hover:not(:disabled){background:linear-gradient(180deg,#f65650 0%,#e0342f 100%)}
/* โหมดย้อนยุค: การ์ด STEP 1 / STEP 3 ให้เป็นการ์ดเข้มแบบเดียวกับหน้าอื่น + ปุ่ม "สร้างรายการซีน" ปุ่มแดงมน */
#p-ai-script#p-ai-script#p-ai-script .aicols.retro2 #aiNews,#p-ai-script#p-ai-script#p-ai-script .aitop:has(+.aicols.retro2),#p-ai-script#p-ai-script#p-ai-script .slx-set{background:linear-gradient(180deg,#232326 0%,#161618 100%);border:1px solid rgba(255,255,255,.09);border-radius:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 2px 6px rgba(0,0,0,.4),0 22px 40px -16px rgba(0,0,0,.85)}
#p-ai-script#p-ai-script#p-ai-script #slGen{border-radius:12px;font-size:16px;font-weight:700;color:#f3ebe1;background:linear-gradient(180deg,#f2453f 0%,#d62d2a 100%);border:1px solid rgba(255,255,255,.22);box-shadow:0 8px 20px -8px rgba(240,70,62,.75),inset 0 1px 0 rgba(255,255,255,.28);text-shadow:none}
#p-ai-script#p-ai-script#p-ai-script #slGen:hover:not(:disabled){background:linear-gradient(180deg,#f65650 0%,#e0342f 100%);transform:translateY(-1px)}
#p-ai-script#p-ai-script#p-ai-script #slGen:active:not(:disabled){transform:scale(.98)}
#p-ai-script#p-ai-script#p-ai-script .slx-empty{background-color:#101012;background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.02) 0 10px,transparent 10px 20px);border:1.5px dashed rgba(255,255,255,.2);border-radius:12px;box-shadow:inset 0 2px 8px rgba(0,0,0,.55);color:#93939b;line-height:1.7}

/* มือถือ: 051-retro-balance บังคับ 2 คอลัมน์ทับกฎมือถือเดิม — ให้เรียงลงทีละขั้น */
@media(max-width:760px){#p-ai-script#p-ai-script#p-ai-script .aicols.retro2{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlgo,#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell#p-ai-tell[data-emb] .tlbtn{white-space:nowrap;font-size:14px;padding-left:10px!important;padding-right:10px!important;gap:6px}}
/* STEP 3: บอกชัดว่าเป็นรายการภาพที่แนะนำ ไม่ใช่รูปที่สร้างแล้ว */
#p-ai-script#p-ai-script .aic5 .slx-pvnote{margin:2px 4px 6px;padding:9px 12px;border-radius:10px;font-size:13px;line-height:1.55;color:#d8dbe2;background:rgba(255,196,0,.08);border:1px solid rgba(255,196,0,.28)}
#p-ai-script#p-ai-script .aic5 .slx-pvnote b{color:#ffd45c;font-weight:800}
/* เมนูโหมด: ✓ เขียว = โหมดที่เขียนบทไว้แล้ว (โหมดที่เลือกอยู่ใช้แถบแดงบอก) */
#p-ai-script#p-ai-script#p-ai-script .aimdi[data-aimi] em{opacity:0;padding:3px 9px;border-radius:999px;font-size:11.5px;font-weight:800;white-space:nowrap;color:#9df0b7;background:rgba(31,163,74,.16);border:1px solid rgba(61,220,114,.42)}
#p-ai-script#p-ai-script#p-ai-script .aimdi[data-aimi].hasw em{opacity:1}
