/* หน้าจอเกม (UI): แถบปุ่ม · หน้าต่าง ตัวละคร+กระเป๋า / สกิล / ค่าสถานะ / ตั้งค่า
   เขียน 29 พ.ย. 69 โดยผู้ช่วย Claude (Opus 5.5) · ไม่ใช้ไลบรารีภายนอก · ทุกชื่อขึ้นต้น gu- (ไม่ชนกับปุ่มเดิมของเกม .btn .bar .bag .sk)
   แนวหน้าตา 3 แนว (ภาพแนวทาง assets-src/astra/ui-01/ui-style-{a,b,c}.png) สลับด้วย data-theme บน .gu:
     a = แดงชาด+ทอง · b = กรมท่าเรียบ · c = ไม้+กระดาษ
   จัดหน้า 3 แบบ (ตัวจัดตั้ง data-lay ตามขนาดพื้นที่เกม): p = จอตั้ง · l = จอนอนเตี้ย · w = จอกว้าง (คอม/แท็บเล็ต)
   ตัวหนังสือไทยไม่ต่ำกว่า 14 จุด · ปุ่มแตะสูงไม่ต่ำกว่า 44 จุด */

.gu {
  --gu-scale: 1;
  --font: "Leelawadee UI", "Noto Sans Thai", "Thonburi", "Sukhumvit Set", Tahoma, sans-serif;
  --O: #1c1410;
  position: absolute; inset: 0; z-index: 30; pointer-events: none;
  font-family: var(--font); font-size: calc(15px * var(--gu-scale)); line-height: 1.35; color: var(--h-ink);
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.gu *, .gu *::before, .gu *::after { box-sizing: border-box; }
.gu [hidden] { display: none !important; }
/* ตัวตั้งต้นของปุ่ม: :where() ทำให้ไม่ชนะคลาสของปุ่มแต่ละแบบ (สี น้ำหนักตัวอักษร) */
.gu :where(button) { font: inherit; color: inherit; margin: 0; cursor: pointer; touch-action: manipulation; -webkit-appearance: none; appearance: none; }
.gu :where(button:disabled) { cursor: default; }
.gu :focus { outline: none; }
.gu :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.gu svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gu .num { font-variant-numeric: tabular-nums; }

/* ---------- แนว ข กรมท่าเรียบ (ค่าตั้งต้น) ---------- */
.gu, .gu[data-theme="b"] {
  --w-bg: linear-gradient(180deg, #1f2834 0%, #161d27 100%);
  --w-border: #c9a25a80; --w-radius: 18px; --w-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  --h-bg: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)); --h-line: 1px solid #c9a25a55; --h-ink: #eef2f6; --h-muted: #a6b2c1;
  --p-bg: #10161e; --p-ink: #e9eef4; --p-muted: #a3afbe; --p-line: #2b3747; --p-border: #2c394a; --p-radius: 14px;
  --s-bg: #0b1017; --s-border: #344458; --s-glyph: #4a5d74;
  --c-bg: #1b2531; --c-ink: #d7e0ea; --c-border: #39495e; --c-on-bg: linear-gradient(180deg, #ffc66b, #f0a63a); --c-on-ink: #241603; --c-on-border: #ffd890;
  --a-bg: linear-gradient(180deg, #ffc56a, #ee9f33); --a-ink: #261702; --a-rim: #ffe0a3;
  --b2-bg: #243041; --b2-ink: #e6ecf3; --b2-border: #3d4e65;
  --d-bg: #3a1c1f; --d-ink: #ffd0c8; --d-border: #a4483d;
  --good: #6fe07a; --bad: #ff7a6b; --gold: #f0b44a;
  --track: #263243; --fill: linear-gradient(90deg, #f6a93b, #ffd27a);
  --dock-bg: rgba(16, 22, 30, .82); --dock-ink: #f2f5f8; --dock-border: #c9a25a77;
  --sk-ring: #c9a25a; --sk-bg: #0a0e14; --ped: rgba(255, 196, 92, .55); --focus: #ffd27a; --sel: #ffd27a; --sel-bg: rgba(255, 210, 120, .14);
  --r0: #d9dde3; --r1: #74d36c; --r2: #5fb0ff; --r3: #bd84ff; --r4: #ffc93c; --r5: #ff6656;
  --back: rgba(3, 6, 10, .5);
}
/* ---------- แนว ก แดงชาด+ทอง ---------- */
.gu[data-theme="a"] {
  --w-bg: radial-gradient(130% 70% at 50% 0%, #84181d 0%, #5c0e12 45%, #3d080b 100%);
  --w-border: #e0b04d; --w-radius: 16px; --w-shadow: 0 18px 50px rgba(20, 0, 0, .65);
  --h-bg: linear-gradient(180deg, #6e1217, #4a0b0e); --h-line: 2px solid #d9a441; --h-ink: #fbe7b0; --h-muted: #e8c47a;
  --p-bg: linear-gradient(180deg, #f7ead0, #ecdab4); --p-ink: #3a2210; --p-muted: #6e4f2e; --p-line: #d2b27a; --p-border: #c79a45; --p-radius: 10px;
  --s-bg: #fbf1dc; --s-border: #c9a050; --s-glyph: #c4a575;
  --c-bg: #5b0e12; --c-ink: #f6d98e; --c-border: #b98a3a; --c-on-bg: linear-gradient(180deg, #ffe08c, #e3aa3e); --c-on-ink: #3a1d05; --c-on-border: #fff1bd;
  --a-bg: linear-gradient(180deg, #ffe08a, #e2a73c); --a-ink: #3a2205; --a-rim: #fff3c2;
  --b2-bg: linear-gradient(180deg, #f1e3c3, #ddc79a); --b2-ink: #4a2d12; --b2-border: #b8913f;
  --d-bg: linear-gradient(180deg, #a42a22, #7c1914); --d-ink: #ffe6c8; --d-border: #e0b04d;
  --good: #1f8a2e; --bad: #c22a1c; --gold: #b7801f;
  --track: #dcc79c; --fill: linear-gradient(90deg, #d99a2b, #f6cc5c);
  --dock-bg: linear-gradient(180deg, rgba(110, 18, 23, .92), rgba(70, 9, 12, .92)); --dock-ink: #fbe7b0; --dock-border: #e0b04d;
  --sk-ring: #e0b04d; --sk-bg: #2a0507; --ped: rgba(255, 200, 80, .7); --focus: #ffe08a; --sel: #a8740f; --sel-bg: rgba(225, 170, 60, .22);
  --r0: #8f8a80; --r1: #3c9a35; --r2: #2a78cf; --r3: #8b49d6; --r4: #d9a21a; --r5: #d8392b;
  --back: rgba(20, 2, 4, .5);
}
/* ---------- แนว ค ไม้+กระดาษ ---------- */
.gu[data-theme="c"] {
  --w-bg:
    linear-gradient(180deg, rgba(255, 220, 170, .07), rgba(0, 0, 0, .28)),
    repeating-linear-gradient(91deg, rgba(0, 0, 0, 0) 0 5px, rgba(0, 0, 0, .13) 5px 6px, rgba(255, 230, 190, .05) 6px 7px, rgba(0, 0, 0, 0) 7px 15px),
    repeating-linear-gradient(89deg, #5e3c23 0 17px, #533419 17px 26px, #664429 26px 36px);
  --w-border: #2b1909; --w-radius: 12px; --w-shadow: 0 18px 50px rgba(0, 0, 0, .65);
  --h-bg: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .22)); --h-line: 2px solid #2a1808; --h-ink: #f6e7c3; --h-muted: #dcc596;
  --p-bg:
    radial-gradient(120% 90% at 15% 8%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 60%),
    radial-gradient(70% 55% at 88% 92%, rgba(140, 95, 45, .2), rgba(140, 95, 45, 0) 70%),
    linear-gradient(180deg, #f3e4c2, #e7d1a3);
  --p-ink: #3a2714; --p-muted: #6a5234; --p-line: #c9ad7a; --p-border: #a98a55; --p-radius: 6px;
  --s-bg: #ecdcb6; --s-border: #8f6f40; --s-glyph: #b39a6c;
  --c-bg: #2f4a2b; --c-ink: #f1e6c8; --c-border: #c9a45c; --c-on-bg: linear-gradient(180deg, #4f8a45, #356b30); --c-on-ink: #fff6dc; --c-on-border: #f1d38a;
  --a-bg: linear-gradient(180deg, #3f7f3a, #2b5f2a); --a-ink: #fff6dc; --a-rim: #e1bf6e;
  --b2-bg: linear-gradient(180deg, #efe0bb, #dcc595); --b2-ink: #3d2a15; --b2-border: #8f6f40;
  --d-bg: linear-gradient(180deg, #8a2b20, #651b13); --d-ink: #ffe9cf; --d-border: #e1bf6e;
  --good: #1f7a2c; --bad: #b7281b; --gold: #9a6a16;
  --track: #d6c095; --fill: linear-gradient(90deg, #d39a2a, #f2c75a);
  --dock-bg: linear-gradient(180deg, rgba(98, 63, 37, .95), rgba(70, 44, 24, .95)); --dock-ink: #f6e7c3; --dock-border: #c9a45c;
  --sk-ring: #c9a45c; --sk-bg: #1d140b; --ped: rgba(255, 214, 120, .6); --focus: #f1d38a; --sel: #2f6b34; --sel-bg: rgba(60, 120, 55, .16);
  --r0: #8b8576; --r1: #3a8d33; --r2: #2b70bd; --r3: #8346c8; --r4: #c9951a; --r5: #c8352a;
  --back: rgba(10, 6, 2, .5);
}

/* ---------- แถบปุ่ม (dock) ---------- */
.gu-dock { position: absolute; display: flex; gap: 6px; pointer-events: auto; z-index: 1; }
.gu[data-dockpos="right"] .gu-dock { right: max(8px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); flex-direction: column; }
.gu[data-dockpos="left"] .gu-dock { left: max(8px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); flex-direction: column; }
.gu[data-dockpos="top"] .gu-dock { top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); flex-direction: row; }
.gu[data-dockpos="bottom"] .gu-dock { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); flex-direction: row; }
.gu[data-dockpos="none"] .gu-dock { display: none; }
.gu-dockbtn {
  width: 64px; min-height: 58px; padding: 5px 2px 4px; border-radius: 14px; display: grid; justify-items: center; align-content: center; gap: 1px;
  background: var(--dock-bg); color: var(--dock-ink); border: 1.5px solid var(--dock-border); box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}
.gu-dockbtn .gu-ico { width: 28px; height: 28px; }
.gu-dockbtn .gu-dl { font-size: .94em; line-height: 1.15; font-weight: 700; white-space: nowrap; }
.gu-dockbtn[aria-expanded="true"] { background: var(--c-on-bg); color: var(--c-on-ink); border-color: var(--c-on-border); }
.gu-dockbtn:active { transform: scale(.95); }
.gu-dockbtn .gu-dot { position: absolute; }
.gu-dockbtn { position: relative; }
.gu-pip { position: absolute; top: -5px; right: -5px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e0382a; color: #fff; font-size: .94em; font-weight: 700; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }

/* ---------- ชั้นหน้าต่าง ---------- */
.gu-layer { position: absolute; inset: 0; pointer-events: auto; z-index: 2; }
.gu-back { position: absolute; inset: 0; background: var(--back); opacity: 0; transition: opacity .16s ease; }
.gu-win {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  background: var(--w-bg); border: 1.5px solid var(--w-border); border-radius: var(--w-radius); box-shadow: var(--w-shadow); color: var(--h-ink);
  opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
}
.gu-layer.is-in .gu-back { opacity: 1; }
.gu-layer.is-in .gu-win { opacity: 1; transform: none; }
.gu[data-motion="0"] .gu-win, .gu[data-motion="0"] .gu-back { transition: none; }
@media (prefers-reduced-motion: reduce) { .gu-win, .gu-back { transition: none; } }
.gu[data-lay="p"] .gu-win { left: max(6px, env(safe-area-inset-left, 0px)); right: max(6px, env(safe-area-inset-right, 0px)); top: calc(6px + env(safe-area-inset-top, 0px)); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
.gu[data-lay="l"] .gu-win { left: max(6px, env(safe-area-inset-left, 0px)); right: max(6px, env(safe-area-inset-right, 0px)); top: calc(6px + env(safe-area-inset-top, 0px)); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); border-radius: 12px; }   /* 1 ธ.ค. 69 จอนอน: เว้นเขตรอยบาก/แถบโฮมบน-ล่างด้วย */
.gu[data-lay="w"] .gu-win { inset: 0; margin: auto; width: min(1000px, calc(100% - 40px)); height: min(700px, calc(100% - 40px)); }
/* กรอบทองและลายมุม (แนว ก) · หมุดทองเหลือง (แนว ค) */
.gu-win::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 7; }
.gu[data-theme="a"] .gu-win::after {
  box-shadow: inset 0 0 0 1.5px #f0cd78, inset 0 0 0 4px #3d070a, inset 0 0 0 5.5px #c38b2f;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M3 3H22C14 4 9 7 7 13C6 9 5 6 3 3Z' fill='%23f2cf73'/%3E%3Cpath d='M3 3V22C4 14 7 9 13 7C9 6 6 5 3 3Z' fill='%23c99236'/%3E%3Cpath d='M10 10C14 8 19 9 21 13C22 16 19 18 17 16C15.5 14.5 17 12.8 18.3 13.6' fill='none' stroke='%23f2cf73' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M10 10C8 14 9 19 13 21C16 22 18 19 16 17' fill='none' stroke='%23c99236' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='2.2' fill='%23fff1b8'/%3E%3C/svg%3E") left 3px top 3px / 26px 26px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 0) scale(-1 1)'%3E%3Cpath d='M3 3H22C14 4 9 7 7 13C6 9 5 6 3 3Z' fill='%23f2cf73'/%3E%3Cpath d='M3 3V22C4 14 7 9 13 7C9 6 6 5 3 3Z' fill='%23c99236'/%3E%3Cpath d='M10 10C14 8 19 9 21 13C22 16 19 18 17 16C15.5 14.5 17 12.8 18.3 13.6' fill='none' stroke='%23f2cf73' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M10 10C8 14 9 19 13 21C16 22 18 19 16 17' fill='none' stroke='%23c99236' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='2.2' fill='%23fff1b8'/%3E%3C/g%3E%3C/svg%3E") right 3px top 3px / 26px 26px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(0 40) scale(1 -1)'%3E%3Cpath d='M3 3H22C14 4 9 7 7 13C6 9 5 6 3 3Z' fill='%23f2cf73'/%3E%3Cpath d='M3 3V22C4 14 7 9 13 7C9 6 6 5 3 3Z' fill='%23c99236'/%3E%3Cpath d='M10 10C14 8 19 9 21 13C22 16 19 18 17 16C15.5 14.5 17 12.8 18.3 13.6' fill='none' stroke='%23f2cf73' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M10 10C8 14 9 19 13 21C16 22 18 19 16 17' fill='none' stroke='%23c99236' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='2.2' fill='%23fff1b8'/%3E%3C/g%3E%3C/svg%3E") left 3px bottom 3px / 34px 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg transform='translate(40 40) scale(-1 -1)'%3E%3Cpath d='M3 3H22C14 4 9 7 7 13C6 9 5 6 3 3Z' fill='%23f2cf73'/%3E%3Cpath d='M3 3V22C4 14 7 9 13 7C9 6 6 5 3 3Z' fill='%23c99236'/%3E%3Cpath d='M10 10C14 8 19 9 21 13C22 16 19 18 17 16C15.5 14.5 17 12.8 18.3 13.6' fill='none' stroke='%23f2cf73' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M10 10C8 14 9 19 13 21C16 22 18 19 16 17' fill='none' stroke='%23c99236' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='4.5' cy='4.5' r='2.2' fill='%23fff1b8'/%3E%3C/g%3E%3C/svg%3E") right 3px bottom 3px / 34px 34px no-repeat;
}
.gu[data-theme="c"] .gu-win::after {
  box-shadow: inset 0 0 0 2px rgba(255, 220, 160, .12), inset 0 0 18px rgba(0, 0, 0, .45);
  background:
    radial-gradient(circle at 50% 50%, #fff3c4 0 1.5px, #d8b25a 2px 4px, #6e4f1d 5px 6px, rgba(0, 0, 0, 0) 6.5px) left 4px top 4px / 14px 14px no-repeat,
    radial-gradient(circle at 50% 50%, #fff3c4 0 1.5px, #d8b25a 2px 4px, #6e4f1d 5px 6px, rgba(0, 0, 0, 0) 6.5px) right 4px top 4px / 14px 14px no-repeat,
    radial-gradient(circle at 50% 50%, #fff3c4 0 1.5px, #d8b25a 2px 4px, #6e4f1d 5px 6px, rgba(0, 0, 0, 0) 6.5px) left 4px bottom 4px / 14px 14px no-repeat,
    radial-gradient(circle at 50% 50%, #fff3c4 0 1.5px, #d8b25a 2px 4px, #6e4f1d 5px 6px, rgba(0, 0, 0, 0) 6.5px) right 4px bottom 4px / 14px 14px no-repeat;
}

/* ---------- หัวหน้าต่าง ---------- */
.gu-head { position: relative; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 10px; min-height: 58px; background: var(--h-bg); border-bottom: var(--h-line); flex: 0 0 auto; }
.gu[data-lay="l"] .gu-head { min-height: 50px; padding: 3px 8px; }
.gu-nav { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; }
.gu-navbtn {
  height: 44px; min-width: 44px; padding: 0 9px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: transparent; color: var(--h-muted); border: 1.5px solid transparent; font-weight: 700; white-space: nowrap;
}
.gu-navbtn .gu-ico { width: 24px; height: 24px; flex: 0 0 auto; }
.gu-navbtn .lbl { display: none; }
.gu-navbtn[aria-selected="true"] { background: var(--c-on-bg); color: var(--c-on-ink); border-color: var(--c-on-border); }
.gu-navbtn[aria-selected="true"] .lbl { display: inline; }
.gu[data-lay="w"] .gu-navbtn .lbl { display: inline; }
.gu-themechip { height: 44px; padding: 0 10px; border-radius: 22px; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; background: var(--c-bg); color: var(--c-ink); border: 1.5px solid var(--c-border); font-weight: 700; white-space: nowrap; }
.gu-themechip .gu-ico { width: 20px; height: 20px; }
.gu-x { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--b2-bg); color: var(--b2-ink); border: 1.5px solid var(--b2-border); }
.gu-x .gu-ico { width: 20px; height: 20px; }
.gu-body { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; z-index: 1; }

/* ---------- ของใช้ร่วม ---------- */
.gu-pane { background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--p-border); border-radius: var(--p-radius); }
.gu[data-theme="a"] .gu-pane { box-shadow: inset 0 0 0 2px rgba(255, 250, 235, .55), inset 0 2px 8px rgba(120, 70, 20, .18); }
.gu[data-theme="c"] .gu-pane { box-shadow: 0 2px 0 rgba(0, 0, 0, .35), inset 0 0 22px rgba(130, 90, 40, .22); }
.gu-muted { color: var(--p-muted); }
.gu-ico { display: inline-block; width: 24px; height: 24px; flex: 0 0 auto; }
.gu-btn {
  min-height: 44px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--b2-bg); color: var(--b2-ink); border: 1.5px solid var(--b2-border); font-weight: 700; white-space: nowrap;
}
.gu-btn .gu-ico { width: 22px; height: 22px; }
.gu-btn--main { background: var(--a-bg); color: var(--a-ink); border-color: var(--a-rim); box-shadow: 0 2px 0 rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35); }
.gu-btn--danger { background: var(--d-bg); color: var(--d-ink); border-color: var(--d-border); }
.gu-btn:disabled { opacity: .45; }
.gu-btn:not(:disabled):active, .gu-chip:active, .gu-plus:not(:disabled):active { transform: translateY(1px) scale(.98); }
.gu-chip {
  min-height: 44px; padding: 0 13px; border-radius: 22px; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  background: var(--c-bg); color: var(--c-ink); border: 1.5px solid var(--c-border); font-weight: 700; white-space: nowrap;
}
.gu-chip .gu-ico { width: 22px; height: 22px; }
.gu-chip[aria-pressed="true"], .gu-chip[aria-selected="true"] { background: var(--c-on-bg); color: var(--c-on-ink); border-color: var(--c-on-border); }
.gu-chiprow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; }
.gu-chiprow::-webkit-scrollbar { display: none; }
.gu-plus {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--a-bg); color: var(--a-ink); border: 2px solid var(--a-rim); font-size: 1.6em; font-weight: 700; line-height: 1; box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.gu-plus .gu-ico { width: 22px; height: 22px; }
.gu-plus:disabled { opacity: .35; filter: grayscale(.6); }
.gu-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scrollbar-width: thin; }
.gu-good { color: var(--good); } .gu-bad { color: var(--bad); }
.gu-bar { position: relative; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.gu-bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: 0 50%; background: var(--fill); border-radius: inherit; }
.gu-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: max(11px, .94em); font-weight: 700; line-height: 1.6; background: rgba(127, 127, 127, .16); border: 1px solid rgba(127, 127, 127, .35); white-space: nowrap; }
.gu-empty { padding: 18px; text-align: center; color: var(--p-muted); }

/* ---------- ช่องของ (สวมใส่ + กระเป๋า) ---------- */
.gu-slot {
  --rc: var(--s-border);
  position: relative; width: var(--slot, 58px); height: var(--slot, 58px); border-radius: 10px; flex: 0 0 auto; padding: 0;
  display: grid; place-items: center; background: var(--s-bg); border: 2px solid var(--rc); color: var(--s-glyph);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25);
}
.gu-slot.has { background: radial-gradient(circle at 50% 42%, var(--rg, rgba(255, 255, 255, .1)) 0%, rgba(0, 0, 0, 0) 70%), var(--s-bg); }
.gu-slot .gu-art { width: 78%; height: 78%; }
.gu-slot .gu-glyph { width: 62%; height: 62%; opacity: .9; }
.gu-slot.sel { box-shadow: 0 0 0 3px var(--sel), inset 0 2px 6px rgba(0, 0, 0, .25); }
.gu-slot.want { animation: gu-pulse 1.1s ease-in-out infinite; }
@keyframes gu-pulse { 50% { box-shadow: 0 0 0 4px var(--focus); } }
.gu[data-motion="0"] .gu-slot.want { animation: none; box-shadow: 0 0 0 3px var(--focus); }
.gu-badge { position: absolute; top: 1px; right: 3px; font-size: .94em; font-weight: 800; line-height: 1.1; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000, 1px 0 1px #000, -1px 0 1px #000; pointer-events: none; }
.gu-count { position: absolute; bottom: 0; right: 3px; font-size: .94em; font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000, 1px 0 1px #000, -1px 0 1px #000; pointer-events: none; }
.gu-lockmark { position: absolute; left: 2px; bottom: 1px; width: 18px; height: 18px; pointer-events: none; }
.gu-slotlbl { display: block; text-align: center; font-size: .94em; line-height: 1.2; margin-top: 2px; color: var(--h-muted); white-space: nowrap; }

/* ---------- หน้าต่าง ตัวละคร + กระเป๋า ---------- */
.gu-eq { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; padding: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
.gu[data-lay="l"] .gu-eq, .gu[data-lay="w"] .gu-eq { grid-template-columns: minmax(310px, 42%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.gu[data-lay="l"] .gu-eq { gap: 6px; padding: 6px; }
.gu-eqsub { display: flex; gap: 6px; align-items: center; }
.gu-eqsub .gu-chip { flex: 1 1 0; justify-content: center; }
.gu[data-lay="l"] .gu-eqsub .gu-chip, .gu[data-lay="w"] .gu-eqsub .gu-chip { min-height: 44px; }
.gu-doll { --slot: 58px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: stretch; padding: 8px; }
.gu[data-lay="l"] .gu-doll { --slot: 46px; gap: 5px; padding: 6px; grid-row: 2; grid-column: 1; }
.gu[data-lay="w"] .gu-doll { --slot: 64px; grid-row: 2; grid-column: 1; align-content: start; }
.gu-slotcol { display: flex; flex-direction: column; gap: 7px; }
.gu[data-lay="l"] .gu-slotcol { gap: 5px; }
.gu-prev { position: relative; min-height: 150px; border-radius: 12px; overflow: hidden; touch-action: pan-y; }
.gu-prev::before { content: ""; position: absolute; left: 14%; right: 14%; bottom: 7%; height: 15%; border-radius: 50%; background: radial-gradient(closest-side, var(--ped), rgba(0, 0, 0, 0)); pointer-events: none; }
.gu[data-theme="a"] .gu-prev::after, .gu[data-theme="b"] .gu-prev::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 10.5%; height: 7%; border-radius: 50%; border: 2px solid var(--ped); pointer-events: none; }
.gu-prev canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.gu-prevload { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--p-muted); padding: 10px; }
.gu-rot { position: absolute; bottom: 4px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--b2-bg); color: var(--b2-ink); border: 1.5px solid var(--b2-border); opacity: .92; }
.gu-rot .gu-ico { width: 20px; height: 20px; }
.gu-rot.l { left: 4px; } .gu-rot.r { right: 4px; }
.gu-dirdots { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.gu-dirdots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(127, 127, 127, .45); }
.gu-dirdots i.on { background: var(--gold); }
.gu-dollfoot { grid-column: 1 / -1; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
/* 29 พ.ย. 13:5x แถวชุดแฟชั่นที่ใส่อยู่ */
.gu-fashrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gu-fashrow .gu-slot { width: 44px; height: 44px; }
.gu-fashlab { font-size: 12px; font-weight: 700; opacity: .75; letter-spacing: .5px; }
.gu-setstrip { margin-left: auto; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 22px; background: rgba(127, 127, 127, .14); border: 1px solid rgba(127, 127, 127, .3); font-weight: 700; color: inherit; }
.gu-setstrip i { width: 12px; height: 12px; border-radius: 50%; background: rgba(127, 127, 127, .45); box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .3); }
.gu-setstrip i.on { background: radial-gradient(circle at 35% 35%, #fff5c8, var(--gold) 60%); }
.gu[data-lay="l"] .gu-setstrip { min-height: 44px; padding: 0 8px; }
.gu-bagcol { position: relative; display: flex; flex-direction: column; min-height: 0; gap: 6px; padding: 8px; }
.gu[data-lay="l"] .gu-bagcol, .gu[data-lay="w"] .gu-bagcol { grid-row: 1 / span 2; grid-column: 2; }
.gu[data-lay="l"] .gu-bagcol { padding: 6px; }
.gu-bagbar { display: flex; gap: 6px; align-items: center; }
.gu-bagbar .gu-chiprow { flex: 1 1 auto; min-width: 0; }
.gu-sortbtn { flex: 0 0 auto; padding: 0 10px; }
.gu-bagbar .gu-chiprow { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); padding-right: 28px; }
.gu-bagbar .gu-chip { padding: 0 11px; }
.gu-grid { --cell: 58px; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cell), 1fr)); grid-auto-rows: max-content; gap: 8px; padding: 4px 2px 8px; align-content: start; }
.gu[data-lay="l"] .gu-grid { --cell: 54px; gap: 6px; }
.gu[data-lay="w"] .gu-grid { --cell: 66px; }
.gu-grid .gu-slot { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.gu-grid .gu-cellempty { aspect-ratio: 1 / 1; border-radius: 10px; border: 1.5px dashed var(--s-border); opacity: .45; }
.gu-bagfoot { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px; font-weight: 700; }
.gu-bagfoot .gu-ico { width: 22px; height: 22px; }
.gu-bagfoot .sp { flex: 1 1 auto; }
.gu-hint { font-size: .94em; color: var(--p-muted); }
.gu-wantbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(127, 127, 127, .14); font-weight: 700; }
.gu-wantbar .sp { flex: 1 1 auto; }

/* การ์ดรายละเอียดของ */
.gu-card {
  position: absolute; left: 4px; right: 4px; bottom: 4px; max-height: calc(100% - 8px); z-index: 4;
  display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; color: var(--p-ink);
  background: var(--p-bg); border: 2px solid var(--rc, var(--p-border)); box-shadow: 0 -6px 30px rgba(0, 0, 0, .5);
  animation: gu-up .16s ease;
}
.gu[data-motion="0"] .gu-card { animation: none; }
@keyframes gu-up { from { transform: translateY(18px); opacity: .4; } }
.gu-cardtop { display: flex; gap: 10px; padding: 10px 10px 6px; align-items: flex-start; }
.gu-cardtop .gu-slot { --slot: 64px; }
.gu-cardname { font-size: 1.15em; font-weight: 800; line-height: 1.25; }
.gu-cardsub { color: var(--p-muted); font-size: .94em; }
.gu-cardx { margin-left: auto; }
.gu-cardbody { padding: 0 12px 8px; overflow-y: auto; min-height: 0; flex: 1 1 auto; touch-action: pan-y; overscroll-behavior: contain; }
.gu-lines { display: grid; gap: 3px; margin: 4px 0 8px; }
.gu-lines div { display: flex; gap: 6px; align-items: baseline; }
.gu-sec { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--p-line); font-weight: 800; }
.gu-cmp { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; align-items: baseline; }
.gu-cmp .v { text-align: right; font-weight: 800; }
.gu-cardbtns { display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid var(--p-line); flex-wrap: wrap; }
.gu-cardbtns .gu-btn { flex: 1 1 0; min-width: 0; }
.gu-req { font-weight: 700; }

/* แต่งหน้าตา */
.gu-lookpanel { display: flex; flex-direction: column; gap: 10px; padding: 10px; min-height: 0; }
.gu[data-lay="l"] .gu-lookpanel, .gu[data-lay="w"] .gu-lookpanel { grid-row: 1 / span 2; grid-column: 2; }
.gu-lookgrp h4 { margin: 0 0 6px; font-size: 1.05em; }
/* 29 พ.ย. 14:1x ปุ่มสีย้อม */
.gu-dyerow .gu-chip { display: inline-flex; align-items: center; gap: 6px; }
.gu-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .25); flex: 0 0 auto; }
.gu-swatch.base { background: conic-gradient(#2a2622 0 50%, #e6ab73 0 100%); }
.gu-lookgrp .gu-chiprow { flex-wrap: wrap; overflow: visible; }

/* ---------- หน้าต่างสกิล ---------- */
.gu-sk { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; padding: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
.gu[data-lay="l"] .gu-sk, .gu[data-lay="w"] .gu-sk { grid-template-columns: minmax(0, 1fr) minmax(300px, 42%); grid-template-rows: auto minmax(0, 1fr) auto; }
.gu[data-lay="l"] .gu-sk { gap: 6px; padding: 6px; }
.gu-sktop { display: flex; gap: 6px; align-items: center; }
.gu[data-lay="l"] .gu-sktop, .gu[data-lay="w"] .gu-sktop { grid-column: 1; grid-row: 1; }
.gu-sktop .gu-chiprow { flex: 1 1 auto; min-width: 0; }
.gu-pts { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 22px; background: var(--c-bg); color: var(--c-ink); border: 1.5px solid var(--c-border); font-weight: 800; white-space: nowrap; flex: 0 0 auto; }
.gu-pts .gu-ico { width: 22px; height: 22px; }
.gu-skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 8px; align-content: start; }
.gu[data-lay="l"] .gu-skgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; padding: 6px; }
.gu[data-lay="l"] .gu-skgrid, .gu[data-lay="w"] .gu-skgrid { grid-column: 1; grid-row: 2; }
.gu-sktile { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 4px 6px; border-radius: 12px; background: transparent; border: 1.5px solid transparent; color: inherit; touch-action: none; }
.gu-sktile.sel { background: var(--sel-bg); border-color: var(--sel); border-width: 2px; }
.gu-sktile .nm { font-size: .94em; font-weight: 700; line-height: 1.2; text-align: center; min-height: 2.4em; display: flex; align-items: center; }
.gu-sktile.lock .gu-skico { filter: grayscale(1) brightness(.55); }
.gu-lvpill { font-size: .94em; font-weight: 800; padding: 0 8px; border-radius: 999px; line-height: 1.5; background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid var(--sk-ring); }
.gu-lvpill.max { background: var(--a-bg); color: var(--a-ink); }
.gu-tileplus { position: absolute; top: 2px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--a-bg); color: var(--a-ink); font-weight: 800; border: 1.5px solid var(--a-rim); line-height: 1; pointer-events: none; }
.gu-locktag { position: absolute; top: 46px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .75); color: #fff; font-size: .94em; font-weight: 700; line-height: 1.5; white-space: nowrap; pointer-events: none; }
.gu-locktag .gu-ico { width: 14px; height: 14px; }
.gu-skico { --s: 64px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: var(--sk-bg); box-shadow: 0 0 0 2px var(--sk-ring), 0 0 0 4px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .45); }
.gu-skico .art { position: absolute; inset: 0; background-repeat: no-repeat; background-blend-mode: multiply; }
.gu-skico .art.tint { filter: brightness(1.5) saturate(1.25); }
.gu-chip .sub { opacity: .78; font-weight: 700; }
.gu-tag i { box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45); }
.gu-skico .glyph { position: absolute; inset: 18%; }
.gu-skico .ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), inset 0 -10px 18px rgba(0, 0, 0, .45); pointer-events: none; }
.gu-kind { position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%); display: flex; gap: 2px; pointer-events: none; }
.gu-kind i { width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 2px #000; }
.gu-kind.area i { width: 4px; height: 4px; }
.gu-skdet { display: flex; flex-direction: column; min-height: 0; }
.gu[data-lay="l"] .gu-skdet, .gu[data-lay="w"] .gu-skdet { grid-column: 2; grid-row: 1 / span 3; }
.gu[data-lay="l"] .gu-skdethead { padding: 6px 8px 2px; }
.gu[data-lay="l"] .gu-skdethead .gu-skico { --s: 56px; }
.gu[data-lay="l"] .gu-skact { padding: 6px 8px 8px; }
.gu-skdethead { display: flex; gap: 10px; align-items: center; padding: 10px 10px 6px; }
.gu-skdethead .gu-skico { --s: 72px; }
.gu-skdethead .t { flex: 1 1 auto; min-width: 0; }
.gu-skdethead .nm { font-size: 1.2em; font-weight: 800; line-height: 1.25; }
.gu-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.gu-skdetbody { padding: 0 12px 10px; overflow-y: auto; min-height: 0; flex: 1 1 auto; touch-action: pan-y; overscroll-behavior: contain; }
.gu-sktab { width: 100%; border-collapse: collapse; margin: 4px 0 6px; }
.gu-sktab th, .gu-sktab td { padding: 3px 4px; text-align: right; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--p-line); }
.gu-sktab th:first-child, .gu-sktab td:first-child { text-align: left; font-weight: 700; }
.gu-sktab thead th { font-size: .94em; color: var(--p-muted); font-weight: 700; }
.gu-sktab td.up { color: var(--good); font-weight: 800; }
.gu-est { margin: 4px 0; font-weight: 700; }
.gu-skact { display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid var(--p-line); flex-wrap: wrap; }
.gu-skact .gu-btn { flex: 1 1 auto; }
.gu-skbar { display: flex; align-items: center; gap: 8px; padding: 8px; flex-wrap: wrap; justify-content: center; }
.gu[data-lay="l"] .gu-skbar, .gu[data-lay="w"] .gu-skbar { grid-column: 1; grid-row: 3; padding: 6px 8px; flex-wrap: nowrap; }
.gu-skbar .lbl { font-weight: 800; }
.gu-bartabs { display: flex; gap: 4px; }
.gu-bartabs .gu-chip { min-width: 44px; justify-content: center; padding: 0 10px; }
.gu-barslots { display: flex; gap: 10px; }
.gu-barslot { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--s-bg); border: 2px dashed var(--s-border); color: var(--s-glyph); touch-action: none; }
.gu[data-lay="l"] .gu-barslot { width: 52px; height: 52px; }
.gu-barslot.has { border-style: solid; border-color: var(--sk-ring); }
.gu-barslot .gu-skico { --s: 52px; box-shadow: none; }
.gu[data-lay="l"] .gu-barslot .gu-skico { --s: 46px; }
.gu-barslot .k { position: absolute; bottom: -6px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, .8); color: #fff; font-size: .94em; font-weight: 800; line-height: 22px; text-align: center; padding: 0 4px; }
.gu-barslot.drop { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus); }
.gu-barslot.arm { animation: gu-pulse 1.1s ease-in-out infinite; }
.gu-ghost { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; opacity: .9; transform: translate(-50%, -50%) scale(1.05); }

