/* left-hud-a-1028 · แผงซ้ายแบบ A "บอกเรื่องเดียว" — จอสัมผัสเท่านั้น (html.lhr.touch-ui · quest-track.js) · คอมไม่เปลี่ยน · ?lhr=0 = แบบก่อนงานนี้
 * สเปก design-briefs/left-hud-review-1028/REPORT.md "สเปก A" · mock/mockA.css (ปรับให้เข้ากับขนาดย่อของ left-hud-size-1028 ที่ผู้ใช้ว่าเล็กลงแล้ว)
 * แผงกาง: เป้าหมายหลัก + ▶ ไปเลย + 📋 เควส · ไม่มีแถวกิจกรรม/📌/📯 (ย้ายไปจุดแดงปุ่มวันนี้ · หน้าต่างเควส · แท็บปาร์ตี้) */

/* ── แผงกาง: แคบลง · ทึบขึ้น (ปุ่มโปร่งจมหายบนแชท ข้อ 13) · สูงไม่เกินขอบบนโซนล่างซ้าย (จอย) ข้อ 3-4 ── */
html.lhr.touch-ui.land body #goal#goal:not(.min) {
  width: min(40vw, 280px) !important; max-width: min(40vw, 280px) !important;
  background: rgba(16, 24, 32, .9) !important;
  max-height: calc((100dvh - var(--hz-bl-t, 120px) - var(--hz-goal-t, 80px) - 8px) / var(--ui, 1)) !important;
}
/* ข้อ 8-10 ที่ไม่ต้องแสดงในแผง: แถวกิจกรรม · ติดตาม · ขอช่วย */
html.lhr.touch-ui body #goal #goal-cer, html.lhr.touch-ui body #goal #goal-pin, html.lhr.touch-ui body #goal #goal-sos { display: none !important; }
/* ข้อ 5: ซ่อนป้ายหัว "เป้าหมายแนะนำ" — ปุ่มย่อลอยมุมขวาบน (แตะ 44 ด้วย ::after) → แผงเตี้ยลง */
html.lhr.touch-ui body #goal:not(.min) > header { position: absolute !important; right: 4px; top: 5px; z-index: 2; min-height: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; width: auto; }
html.lhr.touch-ui body #goal:not(.min) > header > span { display: none !important; }
html.lhr.touch-ui body #goal:not(.min) > .body { padding: 5px 8px 2px 10px !important; flex: none; }
html.lhr.touch-ui body #goal:not(.min) #goal-txt { margin-right: 54px; }   /* หลบปุ่มย่อมุมขวาบน เฉพาะบรรทัดชื่อ — บรรทัดรองใช้เต็มกว้าง */
html.lhr.touch-ui body #goal#goal:not(.min) #goal-min { position: relative !important; min-height: 30px !important; padding: 0 9px !important; font-size: var(--fs-xs, 12px) !important; }
html.lhr.touch-ui body #goal#goal:not(.min) #goal-min::after { content: ""; position: absolute; inset: -8px -6px -4px; }
/* ข้อ 6: ชื่อ ≤ 2 บรรทัด · บรรทัดรอง 1 บรรทัด */
html.lhr.touch-ui body #goal:not(.min) #goal-txt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html.lhr.touch-ui body #goal:not(.min) #goal-sub { display: -webkit-box !important; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 1 !important; line-height: 1.25 !important; }
/* ข้อ 7: ปุ่มท้ายแผง 2 ปุ่ม [▶ ไปเลย 1.6fr][📋 เควส n/5 1fr] — ภาพสูง 30 แตะ 44 (ขอบโปร่งจาก left-hud-size-1028) */
html.lhr.touch-ui body #goal#goal:not(.min) .gfoot { grid-template-columns: 1.6fr 1fr !important; grid-auto-flow: row !important; grid-auto-columns: auto !important; gap: 6px !important; padding: 0 10px 8px !important; }
html.lhr.touch-ui body #goal#goal:not(.min) #goal-act { font-size: var(--fs-sm, 14px) !important; }
html.lhr.touch-ui body #goal#goal:not(.min) #goal-quest { background: rgba(255, 255, 255, .16) !important; }

