/* V7 序破急 JOHAKYŪ — รูปเดี่ยว → การ์ดผู้ก่อตั้ง (ชื่อบนรูป) → NIKKENSEI สองคำใหญ่สวนทาง → ความลึกแบบ V2 (ประโยคแตกเป็นพิกเซล) → EMAKI แนวนอนแบบ V1
   ชั้น: canvas WebGL ตรึงเต็มจอ (z 0) → proxy ของแผ่น p12 (z 1) → #story (z 2)
   โหมด h (เดสก์ท็อป): #story ถูก pin ทั้งหน้า องก์ 1/2 เป็นชั้นเต็มจอซ้อนกัน องก์ 3a = แถวม้วน (.track) เฉพาะ B2–B3 แล้วส่งต่อเป็นผนังขาว
   จากนั้น .v7-after (นอก pin) เลื่อนแนวตั้งปกติ: B4 = ห้องจัดแสดง 3D เดินผ่านทีละห้อง (canvas ด้านหลัง + DOM บน stage ที่ติดจอ) · B5–B7 เส้นทางชีวิต (ขาว) · B8 ครีม
   โหมด v (จอแคบ/ไม่มี WebGL/ลดการเคลื่อนไหว): B0 และ B1 เป็นช่อง 100vh (pin ทีละช่อง) B2–B8 ไหลแนวตั้งแบบ V1 */
