EP, TITLE = 189, "迷いまで覚えた"
# 2026-11-26 カメラワーク（エイイチ了承済み）
# P1 斜め右前150cm、迷う高杉さん（腰上）と同じ形のツカムくん・右奥に小さくハコブくん／P2 高杉さんの左肩越し、ピタッと止まるツカムくん
# P3 ハコブくん目線100cm、右手前にハコブくんの画面（同じ止まり方の絵が2つ）・左に身を乗り出す高杉さん／P4 3人の全身の引き
# 舞台：台の上の左にお手本用の腕、右に箱。高杉さんは台の左、ハコブくんは右（毎コマ守る）
import os
from importlib.machinery import SourceFileLoader as _L
C = _L("_c188", os.path.expanduser("~/mnt/PixelstoMotors/ハコブくん/4コママンガ作成データ/縦長/_common_188_192.py")).load_module()
PROPS = [C.LEADER + ", at the LEFT end of the table", C.BOX + ", at the RIGHT end of the table", C.BOTTLE + ", held in Tsukamukun's gripper"]
PANELS = [
 dict(chars=["高杉", "ツカム", "ハコブ"], mouth="NORMAL", no_yline=True, hdir="left", prop=("TEACHING ARM, BOX AND BOTTLE", PROPS),
      hscale_text=["Takasugi stands at the left, from the waist up, x 2–46%, her head top at about 18% of the image height, both hands on the grip of the small teaching arm",
                   "Tsukamukun on its work table at the centre-right, x 36–80%, its arm in EXACTLY the same pose as the teaching arm, holding the bottle and hovering above the box",
                   "Hakobukun is SMALL at the back right, full body, three-quarter view facing camera-left toward Takasugi, x 80–98%, its top at about 52% and its wheels at about 80% of the image height, watching"],
      camera=["SHOT SIZE: Takasugi waist-up with Tsukamukun", "CAMERA POSITION: front-right, three-quarter", "CAMERA HEIGHT: 150 cm"],
      band="3% and 16%",
      comp=["Takasugi hesitates, eyes wandering, lips pursed, a small question mark near her head — both she and Tsukamukun hold still above the box",
            "the bubble 「えーと…ここかな」 at the upper left, its tail to Takasugi"],
      bubbles=[("Nurse Takasugi", "えーと…ここかな", ["えーと…", "ここかな"])],
      extra=[C.STOUT, C.CLOSED, C.TSU_SHAPE],
      scene="Takasugi is recording a demonstration with the small teaching arm: Tsukamukun copies her moves exactly. Above the box she can't decide where to put the bottle and stops for three seconds."),
 dict(chars=["高杉", "ツカム"], prop=("TEACHING ARM, BOX AND BOTTLE", PROPS),
      camera=["SHOT SIZE: Tsukamukun's arm above the box, Takasugi's back of head in the foreground", "CAMERA POSITION: over Takasugi's LEFT shoulder, from behind her", "CAMERA HEIGHT: 140 cm"],
      band="3% and 16%",
      comp=["the back of Takasugi's head (short chin-length black bob) and her left shoulder are in the left foreground, cut by the left and bottom edges, x 0–34%; her hands are NOT on the teaching arm",
            "Tsukamukun on its table fills the centre and right, x 30–96%, its face on the base visible, its arm frozen above the box holding the bottle — perfectly still",
            "the sound effect 「ピタッ」 beside the frozen gripper; the bubble 「…なんで止まるの？」 at the upper left, its tail to Takasugi"],
      sfx=[("ピタッ", "beside the gripper, about x 60–80%, y 22–32%")],
      bubbles=[("Nurse Takasugi", "…なんで止まるの？", ["…なんで", "止まるの？"])],
      extra=[C.TSU_SHAPE],
      scene="After learning, Tsukamukun moves on its own. Above the box it freezes for exactly three seconds. Takasugi: why does it stop?"),
 dict(chars=["高杉", "ツカム", "ハコブ"], mouth="NORMAL", no_yline=True, hdir="left", prop=("BOX AND BOTTLE", [C.BOX, C.BOTTLE + ", held in Tsukamukun's gripper"]),
      hscale_text=["Hakobukun is LARGE in the right foreground, cut by the right and bottom edges, x 46–100%, three-quarter view facing camera-left, its screen turned toward Takasugi",
                   "Takasugi at the left, from the waist up, leaning in toward Hakobukun's screen, x 0–44%, her head top at about 20% of the image height",
                   "Tsukamukun on its table SMALL in the background at the centre, x 30–58%, its arm frozen above the box"],
      camera=["SHOT SIZE: Hakobukun's screen close, Takasugi leaning in", "CAMERA POSITION: low, from beside Hakobukun", "CAMERA HEIGHT: 100 cm (Hakobukun's eye level)"],
      band="3% and 18%",
      comp=["Hakobukun's screen shows two small identical simple line pictures side by side: a robot arm stopped above a box. In this picture the screen shows ONLY these two pictures, NO eyes, NO text, NO numbers",
            "Takasugi is shocked and embarrassed, mouth open, a sweat drop",
            "two bubbles: 「エート…ココカナ」 at the upper centre, its tail down to Tsukamukun's face on its base; 「そこまでまねしないで！」 at the upper left, its tail to Takasugi"],
      bubbles=[("Tsukamukun", "エート…ココカナ", ["エート…", "ココカナ"]), ("Nurse Takasugi", "そこまでまねしないで！", ["そこまで", "まねしないで！"])],
      extra=[C.STOUT, C.CLOSED, C.TSU_SHAPE, ("KATAKANA CHECK:", ["エート…ココカナ is all KATAKANA"])],
      scene="Hakobukun shows the two recordings side by side on its screen: where Takasugi hesitated, Tsukamukun stops too. It even copied her hesitation."),
 dict(chars=["高杉", "ツカム", "ハコブ"], mouth="HAPPY", full=["高杉"], hdir="left", yfeet=92, ytop=30, prop=("TEACHING ARM, BOX AND BOTTLE", [C.LEADER + ", at the LEFT end of the table, untouched", C.BOX + ", at the RIGHT end of the table", C.BOTTLE + ", dropping neatly into the box"]),
      camera=["SHOT SIZE: all three, full body", "CAMERA POSITION: front-left, three-quarter", "CAMERA HEIGHT: 130 cm"],
      band="3% and 22%",
      comp=["Takasugi is centred at about 18% of the image width, arms crossed, a wry defeated smile",
            "Tsukamukun's work table stands in the middle, x 30–66%; Tsukamukun swiftly drops the bottle into the box with a quick clean swoosh line, no hesitation",
            "Hakobukun is centred at about 82% of the image width, three-quarter view facing camera-left toward Takasugi",
            C.SIZE("Takasugi", C.PIT.format(n="Takasugi")),
            "two bubbles: 「私より決断が早い」 at the upper left, its tail to Takasugi; 「迷イハ、教エタ人ニ、オ返シシマス」 at the upper right, its tail down to Hakobukun's screen"],
      bubbles=[("Nurse Takasugi", "私より決断が早い", ["私より", "決断が早い"]), ("Hakobukun", "迷イハ、教エタ人ニ、オ返シシマス", ["迷イハ、", "教エタ人ニ、", "オ返シシマス"])],
      extra=[C.STOUT, C.CLOSED, C.TSU_SHAPE, ("KATAKANA CHECK:", ["in 迷イハ、教エタ人ニ、オ返シシマス the イ, ハ, エ, タ, ニ, オ, シ, シ, マ, ス are KATAKANA"])],
      scene="The still parts of the demonstrations are trimmed and Tsukamukun relearns. Now it drops the bottle in without hesitating. Takasugi: faster to decide than me. Hakobukun: we return the hesitation to the teacher."),
]