/* ข้อ 11: ปุ่มหาปาร์ตี้ ภาพสูง 34 · แตะ 44 (::after โปร่ง) */
html.lhr.touch-ui #pf-dock .pf-btn { min-height: 34px; padding-block: 2px; position: relative; margin-block: 5px; }
html.lhr.touch-ui #pf-dock .pf-btn::after { content: ""; position: absolute; inset: -5px -2px; }
/* ข้อ 12: รายชื่อตี้กาง (+N) ห้ามยื่นขึ้นไปทับแผงเป้าหมาย — สูงสุดเท่าที่ว่างใต้โซนซ้ายบน (--hz-tl-b) ลบแถวชิป/ปุ่มข้างล่าง */
html.lhr.touch-ui body #hud #party-hud.pv2.xopen .pv-list { max-height: max(48px, min(132px, calc((100dvh - var(--hz-tl-b, 120px) - 70px) / var(--ui, 1)))); }
/* ข้อ 14: iPad (ด้านสั้น >= 600) โซนซ้ายไม่ขยาย 1.5 เท่า — --ui ของโซนซ้ายเป็น 1.2 (zoom ของโซนอ่านตัวแปรนี้เอง) · แถบย่อ 250 */
@media (min-height: 600px) {
  html.lhr.touch-ui body #hud :is(.hz-tl, .hz-bl) { --ui: 1.2; }
  html.lhr.touch-ui body #hud .hz-tl > #goal.min:not(.chip) { width: 250px !important; max-width: 250px !important; }
  html.lhr.touch-ui.land body #goal#goal:not(.min) { width: min(40vw, 300px) !important; max-width: min(40vw, 300px) !important; }
}
/* ข้อ 15: ชื่อแถบย่ออังกฤษ ไม่เล็กกว่า 12px จริง (โซนซ้ายถูก zoom --ui) */
html[lang="en"].lhr.touch-ui body #goal.min:not(.chip) #goal-txt { font-size: max(13px, calc(12px / var(--ui, 1))) !important; }
/* จอเตี้ย (<= 430): ชื่อ 1 บรรทัด ให้แผงพอดีเหนือโซนล่างซ้าย (ไม่ทับปาร์ตี้/จอย) — จอสูงกว่านี้ 2 บรรทัดตามข้อ 6 */
@media (max-height: 430px) {
  html.lhr.touch-ui body #goal:not(.min) #goal-txt { -webkit-line-clamp: 1; }
  html.lhr.touch-ui body #goal:not(.min) .qt-tag { font-size: 0; gap: 0; padding: 2px; }   /* ป้ายชนิดเหลือไอคอน (สีขอบซ้ายบอกชนิดด้วย) — ให้ชื่อเป้าหมายอ่านได้มากขึ้น */
  html.lhr.touch-ui body #goal:not(.min) .qt-tag img { width: 22px; height: 22px; margin: 0; }
}
/* กระชับแถวบน: ไอคอน 26 · ไม่มีช่องว่างระหว่างแถว — ให้ขอบโปร่งของปุ่มท้าย (แตะ 44) อยู่ในแผงทั้งหมด ไม่ถูกตัด */
html.lhr.touch-ui body #goal:not(.min) > .body { row-gap: 0 !important; }
html.lhr.touch-ui body #goal:not(.min) #goal-icon { width: 26px !important; height: 26px !important; align-self: center; }
html.lhr.touch-ui body #goal:not(.min) #goal-tag { align-self: center; }
/* พื้นที่แตะปุ่มท้ายแผงบนจอที่ --ui < 1 (โซนซ้ายถูก zoom): ขอบโปร่งขยายให้ขนาดจริงบนจอ >= 46 · ภาพสูง 30 เท่าเดิม */
html.lhr.qw2.touch-ui body #goal#goal:not(.min) .gfoot > button { --hh: max(44px, calc(48px / var(--ui, 1))); height: var(--hh) !important; min-height: var(--hh) !important; max-height: var(--hh) !important; margin: calc((30px - var(--hh)) / 2) 0 !important; border-width: calc((var(--hh) - 30px) / 2) !important; }
html.lhr.touch-ui body #goal#goal:not(.min) .gfoot { padding-bottom: calc(8px + (max(44px, calc(48px / var(--ui, 1))) - 44px) / 2) !important; }