:root { --roll: 68px; --ruler-h: 78px; --top-pad: 76px; }
/* ฟอนต์ serif ไทยของชื่อบนการ์ดผู้ก่อตั้ง (ไฟล์ในรีโป · มีน้ำหนักเดียว → เอียงแบบสังเคราะห์) */
@font-face { font-family: 'Noto Serif Thai'; src: url('assets/fonts/noto-serif-thai.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
.story--v7 { z-index: 2; }
.story--v7 .beat { background: transparent; }

/* ---- canvas + proxy (ใช้ร่วมองก์ 2 และ 3) ---- */
canvas.gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
html.is-canvas canvas.gl { opacity: 1; }
html:not(.is-gl) canvas.gl, html:not(.is-gl) #gl-proxies { display: none; }
#gl-proxies { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.gl-proxy { position: absolute; left: 0; top: 0; width: 100px; height: 100px; pointer-events: auto; will-change: transform; transform-origin: 0 0; }
.gl-proxy[hidden] { display: none; }
.gl-cap { position: absolute; left: 2px; top: calc(100% + 7px); display: inline-flex; align-items: center; max-width: calc(100% - 4px); white-space: nowrap; font-size: 13px; line-height: 17px; font-weight: 700; color: var(--green); opacity: var(--vis, 1); }
/* พื้นตัวอักษรเล็กสุด 13px (คำบรรยายรูป) · ป้าย DRAFT 12px — ทั้งหน้า V7 */
.story--v7 .story-img figcaption { font-size: 13px; }
.story--v7 .draft-flag, #gl-proxies .draft-flag { font-size: 12px; }
.gl-cap::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 999px; background: var(--pink); margin: 0 7px 0 0; }
.gl-cap__t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-cap .draft-flag { flex: none; margin-left: 6px; }

/* ============================================================
   องก์ 1 — B0: ช่อง 100vh ทุกอย่างวางด้วย JS (ตำแหน่งปลายทาง = สถานะค้าง) · ไทม์ไลน์ขับจากสถานะตั้งต้น
   ============================================================ */
.story--v7 .beat--B0, .story--v7 .beat--B1 { display: block; position: relative; height: 100vh; height: 100svh; min-height: 0; padding: 0; overflow: hidden; }
html[data-mode="h"] .story--v7 .beat--B0, html[data-mode="h"] .story--v7 .beat--B1 { position: absolute; inset: 0; height: 100vh; transform-origin: 50% 50%; }
.story--v7 .beat--B0 .beat__glyph, .story--v7 .beat--B1 .beat__glyph { display: none; }
.story--v7 .hero__overlay { display: none !important; }
.story--v7 .beat--B0 .beat__media { position: absolute; inset: 0; z-index: 3; display: block; pointer-events: none; grid-column: auto; }
.story--v7 .beat--B0 .beat__media .story-img { position: absolute; margin: 0; max-height: none; overflow: hidden; will-change: left, top, width, height; }
.story--v7 .beat--B0 .beat__media .story-img img { width: 100%; height: 100%; max-height: none; object-fit: cover; aspect-ratio: auto; }
.story--v7 .beat--B0 .beat__copy { position: absolute; z-index: 2; max-width: none; gap: 10px; grid-column: auto; }
.story--v7 .beat--B0 .beat__kicker { display: none; }
.story--v7 .beat--B0 .hero__role { font-size: clamp(14px, 1.05vw, 16px); line-height: 1.45; opacity: .9; }
.v7-lead { margin: 0; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.3; font-weight: 700; }
.story--v7 .beat--B0 .stat-row { margin: 0; }
.story--v7 .beat--B0 .stat { padding: 10px 10px 8px; }
.story--v7 .beat--B0 .stat b { font-size: clamp(20px, 1.9vw, 28px); }
.story--v7 .beat--B0 .stat span { font-size: 12.5px; }
.story--v7 .beat--B0 .chip { min-height: 30px; font-size: 13px; }
.story--v7 .beat--B0 .research-card { padding: 12px 14px; }
.story--v7 .beat--B0 .research-card .r-title { font-size: 13.5px; }
/* บีบเมื่อจอเตี้ย: ซ่อนบรรทัดบทบาท ย่อการ์ด · บีบอีกขั้น: ซ่อนประโยคญี่ปุ่น */
.story--v7 .beat--B0 .beat__copy.is-compact { gap: 8px; }
.story--v7 .beat--B0 .beat__copy.is-compact .hero__role { display: none; }
.story--v7 .beat--B0 .beat__copy.is-compact .stat { padding: 7px 9px 6px; border-radius: var(--r-md); }
.story--v7 .beat--B0 .beat__copy.is-compact .stat b { font-size: 19px; }
.story--v7 .beat--B0 .beat__copy.is-compact .stat span { font-size: 12.5px; margin-top: 2px; }
.story--v7 .beat--B0 .beat__copy.is-compact .chip { min-height: 26px; font-size: 13px; padding: 2px 10px; }
.story--v7 .beat--B0 .beat__copy.is-compact .research-card { padding: 9px 12px; }
.story--v7 .beat--B0 .beat__copy.is-compact .research-card summary { grid-template-columns: 38px 1fr auto; gap: 10px; }
.story--v7 .beat--B0 .beat__copy.is-compact .research-card .hanko { width: 38px; height: 38px; font-size: 16px; }
.story--v7 .beat--B0 .beat__copy.is-compact .research-card .r-title { font-size: 13px; line-height: 1.4; }
.story--v7 .beat--B0 .beat__copy.is-compact .beat__ja { font-size: 15px; }
.story--v7 .beat--B0 .beat__copy.is-compact .v7-lead { font-size: clamp(20px, 1.8vw, 26px); }
.story--v7 .beat--B0 .beat__copy.is-tight .beat__ja { display: none; }
.story--v7 .beat--B0 .beat__copy.is-tight { gap: 6px; }

/* การ์ดผู้ก่อตั้ง (V7b): คำบรรยายอยู่ "ในรูป" ที่ขอบล่าง บนม่านไล่สีเขียว (ไม่ใช่ดำ) · บรรทัด 1 = h1 ชื่อไทย serif เอียง ขาว · บรรทัด 2 = ชื่ออังกฤษ · บทบาท 13–14px หนา
   ทั้งก้อนอยู่ใน 32% ล่างของรูป (หน้าอยู่ที่ y 56%) — ขนาดตัวอักษรตั้งจาก JS ตามความกว้างรูป */
.founder-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 26px 16px 14px; background: linear-gradient(180deg, rgba(0,109,64,0) 0%, rgba(0,109,64,.78) 100%); color: var(--white); text-align: left; pointer-events: none; will-change: transform, opacity; }
.founder-cap .hero__name { margin: 0; font-family: 'Noto Serif Thai', 'KhaoNiaw', 'Noto Serif', serif; font-style: italic; font-weight: 400; font-size: 32px; line-height: 1.2; color: var(--white); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,109,64,.45); }
.founder-cap .hero__name-th { display: block; }
.founder-cap__sub { margin: 4px 0 0; font-size: 14px; line-height: 1.35; font-weight: 700; letter-spacing: .03em; color: var(--white); text-shadow: 0 1px 2px rgba(0,109,64,.45); }
.story-img.is-narrow .founder-cap__role { display: none; } /* รูปแคบ (มือถือตอนจอดมุมขวาบน): ตัดบทบาท ให้ก้อนคำบรรยายไม่ขึ้นไปถึงหน้า */
/* kicker + หัวเรื่องสองบรรทัด (bigIdea): เริ่มกลางจอเหนือรูป → ไหลไปมุมบนซ้ายแทนป้ายชื่อเดิม (ตำแหน่ง/ขนาดจาก JS) */
.v7-head { position: absolute; z-index: 2; text-align: center; color: var(--green); pointer-events: none; will-change: transform, opacity; }
.v7-head__kicker { margin: 0 0 .3em; font-size: 13px; line-height: 1.3; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.v7-head__line { margin: 0; font-size: 1em; line-height: 1.3; font-weight: 700; }
.v7-head__line--2 { color: var(--pink); }
.v7-head__line--2.is-underline { color: var(--green); text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: .1em; text-underline-offset: .14em; }
/* แถบ NIKKENSEI: เต็มความกว้าง อยู่หลังรูป (z 1 < รูป z 3) · แถว A/B = คำใหญ่คำเดียว (เส้นขอบ) วิ่งสวนทางกัน · คำเดียวทึบตรงกลางคอลัมน์ซ้ายหลังชน */
.v7-band { position: absolute; left: 0; right: 0; z-index: 1; overflow: hidden; pointer-events: none; font-weight: 700; line-height: 1; letter-spacing: -.01em; color: var(--green); }
.v7-row { position: absolute; left: 0; height: 1em; white-space: nowrap; opacity: 0; visibility: hidden; will-change: transform; }
.v7-row__in { position: relative; display: inline-block; white-space: nowrap; will-change: transform; }
.v7-row__l { display: block; white-space: nowrap; }
.v7-row__l + .v7-row__l { position: absolute; left: 0; top: 0; }
.v7-rw { display: inline-block; }
.v7-row__l--outline { color: transparent; -webkit-text-stroke: max(1.5px, .014em) var(--green); }
.v7-row__l--fill { color: var(--green); opacity: 0; }
.v7-row__l--hl { color: transparent; background-image: linear-gradient(90deg, rgba(255,82,162,0) 0%, #FF52A2 32%, #FFFFFF 50%, #FF52A2 68%, rgba(255,82,162,0) 100%); background-size: 46vw 100%; background-repeat: no-repeat; background-position: -60vw 0; -webkit-background-clip: text; background-clip: text; }
.v7-hero { position: absolute; height: 1em; white-space: nowrap; color: var(--green); transform-origin: 50% 50%; }
.v7-hero__l, .v7-hero__r { display: inline-block; will-change: transform; }
.v7-dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* หลังเบรก: แถว B จางหาย (transition) · หลังชน: แถว A/B หายหมด เหลือคำเดียวทึบ — ใช้คลาสบนแถบ ไม่แตะ autoAlpha ของไทม์ไลน์ scrub (ย้อนกลับแล้วเล่นซ้ำได้) */
.v7-band.is-brk .v7-row--b { opacity: 0 !important; transition: opacity .22s linear; }
.v7-band.is-final .v7-row { visibility: hidden !important; }

/* V7f (เดสก์ท็อป ≥ 1024): สถานะค้างของ B0 = เลย์เอาต์โปรไฟล์ตามแบบอ้างอิง — คอลัมน์ซ้าย · รูปใหญ่กลาง (ป้ายกลมมุมบนขวาในโซนเงียบของรูป) · กริดรูป 2×3 ขวา · แถบสถิติ + งานวิจัย ด้านล่าง
   DOM เหล่านี้สร้างเฉพาะเดสก์ท็อป (JS) · ตำแหน่ง/ขนาดจาก layoutAct1 · สี/ขอบ/เงาตาม brand kit */
.v7-head[data-align="left"] { text-align: left; }
.v7-grid { position: absolute; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; pointer-events: none; }
.v7-grid[data-cols="1"] { grid-template-columns: minmax(0, 1fr); }
.v7-grid[data-cols="1"] .v7-grid__it:nth-child(n+4) { display: none; }
.v7-grid__it { margin: 0; min-height: 0; overflow: hidden; border-radius: 18px; border: 2px solid var(--green); background: var(--white); box-shadow: var(--sh-pink-sm); will-change: transform, opacity; }
.v7-grid__it img { display: block; width: 100%; height: 100%; object-fit: cover; }
.v7-bar { position: absolute; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: 18px; padding: 10px 18px; background: var(--white); border: 2px solid var(--green); border-radius: var(--r-xl); box-shadow: var(--sh-green-sm); will-change: transform, opacity; }
.v7-bar .stat-row { margin: 0; gap: 0; }
.story--v7 .beat--B0 .v7-bar .stat { border: 0; border-left: 2px solid var(--green-a15); border-radius: 0; box-shadow: none; background: none; padding: 4px 16px; }
.story--v7 .beat--B0 .v7-bar .stat:first-child { border-left: 0; padding-left: 4px; }
.story--v7 .beat--B0 .v7-bar .stat b { font-size: clamp(20px, 1.7vw, 26px); }
.story--v7 .beat--B0 .v7-bar .research-card { position: static; border: 0; border-left: 2px solid var(--green-a15); border-radius: 0; box-shadow: none; background: none; padding: 2px 0 2px 18px; }
.story--v7 .beat--B0 .v7-bar .research-card summary { grid-template-columns: 40px 1fr auto; gap: 10px; }
.story--v7 .beat--B0 .v7-bar .research-card .hanko { width: 40px; height: 40px; font-size: 17px; }
.story--v7 .beat--B0 .v7-bar .research-card .r-title { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story--v7 .beat--B0 .v7-bar .research-card .r-body { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); margin: 0; padding: 12px 16px; background: var(--white); border: 2px solid var(--green); border-radius: var(--r-md); box-shadow: var(--sh-pink-sm); } /* กางขึ้นด้านบนแบบป๊อปโอเวอร์ แถบไม่ยืด */
.v7-cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.v7-cta { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border: 2px solid var(--green); border-radius: var(--r-chip); background: var(--green); color: var(--white); font: inherit; font-weight: 700; font-size: 15px; line-height: 1; cursor: pointer; box-shadow: var(--sh-pink-sm); transition: box-shadow .2s ease, transform .2s ease; }
.v7-cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--pink); }
.v7-cta__arr { font-size: 18px; line-height: 1; }
.story--v7 .beat--B0 .v7-cta-row .beat__ja { font-family: var(--font-jp); font-weight: 500; font-size: 15px; line-height: 1.45; color: var(--pink); opacity: 1; transform: rotate(-2deg); max-width: 24em; } /* โน้ตญี่ปุ่นสีชมพูข้างปุ่ม (ตามแบบอ้างอิง) */
.story--v7 .beat--B0 .beat__copy.is-tight .v7-cta-row .beat__ja { display: block; }
.v7-badge { position: absolute; z-index: 3; top: 12px; right: 12px; width: 84px; height: 84px; display: grid; place-content: center; gap: 2px; text-align: center; border-radius: 999px; background: var(--pink); color: var(--white); border: 2px solid var(--white); box-shadow: var(--sh-green-sm); line-height: 1.05; pointer-events: none; }
.v7-badge b { font-size: 22px; font-weight: 700; }
.v7-badge small { font-size: 12px; font-weight: 700; letter-spacing: .08em; }

/* จอแคบ: รูปมุมขวาบน ป้ายชื่อซ้าย แถบเต็มความกว้าง ป้าย 4 ใบเป็นแถวเดียวเลื่อนข้างได้ */
@media (max-width: 767px) {
  .story--v7 .beat--B0 .beat__copy { gap: 8px; min-width: 0; }
  .story--v7 .beat--B0 .beat__copy .hero__role { display: none; }
  .story--v7 .beat--B0 .chips { min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .story--v7 .beat--B0 .chips::-webkit-scrollbar { display: none; }
  .story--v7 .beat--B0 .chip { flex: 0 0 auto; white-space: nowrap; }
  .story--v7 .beat--B0 .stat { padding: 8px 10px 6px; }
  .story--v7 .beat--B0 .stat b { font-size: 20px; }
  .v7-lead { font-size: 22px; }
  .story--v7 .beat--B0 .beat__ja { font-size: 15px; }
  .founder-cap { padding: 18px 12px 10px; }
  .founder-cap__sub { margin-top: 3px; font-size: 13px; letter-spacing: .02em; }
  .v7-head__kicker { font-size: 13px; letter-spacing: .1em; }
}

/* ============================================================
   องก์ 2 — B1: ประโยคสองประโยคของเจ้าของ (DOM) · รูป p12 เป็นแผ่น 3D (+proxy) หรือรูป DOM เมื่อไม่มี WebGL/ลดการเคลื่อนไหว
   ============================================================ */
.story--v7 .beat--B1 .beat__copy { position: absolute; inset: 0; z-index: 2; max-width: none; margin: 0; display: block; grid-column: auto; pointer-events: none; }
.story--v7 .beat--B1 .beat__copy > :not(.v7-sent) { visibility: hidden; position: absolute; width: 1px; height: 1px; overflow: hidden; margin: 0; } /* หัวข้อ/ญี่ปุ่น/เนื้อความเดิมยังอยู่ให้ screen reader */
.v7-sent { position: absolute; margin: 0; font-weight: 700; line-height: 1.3; color: var(--green); will-change: transform, opacity; transform-origin: 50% 50%; }
.v7-sent--1 { text-align: center; }
.v7-sent--2 { text-align: left; }
.v7-sent .nowrap { white-space: nowrap; }
.story--v7 .beat--B1 .beat__media { position: absolute; inset: 0; z-index: 1; display: block; pointer-events: none; grid-column: auto; }
.story--v7 .beat--B1 .beat__media .story-img { position: absolute; margin: 0; --ar: 4 / 3; }
.story--v7 .beat--B1 .beat__media .story-img img { max-height: none; }
html.is-gl .story--v7 .beat--B1 .beat__media { visibility: hidden; }
html.is-gl .story--v7 .beat--B1 .beat__media.is-dom { visibility: visible; } /* หลังปล่อย pin (โหมด v): รูป DOM รับช่วงจากแผ่น 3D ที่ตำแหน่งเดียวกัน แล้วเลื่อนออกไปพร้อมประโยค 2 */
html[data-reduced="true"] .v7-sent { opacity: 1 !important; visibility: visible !important; transform: none !important; filter: none !important; }

/* ============================================================
   องก์ 3 (V7c) — โทนขาวมินิมอลแบบ Fastwork สำหรับ B4–B7 · ครีมมินิมอลสำหรับ B8 (ตั้งใจทับกฎ "4 สี" เฉพาะช่วงนี้ ตาม V7c.md)
   พื้นขาว #FFFFFF · หมึก #161A18 · รอง #5C6460 · เส้น #E6E6E1 · สีเน้นเดียว = เขียวแบรนด์ #006D40 ใช้เบา ๆ · ชมพู #FF52A2 เฉพาะตรา 合格
   ============================================================ */
:root { --ink: #161A18; --ink2: #5C6460; --ink3: #8A908C; --line: #E6E6E1; --soft: 0 26px 64px rgba(22,26,24,.10), 0 2px 10px rgba(22,26,24,.05); --soft-sm: 0 12px 32px rgba(22,26,24,.08), 0 1px 4px rgba(22,26,24,.04); }
.story--v7 .pair { display: inline-flex; align-items: baseline; gap: 10px; margin: 0; }
.story--v7 .pair__a, .story--v7 .pair__b { display: inline-block; transform-style: preserve-3d; }
.story--v7 .pair__eq { color: var(--pink); }
.story--v7 .recap li b { opacity: 0; transform: translateY(14px); }
html[data-reduced="true"] .story--v7 .recap li b { opacity: 1; transform: none; }
.story--v7 .beat--B2 .story-img, .story--v7 .beat--B3 .story-img { will-change: clip-path; }
.story--v7 .img-wrap { position: relative; display: block; line-height: 0; }
html[data-mode="v"] .story--v7 .gallery .story-img { align-self: start; }
@media (min-width: 768px) and (max-width: 1023px) {
  html[data-mode="v"] .story--v7 .beat--B2 .beat__media, html[data-mode="v"] .story--v7 .beat--B3 .beat__media { grid-template-columns: 1fr; gap: 20px; justify-items: center; }
  html[data-mode="v"] .story--v7 .beat--B2 .beat__media .story-img, html[data-mode="v"] .story--v7 .beat--B3 .beat__media .story-img { width: min(100%, 360px); }
  html[data-mode="v"] .story--v7 .beat--B2 .beat__media .story-img img, html[data-mode="v"] .story--v7 .beat--B3 .beat__media .story-img img { max-height: 46vh; }
  html[data-mode="v"] .story--v7 .beat--B1 .beat__media .story-img { width: auto; }
}
/* ช่อง B0/B1 ในโหมด v ไม่ใช่กริด: ยกเลิกกฎ media ของแท็บเล็ตที่กำหนดความกว้างรูป · และเพดาน 46vh ของ <img> (ไม่งั้นรูปในการ์ดผู้ก่อตั้งถูกตัดเตี้ยกว่ากรอบ คำบรรยายหลุดไปอยู่ใต้รูป) */
html[data-mode="v"] .story--v7 .beat--B0 .beat__media .story-img { width: auto; }
html[data-mode="v"] .story--v7 .beat--B0 .beat__media .story-img img { height: 100%; max-height: none; }

/* ---- ส่วนประกอบร่วม (ทั้งสองโหมด) ---- */
.story--v7 .v7-b4, .story--v7 .v7-ch, .story--v7 .v7-end { color: var(--ink); }
.story--v7 .v7-b4 .beat__kicker, .story--v7 .lp-kick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); }
.story--v7 .v7-b4 .beat__kicker .act, .story--v7 .lp-kick .act { display: inline; min-width: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 15px; letter-spacing: .08em; color: var(--green); }
.story--v7 .v7-b4 .beat__kicker .sep, .story--v7 .lp-kick .sep { opacity: .5; }
.story--v7 .v7-b4 .beat__kicker time.is-draft, .story--v7 .lp-kick time.is-draft { border-bottom: 2px dotted var(--green); }
.story--v7 .v7-b4 .draft-flag, .story--v7 .v7-ch .draft-flag, .story--v7 .v7-b4 .draft, .story--v7 .v7-ch .draft { color: var(--ink3); font-weight: 700; letter-spacing: .1em; }
.story--v7 .v7-b4 .draft-flag, .story--v7 .v7-ch .draft-flag { display: inline-block; margin-left: 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; line-height: 18px; vertical-align: middle; }

/* B4 — แผ่นป้ายต้อนรับ */
.story--v7 .v7-b4 .beat__copy { gap: 18px; max-width: min(900px, 74vw); }
.plaque__head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px clamp(20px, 2.4vw, 40px); }
.story--v7 .v7-b4 .beat__title { margin: 0; font-size: clamp(38px, 4.6vw, 72px); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--ink); flex: 0 1 auto; }
.story--v7 .v7-b4 .beat__ja { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.5; font-weight: 500; color: var(--ink2); opacity: 1; }
.story--v7 .v7-b4 .beat__body { max-width: 34em; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.85; color: var(--ink2); }
.story--v7 .v7-b4 .stamp { position: relative; right: auto; bottom: auto; flex: 0 0 auto; width: clamp(84px, 7.4vw, 116px); font-size: clamp(34px, 3.2vw, 50px); border-width: 3px; border-radius: 10px; background: transparent; transform: rotate(-12deg); }
.story--v7 .v7-b4 .stamp::after { inset: 4px; }
/* B4 — ห้องละ 1 รูป: เลขห้อง · การ์ดรูปมินิมอล · ชื่อรูปใต้ภาพ */
.room-no { display: block; margin: 0 0 2px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .24em; color: var(--ink2); font-variant-numeric: tabular-nums; }
.story--v7 .room .story-img { --tilt: 0deg; --ar: var(--asp); margin: 0; padding: 12px 12px 4px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--soft); transform: none; will-change: auto; overflow: hidden; }
.story--v7 .room .story-img img { width: 100%; height: auto; aspect-ratio: var(--asp); border-radius: 12px; object-fit: cover; max-height: none; }
.story--v7 .room .story-img figcaption { margin: 14px 6px 10px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; text-align: center; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.45; font-weight: 700; color: var(--ink); }
.story--v7 .room .story-img figcaption::before { display: none; }
.room__in { display: flex; flex-direction: column; align-items: center; gap: 12px; will-change: transform, opacity, filter; }