# 2026-11-26 チェック①（バッチの下書き）：P1 b2（b1 はツカムくんの腕の先に顔）／P2 b1（b2 はお手本用の腕が人の手）／P3 b1
# P4 は1枚だけで、ハコブくんが手前の左・高杉さんがその奥 → 並びの順と同じ床を書き足して描き直す
PICK = {1: '第189話_P1_20261126_021531b2.jpg', 2: '第189話_P2_20261126_021531b1.jpg', 3: '第189話_P3_20261126_021531b1.jpg'}
PANELS[3] = dict(PANELS[3], extra=PANELS[3]["extra"] + [C.TURN("left", "Takasugi"),
    ("LEFT-TO-RIGHT ORDER — STRICT:", ["from LEFT to RIGHT: Takasugi (at the far LEFT), then the work table with Tsukamukun, then Hakobukun (at the far RIGHT). NEVER swap them. Takasugi and Hakobukun stand on the same floor at the same distance from the camera — neither is in front of the other"]),
    ("KANA — STRICT:", ["in 教エタ人ニ the エ, タ, ニ are KATAKANA, NOT hiragana"])])
# 描き直し1回目：021734 は高杉さんが白い別の制服、021738 はハコブくんが小さすぎ（高杉さんとの比 約0.53、目標0.74）→ 服と大きさを書き足してもう一度
PANELS[3] = dict(PANELS[3], extra=PANELS[3]["extra"] + [("TAKASUGI'S CLOTHES:", ["Takasugi wears exactly the same dark short-sleeved scrub top and scrub trousers as on her reference sheet and in the other panels — NOT a white uniform, NOT a dress"]),
    ("HAKOBUKUN IS NOT SMALL:", ["Hakobukun stands at the same distance from the camera as Takasugi; its top reaches the pit of Takasugi's stomach — clearly ABOVE her waist and belt line"])])