/* ── ฟองกิจกรรม (event-bubble.js · html.evb) — ฟองกลมข้างขวาแถบเควสย่อ · แตะ = แผ่นรายการ · ลูกของ #goal (ไม่ตั้งตำแหน่งตายตัวนอกแถบ) ── */
#ev-bubble, #ev-sheet { display: none; }
/* หอระฆัง (html[data-bf]): ฟองบังปุ่ม "แตะกาง" ของแถบย่อหอระฆัง (check-hud-cover bf-bar 844/932/667) — ในดันซ่อนแบบแถบเควส */
html[data-bf] #ev-bubble, html[data-bf] #ev-sheet, html.in-bf #ev-bubble, html.in-bf #ev-sheet { display: none !important; }   /* in-bf = แถบหอระฆังแสดงอยู่ (ทั้งแถบย่อ) */
html.evb.touch-ui body #goal.min { position: relative; overflow: visible; }
html.evb.touch-ui body #goal.min:not(.chip) #ev-bubble:not([hidden]) {
  display: grid; place-items: center; position: absolute; left: calc(100% + 6px); top: 50%; translate: 0 -50%; z-index: 3;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer; pointer-events: auto;
  border: 2px solid #e8b64a; background: rgba(16, 24, 32, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
html.evb.touch-ui body #goal #ev-bubble::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; }   /* แตะ 44 */
html.evb.touch-ui body #goal #ev-bubble img { width: 22px; height: 22px; object-fit: contain; pointer-events: none; }
html.evb.touch-ui body #goal #ev-bubble .evb-dot { display: none; position: absolute; right: -2px; top: -2px; width: 11px; height: 11px; border-radius: 50%; background: #e0453a; border: 2px solid #fff; box-sizing: border-box; pointer-events: none; }
html.evb.touch-ui body #goal #ev-bubble.new .evb-dot { display: block; }
html.evb.touch-ui body #goal #ev-bubble[aria-expanded="true"] { background: #2f6f73; }
/* แผ่นรายการ: ใต้ฟอง ไปทางขวา — ไม่ทับแผงกาง (แผ่นซ่อนเมื่อแผงกาง) */
html.evb.touch-ui body #goal.min:not(.chip) #ev-sheet:not([hidden]) {
  display: grid; gap: 4px; position: absolute; left: calc(100% + 18px); top: calc(50% + 22px); z-index: 4; width: min(230px, 38vw); padding: 6px;
  border-radius: 12px; background: rgba(16, 24, 32, .94); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); pointer-events: auto; color: #fff;
}
html.evb.touch-ui body #goal #ev-sheet .evs-h { padding: 0 4px 2px; color: #f3d98e; font: 700 var(--fs-xs, 12px)/1.3 var(--font-head, inherit); }
html.evb.touch-ui body #goal #ev-sheet .evs-row { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 8px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; text-align: left; cursor: pointer; font: 600 var(--fs-xs, 12px)/1.25 var(--font, inherit); }
html.evb.touch-ui body #goal #ev-sheet .evs-row img { width: 24px; height: 24px; flex: none; object-fit: contain; }
html.evb.touch-ui body #goal #ev-sheet .evs-t { flex: 1 1 auto; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
html.evb.touch-ui body #goal #ev-sheet .evs-go { flex: none; padding: 3px 8px; border-radius: 8px; background: #e8b64a; color: #4b2d17; font-style: normal; font-weight: 800; }