/* B5–B7 — เส้นทางชีวิต: ปีตัวเลขบางใหญ่เหนือการ์ดมุมมน · การ์ดคนละขนาด/คนละความสูง · เส้นบางเชื่อม · คำใหญ่เส้นขอบจางอยู่ด้านหลัง */
/* ===== B5–B7 (V7i): บทละจอบนไทม์เลน์ — รางซ้าย · ตัวใหญ่ · หัวเรื่อง/ญี่ปุ่น/เนื้อความ · รูปหลักใหญ่ + รูปรองซ้อน ===== */
.story--v7 .v7-ch { position: relative; background: #fff; --rail-x: 56px; }
.story--v7 .v7-ch .beat__glyph { position: absolute; inset: 0; z-index: 0; overflow: hidden; display: flex; align-items: center; justify-content: flex-end; padding-right: 3vw; pointer-events: none; }
.story--v7 .v7-ch .beat__glyph span { padding: 0; font-size: min(60vh, 34vw); line-height: 1; font-weight: 900; letter-spacing: 0; color: transparent; opacity: 1; -webkit-text-stroke: 2px rgba(22,26,24,.06); }
.story--v7 .v7-ch .beat__glyph span[lang="en"] { font-weight: 700; }
.ch-rail { position: absolute; top: 0; bottom: 0; left: var(--rail-x); width: 2px; background: var(--line); z-index: 1; }
.ch-rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--ink); }
.ch-rail__dot { position: absolute; left: -8px; top: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; transition: background .3s ease, transform .3s ease; }
.ch-rail.is-on .ch-rail__dot { background: var(--ink); transform: scale(1.15); }
.ch-rail__label { position: absolute; left: 22px; top: calc(50% - 10px); font-size: 13px; font-weight: 700; letter-spacing: .16em; white-space: nowrap; color: var(--ink2); font-variant-numeric: tabular-nums; }
.ch-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.ch-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ch-big { display: block; margin: 0 0 6px; font-size: clamp(72px, 13vh, 140px); font-weight: 300; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.ch-big time { font-weight: 300; text-transform: none; }
.ch-big time.is-draft { border-bottom: 4px dotted var(--green); }
.ch-big .flip-num { margin: 0; display: flex; font-size: inherit; font-weight: inherit; line-height: inherit; }
.ch-big[lang="ja"] { font-family: var(--font-jp); font-weight: 500; }
.story--v7 .v7-ch .lp-kick { margin: 0; }
.story--v7 .lp-kick .sep:nth-of-type(4) { display: none; }
.story--v7 .v7-ch .beat__title { margin: 0; font-size: clamp(30px, 3vw, 46px); line-height: 1.25; font-weight: 700; color: var(--ink); max-width: 14em; }
.story--v7 .v7-ch .beat__ja { margin: 0; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.5; font-weight: 500; color: var(--ink2); opacity: 1; }
.story--v7 .v7-ch .beat__body { margin: 0; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.8; color: var(--ink2); max-width: 32em; }
.ch-doc { position: relative; margin-top: 6px; padding: 18px 20px 16px; max-width: 36em; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--soft-sm); }
.ch-doc::before { content: ''; position: absolute; left: 20px; top: -1px; width: 38px; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
.ch-doc .research-title { margin: 0; font-size: 15px; line-height: 1.7; font-weight: 700; color: var(--ink); }
.ch-doc .research-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); opacity: 1; }
.ch-doc .research-sub:nth-of-type(1) { padding-top: 8px; border-top: 1px solid var(--line); }
.ch-media { position: relative; min-width: 0; display: flex; justify-content: center; align-items: center; }
.ch-fig { position: relative; will-change: transform, opacity; }
.ch-fig .story-img { --tilt: 0deg; --ar: var(--asp); display: inline-flex; flex-direction: column; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--soft); overflow: hidden; transform: none; will-change: auto; }
.ch-fig .story-img img { display: block; width: 100%; height: 100%; aspect-ratio: var(--asp); object-fit: cover; border-radius: 0; max-height: none; }
.ch-fig .story-img figcaption { margin: 0; padding: 12px 16px 14px; font-size: 13px; line-height: 1.4; font-weight: 700; color: var(--ink2); gap: 6px; }
.ch-fig .story-img figcaption::before { display: none; }
.story--v7 .v7-ch .principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 10px 0 0; padding: 0; list-style: none; }
.story--v7 .v7-ch .principle { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--soft-sm); }
.story--v7 .v7-ch .principle .kanji { grid-row: 1 / span 3; width: 48px; height: 48px; font-size: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--green); }
.story--v7 .v7-ch .principle h3 { margin: 0; font-size: 16.5px; line-height: 1.4; color: var(--ink); }
.story--v7 .v7-ch .principle p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink2); }
.story--v7 .v7-ch .principle .draft { font-size: 12px; line-height: 1.4; }