# 描き直し2回目：021940 は『』が付きハコブくんが手前で大きすぎ、021942 はハコブくんが奥に置かれて小さい（高杉さんの腰まで）
# → 枠の下地はやめ、画像の上の位置で書く（ハコブくんの車輪は高杉さんの靴と同じ 92%、上端は 49%）
PANELS[3] = dict(PANELS[3], no_yline=True, full=[],
    hscale_text=["Takasugi stands at the left, full body, x 6–30%, her head top at 30% and her shoes at 92% of the image height",
                 "the work table in the middle, x 32–68%, its feet at 92% of the image height",
                 "Hakobukun stands at the right, full body, x 70–96%, its top at 49% and its wheels at 92% of the image height — the SAME floor line as Takasugi's shoes, NOT further back. Its top is level with the pit of Takasugi's stomach",
                 "Hakobukun is NOT cut by the edge of the picture"],
    extra=PANELS[3]["extra"] + [("NO BRACKETS:", ["do NOT draw 「」 or 『』 marks anywhere inside the bubbles"])])
# 描き直し3回目：022023（同じ床・服・向きは合う。ハコブくんが高杉さんとの比 約0.60で小さめ）→ 仕上げでハコブくんだけ足もとを中心に 1.2 倍（目標0.74）
PICK.update({4: '第189話_P4_20261126_022023.jpg'})
FIX = {4: [(0.64, 1.0, 0.45, 1.2)]}
# 2026-11-26 エイイチ「ハコブくんが細い・段ボールが切れてる・ツカムくんがでかい」→ 方眼で測り直して描き直す
# P1：奥のハコブくんが細い（1.65倍）／P4：ハコブくんが細い（2.05倍）・箱がハコブくんに隠れる・ツカムくんが高杉さんの頭の高さ
PANELS[0] = dict(PANELS[0], hscale_text=PANELS[0]["hscale_text"][:2] + ["Hakobukun is SMALL at the back right, full body, three-quarter view facing camera-left toward Takasugi, x 72–98%, its top at about 52% and its wheels at about 82% of the image height, watching"],
      extra=PANELS[0]["extra"] + [C.TSU_SIZE("Takasugi"), C.HWIDTH(52, 82)])
