"""Generate japan_save slides - 日本自由行省錢攻略 (手帳風)"""
import os, sys
sys.path.insert(0, "C:/Users/Leole/Documents/mallGroup_hnt4h/flux_pipeline")
from flux_slide_generator import FluxPipeline

pipeline = FluxPipeline(comfyui_host="100.67.105.103:8188")
output_dir = "C:/Users/Leole/Documents/mallGroup_hnt4h/ig_posts/japan_save"

# Color constants
CREAM = (255, 248, 235)
DARK_BROWN = (80, 50, 30)
WARM_BROWN = (139, 90, 60)
WHITE = (255, 255, 255)
CORAL = (255, 127, 110)
SOFT_BLUE = (130, 204, 221)
SOFT_GREEN = (162, 217, 170)
SOFT_YELLOW = (255, 230, 150)
SOFT_PINK = (255, 182, 185)
SOFT_PURPLE = (200, 170, 220)
MINT = (152, 224, 210)

slides = [
    # ── Slide 1: Cover ──
    {
        "name": "slide_01_cover",
        "bg_prompt": "Flat lay of a cute bullet journal spread on wooden desk with washi tape, cherry blossom stickers, Japanese train ticket stubs, pastel pink and cream colors, cozy aesthetic, overhead view, soft natural light, scrapbook style, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 50, "opacity_end": 220, "height_ratio": 0.65},
        "seed": 6001,
        "text_layers": [
            # Category badge
            {"type": "rect", "x": 340, "y": 80, "w": 400, "h": 80, "radius": 40, "fill": (*CORAL, 230)},
            {"type": "text", "text": "★ 省錢攻略", "x": 540, "y": 95, "font_key": "huninn", "size": 42, "color": WHITE, "anchor": "mt"},
            # Main title
            {"type": "text", "text": "日本自由行", "x": 540, "y": 250, "font_key": "huninn", "size": 95, "color": DARK_BROWN, "anchor": "mt", "stroke_width": 2, "stroke_fill": WHITE},
            {"type": "text", "text": "省錢攻略", "x": 540, "y": 360, "font_key": "huninn", "size": 95, "color": DARK_BROWN, "anchor": "mt", "stroke_width": 2, "stroke_fill": WHITE},
            # Subtitle
            {"type": "text", "text": "交通+美食+住宿 一次搞定", "x": 540, "y": 480, "font_key": "seto", "size": 46, "color": WARM_BROWN, "anchor": "mt"},
            # Discount preview cards
            {"type": "rect", "x": 80, "y": 590, "w": 280, "h": 70, "radius": 15, "fill": (*SOFT_BLUE, 200)},
            {"type": "text", "text": "HELLO10 9折", "x": 220, "y": 605, "font_key": "huninn", "size": 34, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 400, "y": 590, "w": 280, "h": 70, "radius": 15, "fill": (*SOFT_GREEN, 200)},
            {"type": "text", "text": "TRAVEL2026 92折", "x": 540, "y": 605, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 720, "y": 590, "w": 280, "h": 70, "radius": 15, "fill": (*SOFT_YELLOW, 200)},
            {"type": "text", "text": "ULTRA88 88折", "x": 860, "y": 605, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            # White card with key stats
            {"type": "rect", "x": 100, "y": 720, "w": 880, "h": 350, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "廉航來回 NT$3,200 起", "x": 540, "y": 750, "font_key": "huninn", "size": 40, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "牛丼一碗 ~NT$100", "x": 540, "y": 810, "font_key": "huninn", "size": 40, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "膠囊旅館 NT$440/晚 起", "x": 540, "y": 870, "font_key": "huninn", "size": 40, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "免稅購物 退10%稅金", "x": 540, "y": 930, "font_key": "huninn", "size": 40, "color": CORAL, "anchor": "mt"},
            # Swipe hint
            {"type": "rect", "x": 350, "y": 1130, "w": 380, "h": 65, "radius": 32, "fill": (*WARM_BROWN, 180)},
            {"type": "text", "text": "左滑看詳細 ▶▶", "x": 540, "y": 1143, "font_key": "huninn", "size": 36, "color": WHITE, "anchor": "mt"},
            # Bottom branding
            {"type": "text", "text": "@sim88sim88", "x": 540, "y": 1270, "font_key": "iansui", "size": 32, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 2: 交通篇 ──
    {
        "name": "slide_02_transport",
        "bg_prompt": "Flat lay of a travel journal spread with Japanese train stickers, bullet train washi tape, Tokyo metro map cutout, pastel blue and cream scrapbook aesthetic, overhead view, soft light, cute stationery, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 70, "opacity_end": 210, "height_ratio": 0.55},
        "seed": 6101,
        "text_layers": [
            # Title capsule
            {"type": "rect", "x": 280, "y": 60, "w": 520, "h": 80, "radius": 40, "fill": (*SOFT_BLUE, 230)},
            {"type": "text", "text": "交通篇 | 怎麼搭最省", "x": 540, "y": 75, "font_key": "huninn", "size": 40, "color": DARK_BROWN, "anchor": "mt"},
            # Card 1: 廉航
            {"type": "rect", "x": 80, "y": 190, "w": 920, "h": 250, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "廉航搶票", "x": 120, "y": 210, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 280, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_BLUE, 255)},
            {"type": "text", "text": "樂桃 單程 NT$1,580 起", "x": 155, "y": 270, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 330, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_BLUE, 255)},
            {"type": "text", "text": "虎航 單程 NT$1,199 起", "x": 155, "y": 320, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 380, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_BLUE, 255)},
            {"type": "text", "text": "亞航 高雄-大阪 NT$2,690 起", "x": 155, "y": 370, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Card 2: JR Pass
            {"type": "rect", "x": 80, "y": 490, "w": 920, "h": 300, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "JR Pass 交通券", "x": 120, "y": 510, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 580, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_GREEN, 255)},
            {"type": "text", "text": "全國版 7日 ~NT$10,500", "x": 155, "y": 570, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 630, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_GREEN, 255)},
            {"type": "text", "text": "JR東日本 5日 ~NT$7,350", "x": 155, "y": 620, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 680, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_GREEN, 255)},
            {"type": "text", "text": "Klook 買比官網更便宜", "x": 155, "y": 670, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 730, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_GREEN, 255)},
            {"type": "text", "text": "IC卡 Suica 搭地鐵必備", "x": 155, "y": 720, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Tip box
            {"type": "rect", "x": 80, "y": 840, "w": 920, "h": 130, "radius": 20, "fill": (*SOFT_YELLOW, 180)},
            {"type": "text", "text": "省錢 TIP", "x": 120, "y": 860, "font_key": "huninn", "size": 38, "color": CORAL},
            {"type": "text", "text": "東京地鐵 24hr券 ¥800(~NT$170)", "x": 120, "y": 910, "font_key": "iansui", "size": 34, "color": DARK_BROWN},
            # Page number
            {"type": "text", "text": "2 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 3: 美食篇 ──
    {
        "name": "slide_03_food",
        "bg_prompt": "Flat lay of a cute food journal spread with sushi stickers, ramen washi tape, chopstick illustrations, pastel green and cream scrapbook aesthetic, dried flowers, overhead view, soft light, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 80, "opacity_end": 215, "height_ratio": 0.55},
        "seed": 6201,
        "text_layers": [
            # Title capsule
            {"type": "rect", "x": 280, "y": 60, "w": 520, "h": 80, "radius": 40, "fill": (*SOFT_GREEN, 230)},
            {"type": "text", "text": "美食篇 | 吃飽不吃貴", "x": 540, "y": 75, "font_key": "huninn", "size": 40, "color": DARK_BROWN, "anchor": "mt"},
            # Card 1: 連鎖平價
            {"type": "rect", "x": 80, "y": 190, "w": 920, "h": 260, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "連鎖平價餐廳", "x": 120, "y": 210, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 280, "w": 16, "h": 16, "radius": 8, "fill": (*CORAL, 255)},
            {"type": "text", "text": "松屋牛丼 ¥450 (~NT$100)", "x": 155, "y": 270, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 330, "w": 16, "h": 16, "radius": 8, "fill": (*CORAL, 255)},
            {"type": "text", "text": "吉野家牛丼 ¥450 (~NT$100)", "x": 155, "y": 320, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 380, "w": 16, "h": 16, "radius": 8, "fill": (*CORAL, 255)},
            {"type": "text", "text": "丸龜製麵 ¥390 起(~NT$87)", "x": 155, "y": 370, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Card 2: 超商省錢
            {"type": "rect", "x": 80, "y": 500, "w": 920, "h": 260, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "超商省錢吃法", "x": 120, "y": 520, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 590, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "飯糰 ¥110~150 (~NT$25)", "x": 155, "y": 580, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 640, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "便當 ¥500~800 (~NT$110)", "x": 155, "y": 630, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 690, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "咖啡 ¥100~150 (~NT$25)", "x": 155, "y": 680, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Tip box
            {"type": "rect", "x": 80, "y": 810, "w": 920, "h": 130, "radius": 20, "fill": (*SOFT_YELLOW, 180)},
            {"type": "text", "text": "省錢 TIP", "x": 120, "y": 830, "font_key": "huninn", "size": 38, "color": CORAL},
            {"type": "text", "text": "超市晚上7~9點 熟食半價出清!", "x": 120, "y": 880, "font_key": "iansui", "size": 34, "color": DARK_BROWN},
            # Page number
            {"type": "text", "text": "3 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 4: 住宿篇 ──
    {
        "name": "slide_04_hotel",
        "bg_prompt": "Flat lay of a cozy travel planner journal with hotel stickers, key card cutouts, miniature bed illustrations, pastel purple and cream scrapbook aesthetic, wooden desk background, overhead view, soft light, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 75, "opacity_end": 215, "height_ratio": 0.55},
        "seed": 6301,
        "text_layers": [
            # Title capsule
            {"type": "rect", "x": 280, "y": 60, "w": 520, "h": 80, "radius": 40, "fill": (*SOFT_PURPLE, 230)},
            {"type": "text", "text": "住宿篇 | 睡好不花多", "x": 540, "y": 75, "font_key": "huninn", "size": 40, "color": DARK_BROWN, "anchor": "mt"},
            # Card 1: 住宿類型比較
            {"type": "rect", "x": 80, "y": 190, "w": 920, "h": 310, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "住宿類型比較", "x": 120, "y": 210, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 285, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PURPLE, 255)},
            {"type": "text", "text": "膠囊旅館 ¥2,000起(~NT$440)", "x": 155, "y": 275, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 335, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PURPLE, 255)},
            {"type": "text", "text": "青年旅館 ¥3,000起(~NT$660)", "x": 155, "y": 325, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 385, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PURPLE, 255)},
            {"type": "text", "text": "商務旅館 ¥5,000起(~NT$1,100)", "x": 155, "y": 375, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 435, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PURPLE, 255)},
            {"type": "text", "text": "Airbnb ¥4,000起(~NT$880)", "x": 155, "y": 425, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Card 2: 訂房技巧
            {"type": "rect", "x": 80, "y": 550, "w": 920, "h": 250, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "訂房省錢技巧", "x": 120, "y": 570, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 640, "w": 16, "h": 16, "radius": 8, "fill": (*MINT, 255)},
            {"type": "text", "text": "提早 2~3 個月訂 省 20%+", "x": 155, "y": 630, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 690, "w": 16, "h": 16, "radius": 8, "fill": (*MINT, 255)},
            {"type": "text", "text": "Agoda 手機限定價 再省 5%", "x": 155, "y": 680, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 740, "w": 16, "h": 16, "radius": 8, "fill": (*MINT, 255)},
            {"type": "text", "text": "週日~四入住 比週末便宜 30%", "x": 155, "y": 730, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Tip box
            {"type": "rect", "x": 80, "y": 850, "w": 920, "h": 130, "radius": 20, "fill": (*SOFT_YELLOW, 180)},
            {"type": "text", "text": "省錢 TIP", "x": 120, "y": 870, "font_key": "huninn", "size": 38, "color": CORAL},
            {"type": "text", "text": "用 Booking 免費取消 鎖住低價!", "x": 120, "y": 920, "font_key": "iansui", "size": 34, "color": DARK_BROWN},
            # Page number
            {"type": "text", "text": "4 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 5: 購物篇 ──
    {
        "name": "slide_05_shopping",
        "bg_prompt": "Flat lay of a shopping journal spread with cute shopping bag stickers, receipt tape, Japanese yen coin illustrations, pastel pink and cream scrapbook aesthetic, wooden desk, overhead view, soft light, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 75, "opacity_end": 215, "height_ratio": 0.55},
        "seed": 6401,
        "text_layers": [
            # Title capsule
            {"type": "rect", "x": 280, "y": 60, "w": 520, "h": 80, "radius": 40, "fill": (*SOFT_PINK, 230)},
            {"type": "text", "text": "購物篇 | 買到賺到", "x": 540, "y": 75, "font_key": "huninn", "size": 40, "color": DARK_BROWN, "anchor": "mt"},
            # Card 1: 免稅退稅
            {"type": "rect", "x": 80, "y": 190, "w": 920, "h": 260, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "免稅退稅攻略", "x": 120, "y": 210, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 280, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "滿 ¥5,000 即可退稅 10%", "x": 155, "y": 270, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 330, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "唐吉軻德 出示護照免稅", "x": 155, "y": 320, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 380, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PINK, 255)},
            {"type": "text", "text": "藥妝店 松本清/大國 比價必做", "x": 155, "y": 370, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Card 2: 信用卡
            {"type": "rect", "x": 80, "y": 500, "w": 920, "h": 250, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "信用卡省更多", "x": 120, "y": 520, "font_key": "huninn", "size": 44, "color": CORAL},
            {"type": "rect", "x": 120, "y": 590, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_YELLOW, 255)},
            {"type": "text", "text": "海外回饋 2.5~3% 的卡最划算", "x": 155, "y": 580, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 640, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_YELLOW, 255)},
            {"type": "text", "text": "JCB 卡在日本通路最廣", "x": 155, "y": 630, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 690, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_YELLOW, 255)},
            {"type": "text", "text": "匯率 APP 隨時比價再刷", "x": 155, "y": 680, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            # Tip box
            {"type": "rect", "x": 80, "y": 800, "w": 920, "h": 130, "radius": 20, "fill": (*SOFT_YELLOW, 180)},
            {"type": "text", "text": "省錢 TIP", "x": 120, "y": 820, "font_key": "huninn", "size": 38, "color": CORAL},
            {"type": "text", "text": "唐吉軻德 APP 優惠券再折 ¥200!", "x": 120, "y": 870, "font_key": "iansui", "size": 34, "color": DARK_BROWN},
            # Page number
            {"type": "text", "text": "5 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 6: SIM88 推廣頁 ──
    {
        "name": "slide_06_sim88",
        "bg_prompt": "Flat lay of a cute travel planner journal with smartphone sticker, wifi signal illustrations, airplane stickers, pastel mint and cream scrapbook aesthetic, washi tape decorations, overhead view, soft light, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 60, "opacity_end": 220, "height_ratio": 0.75},
        "seed": 6501,
        "text_layers": [
            # Title capsule
            {"type": "rect", "x": 240, "y": 60, "w": 600, "h": 80, "radius": 40, "fill": (*CORAL, 230)},
            {"type": "text", "text": "上網篇 | 出國網路首選", "x": 540, "y": 75, "font_key": "huninn", "size": 40, "color": WHITE, "anchor": "mt"},
            # SIM88 brand
            {"type": "text", "text": "SIM88 eSIM", "x": 540, "y": 190, "font_key": "huninn", "size": 62, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "出國上網最聰明的選擇", "x": 540, "y": 270, "font_key": "seto", "size": 40, "color": WARM_BROWN, "anchor": "mt"},
            # 5 advantages
            {"type": "rect", "x": 80, "y": 340, "w": 920, "h": 380, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "rect", "x": 120, "y": 365, "w": 16, "h": 16, "radius": 8, "fill": (*CORAL, 255)},
            {"type": "text", "text": "免實名認證 掃碼即用", "x": 155, "y": 355, "font_key": "huninn", "size": 38, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 420, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_BLUE, 255)},
            {"type": "text", "text": "5 分鐘出貨 免等待", "x": 155, "y": 410, "font_key": "huninn", "size": 38, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 475, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_GREEN, 255)},
            {"type": "text", "text": "Ultra 5G 全程不降速", "x": 155, "y": 465, "font_key": "huninn", "size": 38, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 530, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_YELLOW, 255)},
            {"type": "text", "text": "LINE 真人客服 即時回覆", "x": 155, "y": 520, "font_key": "huninn", "size": 38, "color": DARK_BROWN},
            {"type": "rect", "x": 120, "y": 585, "w": 16, "h": 16, "radius": 8, "fill": (*SOFT_PURPLE, 255)},
            {"type": "text", "text": "台灣品牌 安心有保障", "x": 155, "y": 575, "font_key": "huninn", "size": 38, "color": DARK_BROWN},
            # Discount codes
            {"type": "text", "text": "當期折扣碼", "x": 540, "y": 760, "font_key": "huninn", "size": 44, "color": CORAL, "anchor": "mt"},
            {"type": "rect", "x": 80, "y": 820, "w": 440, "h": 65, "radius": 15, "fill": (*SOFT_BLUE, 200)},
            {"type": "text", "text": "HELLO10 新客9折", "x": 300, "y": 833, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 560, "y": 820, "w": 440, "h": 65, "radius": 15, "fill": (*SOFT_GREEN, 200)},
            {"type": "text", "text": "TRAVEL2026 92折", "x": 780, "y": 833, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 80, "y": 905, "w": 440, "h": 65, "radius": 15, "fill": (*SOFT_YELLOW, 200)},
            {"type": "text", "text": "ULTRA88 88折", "x": 300, "y": 918, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 560, "y": 905, "w": 440, "h": 65, "radius": 15, "fill": (*SOFT_PURPLE, 200)},
            {"type": "text", "text": "BFF2026N 折$50", "x": 780, "y": 918, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 280, "y": 990, "w": 520, "h": 65, "radius": 15, "fill": (*SOFT_PINK, 200)},
            {"type": "text", "text": "SPRING10 春季9折", "x": 540, "y": 1003, "font_key": "huninn", "size": 32, "color": DARK_BROWN, "anchor": "mt"},
            # Website
            {"type": "rect", "x": 250, "y": 1100, "w": 580, "h": 75, "radius": 37, "fill": (*CORAL, 230)},
            {"type": "text", "text": "sim88.com.tw", "x": 540, "y": 1115, "font_key": "huninn", "size": 42, "color": WHITE, "anchor": "mt"},
            # Page number
            {"type": "text", "text": "6 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
    # ── Slide 7: CTA ──
    {
        "name": "slide_07_cta",
        "bg_prompt": "Flat lay of a cute journal closing page with heart stickers, star washi tape, bookmark ribbons, pastel rainbow colors on cream background, scrapbook aesthetic, overhead view, soft light, cozy feeling, no text no words no letters, 4K quality",
        "gradient": {"direction": "bottom", "color": CREAM, "opacity_start": 60, "opacity_end": 225, "height_ratio": 0.7},
        "seed": 6601,
        "text_layers": [
            # Main CTA
            {"type": "text", "text": "收藏本篇", "x": 540, "y": 120, "font_key": "huninn", "size": 72, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "旅行前再複習一次!", "x": 540, "y": 210, "font_key": "seto", "size": 44, "color": WARM_BROWN, "anchor": "mt"},
            # Discount code summary
            {"type": "rect", "x": 80, "y": 300, "w": 920, "h": 500, "radius": 25, "fill": (*WHITE, 210)},
            {"type": "text", "text": "折扣碼一覽", "x": 540, "y": 320, "font_key": "huninn", "size": 48, "color": CORAL, "anchor": "mt"},
            {"type": "text", "text": "HELLO10", "x": 150, "y": 400, "font_key": "huninn", "size": 38, "color": CORAL},
            {"type": "text", "text": "新客首購 9折 (滿$500)", "x": 380, "y": 400, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "text", "text": "TRAVEL2026", "x": 150, "y": 460, "font_key": "huninn", "size": 38, "color": SOFT_GREEN},
            {"type": "text", "text": "Q2全季 92折 (滿$600)", "x": 380, "y": 460, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "text", "text": "ULTRA88", "x": 150, "y": 520, "font_key": "huninn", "size": 38, "color": SOFT_YELLOW},
            {"type": "text", "text": "Ultra方案 88折 (滿$800)", "x": 380, "y": 520, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "text", "text": "BFF2026N", "x": 150, "y": 580, "font_key": "huninn", "size": 38, "color": SOFT_PURPLE},
            {"type": "text", "text": "滿$499 現折$50", "x": 380, "y": 580, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "text", "text": "SPRING10", "x": 150, "y": 640, "font_key": "huninn", "size": 38, "color": SOFT_PINK},
            {"type": "text", "text": "春季 9折 (滿$399)", "x": 380, "y": 640, "font_key": "huninn", "size": 36, "color": DARK_BROWN},
            {"type": "text", "text": "sim88.com.tw", "x": 540, "y": 730, "font_key": "huninn", "size": 40, "color": CORAL, "anchor": "mt"},
            # CTA actions
            {"type": "rect", "x": 80, "y": 860, "w": 280, "h": 100, "radius": 20, "fill": (*SOFT_PINK, 200)},
            {"type": "text", "text": "收藏", "x": 220, "y": 880, "font_key": "huninn", "size": 44, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 400, "y": 860, "w": 280, "h": 100, "radius": 20, "fill": (*SOFT_BLUE, 200)},
            {"type": "text", "text": "分享旅伴", "x": 540, "y": 880, "font_key": "huninn", "size": 44, "color": DARK_BROWN, "anchor": "mt"},
            {"type": "rect", "x": 720, "y": 860, "w": 280, "h": 100, "radius": 20, "fill": (*SOFT_GREEN, 200)},
            {"type": "text", "text": "留言", "x": 860, "y": 880, "font_key": "huninn", "size": 44, "color": DARK_BROWN, "anchor": "mt"},
            # Hashtag hint
            {"type": "text", "text": "留言你最想去日本哪裡?", "x": 540, "y": 1010, "font_key": "seto", "size": 40, "color": WARM_BROWN, "anchor": "mt"},
            # Account
            {"type": "rect", "x": 300, "y": 1100, "w": 480, "h": 75, "radius": 37, "fill": (*WARM_BROWN, 200)},
            {"type": "text", "text": "@sim88sim88", "x": 540, "y": 1115, "font_key": "huninn", "size": 42, "color": WHITE, "anchor": "mt"},
            # Page number
            {"type": "text", "text": "7 / 7", "x": 540, "y": 1280, "font_key": "iansui", "size": 30, "color": WARM_BROWN, "anchor": "mt"},
        ],
    },
]

if __name__ == "__main__":
    results = pipeline.generate_post(slides, output_dir, delay_between=3)
    print(f"\nDone! Generated {len(results)} slides in {output_dir}")
