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'

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_PINK = (255, 182, 185)
SOFT_YELLOW = (255, 230, 150)
SOFT_PURPLE = (200, 170, 220)
MINT = (152, 224, 210)
RED_WARN = (220, 60, 60)

slides = [
    {
        'name': 'slide_01_cover',
        'bg_prompt': 'Flat lay of a cute bullet journal spread on wooden desk with washi tape, Japanese yen bills, coins, travel stickers, warning sign stickers, pastel pink and cream aesthetic, overhead view, soft natural lighting, scrapbook style, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 50, 'opacity_end': 225, 'height_ratio': 0.65},
        'seed': 7001,
        'text_layers': [
            {'type': 'rect', 'x': 280, 'y': 55, 'w': 520, 'h': 80, 'radius': 40, 'fill': (*RED_WARN, 230)},
            {'type': 'text', 'text': '✗ 冤枉錢警告', 'x': 540, 'y': 65, 'font_key': 'huninn', 'size': 44, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '去日本別再花', 'x': 540, 'y': 210, 'font_key': 'huninn', 'size': 100, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '冤枉錢！', 'x': 540, 'y': 330, 'font_key': 'huninn', 'size': 110, 'color': RED_WARN, 'anchor': 'mt'},
            {'type': 'text', 'text': '10 個新手必踩的省錢地雷', 'x': 540, 'y': 470, 'font_key': 'seto', 'size': 46, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 200, 'y': 545, 'w': 680, 'h': 4, 'radius': 2, 'fill': (*SOFT_PINK, 180)},
            {'type': 'rect', 'x': 80, 'y': 585, 'w': 920, 'h': 600, 'radius': 30, 'fill': (*WHITE, 200)},
            {'type': 'text', 'text': '你中了幾個？', 'x': 540, 'y': 605, 'font_key': 'huninn', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 670, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*RED_WARN, 255)},
            {'type': 'text', 'text': '機場換匯 匯差虧3-5%', 'x': 175, 'y': 662, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 720, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*RED_WARN, 255)},
            {'type': 'text', 'text': '只玩東京買JR Pass 浪費萬元', 'x': 175, 'y': 712, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 770, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*RED_WARN, 255)},
            {'type': 'text', 'text': '國際漫遊一天NT$399（超貴）', 'x': 175, 'y': 762, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 820, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*RED_WARN, 255)},
            {'type': 'text', 'text': '機場搭計程車 花¥25,000', 'x': 175, 'y': 812, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 870, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*RED_WARN, 255)},
            {'type': 'text', 'text': '唐吉軻德沒用券 少省7%', 'x': 175, 'y': 862, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN},
            {'type': 'text', 'text': '...還有更多', 'x': 540, 'y': 920, 'font_key': 'iansui', 'size': 32, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 120, 'y': 975, 'w': 840, 'h': 70, 'radius': 20, 'fill': (*SOFT_BLUE, 150)},
            {'type': 'text', 'text': '文末附 SIM88 折扣碼 最高88折', 'x': 540, 'y': 990, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 120, 'y': 1065, 'w': 840, 'h': 70, 'radius': 20, 'fill': (*SOFT_YELLOW, 150)},
            {'type': 'text', 'text': '附正確省錢SOP 照做就對了', 'x': 540, 'y': 1080, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '左滑自我檢查 ▶▶▶', 'x': 540, 'y': 1220, 'font_key': 'seto', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_02_mistakes_1to3',
        'bg_prompt': 'Cute bullet journal checklist page, washi tape borders, red cross stickers and green check stickers, pastel cream and pink scrapbook spread, flat lay on wooden desk, soft lighting, cozy aesthetic, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 70, 'opacity_end': 225, 'height_ratio': 0.55},
        'seed': 7101,
        'text_layers': [
            {'type': 'rect', 'x': 300, 'y': 45, 'w': 480, 'h': 70, 'radius': 35, 'fill': (*RED_WARN, 230)},
            {'type': 'text', 'text': '冤枉錢 #1 ~ #3', 'x': 540, 'y': 52, 'font_key': 'huninn', 'size': 38, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 145, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 158, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#1', 'x': 130, 'y': 165, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '在機場換日幣', 'x': 180, 'y': 165, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '匯差 3-5%，換¥50,000', 'x': 120, 'y': 230, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '直接虧 NT$300-500', 'x': 120, 'y': 280, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 335, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：網路結匯＋機場ATM提領最省', 'x': 540, 'y': 342, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '或刷信用卡海外回饋2-3%反賺', 'x': 540, 'y': 400, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 505, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 518, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#2', 'x': 130, 'y': 525, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '只玩東京買JR Pass', 'x': 180, 'y': 525, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '全國版 ¥50,000（NT$10,800）', 'x': 120, 'y': 590, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '東京市區根本用不到！', 'x': 120, 'y': 640, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 695, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：Suica儲值¥5,000搭一週夠用', 'x': 540, 'y': 702, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '跨城市才考慮地區Pass ¥20,000起', 'x': 540, 'y': 760, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 865, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 878, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#3', 'x': 130, 'y': 885, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '在觀光區吃飯', 'x': 180, 'y': 885, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '淺草雷門拉麵 ¥1,200', 'x': 120, 'y': 950, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '巷子裡同品質只要 ¥800', 'x': 120, 'y': 1000, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 1055, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：離開大馬路走2分鐘就省¥400', 'x': 540, 'y': 1062, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '用Tabelog查3.5分以上的巷弄店', 'x': 540, 'y': 1120, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_03_mistakes_4to6',
        'bg_prompt': 'Cute bullet journal page with washi tape, smartphone stickers, shopping bag stickers, pastel blue and cream scrapbook spread, flat lay on wooden desk, cozy aesthetic, soft lighting, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 70, 'opacity_end': 225, 'height_ratio': 0.55},
        'seed': 7201,
        'text_layers': [
            {'type': 'rect', 'x': 300, 'y': 45, 'w': 480, 'h': 70, 'radius': 35, 'fill': (*RED_WARN, 230)},
            {'type': 'text', 'text': '冤枉錢 #4 ~ #6', 'x': 540, 'y': 52, 'font_key': 'huninn', 'size': 38, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 145, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 158, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#4', 'x': 130, 'y': 165, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '用國際漫遊上網', 'x': 180, 'y': 165, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '一天 NT$399！5天就噴', 'x': 120, 'y': 230, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': 'NT$1,995', 'x': 120, 'y': 280, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 335, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：eSIM只要NT$65/天 5天省$1,670', 'x': 540, 'y': 342, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '省下來的錢夠吃18碗松屋牛丼', 'x': 540, 'y': 400, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 505, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 518, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#5', 'x': 130, 'y': 525, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '沒下載券就衝唐吉軻德', 'x': 180, 'y': 525, 'font_key': 'huninn', 'size': 40, 'color': RED_WARN},
            {'type': 'text', 'text': '少了7%折扣 花¥10,000', 'x': 120, 'y': 590, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '白白少省 ¥700（NT$151）', 'x': 120, 'y': 640, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 695, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：先截圖優惠券 免稅10%+折扣7%', 'x': 540, 'y': 702, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '結帳前出示 最多省17%', 'x': 540, 'y': 760, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 865, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 878, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#6', 'x': 130, 'y': 885, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '在日本買轉接頭/充電器', 'x': 180, 'y': 885, 'font_key': 'huninn', 'size': 40, 'color': RED_WARN},
            {'type': 'text', 'text': '日本售價 ¥2,000+（NT$430）', 'x': 120, 'y': 950, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '台灣只要 NT$100-200', 'x': 120, 'y': 1000, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 1055, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：台灣先買好 省一半以上', 'x': 540, 'y': 1062, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '行動電源也是 日本買超貴', 'x': 540, 'y': 1120, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_04_mistakes_7to9',
        'bg_prompt': 'Cute bullet journal page with washi tape, airplane stickers, water bottle stickers, hotel stickers, pastel purple and cream scrapbook spread, flat lay overhead view, wooden desk, cozy aesthetic, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 70, 'opacity_end': 225, 'height_ratio': 0.55},
        'seed': 7301,
        'text_layers': [
            {'type': 'rect', 'x': 300, 'y': 45, 'w': 480, 'h': 70, 'radius': 35, 'fill': (*RED_WARN, 230)},
            {'type': 'text', 'text': '冤枉錢 #7 ~ #9', 'x': 540, 'y': 52, 'font_key': 'huninn', 'size': 38, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 145, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 158, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#7', 'x': 130, 'y': 165, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '不知退稅門檻亂買', 'x': 180, 'y': 165, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '沒湊滿 ¥5,000 結帳', 'x': 120, 'y': 230, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '白付 10% 消費稅！', 'x': 120, 'y': 280, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 335, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：同店湊滿¥5,000再結帳退10%', 'x': 540, 'y': 342, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '2026/11起改先付後退 趁早去更省', 'x': 540, 'y': 400, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 505, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 518, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#8', 'x': 130, 'y': 525, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '機場搭計程車到市區', 'x': 180, 'y': 525, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '成田→新宿 計程車¥25,000+', 'x': 120, 'y': 590, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '等於 NT$5,400 燒掉了', 'x': 120, 'y': 640, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 695, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：Skyliner+地鐵 ¥2,800 省9倍', 'x': 540, 'y': 702, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '京成巴士更省 ¥1,300起', 'x': 540, 'y': 760, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 865, 'w': 920, 'h': 330, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 878, 'w': 60, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#9', 'x': 130, 'y': 885, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '每天在超商買瓶裝水', 'x': 180, 'y': 885, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '¥110/瓶 x 每天3瓶 x 5天', 'x': 120, 'y': 950, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '= ¥1,650（NT$356）', 'x': 120, 'y': 1000, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 1055, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：帶水壺裝自來水（可生飲！）', 'x': 540, 'y': 1062, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '車站也有免費飲水機', 'x': 540, 'y': 1120, 'font_key': 'iansui', 'size': 28, 'color': WARM_BROWN, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_05_sop',
        'bg_prompt': 'Cute bullet journal checklist page with washi tape, green checkmark stickers, gold star stickers, pastel green and cream scrapbook spread, flat lay on wooden desk, organized aesthetic, soft lighting, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 60, 'opacity_end': 220, 'height_ratio': 0.6},
        'seed': 7401,
        'text_layers': [
            {'type': 'rect', 'x': 300, 'y': 45, 'w': 480, 'h': 70, 'radius': 35, 'fill': (*RED_WARN, 230)},
            {'type': 'text', 'text': '冤枉錢 #10', 'x': 540, 'y': 52, 'font_key': 'huninn', 'size': 38, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 145, 'w': 920, 'h': 310, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'rect', 'x': 100, 'y': 158, 'w': 70, 'h': 60, 'radius': 30, 'fill': (*RED_WARN, 220)},
            {'type': 'text', 'text': '#10', 'x': 135, 'y': 165, 'font_key': 'huninn', 'size': 34, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '沒比價就訂飯店', 'x': 190, 'y': 165, 'font_key': 'huninn', 'size': 42, 'color': RED_WARN},
            {'type': 'text', 'text': '同一間飯店 Booking vs Agoda', 'x': 120, 'y': 235, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': 'vs 官網 差價可達 20%', 'x': 120, 'y': 285, 'font_key': 'huninn', 'size': 36, 'color': RED_WARN},
            {'type': 'rect', 'x': 120, 'y': 335, 'w': 840, 'h': 55, 'radius': 12, 'fill': (*SOFT_GREEN, 150)},
            {'type': 'text', 'text': '✓ 正解：三平台比價+信用卡合作優惠疊加', 'x': 540, 'y': 342, 'font_key': 'huninn', 'size': 30, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 500, 'w': 920, 'h': 800, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'text', 'text': '★ 正確省錢 SOP', 'x': 540, 'y': 520, 'font_key': 'huninn', 'size': 46, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'text', 'text': '出發前照做就對了', 'x': 540, 'y': 575, 'font_key': 'seto', 'size': 34, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 630, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*SOFT_BLUE, 200)},
            {'type': 'text', 'text': '1', 'x': 165, 'y': 637, 'font_key': 'huninn', 'size': 32, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '網路結匯換好日幣', 'x': 210, 'y': 640, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 700, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*SOFT_GREEN, 200)},
            {'type': 'text', 'text': '2', 'x': 165, 'y': 707, 'font_key': 'huninn', 'size': 32, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '裝好 eSIM（SIM88）', 'x': 210, 'y': 710, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 770, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*SOFT_YELLOW, 200)},
            {'type': 'text', 'text': '3', 'x': 165, 'y': 777, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '截圖唐吉軻德優惠券', 'x': 210, 'y': 780, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 840, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*SOFT_PINK, 200)},
            {'type': 'text', 'text': '4', 'x': 165, 'y': 847, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '帶水壺+轉接頭+行動電源', 'x': 210, 'y': 850, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 910, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*SOFT_PURPLE, 200)},
            {'type': 'text', 'text': '5', 'x': 165, 'y': 917, 'font_key': 'huninn', 'size': 32, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '三平台比價訂房', 'x': 210, 'y': 920, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 980, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*MINT[:3], 200)},
            {'type': 'text', 'text': '6', 'x': 165, 'y': 987, 'font_key': 'huninn', 'size': 32, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '到了用IC卡+離觀光區吃', 'x': 210, 'y': 990, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 140, 'y': 1050, 'w': 50, 'h': 50, 'radius': 25, 'fill': (*CORAL, 200)},
            {'type': 'text', 'text': '7', 'x': 165, 'y': 1057, 'font_key': 'huninn', 'size': 32, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'text', 'text': '購物湊滿¥5,000退稅', 'x': 210, 'y': 1060, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'text', 'text': '照做至少省 NT$3,000+', 'x': 540, 'y': 1140, 'font_key': 'huninn', 'size': 40, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'text', 'text': '截圖存起來出發前再看一次', 'x': 540, 'y': 1200, 'font_key': 'seto', 'size': 34, 'color': WARM_BROWN, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_06_sim88',
        'bg_prompt': 'Cute bullet journal spread with smartphone illustration, wifi signal stickers, airplane stickers, washi tape borders, pastel mint and cream colors, flat lay on wooden desk, cozy scrapbook aesthetic, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 60, 'opacity_end': 215, 'height_ratio': 0.6},
        'seed': 7501,
        'text_layers': [
            {'type': 'rect', 'x': 200, 'y': 45, 'w': 680, 'h': 70, 'radius': 35, 'fill': (*SOFT_BLUE, 230)},
            {'type': 'text', 'text': '冤枉錢#4 的最佳解法', 'x': 540, 'y': 52, 'font_key': 'huninn', 'size': 38, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 150, 'w': 920, 'h': 280, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'text', 'text': '國際漫遊 vs SIM88 eSIM', 'x': 540, 'y': 170, 'font_key': 'huninn', 'size': 40, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 120, 'y': 230, 'w': 380, 'h': 60, 'radius': 15, 'fill': (*RED_WARN, 180)},
            {'type': 'text', 'text': '漫遊 NT$399/天', 'x': 310, 'y': 240, 'font_key': 'huninn', 'size': 34, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 580, 'y': 230, 'w': 380, 'h': 60, 'radius': 15, 'fill': (*SOFT_GREEN, 200)},
            {'type': 'text', 'text': 'eSIM NT$65/天', 'x': 770, 'y': 240, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '5天差價 = NT$1,670', 'x': 540, 'y': 310, 'font_key': 'huninn', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'text', 'text': '省下來夠吃 18 碗松屋牛丼', 'x': 540, 'y': 365, 'font_key': 'seto', 'size': 34, 'color': WARM_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 470, 'w': 920, 'h': 370, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'text', 'text': 'SIM88 eSIM 五大優勢', 'x': 540, 'y': 490, 'font_key': 'huninn', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'rect', 'x': 120, 'y': 555, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*CORAL, 255)},
            {'type': 'text', 'text': '免實名認證 掃碼即開通', 'x': 155, 'y': 545, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 120, 'y': 605, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*SOFT_BLUE, 255)},
            {'type': 'text', 'text': '5分鐘快速出貨 馬上能用', 'x': 155, 'y': 595, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 120, 'y': 655, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*SOFT_GREEN, 255)},
            {'type': 'text', 'text': 'Ultra 5G 全程不降速', 'x': 155, 'y': 645, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 120, 'y': 705, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*SOFT_YELLOW, 255)},
            {'type': 'text', 'text': 'LINE 即時客服 有問題秒回', 'x': 155, 'y': 695, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 120, 'y': 755, 'w': 14, 'h': 14, 'radius': 7, 'fill': (*SOFT_PURPLE, 255)},
            {'type': 'text', 'text': '台灣品牌 安心有保障', 'x': 155, 'y': 745, 'font_key': 'huninn', 'size': 36, 'color': DARK_BROWN},
            {'type': 'rect', 'x': 80, 'y': 880, 'w': 920, 'h': 420, 'radius': 25, 'fill': (*SOFT_YELLOW, 130)},
            {'type': 'text', 'text': '★ 當期折扣碼', 'x': 540, 'y': 900, 'font_key': 'huninn', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 960, 'w': 800, 'h': 50, 'radius': 10, 'fill': (*SOFT_BLUE, 160)},
            {'type': 'text', 'text': 'HELLO10  新客首購9折 (滿$500)', 'x': 540, 'y': 966, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 1018, 'w': 800, 'h': 50, 'radius': 10, 'fill': (*SOFT_GREEN, 160)},
            {'type': 'text', 'text': 'TRAVEL2026  Q2全季92折 (滿$600)', 'x': 540, 'y': 1024, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 1076, 'w': 800, 'h': 50, 'radius': 10, 'fill': (*SOFT_YELLOW, 160)},
            {'type': 'text', 'text': 'ULTRA88  Ultra方案88折 (滿$800)', 'x': 540, 'y': 1082, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 1134, 'w': 800, 'h': 50, 'radius': 10, 'fill': (*SOFT_PURPLE, 160)},
            {'type': 'text', 'text': 'BFF2026N  滿$499現折$50', 'x': 540, 'y': 1140, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 140, 'y': 1192, 'w': 800, 'h': 50, 'radius': 10, 'fill': (*SOFT_PINK, 160)},
            {'type': 'text', 'text': 'SPRING10  春季9折 (滿$399)', 'x': 540, 'y': 1198, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN, 'anchor': 'mt'},
        ],
    },
    {
        'name': 'slide_07_cta',
        'bg_prompt': 'Cute bullet journal ending page with washi tape, heart stickers, star stickers, confetti decorations, pastel coral and cream scrapbook, flat lay on wooden desk, cheerful cozy aesthetic, soft lighting, no text no words no letters, 4K quality',
        'gradient': {'direction': 'bottom', 'color': CREAM, 'opacity_start': 80, 'opacity_end': 230, 'height_ratio': 0.7},
        'seed': 7601,
        'text_layers': [
            {'type': 'rect', 'x': 200, 'y': 55, 'w': 680, 'h': 80, 'radius': 40, 'fill': (*CORAL, 230)},
            {'type': 'text', 'text': '10個冤枉錢 你中幾個？', 'x': 540, 'y': 65, 'font_key': 'huninn', 'size': 40, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 180, 'w': 920, 'h': 630, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'text', 'text': '地雷總整理', 'x': 540, 'y': 200, 'font_key': 'huninn', 'size': 42, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'text', 'text': '✗ #1 機場換匯虧3-5%', 'x': 140, 'y': 265, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #2 只玩東京買JR Pass', 'x': 140, 'y': 310, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #3 觀光區吃飯多花¥400', 'x': 140, 'y': 355, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #4 國際漫遊NT$399/天', 'x': 140, 'y': 400, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #5 唐吉軻德沒用券少省7%', 'x': 140, 'y': 445, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #6 在日本買轉接頭貴2倍', 'x': 140, 'y': 490, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #7 不知退稅門檻白付10%', 'x': 140, 'y': 535, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #8 機場搭計程車¥25,000', 'x': 140, 'y': 580, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #9 天天買水¥110/瓶', 'x': 140, 'y': 625, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '✗ #10 沒比價訂房差20%', 'x': 140, 'y': 670, 'font_key': 'huninn', 'size': 32, 'color': DARK_BROWN},
            {'type': 'text', 'text': '全避開至少省 NT$3,000+', 'x': 540, 'y': 730, 'font_key': 'huninn', 'size': 36, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 850, 'w': 920, 'h': 180, 'radius': 25, 'fill': (*WHITE, 210)},
            {'type': 'text', 'text': '★ 折扣碼：HELLO10 / TRAVEL2026', 'x': 540, 'y': 875, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': 'ULTRA88 / BFF2026N / SPRING10', 'x': 540, 'y': 920, 'font_key': 'huninn', 'size': 34, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'rect', 'x': 250, 'y': 970, 'w': 580, 'h': 50, 'radius': 25, 'fill': (*CORAL, 220)},
            {'type': 'text', 'text': 'sim88.com.tw', 'x': 540, 'y': 978, 'font_key': 'huninn', 'size': 36, 'color': WHITE, 'anchor': 'mt'},
            {'type': 'rect', 'x': 80, 'y': 1070, 'w': 920, 'h': 230, 'radius': 25, 'fill': (*SOFT_YELLOW, 140)},
            {'type': 'text', 'text': '覺得實用嗎？', 'x': 540, 'y': 1095, 'font_key': 'huninn', 'size': 46, 'color': DARK_BROWN, 'anchor': 'mt'},
            {'type': 'text', 'text': '★收藏本篇 ★分享給旅伴', 'x': 540, 'y': 1160, 'font_key': 'huninn', 'size': 38, 'color': CORAL, 'anchor': 'mt'},
            {'type': 'text', 'text': '留言你踩過哪個地雷 @sim88sim88', 'x': 540, 'y': 1215, 'font_key': 'huninn', 'size': 36, 'color': CORAL, 'anchor': 'mt'},
        ],
    },
]

results = pipeline.generate_post(slides, output_dir, delay_between=3)
print(f'Generated {len(results)} slides')
for r in results:
    print(f'  {r}')
print('ALL DONE')