PANELS[3] = dict(PANELS[3], hscale_text=["Takasugi stands at the left, full body, x 4–28%, her head top at 30% and her shoes at 92% of the image height",
                 "the work table in the middle, x 30–60%, its feet at 92% of the image height. The teaching arm is at the table's LEFT end, Tsukamukun in the middle, and the open box at the table's RIGHT end — the whole box is clearly visible, nothing in front of it",
                 "Hakobukun stands at the right with a small gap after the table, full body, x 62–99%, its top at 55% and its wheels at 92% of the image height — the SAME floor line as Takasugi's shoes. Its top is level with the pit of Takasugi's stomach. It does NOT overlap the table"],
      extra=PANELS[3]["extra"] + [C.TSU_SIZE("Takasugi"), C.HWIDTH(55, 92)])
FIX = {}
# 2026-11-26 エイイチ「リーダーアームの大きさが変。描画が変」→ お手本用の腕の文を直し（_common_188_192.py の LEADER）、出てくる P1・P2・P4 を描き直す
PROPS = [C.LEADER, C.BOX + ", at the RIGHT end of the table", C.BOTTLE + ", held in Tsukamukun's gripper"]
PANELS[0] = dict(PANELS[0], prop=("TEACHING ARM, BOX AND BOTTLE", PROPS))
PANELS[1] = dict(PANELS[1], prop=("TEACHING ARM, BOX AND BOTTLE", PROPS), extra=PANELS[1]["extra"] + [C.TSU_SIZE()])
PANELS[3] = dict(PANELS[3], prop=("TEACHING ARM, BOX AND BOTTLE", [C.LEADER + ", untouched", C.BOX + ", at the RIGHT end of the table", C.BOTTLE + ", dropping neatly into the box"]))
# 描き直し（11:30）：P1 023120（お手本用の腕が台座に立つ同じ大きさの腕）。奥のハコブくんが細い（1.61）→ reshape.py で横 1.05・縦 0.95（比 1.45）
# P2 023112（お手本用の腕・横書き）
# P4 は2枚ともだめ（023119 はハコブくんが細く「教え」が ひらがな・ツカムくんが高すぎ、023128 はハコブくんが2台）
# → 3コマ目と同じく、ハコブくんを右手前に大きく入れる形にする（3コマ目では太さが保てた）。高杉さんは左で全身
PICK.update({1: '第189話_P1_20261126_023120_rs.jpg', 2: '第189話_P2_20261126_023112.jpg'})
PANELS[3] = dict(PANELS[3], full=[], no_yline=True,
    hscale_text=["Hakobukun is LARGE in the right foreground, full body, three-quarter view facing camera-left toward Takasugi, x 50–98%, its top at about 40% and its wheels at about 96% of the image height. It is the ONLY Hakobukun in the picture",
                 "the work table stands behind it at the centre-left, x 24–56%: the teaching arm on its own faceless base at the table's LEFT end, Tsukamukun in the middle, and the open box at the RIGHT end of the table, fully visible above Hakobukun's top",
                 "Takasugi stands at the left, full body, x 2–26%, her head top at about 26% and her shoes at about 86% of the image height, arms crossed, a wry defeated smile"],
    comp=["Tsukamukun swiftly drops the bottle into the box with a quick clean swoosh line, its arm kept LOW, no higher than Takasugi's shoulders",
          "two bubbles: 「私より決断が早い」 at the upper left, its tail to Takasugi; 「迷イハ、教エタ人ニ、オ返シシマス」 at the upper right, its tail down to Hakobukun's screen"],
    camera=["SHOT SIZE: Hakobukun full body in the right foreground, Takasugi and the table behind", "CAMERA POSITION: front-right, three-quarter", "CAMERA HEIGHT: 110 cm"])