/* B8 — จบแบบหน้าแรก: รูปเดี่ยวใหญ่ สีครีม ข้อความน้อย ๆ */
.story--v7 .v7-end .story-img.is-clean { margin: 0; border-radius: 26px; box-shadow: 0 30px 80px rgba(22,26,24,.12); background: #fff; }
.story--v7 .v7-end .story-img.is-clean img { border-radius: 26px; }
.story--v7 .v7-end .beat__media { display: block; position: relative; margin: 0; }
.story--v7 .v7-end .end-col { min-width: 0; }
.story--v7 .v7-end .recap { margin: 0; gap: 10px 0; justify-content: flex-end; }
.story--v7 .v7-end .recap li { gap: 0; }
.story--v7 .v7-end .recap li b { font-size: 16px; line-height: 1.35; padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; box-shadow: none; color: var(--ink); }
.story--v7 .v7-end .recap li .arrow { width: 18px; margin: 0 7px; background: var(--ink3); opacity: .5; flex: 0 0 auto; }
.story--v7 .v7-end .recap li .arrow::after { border-color: var(--ink3); }
.story--v7 .v7-end .end-col--r { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.story--v7 .v7-end .beat__ja { margin: 0; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.6; font-weight: 700; color: var(--ink); opacity: 1; }
.story--v7 .v7-end .cta { height: 52px; padding: 0 24px; font-size: 16px; background: var(--green); border-color: var(--green); box-shadow: none; }
.story--v7 .v7-end .cta:hover { transform: none; box-shadow: 0 12px 28px rgba(0,109,64,.28); }

/* กำแพงขาว/แผ่นครีมที่เลื่อนเข้าทับกระดาษ (โหมด h) */
.v7-wall { position: absolute; inset: 0; z-index: 2; background: #fff; will-change: transform; visibility: hidden; pointer-events: none; }
/* V7e: ขอบนำหน้านุ่ม — เงาไล่ระดับกว้าง 72px ทอดลงบนสิ่งที่กำลังถูกคลุม + ไฮไลต์ขาวบาง ๆ ที่ขอบ ให้ดูเป็น "กำแพงที่เลื่อนเข้ามา" ไม่ใช่การตัดภาพ */
.v7-wall::before { content: ''; position: absolute; top: 0; bottom: 0; left: -72px; width: 72px; pointer-events: none; background: linear-gradient(to right, rgba(22,26,24,0) 0%, rgba(22,26,24,.035) 38%, rgba(22,26,24,.085) 78%, rgba(22,26,24,.13) 100%); }
.v7-wall::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 28px; pointer-events: none; background: linear-gradient(to right, rgba(22,26,24,.05), rgba(22,26,24,0)); }
.v7-wall--cream { background: var(--cream); }
.v7-wall--cream::before { background: linear-gradient(to right, rgba(22,26,24,0) 0%, rgba(22,26,24,.03) 38%, rgba(22,26,24,.07) 78%, rgba(22,26,24,.11) 100%); }
.v7-wall--cream::after { background: linear-gradient(to right, rgba(22,26,24,.035), rgba(22,26,24,0)); }

/* ============================================================
   โหมด v — แผ่นขาวแนวตั้ง (B4–B7) · B8 ครีม
   ============================================================ */
html[data-mode="v"] .v7-hall-wrap { position: relative; z-index: 1; background: #fff; color: var(--ink); border-radius: 28px; box-shadow: 0 -18px 60px rgba(22,26,24,.07), 0 18px 60px rgba(22,26,24,.07); overflow: hidden; }
html[data-mode="v"] .story--v7 .v7-b4 { display: block; min-height: 0; padding: 0; background: transparent; }
html[data-mode="v"] .room--plaque { padding: 92px var(--gutter) 28px calc(var(--gutter) + var(--spine-w)); }
html[data-mode="v"] .story--v7 .v7-b4 .beat__title { font-size: clamp(34px, 9vw, 48px); }
html[data-mode="v"] .story--v7 .v7-b4 .beat__copy { max-width: 640px; }
html[data-mode="v"] .room--photo { min-height: 78svh; display: flex; align-items: center; justify-content: center; padding: 22px var(--gutter) 22px calc(var(--gutter) + var(--spine-w)); }
html[data-mode="v"] .story--v7 .room .story-img { --ph: min(58svh, calc((100vw - var(--gutter) * 2 - var(--spine-w) - 30px) / var(--asp))); width: calc(var(--ph) * var(--asp) + 26px); max-width: 100%; }
html[data-mode="v"] .story--v7 .v7-ch { display: block; min-height: 0; padding: 64px var(--gutter) 56px calc(var(--gutter) + var(--spine-w) + 30px); --rail-x: calc(var(--gutter) + var(--spine-w) + 4px); }
html[data-mode="v"] .ch-rail__label { display: none; } /* แกนรวมด้านซ้ายมีป้ายช่วงอยู่แล้ว */
html[data-mode="v"] .ch-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 640px; }
html[data-mode="v"] .ch-big { font-size: clamp(56px, 16vw, 96px); }
html[data-mode="v"] .ch-media { flex-direction: column; align-items: flex-start; gap: 16px; }
html[data-mode="v"] .ch-fig--lead .story-img { width: min(100%, 420px); }
html[data-mode="v"] .ch-fig--side { width: min(62%, 260px); align-self: flex-end; }
html[data-mode="v"] .ch-fig--side .story-img { width: 100%; }
html[data-mode="v"] .story--v7 .v7-ch .beat__glyph { align-items: flex-start; justify-content: flex-end; }
html[data-mode="v"] .story--v7 .v7-ch .beat__glyph span { font-size: 46vw; margin-top: 8vh; }
html[data-mode="v"] .story--v7 .v7-ch .principles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
html[data-mode="v"] .story--v7 .v7-end { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 76px var(--gutter) 84px calc(var(--gutter) + var(--spine-w)); min-height: 0; }
html[data-mode="v"] .story--v7 .v7-end .beat__media { order: 1; }
html[data-mode="v"] .story--v7 .v7-end .end-col--l { order: 2; }
html[data-mode="v"] .story--v7 .v7-end .end-col--r { order: 3; align-items: center; text-align: center; }
html[data-mode="v"] .story--v7 .v7-end .recap { justify-content: center; }
html[data-mode="v"] .story--v7 .v7-end .story-img.is-clean { width: auto; max-height: none; }
html[data-mode="v"] .story--v7 .v7-end .story-img.is-clean img { width: auto; max-width: 100%; height: min(54svh, 560px); aspect-ratio: 2 / 3; max-height: none; }
@media (max-width: 767px) {
  html[data-mode="v"] .story--v7 .v7-b4 .beat__title { font-size: clamp(27px, 7.4vw, 36px); }
  html[data-mode="v"] .story--v7 .v7-b4 .stamp { width: 72px; font-size: 30px; border-width: 3px; }
  html[data-mode="v"] .story--v7 .v7-end .story-img.is-clean img { height: min(60svh, 540px); }
  html[data-mode="v"] .story--v7 .v7-end .recap li b { font-size: 14px; padding: 3px 10px; }
  html[data-mode="v"] .story--v7 .v7-end .recap li .arrow { width: 10px; margin: 0 4px; }
  html[data-mode="v"] .story--v7 .v7-end { padding-top: 60px; padding-bottom: 44px; gap: 16px; }
}

/* ============================================================
   องก์ 3 — โหมด h: ม้วนแนวนอน (คัดจาก V1, ขอบเขตเฉพาะ .track) → กำแพงขาว → ห้อง/เส้นทางชีวิต → แผ่นครีม · ไม้บรรทัด · จุดหมึก · คำใบ้
   ============================================================ */
html[data-mode="h"] { --spine-w: 0px; }
html[data-mode="h"] .spine { display: none; }
html[data-mode="h"] body { overflow-x: hidden; }
html[data-mode="h"] .story--v7.is-master { position: relative; height: 100vh; overflow: hidden; }
html[data-mode="h"] .v7-stage { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
html[data-mode="h"] .v7-stage--a { z-index: 1; }
html[data-mode="h"] .v7-stage--h { z-index: 3; }
html.is-act3[data-mode="h"] .v7-stage--a { -webkit-mask-image: linear-gradient(to right, transparent 44px, #000 72px, #000 calc(100% - 72px), transparent calc(100% - 44px)); mask-image: linear-gradient(to right, transparent 44px, #000 72px, #000 calc(100% - 72px), transparent calc(100% - 44px)); }
html[data-mode="h"].no-gl .v7-stage--a { -webkit-mask-image: none; mask-image: none; }
html[data-mode="h"] .track { position: absolute; left: 0; top: 0; display: flex; flex-wrap: nowrap; height: 100vh; width: max-content; will-change: transform; }
html[data-mode="h"] .fore { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .4s ease; }
html.is-act3[data-mode="h"] .fore { opacity: 1; }
html.is-hall[data-mode="h"] .fore { opacity: 0; }
html[data-mode="h"] .fore__strip { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
html[data-mode="h"] .fore__dot { position: absolute; width: 3px; height: 3px; border-radius: 999px; background: var(--green); opacity: .22; }
html[data-mode="h"] .fore__dot.is-pink { background: var(--pink); opacity: .45; }
html[data-mode="h"] .fore__dash { position: absolute; width: 2px; height: 12px; border-radius: 2px; background: var(--green); opacity: .16; }

html[data-mode="h"] .track .beat { flex: 0 0 100vw; width: 100vw; height: 100vh; min-height: 0; padding: var(--top-pad) calc(var(--roll) + 2vw) calc(var(--ruler-h) + 14px); display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); column-gap: 3vw; align-items: center; }
html[data-mode="h"] .track .beat__glyph { overflow: hidden; }
html[data-mode="h"] .track .beat__glyph span { padding-left: 4vw; will-change: transform; }
html[data-mode="h"] .track .beat__copy { grid-column: 1; grid-row: 1; max-width: 520px; justify-self: start; gap: 12px; }
html[data-mode="h"] .track .beat__media { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2vw; align-items: start; }
html[data-mode="h"] .track .beat--flip { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }
html[data-mode="h"] .track .beat--flip .beat__copy { grid-column: 2; }
html[data-mode="h"] .track .beat--flip .beat__media { grid-column: 1; }
html[data-mode="h"] .track .beat__media .story-img img { max-height: 60vh; }
html[data-mode="h"] .track .beat__media .story-img[data-role="side"] { align-self: end; }
html[data-mode="h"] .track .beat__media > .story-img:only-child { grid-column: 1 / -1; justify-self: center; width: min(100%, calc(60vh * .75 + 24px)); }
html[data-mode="h"] .track .t-h2 { font-size: clamp(26px, 2.9vw, 42px); }
html[data-mode="h"] .track .t-body { font-size: clamp(15px, 1.15vw, 18px); }

/* ส่วนท้ายหลัง pin (.v7-after): เลื่อนแนวตั้งปกติ — ไม่มีไม้บรรทัด ไม่มีแทร็กแนวนอนอีก */
html[data-mode="h"] .v7-after { position: relative; z-index: 1; background: transparent; color: var(--ink); } /* โปร่ง: canvas (z 0) ต้องมองเห็นผ่านช่วงเดินห้อง · พื้นครีมมาจาก body */
html[data-mode="h"] .v7-hall-wrap { position: relative; background: transparent; }

/* B4 (ไม่มี WebGL / ลดการเคลื่อนไหว) — ห้องขาวแนวตั้ง: แผ่นป้าย 1 จอ + 8 ห้อง ห้องละ 1 จอ */
html[data-mode="h"] .v7-after .beat.v7-b4 { display: block; flex: none; width: auto; height: auto; min-height: 0; padding: 0; column-gap: 0; grid-template-columns: none; background: #fff; }
html[data-mode="h"] .room { width: 100%; height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 76px 0 92px; }

/* B4 (มี WebGL) — เดินผ่านห้องจัดแสดง: section สูงเท่าทางเดิน (JS ตั้ง) · stage 100vh ติดจอ · canvas ด้านหลังมองผ่าน section ที่โปร่งขณะเดิน
   รูปจริงวาดบนผนังด้วย WebGL · figure ใน DOM ถือเฉพาะคำบรรยาย (ไทย) ที่ตามกรอบรูปที่ฉายลงจอ (ตัวแปร --cap* จาก JS) */
html.is-walk canvas.gl { opacity: 1; transition: none; }
html.is-walk .v7-after .beat.v7-b4.is-walk { background: transparent; }
.walk-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.walk-veil { position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0; pointer-events: none; }
.walk-plaque { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; padding: 76px 6vw 92px clamp(72px, 11vw, 200px); will-change: transform, opacity; }
.story--v7 .is-walk .walk-fig { position: absolute; left: 0; top: 0; z-index: 1; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; visibility: hidden; overflow: visible; pointer-events: none; will-change: transform; }
.story--v7 .is-walk .walk-fig img { display: block; width: 100%; height: 100%; opacity: 0; aspect-ratio: auto; border-radius: 0; max-height: none; }
.story--v7 .is-walk .walk-fig figcaption { position: absolute; left: var(--capL, 0px); top: var(--capT, 0px); width: var(--capW, 320px); height: var(--capH, 26px); margin: 0; display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 0 6px; overflow: hidden; white-space: nowrap; text-align: left; font-size: 13px; line-height: 1.3; font-weight: 700; color: var(--ink2); opacity: var(--cap-o, 1); }
.story--v7 .is-walk .walk-fig figcaption::before { display: none; }
.story--v7 .is-walk .walk-fig figcaption .draft-flag { flex: none; }
.walk-count { position: absolute; left: 22px; bottom: 22px; z-index: 2; font-size: 12px; font-weight: 700; letter-spacing: .24em; color: var(--ink2); font-variant-numeric: tabular-nums; opacity: 0; }
.walk-count b { font-weight: 700; color: var(--ink); }
html.is-walk[data-mode="h"] .ruler, html.is-walk[data-mode="h"] .fore { opacity: 0 !important; visibility: hidden; }
/* โหมด v (จอแคบ) ที่มี WebGL: แผ่นขาวห่อ B4–B7 ต้องไม่ทึบ/ไม่ overflow hidden (sticky stage ต้องอิง viewport) → ย้ายพื้นขาวไปที่ B5–B7 แทน */
html[data-mode="v"] .v7-hall-wrap.has-walk { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }
html[data-mode="v"] .v7-hall-wrap.has-walk .v7-ch { background: #fff; }
html[data-mode="v"] .v7-hall-wrap.has-walk .v7-ch--B5 { border-radius: 28px 28px 0 0; }
html[data-mode="v"] .story--v7 .v7-b4.is-walk { background: #fff; }
html.is-walk[data-mode="v"] .story--v7 .v7-b4.is-walk { background: transparent; }
html[data-mode="v"] .walk-plaque { padding: 76px var(--gutter) 92px calc(var(--gutter) + var(--spine-w)); }
@media (max-width: 767px) {
  .walk-count { bottom: 60px; }
  .walk-plaque { padding-bottom: 70px; }
  .story--v7 .is-walk .walk-fig figcaption { white-space: normal; height: auto; min-height: var(--capH, 26px); max-height: 2.7em; align-items: flex-start; line-height: 1.3; } /* จอแคบ: คำบรรยายพับได้ 2 บรรทัด ไม่ตัดทิ้ง */
}
html[data-mode="h"] .room--plaque { justify-content: flex-start; padding-left: clamp(72px, 11vw, 200px); padding-right: 6vw; }
html[data-mode="h"] .story--v7 .room .story-img { --ph: min(62vh, calc(100vh - 300px)); width: min(calc(var(--ph) * var(--asp) + 26px), calc(100vw - 220px)); }

/* B5–B8 */
html[data-mode="h"] .v7-after .beat.v7-ch { display: flex; align-items: center; flex: none; width: auto; height: 100vh; min-height: 0; padding: 72px clamp(32px, 5vw, 80px) 48px calc(var(--rail-x) + 48px); column-gap: 0; grid-template-columns: none; position: relative; background: #fff; overflow: hidden; }
html[data-mode="h"] .ch-grid { width: 100%; max-width: 1360px; margin: 0 auto; }
html[data-mode="h"] .ch-fig--lead .story-img img { height: min(60vh, 620px); width: auto; max-width: min(42vw, 560px); }
html[data-mode="h"] .ch-fig--side { position: absolute; left: 3%; bottom: 15%; width: clamp(150px, 13.5vw, 230px); z-index: 2; } /* ซ้อนบนตัวรูปหลัก ไม่ทับแถบคำบรรยายด้านล่าง */
html[data-mode="h"] .ch-fig--side .story-img { width: 100%; }
html[data-mode="h"] .ch-fig--side .story-img figcaption { padding: 9px 12px 11px; font-size: 12.5px; }
html[data-mode="h"] .v7-ch--B7 .ch-grid { grid-template-columns: minmax(0, 1fr); }
html[data-mode="h"] .v7-ch--B7 .ch-text { max-width: 1100px; }
html[data-mode="h"] .v7-ch--B7 .beat__title { max-width: 18em; }
html[data-mode="h"] .v7-after .beat.v7-end { display: grid; flex: none; width: auto; min-height: 146vh; height: auto; padding: 46vh clamp(24px, 4vw, 64px) 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: clamp(28px, 4vw, 72px); align-items: center; background: linear-gradient(to bottom, #fff 0, var(--cream) 46vh); }
html[data-mode="h"] .v7-end .end-col--l { grid-column: 1; grid-row: 1; justify-self: end; max-width: 440px; }
html[data-mode="h"] .v7-end .beat__media { grid-column: 2; grid-row: 1; }
html[data-mode="h"] .v7-end .end-col--r { grid-column: 3; grid-row: 1; justify-self: start; max-width: 400px; }
html[data-mode="h"] .story--v7 .v7-end .story-img.is-clean { width: auto; }
html[data-mode="h"] .story--v7 .v7-end .story-img.is-clean img { height: min(84vh, calc(100vh - 48px)); width: auto; max-width: none; max-height: none; aspect-ratio: 2 / 3; }
html[data-mode="h"].no-gl { --roll: 16px; }

/* ไม้บรรทัดเวลา (แทน spine) — โผล่เมื่อเข้าองก์ 3 · กลายเป็นสีหมึกตอนอยู่ในห้องขาว · จางหายตอนฉากจบ */
html[data-mode="h"] .ruler { position: fixed; left: 0; right: 0; bottom: 0; height: var(--ruler-h); z-index: 45; pointer-events: none; color: var(--green); opacity: 0; transition: opacity .4s ease, color .5s ease; }
html.is-act3[data-mode="h"] .ruler { opacity: 1; }
html.is-end[data-mode="h"] .ruler { opacity: 0; }
html[data-mode="h"] .ruler__line { position: absolute; left: 0; right: 0; top: 28px; height: 2px; background: var(--green-a15); transition: background .5s ease; }
html[data-mode="h"] .ruler__win { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 150px, #000 calc(100% - 350px), transparent calc(100% - 215px)); mask-image: linear-gradient(to right, transparent 0, #000 150px, #000 calc(100% - 350px), transparent calc(100% - 215px)); }
html[data-mode="h"] .ruler__track { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
html[data-mode="h"] .ruler__fill { position: absolute; left: 0; top: 28px; height: 2px; width: 0; background: var(--pink); transition: background .5s ease; }
html[data-mode="h"] .ruler__sub { position: absolute; top: 24px; width: 1px; height: 10px; background: currentColor; opacity: .3; transform: translateX(-50%); }
html[data-mode="h"] .ruler__tick { position: absolute; top: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; pointer-events: auto; color: inherit; }
html[data-mode="h"] .ruler__dot { width: 14px; height: 14px; border-radius: 999px; border: 2px solid currentColor; background: var(--cream); transition: background .25s ease, border-color .25s ease, transform .25s ease; }
html[data-mode="h"] .ruler__label { font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-align: center; transition: color .25s ease; }
html[data-mode="h"] .ruler__label small { display: block; font-weight: 400; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
html[data-mode="h"] .ruler__tick.is-past .ruler__dot { background: currentColor; }
html[data-mode="h"] .ruler__tick.is-active .ruler__dot { background: var(--pink); border-color: var(--pink); transform: scale(1.2); }
html[data-mode="h"] .ruler__tick.is-active .ruler__label { color: var(--pink); }
html[data-mode="h"] .ruler__now { position: absolute; left: 50%; top: 12px; width: 0; height: 0; transform: translateX(-50%); border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 9px solid var(--pink); transition: border-top-color .5s ease; }
html[data-mode="h"] .ruler__act { position: absolute; left: 22px; bottom: 16px; display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
html[data-mode="h"] .ruler__act .act { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border: 2px solid currentColor; border-radius: 8px; background: var(--white); box-shadow: var(--sh-pink-sm); font-size: 14px; transition: box-shadow .5s ease, border-color .5s ease; }
html[data-mode="h"] .ruler__pct { position: absolute; right: calc(var(--roll) + 22px); bottom: 16px; display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border: 2px solid currentColor; border-radius: 8px; background: var(--white); box-shadow: var(--sh-pink-sm); font-size: 13px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: box-shadow .5s ease, border-color .5s ease; }
html[data-mode="h"] .ruler__pct small { font-weight: 400; opacity: .7; margin-right: 8px; letter-spacing: .04em; }
/* ในห้องขาว: ไม้บรรทัดเป็นสีหมึก เส้นบาง ไม่มีเงาชมพู (ชมพูเหลือแค่ตรา 合格) */
html.is-hall[data-mode="h"] .ruler { color: var(--ink); }
html.is-hall[data-mode="h"] .ruler__line { background: var(--line); }
html.is-hall[data-mode="h"] .ruler__fill { background: var(--ink); }
html.is-hall[data-mode="h"] .ruler__now { border-top-color: var(--ink); }
html.is-hall[data-mode="h"] .ruler__dot { background: #fff; }
html.is-hall[data-mode="h"] .ruler__tick.is-past .ruler__dot { background: var(--ink); }
html.is-hall[data-mode="h"] .ruler__tick.is-active .ruler__dot { background: var(--ink); border-color: var(--ink); }
html.is-hall[data-mode="h"] .ruler__tick.is-active .ruler__label { color: var(--ink); }
html.is-hall[data-mode="h"] .ruler__act .act, html.is-hall[data-mode="h"] .ruler__pct { border: 1px solid var(--line); box-shadow: none; }
html.is-hall[data-mode="h"] .story-brand { border: 1px solid var(--line); box-shadow: none; color: var(--ink); transition: border-color .5s ease; }

/* คำใบ้เลื่อน (องก์ 1 หายเมื่อเริ่มเลื่อน) */
html[data-mode="h"] .hint { position: fixed; right: 22px; bottom: 22px; z-index: 46; display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px 0 16px; border: 2px solid var(--green); border-radius: var(--r-chip); background: var(--white); box-shadow: var(--sh-pink-sm); font-size: 12.5px; font-weight: 700; pointer-events: none; }
html[data-mode="h"] .hint i { display: block; width: 2px; height: 14px; background: var(--pink); border-radius: 2px; animation: hint-slide 1.6s ease-in-out infinite; }
@keyframes hint-slide { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(6px); opacity: 1; } }

/* จอเตี้ย (เช่น 1024×768) */
@media (min-width: 1024px) and (max-height: 820px) {
  html[data-mode="h"] { --top-pad: 68px; }
  html[data-mode="h"] .track .beat__copy { gap: 9px; }
  html[data-mode="h"] .room { padding-top: 66px; padding-bottom: 88px; }
  html[data-mode="h"] .v7-after .beat.v7-ch { padding-top: 60px; padding-bottom: 36px; }
  html[data-mode="h"] .story--v7 .room .story-img { --ph: min(62vh, calc(100vh - 290px)); }
  html[data-mode="h"] .story--v7 .v7-ch .principle { padding: 12px 14px; }
  html[data-mode="h"] .ch-fig--lead .story-img img { height: min(56vh, 520px); }
  html[data-mode="h"] .ch-big { font-size: clamp(64px, 11vh, 110px); }
}
