# -*- coding: utf-8 -*-
"""記事は直さない（ショート専用・舞台型・2026-11-07）
エイイチの言葉: LOGは直さないって言ってんだろ！何度言えばわかる！（2026-11-07「ちょっと強すぎ。もう少し優しげに」で、セリフと画面をやわらかくした）"""
from butai_parts import *
OUTRO_K = 5

NAME, VER = "記事は直さない", 2
HEAD = "公開した記事<br>直す？"
T_ON = (0, 0.6)

def scene(T, S):
    h = CSS
    t0 = T(*T_ON)
    h += win(t0, T(1, 0), kick("公開した記事")
             + '<div class="card" style="left:48px;top:110px;width:804px;height:330px;justify-content:flex-start;padding-top:30px"><small>LOG</small><span style="font-size:44px">公開した記録</span></div>'
             + "".join(f'<div class="line" style="left:90px;top:{260 + k * 44}px;width:{[700, 620, 680][k]}px"></div>' for k in range(3))
             + f'<div class="stamp" style="left:48px;top:470px;font-size:46px;animation:{a("pop", t0 + 1.2, .3)}">ちょっと直す？</div>')
    t1 = T(1, 0)
    h += win(t1, T(2, 0), kick("エイイチの声")
             + f'<div class="msg" style="top:200px;text-align:center;font-size:84px;opacity:0;animation:{a("pop", t1 + 0.2, .4)}">直さないで<br>おこうね</div>')
    t2 = T(2, 0)
    h += win(t2, T(3, 0), kick("公開した記録")
             + '<div class="card" style="left:48px;top:110px;width:804px;height:300px;align-items:center;padding:0;font-size:60px">そのまま残す</div>'
             + f'<div class="stamp" style="left:48px;top:440px;font-size:50px;animation:{a("slam", t2 + 1.2, .3)}">公開したら、そのまま</div>')
    t3 = T(3, 0)
    st = "".join(f'<div class="card" style="left:{48 + k * 276}px;top:150px;width:252px;height:200px;align-items:center;padding:0;font-size:40px;opacity:0;animation:{a("up", t3 + 0.1 + k * 0.25)}"><small>{k + 1}回目</small>直さない</div>' for k in range(3))
    h += win(t3, T(4, 0), kick("同じお願い") + st
             + f'<div class="msg" style="top:400px;font-size:60px;opacity:0;animation:{a("pop", t3 + 1.0, .35)}">何回目かな？</div>')
    t4, s4 = T(4, 0), S(4)
    rows = "".join(f'<div class="chk" style="top:{150 + k * 100}px;animation:{a("up", t4 + 0.2 + k * 0.6)}"><i>✓</i>{nm}</div>' for k, nm in enumerate(["直さない", "直すか、聞かない"]))
    h += win(t4, None, kick("ルールの本に書いた") + rows
             + f'<div class="card or" style="left:48px;top:380px;width:420px;height:130px;align-items:center;padding:0;font-size:46px;opacity:0;animation:{a("pop", t4 + s4 - 1.4, .35)}">ルールの本</div>')
    h += outro(T, OUTRO_K)
    return h


def OVER(T):
    return stage_fx(T, fx=[dict(kind="stars", t=T(3, 0.0), d=2.0), dict(kind="shine", t=T(4, 2.0), d=0.9)])


FACE = [(-1, 0.0, 1.0, "smile"), (0, 0.0, 2.5, "wink"), (1, 0.0, 2.0, "smile"), (2, 0.0, 3.2, "trouble"), (3, 0.0, 1.5, "trouble"), (4, 0.0, 3.4, "joy"), ("end", 0.0, 3.0, "smile")]
POSE = [(-1, 0.0, 1), (1, 0.0, 4), (2, 0.0, 1), (3, 0.0, 4), (4, 0.0, 1), (4, 2.0, 4)]
LEAN = []
INTRO = "rise"
MOVES = [(2, 0.2, "bow", 1.2), (3, 0.2, "tilt", 1.0), (4, 2.0, "hop", 1.0)]
SE = [(-1, 0.0, "se_whoosh", -9), (0, 0.6, "se_boot", -12), (0, 1.8, "se_pop", -12), (1, 0.2, "se_pop", -12), (2, 1.2, "se_ding", -12),
      (3, 0.1, "se_tick", -13), (3, 0.35, "se_tick", -13), (3, 0.6, "se_tick", -13), (3, 1.0, "se_pop", -12), (4, 0.2, "se_tick", -12), (4, 0.8, "se_tick", -12), (4, 2.0, "se_ding", -10)]
ENDING = dict(kind="jump", at=(4, 2.0))