# 描き直し（11:34）：P4 023417（並び・字・ツカムくんの高さは合う。ハコブくんが細い 1.87）→ reshape.py で横 1.12・縦 0.88。023419 はハコブくんが切れて縦書き
PICK.update({4: '第189話_P4_20261126_023417_rs.jpg'})
# 2026-11-26 エイイチ「リーダーアームのデザインが揃ってない」「段ボールが開いてない」「高杉さんの服のスクリーントーンが濃い」
# → お手本用の腕の三面図を作った（キャラ/リーダーアーム.jpg・Gemini で1枚目を採用）。選んだ絵を Gemini の edit で直した（ハコブくんの太さの直しを残すため描き直さない）
# P1 024123・P2 024124：お手本用の腕を三面図どおりに・箱を開く／P3 024126：箱を開く（024124 はツカムくんの手が握りになった）／P4 024127：腕・箱・高杉さんの網点を薄く
PICK.update({1: '第189話_P1_20261126_024123.jpg', 2: '第189話_P2_20261126_024124.jpg', 3: '第189話_P3_20261126_024126.jpg', 4: '第189話_P4_20261126_024127.jpg'})
for i in (0, 1, 3):
    PANELS[i] = dict(PANELS[i], extra_refs=PANELS[i].get("extra_refs", []) + [("teaching arm (leader arm) reference sheet — copy this object exactly", os.path.expanduser("~/mnt/PixelstoMotors/ハコブくん/4コママンガ作成データ/キャラ/リーダーアーム.jpg"))])
# 2026-11-26 エイイチ「切れてるのがいくつもある」：P4 は reshape で台の右端が切れた → ハコブくんと台の間にすき間を空けて描き直す（お手本用の腕の三面図・開いた箱・高杉さんの網点も入れる）
PANELS[3] = dict(PANELS[3], prop=("TEACHING ARM, BOX AND BOTTLE", [C.LEADER + ", untouched", C.BOXO + ", at the RIGHT end of the table", C.BOTTLE + ", dropping neatly into the box"]),
    hscale_text=["Hakobukun stands in the right foreground, full body, three-quarter view facing camera-left toward Takasugi, x 60–98%, its top at about 46% and its wheels at about 96% of the image height. It is the ONLY Hakobukun in the picture",
                 "the work table stands at the centre-left, x 22–54%, completely visible with all four legs: the teaching arm on its own faceless base at the LEFT end, Tsukamukun in the middle, and the open box at the RIGHT end",
                 "Takasugi stands at the left, full body, x 2–22%, her head top at about 26% and her shoes at about 86% of the image height, arms crossed, a wry defeated smile"],
    extra=PANELS[3]["extra"] + [C.GAP, C.HWIDTH(46, 96), C.TONE("Takasugi")])
# 描き直し（11:45）の2枚はハコブくんが細く台に重なった → 024127 の台の切れ目だけ edit で直した 024632（台がハコブくんの後ろへ続く）
PICK.update({4: '第189話_P4_20261126_024632.jpg'})
# 2026-11-26 エイイチ「ハコブくん右に見切れさせていいよ」（4コマ目のハコブくんが細い）→ 右の端で切れる大きさで描き直す。edit でも太くしてみる
PANELS[3] = dict(PANELS[3], hscale_text=["Hakobukun stands in the right foreground, full body except its right side, which is CUT OFF by the right edge of the picture, three-quarter view facing camera-left toward Takasugi, from x 56% to beyond the right edge, its top at about 40% and its wheels at about 96% of the image height. It is broad and stout like the 3D reference. It is the ONLY Hakobukun in the picture",
                 "the work table stands at the centre-left, x 20–52%, completely visible with all four legs: the teaching arm on its own faceless base at the LEFT end, Tsukamukun in the middle, and the open box at the RIGHT end",
                 "Takasugi stands at the left, full body, x 2–20%, her head top at about 26% and her shoes at about 86% of the image height, arms crossed, a wry defeated smile"],
    extra=[e for e in PANELS[3]["extra"] if not e[0].startswith("HAKOBUKUN WIDTH")])
# 2026-11-26 P4：描き直しは腕や箱が崩れ、edit で太くした 025611 は逆にずんぐり（1.19）→ 縦だけ 1.22 倍に伸ばした（1.51・幅は変えないので台は動かない）
PICK.update({4: '第189話_P4_20261126_025611_rs.jpg'})
# 2026-11-26 エイイチ「ここだけ絵が切れたりしてる（4コマ目）・他はOK」→ 縦に伸ばした rs で箱・台の右端が切れていた所だけ edit で直した 030047
PICK.update({4: '第189話_P4_20261126_030047.jpg'})
PATCH = {4: [(0, 1305, 1080, 1350)]}  # 下の端に出た点線を白で消す