/* ---------- หน้าต่างค่าสถานะ ---------- */
.gu-st { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; padding: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.gu[data-lay="l"] .gu-st, .gu[data-lay="w"] .gu-st { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.gu[data-lay="l"] .gu-st { gap: 6px; padding: 6px; }
.gu-stleft { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.gu[data-lay="p"] .gu-stleft { overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; }
.gu-stsum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 8px; align-items: center; }
.gu-portrait { position: relative; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(255, 210, 140, .25), rgba(0, 0, 0, 0) 70%), var(--s-bg); border: 2px solid var(--sk-ring); }
.gu[data-lay="l"] .gu-portrait { width: 64px; height: 64px; }
.gu-portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.gu-stsum .lv { font-size: 1.5em; font-weight: 800; line-height: 1.1; }
.gu-stsum .cls { font-weight: 700; color: var(--p-muted); }
.gu-ptsline { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-weight: 800; flex-wrap: wrap; }
.gu-ptsline .gu-ico { width: 22px; height: 22px; }
.gu-base { display: grid; gap: 0; padding: 4px 8px; }
.gu[data-lay="l"] .gu-base { overflow-y: auto; min-height: 0; touch-action: pan-y; }
.gu-strow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--p-line); }
.gu-strow:last-child { border-bottom: 0; }
.gu-strow .gu-ico { width: 34px; height: 34px; }
.gu-strow .nm { font-weight: 800; line-height: 1.2; }
.gu-strow .nm small { font-size: 1em; font-weight: 700; color: var(--p-muted); margin-left: 4px; }
.gu-strow .why { font-size: .94em; color: var(--p-muted); line-height: 1.3; }
.gu-strow .gain { font-size: .94em; font-weight: 700; color: var(--good); line-height: 1.3; }
.gu-strow .val { font-size: 1.45em; font-weight: 800; text-align: right; min-width: 2.2em; font-variant-numeric: tabular-nums; }
.gu-strow .val .pend { display: block; font-size: .67em; color: var(--good); line-height: 1.1; }
.gu-strow .pl { display: grid; justify-items: center; gap: 1px; }
.gu-strow .cost { font-size: .94em; color: var(--p-muted); white-space: nowrap; }
.gu-der { display: flex; flex-direction: column; min-height: 0; }
.gu-der h3 { margin: 0; padding: 8px 10px 4px; font-size: 1.05em; }
.gu-derlist { padding: 0 10px 8px; overflow-y: auto; min-height: 0; flex: 1 1 auto; touch-action: pan-y; overscroll-behavior: contain; }
.gu[data-lay="p"] .gu-derlist { overflow: visible; }
.gu-drow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 6px 0; min-height: 46px; border-bottom: 1px solid var(--p-line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; }
.gu-drow .gu-ico { width: 26px; height: 26px; }
.gu-drow .lbl { font-weight: 700; }
.gu-drow .v { font-weight: 800; font-size: 1.1em; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gu-drow .d { font-size: .94em; font-weight: 800; color: var(--good); margin-left: 4px; }
.gu-drow .gu-bar { grid-column: 2 / -1; height: 6px; }
.gu-drow .why { grid-column: 2 / -1; font-size: .94em; color: var(--p-muted); line-height: 1.3; }
.gu-stact { grid-column: 1 / -1; display: flex; gap: 8px; }
.gu-stact .gu-btn { flex: 1 1 0; }
.gu-stact .gu-btn--main { flex: 1.6 1 0; }

/* ---------- ตั้งค่า ---------- */
.gu-set { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px; display: grid; gap: 8px; align-content: start; touch-action: pan-y; }
.gu[data-lay="l"] .gu-set, .gu[data-lay="w"] .gu-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gu-setgrp { padding: 10px; }
.gu-setgrp h3 { margin: 0 0 8px; font-size: 1.05em; }
.gu-setgrp .gu-chiprow { flex-wrap: wrap; overflow: visible; }
.gu-themecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gu-themecard { display: grid; gap: 4px; padding: 6px; border-radius: 12px; background: transparent; border: 2px solid var(--p-line); color: inherit; text-align: center; font-weight: 700; min-height: 44px; }
.gu-themecard[aria-pressed="true"] { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel); }
.gu-themecard .sw { height: 46px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .3); }
.gu-themecard .sw.a { background: linear-gradient(135deg, #7a1418 0 55%, #f4e6c8 55% 80%, #e0b04d 80%); }
.gu-themecard .sw.b { background: linear-gradient(135deg, #1d2633 0 55%, #10161e 55% 80%, #f0a63a 80%); }
.gu-themecard .sw.c { background: linear-gradient(135deg, #5b3a22 0 55%, #f0e0bb 55% 80%, #2f6b34 80%); }

/* ---------- ข้อความแจ้ง ---------- */
.gu-toast { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 9; max-width: min(92%, 520px); padding: 10px 16px; border-radius: 12px; background: rgba(12, 10, 8, .92); color: #fff; font-weight: 700; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); pointer-events: none; border: 1.5px solid var(--gold); }
.gu-toast.bad { border-color: #ff6b5e; }
.gu-toast.good { border-color: #6fe07a; }

/* ---------- ปุ่มสกิลบนจอเกม (แถบ 1/2/3 · ใช้ในหน้าลอง · ข้อเสนอให้ main.js) ---------- */
.gu-hud { position: absolute; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); width: 112px; height: 112px; pointer-events: none; z-index: 1; }
.gu-hudatk { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--a-rim); background: var(--a-bg); color: var(--a-ink); font-size: 1.8em; font-weight: 800; pointer-events: auto; box-shadow: 0 4px 14px rgba(0, 0, 0, .55); }
.gu-hudsk { position: absolute; width: 60px; height: 60px; border-radius: 50%; padding: 0; display: grid; place-items: center; pointer-events: auto; background: var(--sk-bg); border: 2px solid var(--sk-ring); box-shadow: 0 3px 10px rgba(0, 0, 0, .5); }
.gu-hudsk .gu-skico { --s: 54px; box-shadow: none; }
.gu-hudsk.empty { border-style: dashed; opacity: .55; }
.gu-hudtab { position: absolute; width: 52px; height: 44px; border-radius: 14px; pointer-events: auto; display: grid; place-items: center; line-height: 1.05; background: var(--dock-bg); color: var(--dock-ink); border: 1.5px solid var(--dock-border); font-weight: 800; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.gu-hudtab small { font-size: .94em; font-weight: 700; display: block; }
/* ช่องว่างมีป้ายชื่อในช่อง (จอตั้ง จอกว้าง) */
.gu-slot.cap { align-content: center; gap: 0; grid-template-rows: auto auto; }
.gu-slot.cap .gu-glyph { width: 52%; height: 52%; }
.gu-slotcap { font-size: .94em; line-height: 1.05; font-weight: 700; color: var(--s-glyph); white-space: nowrap; letter-spacing: -.2px; }
.gu[data-theme="b"] .gu-slotcap { color: #7d8ea4; }

/* หัวหน้าต่างจอตั้ง: ปุ่มแคบลง ปุ่มสลับแนวเหลือตัวอักษรเดียว (ก ข ค) */
.gu[data-lay="p"] .gu-head { gap: 5px; padding-left: 8px; padding-right: 7px; }
.gu[data-lay="p"] .gu-nav { gap: 3px; }
.gu[data-lay="p"] .gu-navbtn { padding: 0 7px; gap: 5px; }
.gu[data-lay="p"] .gu-themechip { padding: 0 8px; gap: 3px; }
.gu[data-lay="p"] .gu-themechip .long { display: none; }

/* ค่าสถานะจอนอน: สรุปบรรทัดเดียว · ซ่อนคำอธิบายยาว (เหลือ "กด + ได้อะไร") · ซ่อนคำแนะนำท้ายรายการ */
.gu[data-lay="l"] .gu-stsum { grid-template-columns: auto minmax(0, 1fr); padding: 4px 8px; gap: 8px; }
.gu[data-lay="l"] .gu-stsum .pf, .gu[data-lay="l"] .gu-stsum .xpt { display: none; }
.gu[data-lay="l"] .gu-stsum .lv { font-size: 1.15em; display: inline; margin-right: 6px; }
.gu[data-lay="l"] .gu-stsum .cls { display: inline; }
.gu[data-lay="l"] .gu-ptsline { margin-top: 2px; }
.gu[data-lay="l"] .gu-strow { padding: 4px 0; }
.gu[data-lay="l"] .gu-der .gu-hint { display: none; }
.gu[data-lay="l"] .gu-der h3 { padding: 6px 10px 2px; }
.gu[data-lay="l"] .gu-stleft { gap: 6px; }
.gu[data-lay="l"] .gu-stact .gu-btn { min-height: 44px; }
.gu[data-lay="l"] .gu-strow .pl { grid-auto-flow: column; align-items: center; gap: 6px; }
.gu[data-lay="l"] .gu-strow .pl .cost { order: -1; }

.gu[data-theme="a"] .gu-body { padding-bottom: 5px; }
.gu[data-theme="a"][data-lay="p"] .gu-lookpanel { padding-bottom: 22px; }
/* จอกว้าง: รายการค่าหลักเลื่อนได้ · ภาพตัวละครสูงพอให้ขยาย 2 เท่า */
.gu[data-lay="w"] .gu-base { overflow-y: auto; min-height: 0; touch-action: pan-y; }
.gu[data-lay="w"] .gu-doll { grid-template-rows: auto auto; }
.gu[data-lay="w"] .gu-prev { min-height: 400px; }
.gu[data-lay="w"] .gu-slotcol { justify-content: space-between; }
.gu-maintag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: .94em; font-weight: 800; line-height: 1.5; background: var(--a-bg); color: var(--a-ink); vertical-align: 1px; }

/* แนว ค: ปุ่มที่เลือกอยู่มีขอบทองเหลืองเรือง (แยกจากปุ่มอื่นชัดขึ้น) */
.gu[data-theme="c"] .gu-chip[aria-pressed="true"], .gu[data-theme="c"] .gu-chip[aria-selected="true"], .gu[data-theme="c"] .gu-navbtn[aria-selected="true"] { box-shadow: 0 0 0 2px #f1d38a, 0 0 10px rgba(241, 211, 138, .45); }
/* อุ่นเครื่อง (prewarm): วาดหน้าต่างจริงแต่แทบมองไม่เห็น และแตะไม่ได้ */
.gu.gu-warm .gu-layer { opacity: .01 !important; pointer-events: none !important; }
.gu.gu-warm .gu-layer * { pointer-events: none !important; }
/* จอตั้ง: หน้าต่างเริ่มใต้แถบเลือดของเกม (เห็นเลือดระหว่างเปิดเมนู · แถบบนที่มืดลงแตะแล้วปิดหน้าต่างได้จริง ไม่ใช่แค่ขอบ 6 จุด) */
.gu[data-lay="p"] .gu-win { top: calc(64px + env(safe-area-inset-top, 0px)); }
/* จอตั้ง: ข้อความแจ้งอยู่ในแถบบน (เหนือหน้าต่าง) ไม่บังหัวหน้าต่าง */
.gu[data-lay="p"] .gu-toast { top: calc(8px + env(safe-area-inset-top, 0px)); padding: 8px 14px; font-size: .94em; }
.gu-toast { width: max-content; max-width: calc(100% - 24px); }   /* กว้างตามข้อความ (ไม่ถูกบีบครึ่งจอเพราะ left: 50%) */
/* จอตั้ง: กล่องในคอลัมน์เลื่อนของค่าสถานะต้องไม่หดจนเนื้อหาซ้อนกัน (รายการค่าที่ได้เคยซ้อนกับคำแนะนำท้ายรายการ) */
.gu[data-lay="p"] .gu-stleft > * { flex-shrink: 0; }
.gu[data-lay="p"] .gu-der, .gu[data-lay="p"] .gu-derlist { flex: 0 0 auto; min-height: auto; }
/* 2 ธ.ค. 69 กระเป๋าเต็มหน้าต่าง (เจ้าของ "ช่องดูของทั้งหมดมันสั้นเล็กไป" · ใบส่งงาน 16.65): แท็บย่อย "กระเป๋า" (จอตั้ง) · ปุ่ม "กระเป๋า" ที่ขอบจอเปิดแบบนี้
   แบบเต็ม = ซ่อนตัวละคร/ช่องสวมใส่ · ช่องใหญ่ขึ้น มีชื่อใต้รูป · ของลองชุดมีป้าย "ลอง" · จอตั้งเห็นราว 4–5 แถว (เดิม 2) · จอนอนใช้แบบเดิม (กระเป๋าสูงเต็มคอลัมน์อยู่แล้ว) */
.gu:not([data-lay="p"]) .gu-eqsub [data-s="bag"] { display: none; }
.gu[data-lay="p"] .gu-eq--big .gu-doll { display: none; }
.gu[data-lay="p"] .gu-eq--big { grid-template-rows: auto minmax(0, 1fr); }
.gu[data-lay="p"] .gu-eq--big .gu-grid { --cell: 74px; gap: 8px; }
.gu[data-lay="p"] .gu-eq--big .gu-grid .gu-slot { aspect-ratio: auto; height: auto; grid-template-rows: 56px auto; align-content: start; gap: 2px; padding: 5px 3px 6px; }
.gu[data-lay="p"] .gu-eq--big .gu-grid .gu-slot .gu-art { width: 56px; height: 56px; }
.gu[data-lay="p"] .gu-eq--big .gu-grid .gu-count { top: 42px; bottom: auto; }
.gu[data-lay="p"] .gu-eq--big .gu-grid .gu-cellempty { display: none; }
.gu-slotname { display: none; }
.gu[data-lay="p"] .gu-eq--big .gu-grid .gu-slotname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; font-size: .74em; line-height: 1.2; text-align: center; color: var(--p-ink); word-break: break-word; }
.gu-trytag { position: absolute; top: 2px; left: 2px; padding: 0 4px; border-radius: 6px; font-size: max(11px, .74em); font-weight: 800; line-height: 1.4; background: rgba(240, 180, 74, .94); color: #1e1608; pointer-events: none; }
/* จอตั้ง แบบมีตัวละคร: ช่องสวมใส่เล็กลงเล็กน้อย */
.gu[data-lay="p"] .gu-doll { --slot: 52px; gap: 6px; padding: 6px; }
.gu[data-lay="p"] .gu-slotcol { gap: 6px; }
.gu[data-lay="p"] .gu-fashrow .gu-slot { width: 40px; height: 40px; }
/* 2 ธ.ค. 69 จอตั้ง: สกิลเยอะขึ้นแล้วตารางสกิล (แถวสูงตามเนื้อหา) ดันส่วนรายละเอียดจนสูง 0 → รูปสกิลและปุ่ม "เพิ่มเลเวล" ล้นไปทับแถบสกิล 1–4 (ตัวตรวจ tools/game/ui_audit.mjs · ใบส่งงาน 16.65)
   → ตารางสกิลเลื่อนได้ในพื้นที่ที่เหลือ · ส่วนรายละเอียดสูงตามเนื้อหา (ไม่เกิน 44% ของจอ ข้อความในนั้นเลื่อนได้) · แถบสกิลอยู่ล่างสุดเสมอ */
.gu[data-lay="p"] .gu-sk { grid-template-rows: auto minmax(132px, 1fr) auto auto; }
.gu[data-lay="p"] .gu-skgrid { min-height: 0; }
.gu[data-lay="p"] .gu-skdet { max-height: 44vh; overflow: hidden; }
