/* ==========================================================================================================
   UI V3 HUD layout (owner's brief 2026-10-10: tidy HUD, separate phone landscape / portrait, flat menu).
   Loaded after style.css and ui-v2.css; those keep the looks, this file owns *where* things sit.
   Modes (body classes from pcMode in ui.js): pc · m-land (phone sideways, height <= 540) · m-port · m-tab.
   Left column (buffs, pet, party, quest) and the PC right column are stacked by stackHud() in ui.js.
   ========================================================================================================== */
:root { --hk: 1; --gap: 8px; }
body.m-land { --hk: .86; }
@media (max-height: 400px) { body.m-land { --hk: .8; } }
body.m-port { --hk: .9; }
@media (max-width: 360px) { body.m-port { --hk: .82; } }

/* ---------- shared HUD frames ---------- */
#hud .mic { width: 26px; height: 26px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); pointer-events: none; }
.bdg { position: absolute; right: 2px; top: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font: 700 10px/16px var(--u-font); font-style: normal;
  color: #fff; background: linear-gradient(#ff7a6a, #d63a3a); box-shadow: 0 0 0 1px rgba(20, 6, 6, .8), 0 0 8px rgba(255, 90, 90, .55); pointer-events: none; text-align: center; }
.bdg:empty { display: none; }
#menuDot { right: 4px; top: 4px; z-index: 1; box-shadow: 0 0 0 1px #10070a, 0 0 6px rgba(255, 90, 90, .8); }

/* ---------- top right: minimap card (clock + gold on one line) ---------- */
#topr { width: 128px !important; padding: 6px !important; gap: 3px !important; border-radius: 12px !important; }
#mapRing { width: 114px !important; height: 114px !important; }
#mini { width: 114px !important; height: 114px !important; }
#topr .clk { font-size: 13px; gap: 4px; } #topr .gold { font-size: 11px; }
#topr .clk, #topr .gold { display: inline-flex; }
#onlineN { font-size: 10px; color: var(--tx3); }

/* ---------- the rail: shortcut buttons + ☰ ---------- */
#rail { position: absolute; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
#rail button { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 12px;
  background: linear-gradient(#22325a, #121c36); border: 1px solid rgba(232, 194, 106, .5); color: var(--au3); font-size: 18px;
  box-shadow: 0 0 0 1px rgba(4, 8, 18, .8), 0 4px 12px rgba(0, 0, 0, .35); transition: transform .08s, border-color .12s, filter .12s; }
#rail button:hover { border-color: var(--au); filter: brightness(1.15); }
#rail button:active { transform: scale(.92); }
#rail button span, #rail button u { display: none; }
#rail button i { font-style: normal; }
#rail .rp:not(.rt) { display: none; }
#menuBtn { position: relative !important; left: auto !important; top: auto !important; width: 44px !important; height: 44px !important; }
#zoomBtn { position: relative !important; left: auto !important; top: auto !important; width: 44px !important; height: 44px !important; font-size: 18px; }
#rail .open { border-color: var(--au) !important; box-shadow: 0 0 0 1px var(--au), 0 0 12px rgba(232, 194, 106, .45) !important; }

/* ---------- the flat menu ---------- */
#hud #menu { position: absolute !important; z-index: 9 !important; display: block !important; min-width: 0 !important; padding: 10px 10px 12px !important;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border-radius: 14px !important;
  background: linear-gradient(180deg, rgba(22, 34, 63, .975), rgba(11, 18, 36, .975)) !important; border: 1px solid rgba(232, 194, 106, .55) !important;
  box-shadow: 0 0 0 1px rgba(4, 8, 18, .9), 0 16px 40px rgba(0, 0, 0, .55) !important; animation: uWinIn .14s var(--u-ease); }
#hud #menu[hidden] { display: none !important; }
#hud #menu > header { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0 0 6px 4px; }
#hud #menu > header b { font: 600 15px var(--u-font); color: var(--au3); }
#hud #menu > header small { flex: 1; font-size: 10px; color: var(--tx3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hud #menuX { width: 40px; height: 40px; flex: none; border-radius: 10px; background: linear-gradient(#26375f, #17223f); border: 1px solid rgba(232, 194, 106, .6); color: var(--au3); font-size: 15px; }
#hud #menu:not([hidden]) { display: grid !important; grid-template-columns: repeat(var(--scols, 1), minmax(0, 1fr)); gap: 0 14px; align-content: start; }
#hud #menu .mgrp { position: static !important; margin-top: 8px; min-width: 0; }
#hud #menu .mgrp > h4 { display: flex !important; flex-direction: row !important; width: auto !important; height: auto !important; margin: 0 2px 6px !important; padding: 0 !important; background: none !important;
  box-shadow: none !important; cursor: default !important; font: 600 11px var(--u-font) !important; color: var(--au) !important; letter-spacing: .6px; }
#hud #menu .mgrp > h4::after { content: '' !important; flex: 1; height: 1px; margin-left: 8px; align-self: center; background: linear-gradient(90deg, rgba(232, 194, 106, .45), transparent); font-size: 0 !important; }
#hud #menu .mgrp > div { position: static !important; display: grid !important; grid-template-columns: repeat(var(--mcols, 4), minmax(0, 1fr)); gap: 6px; width: auto !important;
  padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; animation: none !important; }
#hud #menu .mgrp > div::before { display: none !important; }
#hud #menu .mgrp button { position: relative; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 3px !important;
  width: auto !important; min-height: 62px !important; padding: 6px 2px 5px !important; border-radius: 10px !important; text-align: center !important;
  background: linear-gradient(180deg, rgba(42, 61, 106, .55), rgba(22, 34, 63, .55)) !important; border: 1px solid rgba(116, 140, 200, .28) !important; color: var(--tx) !important;
  transition: border-color .12s, background .12s, transform .08s; }
#hud #menu .mgrp button:hover { border-color: rgba(232, 194, 106, .75) !important; background: linear-gradient(180deg, rgba(64, 86, 140, .6), rgba(30, 45, 82, .6)) !important; }
#hud #menu .mgrp button:active { transform: scale(.95); }
#hud #menu .mgrp button .mic { width: 30px; height: 30px; }
#hud #menu .mgrp button > i { width: auto !important; height: 30px; display: grid; place-items: center; font-style: normal; font-size: 20px !important; color: var(--au) !important; }
#hud #menu .mgrp button span { font: 500 11.5px/1.2 var(--u-font) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#hud #menu .mgrp button u { position: absolute !important; left: 5px !important; top: 3px !important; margin: 0 !important; font: 600 9px var(--u-font) !important; color: var(--tx3) !important; text-decoration: none; }
#hud #menu .mgrp.sys button span { font-size: 10px !important; line-height: 1.15 !important; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#hud #menu .mgrp button::after { display: none !important; } /* old .dot marks: the badge replaces them */

/* ---------- touch layouts (everything not .pc) ---------- */
body:not(.pc) #me { transform: scale(var(--hk)); transform-origin: top left; }
body:not(.pc) #topr { transform: scale(calc(var(--hk) * .92)); transform-origin: top right; }
body:not(.pc) #zoomBar { display: none !important; } /* pinch / ⤢ zoom on touch */
body:not(.pc) #rail { top: calc(10px + var(--st)); right: calc(18px + var(--sr) + 128px * var(--hk) * .92); }
body:not(.pc) #dock { display: contents; }
body:not(.pc) #wheel { transform: scale(calc(var(--hk) * var(--ctl))) !important; transform-origin: right bottom; }
body:not(.pc) #quick, body:not(.pc) #pills { transform: scale(var(--ctl)) !important; }
body:not(.pc) #joy { transform: scale(calc(var(--hk) * var(--ctl))) !important; transform-origin: left bottom; }
body:not(.pc) #quick button, body:not(.pc) #pills button { width: 46px; height: 46px; }
body:not(.pc) #autoBtn { width: 66px !important; }
body:not(.pc) #expTxt, body:not(.pc) #jexpTxt { transform: none !important; right: auto; }
body:not(.pc) #expTxt { left: calc(36px + var(--sl) + 124px * var(--hk)); } body:not(.pc) #jexpTxt { left: calc(116px + var(--sl) + 124px * var(--hk)); }
body:not(.pc) #jqCard { left: calc(10px + var(--sl)); right: auto !important; width: 196px; transform: scale(var(--hk)); transform-origin: top left; }
body:not(.pc) #partyFrame, body:not(.pc) #petFrame { transform: scale(var(--hk)); transform-origin: top left; }
body:not(.pc) #menu { top: calc(10px + var(--st)); right: calc(10px + var(--sr)); width: min(560px, calc(100vw - 20px - var(--sl) - var(--sr))); max-height: calc(100vh - 20px - var(--st) - var(--sb)); --mcols: 4; --scols: 2; }
/* the wheel's ⇄ page button sits just outside the outer arc (it used to land on the potions) */
body:not(.pc) #skPage { left: -4px; top: 40px; }

/* landscape phone: wheel bottom right, AUTO row + potions row to its left, joystick bottom left, quest card under the portrait */
/* 2026-10-12 ("HUD too dense on phones"): quick actions sit on the SAME bottom row as the potions (was a second row above them,
   a 2x4 block right in front of the hero); one row between the joystick and the wheel leaves the middle of the field free */
body.m-land #quick { right: calc(16px + var(--sr) + 250px * var(--hk) * var(--ctl) + 146px * var(--ctl)); bottom: calc(12px + var(--sb)); flex-direction: row-reverse; align-items: center; gap: 6px; transform-origin: right bottom; }
body.m-land #pills { right: calc(16px + var(--sr) + 250px * var(--hk) * var(--ctl)); bottom: calc(12px + var(--sb)); left: auto; gap: 6px; transform-origin: right bottom; }
/* loot lines under the top-right menu, clear of the wheel (2026-10-12 playtest: at 844x390 they sat on its outer buttons) */
body.m-land #loot { top: calc(64px + var(--st)); bottom: auto; right: calc(16px + var(--sr) + 250px * var(--hk)); }
body.m-land #target { top: calc(8px + var(--st)); width: min(300px, 38vw); }
body.m-land #target.boss { width: min(380px, 44vw); }
body.m-land #interactBtn { bottom: calc(118px + var(--sb)); }
body.m-land #tame { bottom: calc(80px + var(--sb)); }
body.m-land #hud #menu .mgrp button { min-height: 54px !important; } body.m-land #hud #menu .mgrp { margin-top: 4px; }
body.m-land #zoomBtn { display: none !important; } /* pinch zoom; the wheel needs that corner */

/* portrait phone: wheel bottom right, AUTO column on the right edge above it, potions column above the joystick */
body.m-port #quick { right: calc(12px + var(--sr)); bottom: calc(18px + var(--sb) + 250px * var(--hk) * var(--ctl)); flex-direction: column; align-items: flex-end; gap: 8px; transform-origin: right bottom; }
body.m-port #pills { left: calc(12px + var(--sl)); right: auto; bottom: calc(40px + var(--sb) + 124px * var(--hk) * var(--ctl)); flex-direction: column; gap: 8px; transform-origin: left bottom; }
body.m-port #target { bottom: auto; width: min(320px, calc(100vw - 116px - var(--sl) - var(--sr))); } /* top lane (ui.js stackTop), clear of the fight in the middle */
body.m-port #loot { top: calc(286px + var(--st)); bottom: auto; right: calc(70px + var(--sr)); } /* between the quest card and the hero's head (it sat on the target bar / the hero) */
body.m-port #menu { left: calc(10px + var(--sl)); right: calc(10px + var(--sr)); width: auto; --mcols: 4; --scols: 1; }
body.m-port #interactBtn { bottom: calc(260px + var(--sb)); }

/* tablet / big touch screen: the roomy version of landscape, chat feed above the joystick */
body.m-tab #quick { right: calc(14px + var(--sr)); bottom: calc(272px * var(--ctl) + var(--sb)); flex-direction: column; align-items: flex-end; gap: 8px; transform-origin: right bottom; }
body.m-tab #pills { right: calc(270px * var(--ctl) + var(--sr)); bottom: calc(14px + var(--sb)); transform-origin: right bottom; }
body.m-tab #log { display: flex !important; left: calc(14px + var(--sl)); bottom: calc(176px + var(--sb)); width: 300px; max-height: 76px; }
body.m-tab #menu { width: min(600px, calc(100vw - 200px)); }

/* ---------- PC: one action dock at the bottom, the rail on the right, chat bottom left ---------- */
body.pc { --chatw: 300px; --slot: 42px; }
body.pc #dock { position: absolute; left: calc(var(--chatw) + 28px + var(--sl)); right: calc(12px + var(--sr)); bottom: calc(12px + var(--sb));
  display: flex; justify-content: center; align-items: flex-end; gap: 10px; pointer-events: none; }
body.pc #dock > * { pointer-events: auto; position: static !important; transform: none !important; }
body.pc #wheel { width: auto !important; height: auto !important; order: 2; }
body.pc #pills { order: 1; display: flex; gap: 6px; padding: 6px; border-radius: 12px; }
body.pc #quick { order: 3; display: flex; flex-direction: row !important; gap: 6px; padding: 6px; border-radius: 12px; align-items: center; }
body.pc #pills, body.pc #quick { background: linear-gradient(180deg, rgba(22, 34, 63, .82), rgba(11, 18, 36, .86)); border: 1px solid rgba(232, 194, 106, .35); box-shadow: 0 0 0 1px rgba(4, 8, 18, .7), 0 6px 18px rgba(0, 0, 0, .35); }
body.pc #pills button, body.pc #quick button { width: var(--slot) !important; height: var(--slot) !important; border-radius: 9px !important; }
body.pc #autoBtn { width: calc(var(--slot) * 1.5) !important; font-size: 12px !important; }
body.pc #pills .pxi { width: 28px; height: 28px; }
body.pc #skills { display: grid !important; grid-template-columns: repeat(12, var(--slot)) !important; gap: 18px 4px !important; padding: 6px 6px 20px !important; border-radius: 12px !important; }
body.pc .sk { width: var(--slot) !important; height: var(--slot) !important; }
body.pc .sk .pxi { width: calc(var(--slot) - 8px); height: calc(var(--slot) - 8px); }
/* second row (Shift + 1..=) only while something sits on it */
body.pc #skills:not(.r2) .sk.pg2, body.pc #skills:not(.r2) .sk.pg3 { display: none !important; }
body.pc #log { left: calc(12px + var(--sl)); width: var(--chatw) !important; }
body.pc #logTabs { left: calc(12px + var(--sl)); width: var(--chatw) !important; }
body.pc #rail { right: calc(10px + var(--sr)); top: var(--railTop, 214px); }
body.pc #rail .rp { display: grid !important; }
body.pc #rail button { width: 50px; height: 46px; }
body.pc #rail button u { display: block; position: absolute; right: 3px; top: 1px; font: 600 9px var(--u-font); color: var(--au3); text-decoration: none; opacity: .8; }
body.pc #zoomBtn { display: none !important; } /* the zoom bar under the minimap does it on PC */
body.pc #menu { right: calc(var(--railW, 60px) + 20px + var(--sr)); top: calc(var(--railTop, 214px) + 6px); width: 660px; max-height: calc(100vh - var(--railTop, 214px) - 96px); --mcols: 4; --scols: 2; }
body.pc #loot { right: calc(var(--railW, 60px) + 20px + var(--sr)) !important; }
body.pc #rail.two { display: grid; grid-template-columns: repeat(2, auto); }
@media (min-height: 820px) { /* tall screens: rail buttons get their labels */
  body.pc #rail button { width: 58px; height: 54px; gap: 0; align-content: center; }
  body.pc #rail button span { display: block; font: 500 10px var(--u-font); color: var(--tx2); }
}
@media (min-width: 1500px) { body.pc { --chatw: 360px; --slot: 46px; } }
@media (max-width: 1239px) { /* narrow PC: the 12 slots fold into two rows of six */
  body.pc { --chatw: 250px; --slot: 40px; }
  body.pc #skills { grid-template-columns: repeat(6, var(--slot)) !important; }
}
/* PC: EXP / JOB text sits in the strip under the chat box instead of under the skill bar */
body.pc #expTxt, body.pc #jexpTxt { transform: none !important; bottom: 7px !important; }
body.pc #expTxt { left: calc(14px + var(--sl)); } body.pc #jexpTxt { left: calc(110px + var(--sl)); }
body.pc #log { bottom: calc(24px + var(--sb)) !important; } body.pc #logTabs { bottom: calc(156px + var(--sb)) !important; }

/* ---------- Skill tree V3: zoom tools, "can upgrade now" glow, level pips, legend, mobile split ---------- */

/* node states: learned = gold rim, can-upgrade = green pulse + "+", not learned yet = dim, locked = grey */

@keyframes skReady { 50% { box-shadow: 0 0 0 1px rgba(111, 227, 154, .5), 0 0 14px rgba(111, 227, 154, .45); } }

@keyframes skFlow { to { stroke-dashoffset: -11; } }

/* phones: tree on top, detail below (portrait) / side by side (landscape); the pose preview gets smaller */
@media (max-width: 760px) and (min-height: 541px) {
  /* S4 (2026-10-13): the tree showed 2 of 10 skills at 360-390 px wide: it gets two thirds of the height, and the legend + zoom
     row lies over the tree's bottom edge instead of taking its own ~90 px */

    /* (as on short screens) */

}

/* ---------- Inventory V3: upgrade marks, slot chips, compare verdict, phone detail sheet ---------- */
.u-slot.u-up::after { content: '▲'; position: absolute; left: 2px; bottom: 0; font: 700 11px/1 var(--u-font); color: #6fe39a; text-shadow: 0 0 4px rgba(0, 0, 0, .9), 0 0 6px rgba(111, 227, 154, .8); }

.inv-x { display: none; }
@media (max-width: 600px) and (min-height: 541px) { /* upright phones: the grid gets the room, a picked item slides up as a sheet */
  #panel[data-kind="bag"] #pbody { position: relative; }

  .u-seg button { padding: 0 8px !important; font-size: 11px; }
}

/* ---------- Map window V3 (src/worldmap.js) ---------- */
#bigMap { z-index: 6; background: rgba(4, 8, 18, .6); }
#bigMap .bm-box { width: min(1180px, calc(100vw - 24px)); height: min(760px, calc(100vh - 24px)); max-width: none; padding: 0; gap: 0; display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--u-font); color: var(--tx); border-radius: 14px; background: linear-gradient(180deg, rgba(22, 34, 63, .985), rgba(11, 18, 36, .985));
  border: 1px solid rgba(232, 194, 106, .6); box-shadow: 0 0 0 1px rgba(4, 8, 18, .9), 0 18px 48px rgba(0, 0, 0, .6); animation: uWinIn .16s var(--u-ease); }
#bigMap header { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-bottom: 1px solid rgba(232, 194, 106, .28); background: linear-gradient(180deg, rgba(232, 194, 106, .12), transparent); }
#bigMap h2 { flex: 1; min-width: 0; margin: 0; font: 600 14px var(--u-font); color: var(--au3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }

#bmClose { width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--au3); background: linear-gradient(#26375f, #17223f); border: 1px solid rgba(232, 194, 106, .6); }
.bm-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 290px; }
.bm-main { position: relative; min-width: 0; min-height: 0; }
.bm-main > div { position: absolute; inset: 0; display: none; }
#bigMap[data-tab="here"] .bm-here, #bigMap[data-tab="world"] .bm-world, #bigMap[data-tab="list"] .bm-list { display: block; }
/* here: the real map picture in a gold frame */
.bm-here { padding: 12px; } #bigMap[data-tab="here"] .bm-here { display: grid; place-items: center; }
#bigCv { width: auto; max-width: 100%; border-radius: 10px; image-rendering: auto; cursor: crosshair; box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(232, 194, 106, .55), 0 10px 30px rgba(0, 0, 0, .5); }
/* world: a starry navy sea, glowing regions, roads, round place badges */
.bm-world { background: radial-gradient(ellipse at 50% 50%, #1b2b52 0%, #0d1630 55%, #070c1a 100%); }
#wmView { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; touch-action: pan-x pan-y; cursor: grab; }
#wmView:active { cursor: grabbing; }
.wm-world { position: relative; background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1.4px), radial-gradient(rgba(116, 208, 255, .35) 1px, transparent 1.4px);
  background-size: 97px 89px, 143px 131px; background-position: 13px 27px, 61px 5px; }
.wm-rose { position: absolute; left: 24px; bottom: 24px; width: 90px; height: 90px; opacity: .35; border-radius: 50%;
  background: conic-gradient(from 45deg, transparent 0 20deg, #e8c26a 20deg 25deg, transparent 25deg 110deg, #e8c26a 110deg 115deg, transparent 115deg 200deg, #e8c26a 200deg 205deg, transparent 205deg 290deg, #e8c26a 290deg 295deg, transparent 295deg);
  box-shadow: inset 0 0 0 2px rgba(232, 194, 106, .7), inset 0 0 0 15px rgba(232, 194, 106, .2); }
.wm-glow { position: absolute; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, var(--c), transparent 62%); opacity: .13; }
.wm-roads { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.wm-roads .rd { fill: none; stroke: rgba(10, 14, 28, .9); stroke-width: 9; stroke-linecap: round; }
.wm-roads .rd2 { fill: none; stroke-width: 3; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .85; }
.wm-roads .dash { stroke: rgba(232, 194, 106, .5); stroke-width: 3; stroke-dasharray: 6 6; }
.wm-arm { position: absolute; transform: translate(-50%, -50%); font: 600 11px var(--u-font); color: var(--au); letter-spacing: 1px; text-shadow: 0 1px 3px #000; white-space: nowrap; pointer-events: none; opacity: .85; }
.wm-node { position: absolute; width: 132px; margin-left: -66px; margin-top: -40px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; background: none; border: 0; color: var(--tx); cursor: pointer; }
.wm-node .disc { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background-color: #1a2748; background-size: 48px; image-rendering: pixelated;
  box-shadow: 0 0 0 3px #0a0f1e, 0 0 0 5px var(--c), 0 6px 14px rgba(0, 0, 0, .6), inset 0 0 18px rgba(0, 0, 0, .55); transition: transform .12s, box-shadow .12s; }
.wm-node .disc img { width: 92%; height: 92%; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }
.wm-node.town .disc { width: 104px; height: 104px; background: radial-gradient(circle at 50% 40%, #34497a, #121c36); box-shadow: 0 0 0 3px #0a0f1e, 0 0 0 6px var(--au), 0 0 24px rgba(232, 194, 106, .5); }
.wm-node.town { margin-top: -54px; }
.wm-node .nm { margin-top: 4px; max-width: 132px; padding: 1px 8px; border-radius: 8px; font: 600 12px var(--u-font); color: #fff; background: rgba(8, 13, 26, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.wm-node small { font: 500 10.5px var(--u-font); color: var(--tx2); text-shadow: 0 1px 2px #000; }
.wm-node:hover .disc { transform: scale(1.06); }
.wm-node .boss { position: absolute; top: -6px; left: calc(50% + 22px); font-style: normal; font-size: 18px; filter: drop-shadow(0 1px 2px #000); }
.wm-node .you { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 10px; font: 700 10px var(--u-font); font-style: normal; white-space: nowrap;
  color: #20160a; background: linear-gradient(#ffe39a, #d8a640); box-shadow: 0 2px 6px rgba(0, 0, 0, .6); animation: wmBob 1.4s ease-in-out infinite; z-index: 1; }
.wm-node .you::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-top-color: #d8a640; border-bottom: 0; }
@keyframes wmBob { 50% { transform: translate(-50%, -3px); } }
.wm-node.here .disc { box-shadow: 0 0 0 3px #0a0f1e, 0 0 0 6px #ffe39a, 0 0 22px rgba(255, 227, 154, .7); }
.wm-node.fit .nm { box-shadow: 0 0 0 1px rgba(111, 227, 154, .7); }
.wm-node.early .disc { filter: saturate(.45) brightness(.7); }
.wm-node.sel .disc { box-shadow: 0 0 0 3px #0a0f1e, 0 0 0 6px #fff, 0 0 26px var(--c); transform: scale(1.08); }
.wm-tools { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(8, 13, 26, .85); border: 1px solid rgba(232, 194, 106, .4); }
.wm-tools button { width: 38px; height: 38px; border-radius: 8px; color: var(--au3); background: linear-gradient(#22325a, #17223f); border: 1px solid rgba(116, 140, 200, .35); font-size: 16px; }
.wm-tools b { min-width: 42px; text-align: center; font: 600 11px var(--u-font); color: var(--au3); }
/* list */
.bm-list { overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; }
.bm-list h4 { margin: 10px 2px 6px; font: 600 12px var(--u-font); color: var(--au); display: flex; gap: 8px; align-items: center; }
.bm-list h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(232, 194, 106, .45), transparent); }
.wm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.wm-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px 6px 6px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(22, 34, 63, .5)); border: 1px solid rgba(116, 140, 200, .25); }
.wm-card.sel { border-color: var(--au); box-shadow: 0 0 0 1px var(--au); } .wm-card.here { border-color: rgba(255, 227, 154, .7); }
.wm-card .th, .wm-ihead .th { width: 54px; height: 54px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background-color: #1a2748; background-size: 36px; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--c), inset 0 0 12px rgba(0, 0, 0, .5); }
.wm-card .th img, .wm-ihead .th img { width: 90%; height: 90%; object-fit: contain; image-rendering: auto; }
.wm-card .t { min-width: 0; } .wm-card .t b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wm-card .t small { display: block; font-size: 11px; color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.tags i { font-style: normal; font-size: 10px; padding: 0 6px; border-radius: 6px; line-height: 16px; }
.tags .fit { color: #062012; background: var(--ok); } .tags .early { color: #fff; background: rgba(255, 122, 122, .55); } .tags .you { color: #20160a; background: #ffe39a; }
.wm-card .go { min-width: 64px; min-height: 40px; border-radius: 9px; font: 600 12.5px var(--u-font); color: #20160a; background: linear-gradient(#e9c56f, #b38633); border: 1px solid #ffe7a8; }
.wm-card .go:disabled { color: var(--tx3); background: rgba(255, 255, 255, .05); border-color: rgba(116, 140, 200, .25); }
/* info side */
#wmInfo { display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow-y: auto; border-left: 1px solid rgba(232, 194, 106, .22); background: rgba(6, 10, 22, .35); scrollbar-width: thin; }
.wm-ihead { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; } .wm-ihead .th { width: 64px; height: 64px; }
.wm-ihead b { display: block; font-size: 15px; color: var(--au3); } .wm-ihead small { color: var(--tx2); font-size: 12px; }
.wm-boss { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; padding: 6px; border-radius: 10px; background: rgba(255, 90, 90, .08); border: 1px solid rgba(255, 106, 106, .35); }
.wm-boss img { width: 52px; height: 52px; object-fit: contain; image-rendering: pixelated; } .wm-boss b { display: block; color: #ffd0d0; } .wm-boss small { display: block; font-size: 10.5px; color: var(--tx3); }
.wm-mons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wm-mons span { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 4px; border-radius: 8px; background: rgba(255, 255, 255, .035); }
.wm-mons img { grid-row: span 2; width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; }
.wm-mons small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wm-mons em { font-style: normal; font-size: 10px; color: var(--tx3); }
.wm-go { min-height: 48px; border-radius: 10px; font: 600 15px var(--u-font); color: #20160a; background: linear-gradient(#f2d27c, #b38633); border: 1px solid #ffe7a8; box-shadow: 0 4px 14px rgba(232, 194, 106, .3); }
.wm-go:not(:disabled):active { transform: translateY(1px); }
.wm-go:disabled { color: var(--tx3); background: rgba(255, 255, 255, .05); border-color: rgba(116, 140, 200, .25); box-shadow: none; }
.wm-sub, .wm-hint { display: block; text-align: center; font-size: 11px; color: var(--tx3); margin-top: -4px; } .wm-note { margin: 0; font-size: 12px; color: var(--tx2); }
.wm-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.wm-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; vertical-align: -2px; }
.wm-legend .lg-me::before { background: #fff; box-shadow: 0 0 0 2px #ffe39a; } .wm-legend .lg-npc::before { background: #1a2748; box-shadow: 0 0 0 2px #e8c26a; } .wm-legend .lg-gate::before { background: #2a1650; box-shadow: 0 0 0 2px #d8b8ff; }
.wm-legend .lg-mon::before { width: 6px; height: 6px; border-radius: 1px; background: #ff5a5a; margin: 0 11px 0 3px; } .wm-legend .lg-boss::before { background: #5a1020; box-shadow: 0 0 0 2px #ff6a6a; }
/* phones */
@media (max-height: 540px) { /* sideways: full screen, narrower side panel */
  #bigMap .bm-box { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
  .bm-body { grid-template-columns: minmax(0, 1fr) 230px; }
   #bigMap h2 { display: none; }
  .bm-here { padding: 6px; } .wm-mons { grid-template-columns: 1fr; } #wmInfo { padding: 8px; gap: 8px; }
}
@media (max-width: 600px) and (min-height: 541px) { /* upright: map on top, details under it */
  #bigMap .bm-box { width: 100vw; height: 100vh; border-radius: 0; border: 0; }
  .bm-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  #wmInfo { max-height: 42vh; border-left: 0; border-top: 1px solid rgba(232, 194, 106, .3); }
   #bigMap h2 { display: none; }
  .wm-cards { grid-template-columns: 1fr; }
  .wm-legend { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; }
  .wm-mons { grid-template-columns: repeat(4, 1fr); } .wm-mons span { grid-template-columns: 1fr; justify-items: center; } .wm-mons small { display: none; } .wm-mons img { grid-row: auto; }
  .wm-boss { grid-template-columns: 40px 1fr; } .wm-boss img { width: 40px; height: 40px; } #wmInfo { gap: 8px; padding: 10px; }
}
#wmInfo .wm-go { position: sticky; bottom: 0; z-index: 1; flex: none; }

/* ---------- UX feedback V3: press, refuse, ready, empty ---------- */
.sk.deny { animation: skDeny .32s ease; box-shadow: 0 0 0 2px #ff6a6a, 0 0 14px rgba(255, 90, 90, .6) !important; }
@keyframes skDeny { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.sk .why { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  font: 600 11px var(--u-font); font-style: normal; color: #fff; background: rgba(120, 24, 30, .92); border: 1px solid #ff8a8a; opacity: 0; transition: opacity .15s; z-index: 4; }
.sk.deny .why { opacity: 1; }
.sk.ready::after { content: ""; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 2px #ffe39a, 0 0 16px rgba(255, 227, 154, .9); animation: skReadyF .55s ease-out forwards; }
@keyframes skReadyF { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.15); } }
#potHp.none, #potMp.none { filter: grayscale(1) brightness(.6); }
#potHp.none b, #potMp.none b { color: #ff9a9a; }
#potTp[hidden] { display: none !important; } /* Return Scroll pill: only while one is in the bag */
/* every HUD button: a gold rim flash while pressed */
#rail button:active, #dock button:active, #menu .mgrp button:active, .wm-node:active .disc{ filter: brightness(1.25); }
#dock button:focus-visible, #rail button:focus-visible, #menu button:focus-visible, #bigMap button:focus-visible { outline: 2px solid var(--cr); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sk.deny, .sk.ready::after, .wm-node .you { animation: none !important; } }
/* one type scale for HUD text (Prompt): 10 / 11 / 12 / 13 / 15; nothing under 9 px on phones */
#hud, #menu, #bigMap, #panel { font-family: var(--u-font); }
body:not(.pc) #xp span { font-size: 9.5px; }
body.m-land #jqCard { font-size: 11px; }
/* narrow phones: segmented choices wrap instead of running off the window */

/* sideways phones: the tree gets the full height, zoom tools float over its corner, the colour key hides */

/* PC layout forced on a narrow window (menu → ระบบ → หน้าจอ: PC): the action bar takes the whole bottom, the chat sits above it */
@media (max-width: 1000px) {
  body.pc #dock { left: calc(8px + var(--sl)); right: calc(8px + var(--sr)); }
  body.pc #log { bottom: calc(118px + var(--sb)) !important; height: 96px !important; max-height: 96px !important; }
  body.pc #logTabs { bottom: calc(214px + var(--sb)) !important; }
  body.pc #pills button, body.pc #quick button { --slot: 38px; }
}

/* ==========================================================================================================
   UI V3.1 premium polish (owner 2026-10-10: lighter, cleaner, more premium; looks only — no layout of systems changed).
   Hierarchy: minimap = the jewel (ornate frame), quest tracker = a quiet ribbon, utility rail = a slim glass spine.
   Bottom: one glass ribbon of three groups; skills 1-4 are the primary slots (bigger, gold rim), the rest steel.
   ========================================================================================================== */
:root {
  --glass: linear-gradient(180deg, rgba(20, 30, 58, .74), rgba(9, 14, 30, .82));
  --glass2: linear-gradient(180deg, rgba(24, 36, 68, .78), rgba(10, 16, 34, .84));
  --hair: rgba(232, 194, 106, .32); --hair2: rgba(232, 194, 106, .62);
  --lift: 0 0 0 1px rgba(3, 6, 14, .55), 0 8px 22px rgba(0, 0, 0, .32);
  --inner: inset 0 1px 0 rgba(255, 240, 194, .10), inset 0 -1px 0 rgba(0, 0, 0, .35);
  --soft: cubic-bezier(.2, .8, .2, 1);
}
/* (window chrome + window buttons: sigil-ui.css since the UI Redesign V2) */
/* menu tiles: lighter, a hover lift and a gold glow */
#hud #menu .mgrp button { background: linear-gradient(180deg, rgba(42, 61, 106, .38), rgba(18, 28, 54, .5)) !important; border-color: rgba(116, 140, 200, .2) !important; box-shadow: var(--inner); }
#hud #menu .mgrp button:hover { transform: translateY(-2px); border-color: rgba(232, 194, 106, .6) !important; box-shadow: var(--inner), 0 8px 16px rgba(0, 0, 0, .35), 0 0 12px rgba(232, 194, 106, .18); }
#hud #menu .mgrp button .mic { width: 32px; height: 32px; transition: transform .18s var(--soft); } #hud #menu .mgrp button:hover .mic { transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) { #hud #autoBtn.on { animation: none; } #hud .sk:hover, #hud #menu .mgrp button:hover { transform: none; } }
body.pc #hud .sk.trail { display: none !important; }

#hud #joy { background: url(assets/ui/joy-base-v2.png) center / 100% no-repeat !important; border: 0 !important; opacity: .9; }
#hud #knob { background: url(assets/ui/joy-knob-v2.png) center / 100% no-repeat !important; border: 0 !important; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); }
/* ---------- mouse cursors (owner 2026-10-10: "make the pointer modern"): navy + gold SVGs, system cursor as fallback ---------- */
html, body, #game { cursor: url(assets/ui/cursor/arrow.svg) 3 2, default; }
button, [data-open], [role="button"], a, .wm-node, .wm-card, #mapRing, .u-slot, #bigCv, label { cursor: url(assets/ui/cursor/hand.svg) 10 4, pointer !important; }
button:disabled { cursor: url(assets/ui/cursor/arrow.svg) 3 2, not-allowed !important; }
#game.cur-atk { cursor: url(assets/ui/cursor/attack.svg) 3 3, crosshair; }
#game.cur-talk { cursor: url(assets/ui/cursor/talk.svg) 3 2, pointer; }
#game.cur-gate { cursor: url(assets/ui/cursor/portal.svg) 3 2, pointer; }
#game.cur-grab { cursor: url(assets/ui/cursor/grab.svg) 3 2, pointer; }
input, textarea { cursor: text; }
#wmView { cursor: url(assets/ui/cursor/hand.svg) 10 4, grab; }

/* ==========================================================================================================
   UI V3.2 final polish (owner 2026-10-10): calmer gold, clear button hierarchy, roomier portrait phone, lighter banners.
   Tiers: primary skills (gold rim, full size) > secondary skills (steel rim, smaller) > utility (AUTO, potions, dash: glass, small).
   ========================================================================================================== */
:root { --hair: rgba(232, 194, 106, .22); --hair2: rgba(232, 194, 106, .45); --glass: linear-gradient(180deg, rgba(18, 27, 52, .58), rgba(8, 13, 28, .68)); }

/* ---------- announcement / achievement banner: smaller, see-through, out of the way ---------- */
#ann { padding: 5px 16px 6px !important; border-radius: 12px !important; max-width: min(78vw, 460px) !important;
  background: linear-gradient(180deg, rgba(18, 27, 52, .72), rgba(8, 13, 28, .72)) !important; border: 1px solid rgba(232, 194, 106, .3) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#ann.ann-refine { background: linear-gradient(180deg, rgba(80, 36, 16, .72), rgba(40, 16, 8, .72)) !important; }
#ann em { font: 700 9.5px var(--u-font) !important; letter-spacing: 2px !important; padding: 0 9px !important; margin-bottom: 2px !important; background: rgba(116, 208, 255, .22) !important; color: #cfefff !important; }
#ann div { font: 600 12.5px/1.35 var(--u-font) !important; color: #ffe9b8 !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .8) !important; gap: 6px !important; }
#ann .pxi { width: 22px !important; height: 22px !important; }
/* body.pc #ann top: set by the notification lane (ui.js stackTop) */
body.m-port #ann { max-width: 70vw !important; }
body.m-land #ann { max-width: 44vw !important; }
body.m-land #ann div { font-size: 11.5px !important; }

/* ---------- right side: minimap leads, the quest ribbon below it, the rail recedes ---------- */
body.pc #hud #rail { top: calc(var(--railTop, 214px) + 6px) !important; }

/* ---------- portrait phone: fewer buttons at once, more picture ---------- */
body.m-port { --hk: .86; }
body.m-port #hud #autoSet, body.m-port #hud #zoomBtn { display: none !important; } /* farm settings: menu → ตั้งค่าฟาร์ม; zoom: pinch */
body.m-port #hud #rail [data-open="stats"] { display: none !important; } /* character: the portrait opens it (tap) */
body.m-port #hud #quick { gap: 10px !important; bottom: calc(26px + var(--sb) + 250px * var(--hk) * var(--ctl)) !important; right: calc(14px + var(--sr)) !important; }
body.m-port #hud #pills { gap: 10px !important; left: calc(16px + var(--sl)) !important; bottom: calc(46px + var(--sb) + 124px * var(--hk) * var(--ctl)) !important; }
body.m-port #hud #jqCard { max-width: 62vw; }
body.m-port #hud #petFrame { display: none !important; } /* the pet shows next to the hero anyway; its HP is in the pet window */
body.m-port #hud #log { display: none !important; }
#hud #me { cursor: url(assets/ui/cursor/hand.svg) 10 4, pointer; }

/* ---------- main menu: clearer sections, keycaps, primary tiles larger ---------- */
#hud #menu .mgrp { margin-top: 14px !important; padding: 10px 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(116, 140, 200, .12); }
#hud #menu > header + .mgrp, #hud #menu > header + .mgrp + .mgrp { margin-top: 6px !important; }
#hud #menu .mgrp > h4 { font: 700 12px var(--u-font) !important; color: var(--au3) !important; letter-spacing: 1px !important; margin: 0 2px 8px !important; }
#hud #menu .mgrp > h4::before { content: ""; width: 4px; height: 12px; margin-right: 7px; border-radius: 2px; background: linear-gradient(var(--au), #b48a38); align-self: center; }
#hud #menu .mgrp > div { gap: 8px !important; }
#hud #menu .mgrp button { min-height: 68px !important; border-radius: 12px !important; }
#hud #menu .mgrp button span { font-size: 12px !important; font-weight: 500 !important; }
#hud #menu .mgrp button u { left: 6px !important; top: 5px !important; padding: 0 4px !important; min-width: 14px; border-radius: 4px; font: 700 9px/14px var(--u-font) !important; text-align: center;
  color: var(--tx2) !important; background: rgba(4, 7, 16, .7); box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(150, 170, 220, .25); }
#hud #menu .mgrp:first-of-type button { min-height: 74px !important; }
#hud #menu .mgrp:first-of-type button .mic { width: 36px !important; height: 36px !important; }
#hud #menu .mgrp.sys { background: transparent; border-style: dashed; }
#hud #menu .mgrp.sys button { min-height: 52px !important; background: rgba(255, 255, 255, .02) !important; }
#hud #menu .mgrp.sys button > i { font-size: 16px !important; height: 20px !important; color: var(--tx2) !important; }
#hud #menu > header { padding-bottom: 8px; border-bottom: 1px solid rgba(232, 194, 106, .2); }
#hud #menu > header b { font-size: 16px !important; letter-spacing: .5px; }
body.m-port #hud #menu .mgrp button { min-height: 62px !important; }
@media (max-width: 380px) { body.m-port { --hk: .76; } body.m-port #hud #rail button { width: 40px !important; height: 40px !important; } }
/* sideways phones: the rail lies flat beside the minimap (a column ran into the skill wheel) */
body.m-land #hud #rail { flex-direction: row; }
/* PC: the full menu opens in the middle of the screen (beside the rail it only fitted two rows on a 720 px screen) */
body.pc #hud #menu { left: 50%; right: auto !important; top: 50% !important; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 200px)) !important; max-height: calc(100vh - 150px) !important; animation: none; }
body.pc #hud #menu .mgrp button { min-height: 62px !important; }
body.pc #hud #menu .mgrp:first-of-type button { min-height: 68px !important; }

/* job change ready: a tappable gold call to action at the top of the quest tracker (walks to the shrine) */

/* ---------- chat input (owner 2026-10-10: "can't type in chat") ---------- */
input, textarea, select { -webkit-user-select: text; user-select: text; touch-action: manipulation; }
body.pc #hud #rail [data-open="chat"], body.m-tab #hud #rail [data-open="chat"] { display: none !important; } /* docked input there */
#hud #chatBar { gap: 4px; padding: 4px; border-radius: 10px; background: rgba(8, 13, 28, .82); border: 1px solid rgba(232, 194, 106, .3); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
#hud #chatBar select, #hud #chatBar input { min-height: 36px !important; border-radius: 8px !important; background: rgba(4, 7, 16, .85) !important; border: 1px solid rgba(150, 170, 220, .3) !important; color: var(--tx) !important; font: 13px var(--u-font) !important; }
#hud #chatBar input:focus { border-color: var(--au) !important; box-shadow: 0 0 0 2px rgba(232, 194, 106, .2); }
#hud #chatBar select { padding: 0 4px; max-width: 92px; }
/* docked: a slim row right under the chat log (PC, tablet) */
body.pc #hud #chatBar, body.m-tab #hud #chatBar { left: calc(12px + var(--sl)) !important; bottom: calc(14px + var(--sb)) !important; width: var(--chatw, 300px) !important; padding: 3px; border-radius: 0 0 10px 10px; border-top: 0; }
body.pc #hud #log { bottom: calc(56px + var(--sb)) !important; height: 108px !important; max-height: 108px !important; }
body.pc #hud #logTabs { bottom: calc(164px + var(--sb)) !important; }
body.m-tab { --chatw: 300px; }
body.m-tab #hud #log { bottom: calc(220px + var(--sb)) !important; }
body.m-tab #hud #logTabs { display: flex !important; position: absolute; left: calc(14px + var(--sl)); bottom: calc(298px + var(--sb)); width: 300px; }
body.m-tab #hud #chatBar { bottom: calc(174px + var(--sb)) !important; }
/* phones: the bar opens over the top middle (clear of the keyboard and the thumbs) */
body.m-land #hud #chatBar, body.m-port #hud #chatBar { left: 50% !important; transform: translateX(-50%); top: calc(8px + var(--st)); bottom: auto !important; width: min(520px, calc(100vw - 20px)) !important; z-index: 12; }
#hud #sitBtn.on { border-color: #ffb050 !important; box-shadow: 0 0 12px rgba(255, 160, 60, .55) !important; }
#hud #sitBtn .mic { width: 26px; height: 26px; }
body.pc #hud #sitBtn u { display: block; }
@media (max-width: 1000px) { body.pc #hud #chatBar { bottom: calc(76px + var(--sb)) !important; } body.pc #hud #log { bottom: calc(118px + var(--sb)) !important; height: 80px !important; max-height: 80px !important; } body.pc #hud #logTabs { bottom: calc(198px + var(--sb)) !important; } }
/* tablet: the chat box gets the same frame as on PC */
body.m-tab #hud #logTabs { background: rgba(10, 16, 34, .72); border: 1px solid rgba(232, 194, 106, .2); border-radius: 10px 10px 0 0; overflow: hidden; z-index: 2; }
body.m-tab #hud #logTabs button { flex: 1; min-height: 30px; font: 600 11px var(--u-font); color: var(--tx3); }
body.m-tab #hud #logTabs button.on { color: var(--au3); background: linear-gradient(rgba(232, 194, 106, .05), rgba(232, 194, 106, .16)); box-shadow: inset 0 -2px 0 var(--au); }
body.m-tab #hud #log { height: 76px; padding: 6px 10px; border-radius: 0; background: linear-gradient(180deg, rgba(8, 13, 28, .38), rgba(8, 13, 28, .6)); border: 1px solid rgba(232, 194, 106, .16); border-top: 0; -webkit-mask-image: none; mask-image: none; }
/* auto quest (src/autoquest.js): a button under each quest on the tracker card; running = green with what it is doing */
/* the walk button keeps its label whole («ไปหามอน ➜» ran past its frame on phones); the auto-quest button takes the rest */
#hud #jqCard .aqrow .aqb.aqw { flex: 0 0 auto; }
/* town guide (ไกด์เมือง): one row per NPC, tap = walk there */
#panel .guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 6px 0; }

 

/* blacksmith tabs (equipment V2): refine to +15, tier upgrade, crafting, options, shop */

 #panel .smchips button { flex: 1; min-height: 40px; min-width: 64px; border-radius: 9px; font: 600 12px var(--u-font); color: var(--tx2, #b8c4dc);
  background: rgba(20, 28, 52, .6); border: 1px solid rgba(232, 194, 106, .22); }
 #panel .smchips button.on { color: #fff3c9; background: linear-gradient(180deg, rgba(232, 194, 106, .32), rgba(232, 194, 106, .12)); border-color: rgba(232, 194, 106, .7); }
#panel .smchips { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 8px; }
 
#panel .smguard { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: #fff3c9; }
#panel .smguard input { width: 20px; height: 20px; }

 .tipcard .warn { font-style: normal; color: #ff8a8a; }
#panel .mats { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 3px; }
#panel .mats .mat { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #cfe8c8; }
#panel .mats .mat.lack { color: #ff9a9a; }
#panel .mats .mat img, #panel .mats .mat .ii { width: 16px; height: 16px; font-size: 13px; }
.tipcard .tipset { margin: 5px 0 2px; padding-top: 4px; border-top: 1px solid rgba(232, 194, 106, .25); font-size: 11px; color: #9aa6c0; }
.tipcard .tipset b { color: #ffd890; } .tipcard .tipset .on { color: #9affb0; }
/* stats: the +5 button and the reset row (RO-style status, 2026-10-11) */

#panel .streset { display: flex; justify-content: flex-end; margin: 6px 0 2px; }
#panel .streset button { min-height: 40px; }
/* skill window: sort + link combo (2026-10-11) */

#panel .cbed { padding: 8px; margin-bottom: 8px; }
#panel .cbrow { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 10px; border: 1px solid transparent; }
#panel .cbrow.on { border-color: rgba(232, 194, 106, .6); background: rgba(232, 194, 106, .08); }
#panel .cbrow .cbn { min-width: 44px; min-height: 40px; border-radius: 9px; font: 700 13px var(--u-font); color: #fff3c9; background: rgba(40, 56, 96, .7); border: 1px solid rgba(232, 194, 106, .4); }
#panel .cbchain { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-height: 40px; }
#panel .cbchain i { font-style: normal; color: var(--au3, #ffe39a); font-size: 12px; }
#panel .cbchain small { color: var(--tx3, #8a96b0); font-size: 11px; }
#panel .cbsk { width: 40px; height: 40px; padding: 3px; border-radius: 8px; background: rgba(20, 28, 52, .7); border: 1px solid rgba(232, 194, 106, .25); }
#panel .cbsk img { width: 100%; height: 100%; image-rendering: pixelated; }
#panel .cbpick { margin-top: 6px; } #panel .cbpick > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
/* HUD link combo buttons, next to AUTO */
#combos { display: contents; }
#hud #combos .cbtn { position: relative; padding: 3px; }
#hud #combos .cbtn img { width: 100%; height: 100%; image-rendering: pixelated; opacity: .9; }
#hud #combos .cbtn u { position: absolute; right: 1px; bottom: 0; font: 700 10px var(--u-font); text-decoration: none; color: #fff3c9; text-shadow: 0 1px 2px #000; }
#hud #combos .cbtn.on { box-shadow: 0 0 0 2px #7aff8a, 0 0 12px rgba(122, 255, 138, .6) !important; }

/* ---------- title screen: title.css (redesign 2026-10-14) ---------- */

/* ---------- scroll cues (ui.js scrollCues): fade the edge that has more to read + an arrow under the window ---------- */
.cue-b { -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0,0,0,.12)); mask-image: linear-gradient(#000 calc(100% - 34px), rgba(0,0,0,.12)); }
.cue-t { -webkit-mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px); mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px); }
.cue-t.cue-b { -webkit-mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px, #000 calc(100% - 34px), rgba(0,0,0,.12)); mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px, #000 calc(100% - 34px), rgba(0,0,0,.12)); }
/* S5 (2026-10-13): the menu is a solid panel; masking it faded its own background too and the HUD behind showed through at the
   edge. A sticky shade in the panel's colour marks "more below / above" instead */
#hud #menu.cue-b, #hud #menu.cue-t { -webkit-mask-image: none; mask-image: none; }
#hud #menu.cue-b::after { content: ''; position: sticky; display: block; bottom: -12px; height: 34px; margin: -34px -10px -12px; pointer-events: none; z-index: 2;
  background: linear-gradient(rgba(11, 18, 36, 0), rgba(11, 18, 36, .97)); }
#hud #menu.cue-t::before { content: ''; position: sticky; display: block; top: -10px; height: 26px; margin: -10px -10px -16px; pointer-events: none; z-index: 2;
  background: linear-gradient(rgba(22, 34, 63, .97), rgba(22, 34, 63, 0)); }
#moreCue { display: none; position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 5; pointer-events: none;
  padding: 3px 12px; border-radius: 999px; font: 600 11px var(--u-font, Prompt), sans-serif; font-style: normal; color: #1d1608; background: linear-gradient(#f4c96b, #c99a3c);
  box-shadow: 0 2px 8px rgba(0,0,0,.5); animation: cueBob 1.4s ease-in-out infinite; }
#panel.more #moreCue { display: block; }
@keyframes cueBob { 50% { transform: translate(-50%, -3px); } }
@media (prefers-reduced-motion: reduce) { #moreCue { animation: none; } }
#panel *, #menu { scrollbar-width: thin; scrollbar-color: rgba(244,201,107,.55) transparent; }
#panel *::-webkit-scrollbar, #menu::-webkit-scrollbar { width: 6px; height: 6px; }
#panel *::-webkit-scrollbar-thumb, #menu::-webkit-scrollbar-thumb { background: rgba(244,201,107,.5); border-radius: 3px; }

/* ---------- skill window: one toolbar row, a solid footer, more room for the tree on short screens (UI tour 2026-10-11) ---------- */

/* ---------- primary buttons look pressable; disabled ones look disabled (UI tour: claim / report looked greyed out) ---------- */

 #pbody .u-btn[disabled] { opacity: .5; filter: saturate(.4); cursor: not-allowed; }
 /* the window's main action stays on screen */
/* ...and when it is disabled (e.g. «✓ รับแล้ววันนี้») it stays solid: at the shared 50% opacity the cards scrolling under it showed through its label */

.lday.today::before { content: 'วันนี้'; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 6px; font: 700 9px var(--u-font, Prompt); color: #1d1608; background: #ffd36a; }
:lang(en) .lday.today::before { content: 'Today'; } /* English page (i18n.js trDom sets <html lang="en">) */
@keyframes ldayGlow { 50% { box-shadow: 0 0 0 2px #ffd36a, 0 0 22px rgba(255, 211, 106, .8); } }

/* ---------- selected choices read as selected (UI tour: the chosen option looked dimmer than the others) ---------- */

#pbody .arow b small { font-weight: 400; color: var(--tx3, #8b95ad); font-size: 11px; }

/* ---------- touch screens: no keyboard hints (UI tour 2026-10-11: [C], key letters on menu tiles, keyboard help first) ---------- */
body:not(.pc) #ptitle small, body:not(.pc) #menu button > u, body:not(.pc) #hubTabs u, body:not(.pc) #menu header small { display: none !important; }
/* help as cards; the controls of the current device first */

/* ---------- menu labels wrap to two lines instead of "…" (UI tour 2026-10-11) ---------- */
#hud #menu .mgrp button span { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; font-size: 11px !important; line-height: 1.15 !important; }
#hud #menu .mgrp button { min-height: 66px !important; }

/* ---------- empty states (offline cards for the online-only systems, empty mailbox...) ---------- */

body.offline #menu [data-open="party"], body.offline #menu [data-open="guild"], body.offline #menu [data-open="mailbox"], body.offline #menu [data-open="market"],
body.offline #menu [data-open="vend"], body.offline #menu [data-open="rank"] { opacity: .6; }
body.offline #menu [data-open="party"]::after, body.offline #menu [data-open="guild"]::after, body.offline #menu [data-open="mailbox"]::after, body.offline #menu [data-open="market"]::after,
body.offline #menu [data-open="vend"]::after, body.offline #menu [data-open="rank"]::after { content: '🌐'; position: absolute; right: 4px; top: 3px; font-size: 10px; }

/* ---------- EXP / JOB strip readable on any ground (UI tour 2026-10-11: 9 px grey on a 3 px bar) ---------- */
#hud #xp { height: 8px !important; }
#hud #xp i { height: 4px !important; }
#hud #xp span { padding: 1px 7px; border-radius: 999px; background: rgba(6, 10, 20, .78); border: 1px solid rgba(232, 194, 106, .3); font: 600 11px var(--u-font, Prompt), sans-serif !important; color: #e8eefc !important; }
#hud #expTxt { color: #9af0ff !important; border-color: rgba(116, 208, 255, .45); }
#hud #jexpTxt { color: #ffe39a !important; }
body.pc #hud #expTxt, body.pc #hud #jexpTxt { bottom: 12px !important; }
body.pc #hud #jexpTxt { left: calc(130px + var(--sl)); }
body:not(.pc) #hud #expTxt, body:not(.pc) #hud #jexpTxt { bottom: 11px; }
body:not(.pc) #hud #jexpTxt { left: calc(136px + var(--sl) + 124px * var(--hk)); }

/* ---------- 'here' map: zoom + pan (worldmap.js zoomHere); tools like the world map's ---------- */
#bigMap .bm-main { position: relative; }
#bigMap[data-tab="here"] .bm-here { display: flex !important; overflow: auto; padding: 6px; touch-action: pan-x pan-y; }
#bigMap .bm-here #bigCv { margin: auto; flex-shrink: 0; max-width: none; touch-action: pan-x pan-y; }
#bigMap .bm-here.zoomed #bigCv { cursor: grab; }
.bm-main > .hm-tools { display: none; position: absolute; inset: auto 10px 10px auto; width: auto; height: auto; z-index: 2; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(8, 13, 26, .85); border: 1px solid rgba(232, 194, 106, .4); }
#bigMap[data-tab="here"] .bm-main > .hm-tools { display: flex; }
.hm-tools button { width: 40px; height: 40px; border-radius: 8px; color: var(--au3); background: linear-gradient(#22325a, #17223f); border: 1px solid rgba(116, 140, 200, .35); font-size: 17px; }
.hm-tools b { min-width: 42px; text-align: center; font: 600 11px var(--u-font); color: var(--au3); }
#wmInfo .wm-here { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(232, 194, 106, .45); color: var(--au3, #ffe39a); font-size: 13px; text-align: center; }
#wmInfo .wm-crown { display: block; margin-top: 6px; color: var(--tx2, #aeb7cc); font-size: 11px; }

/* chat log: the oldest visible line fades out under the tab strip instead of being cut in half (UI tour 2026-10-11) */
#hud #log { -webkit-mask-image: linear-gradient(transparent, #000 16px); mask-image: linear-gradient(transparent, #000 16px); padding-top: 6px; }
.jcta .nw { white-space: nowrap; }
.jcta { background: linear-gradient(135deg, rgba(60, 44, 14, .92), rgba(20, 26, 46, .92)) !important; } /* the call-to-action card was see-through */

/* ---------- first-steps coach (ui.js coachTick): a slim tip under the zone banner, taps pass through except ✕ ---------- */
#coach { position: absolute; left: 50%; top: calc(64px + var(--st, 0px)); transform: translateX(-50%); z-index: 6; pointer-events: none;
  display: flex; align-items: center; gap: 6px; max-width: min(520px, 62vw); padding: 6px 6px 6px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(22, 34, 63, .94), rgba(11, 18, 36, .94)); border: 1px solid rgba(232, 194, 106, .6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45), 0 0 14px rgba(232, 194, 106, .18); color: #f2f5ff; font: 500 13px/1.45 var(--u-font, Prompt), sans-serif;
  animation: coachIn .35s ease-out; }
#coach[hidden] { display: none; }
#coach button { pointer-events: auto; flex-shrink: 0; width: 40px; height: 40px; border-radius: 9px; border: 1px solid rgba(232, 194, 106, .4); background: rgba(255, 255, 255, .05); color: var(--au3, #ffe39a); font-size: 15px; }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, -6px); } }
body:not(.pc) #coach { top: calc(8px + env(safe-area-inset-top)); font-size: 12px; max-width: min(440px, 56vw); }
body.m-port #coach { top: auto; bottom: calc(250px + env(safe-area-inset-bottom)); max-width: 92vw; }
.coach-hi { animation: coachHi 1.1s ease-in-out infinite !important; }
@keyframes coachHi { 50% { box-shadow: 0 0 0 3px #ffd36a, 0 0 18px rgba(255, 211, 106, .9); } }
@media (prefers-reduced-motion: reduce) { #coach, .coach-hi { animation: none !important; } .coach-hi { box-shadow: 0 0 0 3px #ffd36a; } }
body.m-land #coach { top: calc(80px + env(safe-area-inset-top)); max-width: min(420px, 50vw); } /* under the top-right button pill */
#moreCue { left: auto; right: 12px; bottom: 8px; transform: none; animation-name: cueBob2; } /* corner: never over a sticky main button */
@keyframes cueBob2 { 50% { transform: translateY(-3px); } }

#panel.more:has(#pbody > button.big) #moreCue { bottom: 66px; }
/* the same for the sticky confirm bars of the status window («ยืนยัน n แต้ม») and the skill window (upright phones): the cue sat on their labels */
#panel.more:has(#pbody .cs2-right .pend .u-btn) #moreCue { bottom: 62px; }
#pbody button .why { display: block; font-size: 10px; color: #ff9a8a; font-weight: 600; }

/* ---------- tame offer = slim non-blocking notification at the top (UI final polish 2026-10-11) ----------
   was a card above the skill bar in the middle of the fight; now a 52 px strip under the target bar with ✓ / ✕ and a
   countdown, clear of the hero, the joystick and the skill wheel */
#tame { left: 50%; top: calc(52px + env(safe-area-inset-top)); bottom: auto !important; transform: translateX(-50%); width: min(380px, 58vw); z-index: 6;
  display: flex; align-items: center; gap: 8px; padding: 5px 6px 7px 8px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 44, 38, .95), rgba(11, 18, 36, .95)); border: 1px solid rgba(111, 227, 154, .6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 14px rgba(111, 227, 154, .2); }
#tame.pop { animation: tameIn .3s ease-out; }
@keyframes tameIn { from { transform: translate(-50%, -10px); opacity: 0; } }
#tameImg { width: 40px; height: 40px; flex-shrink: 0; }
#tame p { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.3; }
#tame > div { display: flex; gap: 5px; flex-shrink: 0; }
#tame button { min-height: 40px; min-width: 44px; padding: 0 10px; border-radius: 9px; font-weight: 700; }
#tameYes { min-width: 64px !important; }
#tameBar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #6fe39a, #c8ffd8); transition: width .2s linear; }
body.pc #tame { top: 84px; }
body.m-port #tame { top: calc(150px + env(safe-area-inset-top)); width: 92vw; }

/* ---------- short landscape phones (any width): skill tree left, detail right, both use the full height (final polish) ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  
   
  #panel #hubTabs button { min-height: 34px !important; padding-top: 2px !important; padding-bottom: 2px !important; }
  #panel .win > header { min-height: 44px; padding-top: 2px !important; padding-bottom: 2px !important; }
  
  
}

/* AUTO settings: basic / advanced (ui.js autoTab) */

/* ---------- Status on upright phones: points and + buttons right under the name card, the paper doll after (final polish) ---------- */
@media (max-width: 760px) and (min-height: 501px) {
  #pbody .cs2 { display: flex; flex-direction: column; gap: 10px; }
  #pbody .cs2-left { display: contents; }
  #pbody .cs2-id { order: 0; } #pbody .cs2-right { order: 1; } #pbody .cs2-left > :not(.cs2-id) { order: 2; }
  
  
}

/* ---------- boss HUD (final polish, ready for the world boss): wide bar, phase line, time left, a warning strip ---------- */
#target .tgh { display: flex; align-items: baseline; gap: 8px; }
#target #tgTime { margin-left: auto; padding: 0 8px; border-radius: 999px; font: 700 12px var(--u-font, Prompt); color: #ffe39a; background: rgba(0, 0, 0, .45); border: 1px solid rgba(232, 194, 106, .45); }
#target.wb { width: min(600px, 64vw) !important; border-color: rgba(255, 90, 110, .8) !important; box-shadow: 0 0 0 1px rgba(4, 8, 18, .8), 0 0 22px rgba(255, 74, 106, .35) !important; }
#target.wb .tgh span::before { content: '👹 บอสโลก · '; color: #ff8a9a; }
:lang(en) #target.wb .tgh span::before { content: '👹 World Boss · '; } /* English page (i18n.js trDom sets <html lang="en">) */
#target.wb .tgbar { height: 12px; }
#target.wb .tgbar i { background: linear-gradient(90deg, #ff4a6a, #ffb36a) !important; }
#bossWarn { position: absolute; left: 50%; top: calc(66px + var(--st, 0px)); transform: translateX(-50%); z-index: 7; pointer-events: none;
  padding: 6px 16px; border-radius: 10px; font: 800 14px var(--u-font, Prompt), sans-serif; color: #fff; letter-spacing: .3px; white-space: nowrap;
  background: linear-gradient(90deg, rgba(150, 20, 40, .92), rgba(220, 60, 50, .92)); border: 1px solid #ffb0a0; box-shadow: 0 0 20px rgba(255, 60, 60, .55); text-shadow: 0 1px 2px #000; }
#bossWarn.go { animation: warnPulse .45s ease-in-out 3; }
@keyframes warnPulse { 50% { transform: translateX(-50%) scale(1.07); } }
body.m-land #bossWarn { top: calc(58px + var(--st, 0px)); font-size: 13px; }
body.m-port #bossWarn { top: auto; bottom: calc(360px + var(--sb, 0px)); }
body.pc #bossWarn { top: calc(76px + var(--st, 0px)); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { #bossWarn.go { animation: none; } }

/* ---------- compact combat HUD on touch (ui.js: body.combat while fighting + 4 s) ---------- */
body.combat #hud #petFrame, body.combat #hud #log, body.combat #hud #logTabs { opacity: .35; transition: opacity .3s; }
/* quest compact mode: the card hides, one solid strip shows the step in progress (ui.js #jqMini) */
body.combat #hud #jqCard { display: none !important; }
#jqMini { display: none; position: absolute; left: calc(12px + var(--sl, 0px)); z-index: 3; max-width: min(240px, 40vw); padding: 5px 10px; border-radius: 9px;
  font: 600 12px/1.3 var(--u-font, Prompt), sans-serif; color: #f2f5ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(90deg, rgba(22, 34, 63, .96), rgba(11, 18, 36, .96)); border: 1px solid rgba(232, 194, 106, .55); border-left: 3px solid var(--au, #e8c26a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4); pointer-events: none; }
body.combat #hud #jqMini:not(.empty) { display: block; }
body.combat #hud #jqCard:active, body.combat #hud #log:active { opacity: 1; }
body.combat #hud #rail .rp, body.combat #hud #rail #zoomBtn { display: none !important; } /* the shortcut pill shrinks to ☰ while fighting */
body.combat #hud #zoomBar, body.combat #coach { opacity: 0; pointer-events: none; transition: opacity .3s; }
body.combat #hud #buffTray, body.combat #hud .buffs { transform-origin: left top; }
/* the lane (ui.js stackTop) sets top; !important rules of the older layouts must not pin them */
#target, #bossWarn, #ann, #tame, #coach { transition: top .18s ease-out; }
body.m-land #target.wb { width: min(400px, 46vw) !important; } /* between the portrait and the top-right buttons */
body.m-port #bossWarn, body.m-port #tame, body.m-port #coach { max-width: 92vw; white-space: normal; text-align: center; }
/* landscape phones: the target / boss bar fits between the portrait (left) and the minimap (right) on any width */
body.m-land #target, body.m-land #target.boss, body.m-land #target.wb { width: max(200px, min(400px, calc(100vw - 460px - var(--sl, 0px) - var(--sr, 0px)))) !important; }
body.m-port #target.boss, body.m-port #target.wb { width: 92vw !important; }
body.m-port #target .tgh { flex-wrap: wrap; row-gap: 2px; }
body.m-port #bossWarn { white-space: nowrap; font-size: 12.5px; padding: 6px 12px; }

/* ---------- notification priority in a fight (ui.js stackTop laneHold) ---------- */
#ann.held, #coach.held, #toast.held { visibility: hidden !important; }
/* phones: an open window (landscape: full screen, upright: the bottom sheet) or the landscape menu covers the guide tip, which showed
   through as ghost text over the window */
/* body.wpanel / .wmenu / .wbigmap = that window is open (ui.js winFlags; was body:has(#panel:not([hidden])), which Chrome re-checked on
   every hidden-attribute write anywhere in the page, many per frame in a fight); #coach#coach keeps the :has() rule's specificity */
body.m-land.wpanel #coach#coach, body.m-port.wpanel #coach#coach, body.m-land.wmenu #coach#coach { visibility: hidden; }
#ann.mini em { display: none !important; }
#ann.mini { padding: 3px 12px !important; }
#ann.mini div { font-size: 11.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: min(60vw, 420px); }
#ann.mini .pxi { width: 16px !important; height: 16px !important; }
#tame.mini { padding: 3px 4px 5px 6px; width: min(300px, 52vw); }
#tame.mini #tameImg { width: 30px; height: 30px; }
#tame.mini p { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tame.mini button { min-height: 40px; }
body.m-port #tame.mini { width: 86vw; }
/* loot feed in a fight: the last three lines, smaller */
body.fighting #hud #loot .li:nth-last-child(n+4) { display: none; }
body.fighting #hud #loot .li { font-size: 11px; opacity: .9; }
body.m-land #tame.side { left: calc(12px + var(--sl, 0px)); transform: none; width: min(300px, 38vw); animation: none; }

/* quest card buttons take taps (the card itself lets taps through to the field: style.css #jqCard pointer-events none from
   when it was a plain tracker; the ▶ auto quest / job-change buttons added later inherited it and could not be pressed) */

/* Visual polish phase 2 (2026-10-11): compact boss bar on landscape phones. One row: 👹 short name · HP bar with % and
   phase marks · time left; phase/element text folded, the damage share opens on a tap (#target.open). Was 3 rows, 86 px. */
.tgbar .ph { display: none; }
body.m-land #target.boss { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; padding: 4px 10px; }
body.m-land #target.boss .tgh { display: contents; }
body.m-land #target.boss #tgName { order: 0; flex: 0 1 auto; min-width: 0; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; }
body.m-land #target.wb .tgh span::before { content: '👹 '; }
:lang(en) body.m-land #target.wb .tgh span::before { content: '👹 '; } /* keeps the short tag over the English rule above */
body.m-land #target.boss #tgElem { display: none; }
body.m-land #target.boss .tgbar { order: 1; flex: 1 1 80px; height: 12px; margin-top: 0; }
body.m-land #target.boss .tgbar span { font: 600 9px/12px Prompt, sans-serif; }
body.m-land #target.boss .tgbar .ph { display: block; position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
body.m-land #target.boss .tgbar .ph.past { background: rgba(255, 255, 255, .25); }
body.m-land #target.boss #tgTime { order: 2; margin-left: 0; padding: 0 6px; font-size: 11px; line-height: 16px; }
body.m-land #target.boss #tgParty { display: none; order: 3; flex-basis: 100%; margin-top: 3px; }
body.m-land #target.boss.open #tgParty { display: block; }
body.m-land #target.boss::after { content: ""; position: absolute; inset: -7px 0; } /* the tap area reaches 40 px though the bar is ~28 */
/* final verification: the short boss name gets more room; a tap shows full name · phase · element above the damage share */
body.m-land #target.boss #tgName { max-width: 52%; flex-shrink: 0; }
body.m-land #target.boss:not(.open) { flex-wrap: nowrap; } /* one row even on a 667 px phone (the bar narrows first) */
body.m-land #target.boss .tgbar { flex-basis: 36px; min-width: 36px; }
body.m-land #target.boss #tgTime { flex-shrink: 0; font-size: 10px; padding: 0 5px; }
body.m-land #target.boss.open #tgElem { display: block; order: 3; flex-basis: 100%; margin-top: 3px; text-align: center; font-size: 10px; color: #f3dfa8; }
/* boss phase change on landscape phones (owner 2026-10-11): a small pill under the boss bar / danger warning instead of a
   24 px banner across 60% of the screen; the text is also in the chat log */
body.m-land #toast.ph { font-size: 13px; line-height: 18px; padding: 3px 12px; border-radius: 999px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
  color: #ffd0d6; background: rgba(12, 10, 24, .78); border: 1px solid rgba(255, 110, 130, .55); text-shadow: 0 1px 2px #000; }
/* skill window (owner 2026-10-11, "อัพยากจังสกิล"): the open combo editor took its full height and squeezed the skill tree to a
   strip
   -> the combo editor is its own mode: open, it takes the window (tree and detail step aside); closed, the tree has it all */

/* World map V4, direction A (2026-10-12): the painted continent under the routes and sigil markers */
.wm-world.wm-a { background: #12305a url(assets/maps/world/world-a.png) 0 0 / 100% 100% no-repeat; border-radius: 10px; }
.wm-a .wm-roads .rd { stroke: rgba(30, 22, 8, .38); stroke-width: 5; }
.wm-a .wm-roads .rd2 { stroke: #fff1c4 !important; stroke-width: 2; stroke-dasharray: 1 7; opacity: .9; }
.wm-a .wm-node { margin-top: -22px; }
.wm-a .wm-node .disc { width: 40px; height: 40px; overflow: visible; background: radial-gradient(circle, rgba(255, 236, 170, .35) 0 30%, rgba(10, 14, 28, .55) 31% 100%);
  box-shadow: 0 0 0 2px rgba(10, 14, 28, .8), 0 0 0 4px #e8c26a, 0 0 14px rgba(255, 220, 140, .55); }
.wm-a .wm-node .sig { position: absolute; inset: 7px; border-radius: 50%; border: 1.5px solid rgba(255, 241, 196, .9); }
.wm-a .wm-node .sig::before, .wm-a .wm-node .sig::after { content: ""; position: absolute; left: 50%; top: 50%; width: 140%; height: 1.5px; margin: -.75px 0 0 -70%; background: rgba(255, 241, 196, .8); transform: rotate(45deg); }
.wm-a .wm-node .sig::after { transform: rotate(-45deg); }
.wm-a .wm-node.town { margin-top: -30px; }
.wm-a .wm-node.town .disc { width: 56px; height: 56px; box-shadow: 0 0 0 2px rgba(10, 14, 28, .8), 0 0 0 5px #ffd76a, 0 0 22px rgba(255, 220, 140, .8); }
.wm-a .wm-node .nm { background: rgba(10, 14, 28, .72); border: 1px solid rgba(232, 194, 106, .55); }
.wm-a .wm-node.here .disc { box-shadow: 0 0 0 2px #0a0f1e, 0 0 0 4px #fff, 0 0 18px #fff3c0; }
.wm-a .wm-node.sel .disc { box-shadow: 0 0 0 2px #0a0f1e, 0 0 0 4px #fff, 0 0 22px var(--c); }
.wm-a .wm-node .boss { left: calc(50% + 12px); top: -10px; }
.wm-a .wm-node small { color: #fff0c8; font-weight: 600; text-shadow: 0 1px 2px #000, 0 0 3px #000, 0 0 6px rgba(0, 0, 0, .8); }

/* quest card: the chapter is in another field (2026-10-12) */

/* landscape phones (2026-10-12): the quick actions now share the bottom row, so the EXP / JOB labels sit in one small row just
   above the joystick instead of along the bottom edge */
body.m-land #expTxt { left: calc(26px + var(--sl) + 128px * var(--hk) * var(--ctl)) !important; bottom: calc(10px + var(--sb)) !important; top: auto !important; }
body.m-land #jexpTxt { left: calc(26px + var(--sl) + 128px * var(--hk) * var(--ctl)) !important; bottom: calc(36px + var(--sb)) !important; top: auto !important; }
/* (stacked in the gap right of the joystick, left of the quick row: above the joystick the quest card's auto-quest button
   reached down onto them when the job-change card made it taller, helper's UI audit B3) */

/* an open window stays on top of the tame offer (it covered the window's tab row, helper's UI audit B2 2026-10-13) */
body.wpanel #tame#tame { z-index: 3; }

/* ---------- touch buttons stay >= 40 px on screen (helper round 3, work/tap-play.mjs): the quest card and the wheel are scaled down
   as a block (--hk, --ctl), so their buttons are sized up by the same factor to land at 40 px after the scale ---------- */
body:not(.pc) #hud #jqCard .aqb { min-height: calc(40px / var(--hk)); }
body:not(.pc) #hud #skPage { width: calc(40px / (var(--hk) * var(--ctl))); height: calc(40px / (var(--hk) * var(--ctl))); }

body:not(.pc) #panel #hubTabs button { min-height: 40px !important; }

/* a boss warning on the ground (game.js body.bosswarn): on upright phones the big rings (QUAKE 230, IMPLODE 170, CROSS, SHOCKWAVE)
   reach under the right-hand column, which steps back to see-through until the move lands; taps still work (helper round 5) */
body.m-port.bosswarn #hud #quick { opacity: .38; transition: opacity .15s; }
body.m-port #hud #quick { transition: opacity .3s; }

/* AUTO on must be obvious (owner 2026-10-13: "the AUTO button looks the same, can't tell if it is working"): the PC quick-bar
   rule painted every button dark (#quick button, higher specificity), so "on" showed dark text on a dark button. Now: bright gold
   with a breathing glow and a blinking green light in the corner; off stays the quiet dark button. */
#hud #quick #autoBtn.on, #hud #autoBtn.on.on { position: relative; color: #1a1206 !important; border-color: #fff1c2 !important;
  background: linear-gradient(#ffe08a, #c8902e) !important; text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 2px rgba(255, 214, 120, .55), 0 0 18px rgba(255, 200, 90, .85) !important; animation: none !important; }
/* the breathing glow = a layer that fades in and out (opacity runs on the compositor); animating the box-shadow + filter itself
   re-did the button's style and paint every frame for as long as AUTO was on (fps-ui 2026-10-14) */
#hud #quick #autoBtn.on::before, #hud #autoBtn.on.on::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(255, 226, 150, .75), 0 0 28px rgba(255, 210, 100, 1); background: rgba(255, 246, 220, .1);
  opacity: 0; animation: autoOnPulse 1.4s ease-in-out infinite; will-change: opacity; }
#hud #quick #autoBtn.on::after, #hud #autoBtn.on.on::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%;
  background: #5dff8a; box-shadow: 0 0 6px #5dff8a, 0 0 2px #fff; animation: autoLed 1s steps(2, start) infinite; }
@keyframes autoOnPulse { 50% { opacity: 1; } }
@keyframes autoLed { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { #hud #quick #autoBtn.on, #hud #autoBtn.on.on, #hud #autoBtn.on::after, #hud #autoBtn.on::before { animation: none !important; } }
/* One item card everywhere (CLI-TASK-1, src/itemtip.js): the host is on <body> above every window and dialog; touch = a pinned
   sheet low in the middle with ✕ (tap outside also closes) */
#tip { z-index: 90; pointer-events: none; max-width: 320px; width: max-content; max-height: calc(100vh - 16px); overflow: hidden; }
#tip.pin { pointer-events: auto; position: fixed; left: 50% !important; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(92vw, 360px); max-width: none; max-height: 70vh; overflow-y: auto; padding-top: 12px; }
#tip .tipx { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; font-size: 16px; }
#tip.pin .tipcard .tiph { padding-right: 40px; }
.ic2 .tiph b { font-size: 14px; line-height: 1.25; }
.ic2 .tiph span { font-size: 11px; color: #a9b4cc; font-weight: 500; display: block; }
.ic2 .tiph { flex-wrap: wrap; } .ic2 .tiph span { flex-basis: 100%; margin-left: 42px; margin-top: -6px; }
.ic2-req { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 2px 0 4px; font-size: 11px; }
.ic2-req span { padding: 1px 7px; border-radius: 999px; background: rgba(120, 220, 150, .12); color: #9affb0; border: 1px solid rgba(120, 220, 150, .3); }
.ic2-req span.no { background: rgba(255, 90, 90, .14); color: #ff8a8a; border-color: rgba(255, 110, 110, .45); font-weight: 600; }
.ic2-sec { margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(232, 194, 106, .18); font-size: 12px; }
.ic2-sec h5 { margin: 0 0 3px; font: 600 11px var(--u-font, Prompt), sans-serif; color: #d9c48f; letter-spacing: .2px; }
.ic2-sec h5 small, .ic2-sec h5 i { font-style: normal; font-weight: 500; }
.ic2-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 14px; }
.ic2-cmp { display: grid; grid-template-columns: 1fr auto auto; gap: 1px 10px; } .ic2-cmp span { display: contents !important; }
.ic2-st span, .ic2-cmp span { display: flex; gap: 6px; align-items: baseline; color: #b9c3d8; white-space: nowrap; }
#tip .ic2-st b, #tip .ic2-cmp b { color: #fff; font-weight: 600; margin-left: auto; }
.ic2-st .rf b { color: #ffd36a !important; }
.ic2-cmp .u-diff { margin-left: 4px; min-width: 34px; text-align: right; color: #7f8aa3; } .ic2-cmp .u-diff.up { color: var(--ok, #6fe0a0); } .ic2-cmp .u-diff.down { color: var(--bad, #ff6b6b); }
.ic2-der { margin-top: 3px; font-size: 11px; color: #b9c3d8; line-height: 1.5; }
.ic2-der .u-diff { margin: 0 6px 0 1px; }
.ic2 .opt { color: #8ac8ff; }
.ic2-card { color: #e6d2ff; } .ic2-card small { color: #b9a8d8; }
.ic2-free { color: #7f8aa3; }
.ic2-set div { color: #8d97ad; } .ic2-set div.on { color: #9affb0; }
.ic2-note { margin-top: 5px; font-size: 11px; color: #8d97ad; }
.ic2-eff { color: #9affb0; font-weight: 600; }
.ic2-worn { color: #9affb0; font-weight: 600; }
.ic2-mats { display: flex; flex-direction: column; gap: 2px; }
.ic2-mats span { display: flex; align-items: center; gap: 6px; } .ic2-mats .pxi { width: 18px; height: 18px; }
.ic2-mats span b { margin-left: auto; } .ic2-mats .y b { color: #9affb0 !important; } .ic2-mats .n b { color: #ff8a8a !important; }
[data-it] { -webkit-touch-callout: none; }
 
#tip .tiph .cardi { flex: none; width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: linear-gradient(#3a2f18, #1c1710); border: 1px solid rgba(232, 194, 106, .6); }
#tip .tiph .cardi img { width: 30px; height: 30px; object-fit: contain; border: 0; background: none; }

/* What's new window (src/news.js) */

 

  
.nw2old { margin-top: 10px; } .nw2old summary { cursor: pointer; padding: 10px 4px; min-height: 40px; color: #d9c48f; font-weight: 600; }
/* buff tray: the icons take hover / long-press for their card (the tray itself stays click-through) */
#hud #buffs .bf { pointer-events: auto; cursor: help; -webkit-touch-callout: none; }
/* equipment window: sets being worn */
.eqsets { margin-top: 8px; font-size: 12px; } .eqsets h4 { margin: 0 0 4px; font-size: 12px; color: #d9c48f; }
.eqsets .es + .es { margin-top: 6px; } .eqsets .es b { color: #ffe2a0; } .eqsets .es div { color: #8d97ad; padding-left: 6px; } .eqsets .es div.on { color: #9affb0; }

/* CLI-TASK-2 #1: deposit / withdraw all, claim all */
#pbody .stall { min-height: 40px; margin: 0 0 6px 8px; padding: 0 12px; font-size: 12px; }
#pbody .mlall { display: flex; justify-content: flex-end; margin: 0 0 8px; } #pbody .mlall .u-btn { min-height: 40px; }
/* soul book filters (CLI-TASK-2 #2) */

  

/* buffs about to end blink (CLI-TASK-2 #3) */
#hud #buffs .bf.end { animation: bfEnd .5s steps(2, start) infinite; }
@keyframes bfEnd { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { #hud #buffs .bf.end { animation: none; outline: 2px solid #ff8a8a; } }
/* another player's equipment (CLI-TASK-2 #4) */
#pbody .insp-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; } #pbody .insp-h b { font-size: 16px; color: #ffe2a0; }
#pbody .insp { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
#pbody .insp-r { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: rgba(14, 22, 41, .55); border: 1px solid rgba(232, 194, 106, .18); min-height: 56px; cursor: help; }
#pbody .insp-r > div { display: flex; flex-direction: column; min-width: 0; } #pbody .insp-r b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pbody .insp-r small { font-size: 11px; color: #9aa6c0; } #pbody .insp-r.empty { opacity: .55; cursor: default; }
/* presets (CLI-TASK-2 #5) */
.eqpre { margin-top: 8px; font-size: 12px; } .eqpre h4 { margin: 0 0 6px; font-size: 12px; color: #d9c48f; } .eqpre h4 small { color: #8d97ad; font-weight: 400; }
.eqpre .pr { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding: 4px 0; border-top: 1px solid rgba(232, 194, 106, .12); }
.eqpre .pr b { color: #ffe2a0; } .eqpre .pr small { color: #9aa6c0; min-width: 0; } .eqpre .u-btn { min-height: 40px; padding: 0 12px; }

/* phone pass (CLI-TASK-2 #7): nothing under 10 px in windows on touch screens, 40 px tap targets, smith tabs keep words whole */
 body:not(.pc) #pbody .u-bar span,
body:not(.pc) #pbody .u-slot .u-cap { font-size: 10px !important; }

#panel .smguard { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
#panel .smguard input { width: 22px; height: 22px; margin: 0; flex: none; }

/* refined weapon icons glow by level (ui.js refGlow, owner 2026-10-14): +4 white, +7 blue, +10 purple, +13 gold-red;
   a hard 1 px rim keeps the pixel edge readable, the soft halo breathes (higher = brighter and quicker) */
img.pxi.rfg1 { --rg: rgba(235, 240, 255, .75); filter: drop-shadow(0 0 1px var(--rg)) drop-shadow(0 0 3px var(--rg)); }
img.pxi.rfg2 { --rg: #6fc4ff; filter: drop-shadow(0 0 1px var(--rg)) drop-shadow(0 0 4px var(--rg)); animation: rfgPulse 2.4s ease-in-out infinite; }
img.pxi.rfg3 { --rg: #c58bff; filter: drop-shadow(0 0 1px var(--rg)) drop-shadow(0 0 3px var(--rg)) drop-shadow(0 0 7px var(--rg)) drop-shadow(0 0 2px #fff); animation: rfgPulse 1.8s ease-in-out infinite; }
img.pxi.rfg4 { --rg: #ffb14a; filter: drop-shadow(0 0 2px #ff5a3a) drop-shadow(0 0 4px var(--rg)) drop-shadow(0 0 9px var(--rg)) drop-shadow(0 0 2px #fff6c8); animation: rfgPulse 1.3s ease-in-out infinite; }
@keyframes rfgPulse { 50% { filter: drop-shadow(0 0 1px var(--rg)) drop-shadow(0 0 2px var(--rg)); } }
@media (prefers-reduced-motion: reduce) { img.pxi.rfg2, img.pxi.rfg3, img.pxi.rfg4 { animation: none; } }
/* CLI-TASK-3 premium: the crystal chip under the gold (top right) and in the bag footer */
#hud #topr .crys { display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 11px; color: #9fe6ff; background: none; border: 0; padding: 0; cursor: pointer; pointer-events: auto; }
#hud #topr .crys b { color: #c8f4ff !important; font-weight: 600; }
#hud #topr .crys i { font-style: normal; font-size: 10px; color: #ffd86a; }
#hud #topr .crys i:empty { display: none; }

/* คริสตัล window (src/premium-ui.js) */
.prem { display: flex; flex-direction: column; gap: 10px; }

  
.prem-st { font-size: 13px; color: var(--tx2, #a8b4c8); } .prem-st.on { color: #ffd86a; } .prem-st small { color: var(--tx2, #a8b4c8); }
.prem-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.prem-perks > div { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid rgba(159, 230, 255, .22); border-radius: 6px; background: rgba(40, 70, 100, .25); }
.prem-perks i { font-style: normal; font-size: 18px; line-height: 1.2; } .prem-perks b { display: block; font-size: 13px; color: #e8f4ff; } .prem-perks small { font-size: 11px; color: var(--tx2, #a8b4c8); }
.prem-buy { display: flex; flex-wrap: wrap; gap: 8px; } .prem-buy .u-btn { min-height: 40px; padding: 0 16px; }
.prem-warp { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.prem-warp button { min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 4px 10px; text-align: left; }
.prem-warp button b { font-size: 12px; } .prem-warp button small { font-size: 10px; opacity: .75; }
.prem-log > div { display: grid; grid-template-columns: 64px 1fr; gap: 0 8px; padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 12px; }
.prem-log span { grid-row: span 2; font-weight: 700; text-align: right; color: var(--tx2, #a8b4c8); } .prem-log .up { color: #8affb0; } .prem-log .dn { color: #ff9a9a; }
.prem-log small { color: var(--tx2, #a8b4c8); font-size: 10px; }
.prem-fair { font-size: 11px; }

.prem-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.prem-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid rgba(159, 230, 255, .22); border-radius: 6px; background: rgba(40, 70, 100, .25); }
.prem-item > i { font-style: normal; font-size: 22px; }
.prem-item > span { flex: 1; min-width: 140px; } .prem-item b { display: block; font-size: 13px; color: #e8f4ff; } .prem-item small { display: block; font-size: 11px; color: var(--tx2, #a8b4c8); }
.prem-item em { font-style: normal; font-size: 11px; color: #ffd86a; }
.prem-acts { display: flex; flex-wrap: wrap; gap: 6px; } .prem-acts .u-btn { min-height: 40px; padding: 0 12px; }
.prem-ren { display: flex; gap: 6px; } .prem-ren input { width: 110px; min-height: 40px; }

/* CLI-TASK-4 cosmetics tab (src/premium-ui.js cosTab): worn row, slot filter, item cards with a live preview */
.cos-wear { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.cos-wear > div { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 6px 10px; border: 1px solid rgba(232, 194, 106, .25); border-radius: 6px; background: rgba(20, 28, 52, .5); }
.cos-wear small { flex-basis: 100%; font-size: 10px; color: var(--tx2, #a8b4c8); } .cos-wear b { flex: 1; font-size: 12px; color: #ffe7a8; }
.cos-wear .u-btn { min-height: 32px; padding: 0 10px; }
 

 

.cos-prev { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-height: 76px; border-radius: 6px; background: radial-gradient(ellipse at 50% 70%, rgba(90, 120, 160, .35), rgba(10, 14, 28, .6)); overflow: hidden; }
.cos-prev.big { min-height: 120px; margin-bottom: 6px; }
.cos-nc { font: 700 16px var(--u-font); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 #080a12) drop-shadow(0 0 1px #080a12); }
.cos-cb { position: relative; padding: 5px 12px; border-radius: 8px; background: var(--bg); border: 2px solid var(--ed); color: var(--ink); font: 600 12px var(--u-font); }
.cos-cb::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ed); border-bottom: 0; }
.cos-cb i { position: absolute; right: -6px; top: -9px; font-style: normal; font-size: 12px; }
.cos-tt { font: 600 12px var(--u-font); color: #ffd36a; text-shadow: 0 1px 0 #000; } .cos-nm { font: 600 13px var(--u-font); color: #fff; text-shadow: 0 1px 0 #000; }
.cos-wing { display: flex; align-items: center; justify-content: center; width: 100%; height: 76px; } .cos-wing.big { height: 120px; }
.cos-wing img { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; }
.cos-wing.noart::after { content: '🪽 รออาร์ตปีก'; font-size: 12px; color: var(--tx2, #a8b4c8); }
:lang(en) .cos-wing.noart::after { content: '🪽 Wing art coming soon'; } /* English page (i18n.js trDom sets <html lang="en">) */

.arow.vipoff { opacity: .55; } .arow .seg button[data-act="asellr"] { font-weight: 700; }

/* ===== ui/chr team ===== (2026-10-14, owner: "fix bugs + make the UI easy to read"; report UI-CHR-REPORT.md)
   character windows only: Status, Equipment, Skills, hub tabs, pets, achievements, job shrine */
/* readable minimums: captions under slots, stat names, bar labels and slot numbers were 9 px */
#panel #pbody .u-slot .u-cap { font-size: 10.5px !important; color: var(--tx2); }
#panel #pbody .u-bar span { font-size: 10px !important; }

#panel #pbody .sk4-slots button u { font-size: 10.5px; color: var(--tx2); }
#pbody .cs2-id .nm small{ font-size: 12px; }
#hubTabs button u { font-size: 11px; opacity: .7; }
/* status: the confirm bar sits at the end of the stat column and sticks to the bottom in every layout */

#panel.more:has(.cs2-right .pend) #moreCue { display: none; } /* the "scroll for more" chip sat on the confirm button; the sticky bar already shows there is more */
   
/* derived stats: Thai word under the code, a short key for the colours / ATK parts */

#pbody .der-key { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: -4px 0 2px; font-size: 11px; color: var(--tx3); }
#pbody .der-key .u-bonus { font-style: normal; color: var(--cr); }
/* pets: actions in one row, the pet that is out marked */
#pbody .rn-help { line-height: 1.55; } #pbody .rn-help span { color: var(--tx2); }

 

#pbody .rn-pick { font-size: 12.5px; color: #ffc4dc; }

/* achievements: locked ones were 55 % transparent = hard to read what to aim for */

  
/* job shrine: bigger card text, locked jobs readable (only the picture greys out) */

  

/* equipment: «✦ สวมของที่ดีที่สุด» was cut off ("…ที่สุ") at 1280 px and on landscape phones */
 
/* ===== ui/nav team ===== (2026-10-14: title, big map, NPC prompt, settings, help, new player guide) */
/* the guide's bouncing arrow pointed through the big map at a button underneath it */
body.wbigmap #coachArr#coachArr { display: none !important; }
/* big map: "where am I" on phones too (the title was hidden for room) */
@media (max-height: 540px) { #bigMap h2 { display: block; font-size: 12px; } }
@media (max-width: 600px) and (min-height: 541px) {
  #bigMap header { flex-wrap: wrap; row-gap: 4px; }
  #bigMap h2 { display: block; order: 3; flex: 1 0 100%; text-align: left; font-size: 12px; padding: 0 2px; }
  .wm-mons small { display: block; max-width: 100%; font-size: 9.5px; text-align: center; } /* the monsters' names, not only "Lv 3" */
}
/* 'here' tab: the places of this map, tap = walk there */
#wmInfo .wm-ph { margin: 2px 0 0; font: 600 12px var(--u-font); color: var(--au); display: flex; gap: 8px; align-items: center; }
#wmInfo .wm-ph::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(232, 194, 106, .45), transparent); }
.wm-places { display: flex; flex-direction: column; gap: 4px; }
.wm-pl { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: center; min-height: 42px; padding: 4px 8px; border-radius: 9px; text-align: left; cursor: pointer;
  font-family: var(--u-font); color: var(--tx); background: rgba(255, 255, 255, .035); border: 1px solid rgba(116, 140, 200, .22); }
.wm-pl:hover { border-color: rgba(232, 194, 106, .6); background: rgba(232, 194, 106, .08); }
.wm-pl i { font-style: normal; font-size: 17px; text-align: center; }
.wm-pl span { min-width: 0; } .wm-pl b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-pl small { display: block; font-size: 10.5px; color: var(--tx2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-pl small em { font-style: normal; font-weight: 600; } .wm-pl small em.fit { color: var(--ok, #6fe39a); } .wm-pl small em.early { color: #ff9a9a; }
.wm-pl.gate { border-color: rgba(184, 138, 255, .45); background: rgba(90, 50, 160, .14); } .wm-pl.boss { border-color: rgba(255, 106, 106, .45); }
#wmInfo .wm-hint { margin-top: 0; }
@media (max-width: 600px) and (min-height: 541px) { /* upright: one row that scrolls sideways, the map keeps its height */
  .wm-places { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .wm-pl { flex: 0 0 auto; max-width: 190px; }
  #bigMap[data-tab="here"] .wm-legend { display: none; }
}
/* world map: names stay readable when the map is zoomed out on a phone (--wz = the map's zoom) */
.wm-a .wm-node .nm { font-size: max(12px, calc(9.5px / var(--wz, 1))); }
.wm-a .wm-node small { font-size: max(10.5px, calc(8.5px / var(--wz, 1))); }
/* NPC talk prompt: speech bubble + name + what they do, the key only on PC */
#interactBtn.talk { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 16px 5px 12px; border-radius: 14px; text-align: left; white-space: nowrap;
  color: #20160a; background: linear-gradient(#f2d27c, #c39443); border: 1px solid #ffe7a8; box-shadow: 0 4px 16px rgba(0, 0, 0, .45), 0 0 14px rgba(232, 194, 106, .35); }
#interactBtn.talk i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 16px; background: rgba(10, 15, 30, .85); box-shadow: 0 0 0 1px rgba(232, 194, 106, .6); }
#interactBtn.talk b { display: block; font: 600 14px var(--u-font, Prompt, sans-serif); }
#interactBtn.talk small { display: block; font: 500 11px var(--u-font, Prompt, sans-serif); color: #4a3510; }
#interactBtn u { text-decoration: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; font: 700 12px var(--u-font, Prompt, sans-serif);
  color: var(--au3, #ffe39a); background: rgba(10, 15, 30, .85); border: 1px solid rgba(232, 194, 106, .6); }
#interactBtn:not(.talk) u { margin-right: 8px; }
/* help window: tabs + the key table */

#pbody .hkeys { padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(232, 194, 106, .22); background: rgba(255, 255, 255, .03); }
#pbody .hkeys > b { display: block; margin-bottom: 6px; color: var(--au3, #ffe39a); }
#pbody .hkeys dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin: 0; }
#pbody .hkeys dl div { display: flex; align-items: center; gap: 8px; min-height: 28px; }
#pbody .hkeys dt { flex: 0 0 auto; font-size: 11px; color: var(--tx3, #8e9ab4); } #pbody .hkeys dd { margin: 0; font-size: 12.5px; }
#pbody .hkeys kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 5px; text-align: center; font: 600 11.5px var(--u-font, Prompt, sans-serif); color: var(--au3, #ffe39a);
  background: rgba(10, 15, 30, .8); border: 1px solid rgba(232, 194, 106, .45); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
/* new player guide: a long "🔒 waits for ..." no longer squeezes the step's name into one letter a line on upright phones */
 

/* ===== ui/bag team ===== */
/* Item windows readability pass (owner 2026-10-14 "แก้บัค พร้อมปรับ ui ให้ดูง่าย"): bag, monster cards, smith, life skills, loot feed.
   Rules are scoped to those windows (#panel[data-kind=...]) so other windows keep their look. */

/* gold buttons: style.css `.ok { background: ... !important }` beat the ui-v2 gold gradient while ui-v2 still set dark text, so an
   enabled `button.ok` in these windows read as dark text on a faint wash (the option reroll and the cooking button looked disabled) */
#panel:is([data-kind="smith"], [data-kind="life"], [data-kind="bag"], [data-kind="cards"]) #pbody button.ok:not(:disabled) {
  background: linear-gradient(#e9c56f, #b38633) !important; color: #20160a !important; border-color: #ffe7a8 !important; }
#pbody button:disabled .why { opacity: 1; }

/* smith: money + stones as chips, each with its item card */

/* materials: "Name ×need ✓" or "Name ×need ขาด n" (was have/need, read like a score) */
#panel .mats { gap: 4px 6px; margin-top: 4px; }
#panel .mats .mat { padding: 1px 7px 1px 3px; border-radius: 8px; background: rgba(255, 255, 255, .045); color: #dfe6f5; font-size: 11.5px; }
#panel .mats .mat em { font-style: normal; font-weight: 700; margin-left: 4px; font-size: 10.5px; }
#panel .mats .mat.ok em { color: #6fe39a; }
#panel .mats .mat.lack { color: #ffc2bb; background: rgba(255, 90, 90, .1); box-shadow: inset 0 0 0 1px rgba(255, 110, 110, .35); }
#panel .mats .mat.lack em { color: #ff8a80; }
#panel .mats .mat[data-it] { cursor: help; }
#panel .smst { margin-top: 2px; font-size: 11.5px; color: #9fd3ff; }
 
/* refine: the three steps as coloured cards, the guard as a big switch, every row says its odds and what a miss does */

 
 
 

 
 
 

   

#panel .refres { font-size: 13px; }
#panel .optline small { float: right; font-size: 10.5px; opacity: .7; margin-top: 2px; }
.u-dlgb .no { color: #ff8f86; }
 /* landscape: the smith's flavour line took a third of the height */
 

 
@media (min-width: 1600px) and (min-height: 900px) { #panel:is([data-kind="smith"], [data-kind="life"]) .win { width: min(860px, 60vw); } }
/* bag: the ▲ "better than worn" mark sat on the padlock (both bottom-left since the padlock moved onto the icon); gear has no stack
   count, so ▲ goes bottom-right */

/* gear this character can't wear (job / line / level): faded icon, same as the craft list */

/* which list is on screen (phones show the filters as icons only) */

 

/* the detail's buttons stay in view at the bottom of its column / sheet (Equip / Use / Sell were under the fold on phones) */

/* long names wrap instead of "Shadowflame Kat…" in the narrow landscape column */

/* landscape: the icon-only filter column shows each count as a small badge */

/* the touch padlock reads a little larger (the tap area stays inside the slot) */
body:not(.pc) .u-slot .u-lkb svg { width: 12px; height: 14px; }
body:not(.pc) .u-slot .u-lkb:not(.on) { opacity: .6; }
/* landscape phones: the bag's two main buttons sit side by side (Equip / Sell were under the fold) */

/* bag padlock: its finger area (ui-v2 ::after, ~29 x 29) reached the middle of the slot, so a tap on the centre of an item locked it
   instead of picking it (and a double tap = lock + unlock, never use). Now a 22 x 22 corner box that never covers the centre of a
   46-52 px slot; the 40 px lock button stays in the detail panel */
.u-slot .u-lkb::after { inset: -2px -4px -1px -1px; }
 /* see ui.js 'isel': the second tap of a double tap reaches the cell under the new sheet */
/* monster cards: each found card shows what it gives (first stat at its level) above the name */
.cd2.has-ef .art { inset: 4px 4px 33px; }
.cd2 .ef { position: absolute; left: 0; right: 0; bottom: 20px; padding: 0 3px; font: 600 8.5px/11px var(--u-font); text-align: center; color: #a6ffc4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.cd2-grid.sm .cd2 .ef { font-size: 8px; }
.cd2.big.has-ef .art { inset: 6px 6px 42px; } .cd2.big .ef { bottom: 25px; font-size: 11px; line-height: 14px; }
.cd2-info .cd2-eff { padding: 6px 8px; border-radius: 8px; background: rgba(111, 227, 154, .07); border: 1px solid rgba(111, 227, 154, .25); }
.cd2-info .cd2-eff div { font-size: 13px; font-weight: 600; }
.cands .u-btn small { display: block; font-size: 10px; font-weight: 400; opacity: .85; }
/* upright phones: one wide card grid, the picked card slides up as a sheet (the side column left one card per row) */
body.m-port #panel[data-kind="cards"] #pbody { position: relative; }
body.m-port .cd2-body { grid-template-columns: minmax(0, 1fr) !important; }
body.m-port .cd2-side:not(.sheet) { display: none; }
body.m-port .cd2-side.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 76%; overflow-y: auto; padding: 14px 12px 12px; border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #1a2748, #0d1529); border-top: 1px solid rgba(232, 194, 106, .6); box-shadow: 0 -12px 30px rgba(0, 0, 0, .55); animation: uSheet .2s var(--u-ease); }
body.m-port .cd2-side.sheet .inv-x { display: grid; place-items: center; position: sticky; top: 0; margin: -6px -4px -34px auto; z-index: 2; width: 40px; height: 40px; border-radius: 10px; }
body.m-port .cd2-side.sheet .cd2-det { flex-direction: row; align-items: flex-start; }
body.m-port .cd2-side.sheet .cd2.big { width: 92px; }
body.m-port .cd2-side.sheet .cd2-info { flex: 1; min-width: 0; padding-right: 30px; }
body.m-port .cd2-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); } body.m-port .cd2-grid .cd2 { width: auto; }
/* landscape phones: the card list gets the height (slim progress row, smaller cards, no big copy of the picked card: it is
   framed in the grid already) */
body.m-land .cd2-prog { padding: 2px 10px; gap: 8px; } body.m-land .cd2-prog > b { font-size: 15px; }
body.m-land .cd2-grid { grid-template-columns: repeat(auto-fill, 70px); gap: 8px; } body.m-land .cd2-grid .cd2 { width: 70px; }
body.m-land .cd2-det > .cd2.big { display: none !important; } /* .cd2 is display: block !important in ui-v2.css */
/* loot feed: rare and up in its rarity colour with a coloured edge (src/ui.js addLoot) */
#loot .li[class*=" lr"] { color: var(--lc); box-shadow: inset 2px 0 0 var(--lc), 0 0 8px color-mix(in srgb, var(--lc) 35%, transparent); }
#loot .li.lr3, #loot .li.lr4 { font-weight: 700; }
/* life skills: a grey cooking button says why under its label */
#panel[data-kind="life"] .bt button .why { display: block; font-size: 9.5px; }

/* knocked out: the death box (🪶 ฟื้นที่นี่ / กลับมหาวิหาร) has the top of the screen; the guide tip sat across it on landscape phones */
body.ko #coach { visibility: hidden; }

/* ===== ui/hud team ===== (2026-10-14, owner: "แก้บัค พร้อมปรับ ui ให้ดูง่าย"; report UI-HUD-REPORT.md, shots work/shots/ui-hud/)
   One block for the always-on HUD: readable sizes, solid cards over busy ground, nothing on the portrait / minimap / hero. */

/* bug: the old title's generic .hint (margin-top 10px) also matched guide tips of kind "hint" (#coach.gd.hint): the tip sat 10 px
   lower than the lane (ui.js stackTop) counted and ran into the banner placed under it */
#hud #coach { margin: 0; }

#hud #jqMini { font-size: 12.5px; max-width: min(280px, 46vw); }

/* ---------- coach tip on landscape phones: between the portrait card and the top-right buttons (it lay over both) ---------- */
body.m-land #hud #coach.side { transform: none; animation: hudCoachSide .35s ease-out; } /* ui.js stackTop sets its left + max-width */
@keyframes hudCoachSide { from { opacity: 0; transform: translateY(-6px); } }
/* landscape: the call to action keeps its arrow and drops the second line, so the card ends above the joystick */
body.m-land #hud #jqCard .jcta small { display: none; } body.m-land #hud #jqCard .jcta em { display: inline; }
body.m-land #hud #coach.gd.mini { max-width: none; }

/* ---------- knocked out: a solid box in the top lane (ui.js LANE), a clear countdown, the feather = the gold main button ---------- */
#deathBox { transform: translateX(-50%) !important; top: 24%; width: min(340px, calc(100vw - 24px)); padding: 12px 14px 14px !important; z-index: 7 !important;
  background: linear-gradient(180deg, rgba(40, 18, 26, .96), rgba(14, 12, 28, .96)) !important; border: 1px solid rgba(255, 140, 120, .6) !important; border-radius: 14px !important;
  box-shadow: 0 0 0 1px rgba(4, 8, 18, .9), 0 10px 28px rgba(0, 0, 0, .55) !important; }
#deathBox p { font-size: 13.5px !important; line-height: 1.5; color: #f2e6e6; margin-bottom: 10px !important; }
#deathBox p b { display: block; font-size: 17px; color: #ff9a8a; letter-spacing: .5px; }
#deathBox p small { display: block; font-size: 12px; color: #d8c0c0; }
#deathBox button { min-height: 44px !important; font: 600 14px var(--u-font, Prompt), sans-serif !important; border-radius: 11px !important; color: #e8f2ff;
  background: linear-gradient(180deg, #2c4377, #182748) !important; border: 1px solid rgba(122, 168, 255, .6) !important; }
#deathBox #riseBtn { color: #1a1206 !important; background: linear-gradient(180deg, #ffe39a, #d4a548) !important; border-color: #ffe7a8 !important; }
#deathBox #riseBtn:disabled { opacity: .45; filter: grayscale(.6); }

/* ---------- small print the old passes left under 10 px ---------- */
body.pc #hud .sk .key, body.pc #hud #pills u, body.pc #hud #quick u { font-size: 10px !important; }
#hud #pills b { font-size: 10px !important; }
body:not(.pc) #hud #pills b { font-size: 10px !important; line-height: 13px !important; }
#hud #target .tgbar span, #hud #tgTxt { font-size: 10.5px !important; }
body.pc #hud #rail button u { font-size: 10px !important; }
#hud #buffs .bf i { font-size: 10px; font-weight: 700; }

/* touch: the outer wheel arc landed at 37 px (46 px x the 0.8 HUD scale of a 375 px tall phone): sized up like #skPage so it
   is >= 40 px on screen (CLAUDE.md: tap targets >= 40 px) */
body:not(.pc) #hud .sk.s3, body:not(.pc) #hud .sk.s4, body:not(.pc) #hud .sk.s5 {
  width: max(46px, calc(41px / (var(--hk) * var(--ctl)))) !important; height: max(46px, calc(41px / (var(--hk) * var(--ctl)))) !important;
  margin: calc(max(46px, calc(41px / (var(--hk) * var(--ctl)))) / -2) 0 0 calc(max(46px, calc(41px / (var(--hk) * var(--ctl)))) / -2) !important; }

/* ---------- big PC screens (1600 x 900 and up): the HUD was drawn for 1280 x 720 and read tiny at 1080p ---------- */
@media (min-width: 1600px) and (min-height: 900px) {
  body.pc #hud #me { transform: scale(1.22); transform-origin: top left; }
  body.pc #hud #buffs { transform: scale(1.22); transform-origin: top left; }
  body.pc #hud #topr { transform: scale(1.15); transform-origin: top right; }
  body.pc #hud #jqCard { transform: scale(1.15); transform-origin: top left; }
  body.pc #hud #log, body.pc #hud #logTabs button { font-size: 14px; }
  body.pc #hud #expTxt, body.pc #hud #jexpTxt { font-size: 12px; }
  body.pc #hud #coach { font-size: 14.5px; max-width: 640px; } body.pc #nq .nqi { font-size: 14px; } body.pc #hud #loot .li { font-size: 13px; }
}
/* landscape: the loot feed starts under the top-right button pill (its first line was cut under the rail in town) */
body.m-land #hud #loot { top: calc(80px + var(--st)); }
/* quest reward card on landscape phones: left column (ui.js stackTop), off the hero */
body.m-land #hud #qdone.side { left: calc(12px + var(--sl, 0px)); transform: none; width: min(320px, 40vw); padding: 5px 10px 6px; font-size: 12px; animation: none;
  pointer-events: none; } /* no tap target over the joystick; it goes by itself after 6 s */
body.m-land #hud #qdone.side .qd-i, body.m-land #hud #qdone.side .qd-n { display: none; } /* items: loot feed + chat; next: the quest card */
/* the guide arrow beside a quest card button (src/guide.js guidePoint): sl = left of a right-hand card pointing right, sr = right of
   a left-hand card pointing left */
#coachArr.sl { transform: rotate(-90deg); animation-name: hudArrL; } #coachArr.sr { transform: rotate(90deg); animation-name: hudArrR; }
@keyframes hudArrL { to { margin-left: -22px; } } @keyframes hudArrR { to { margin-left: -6px; } }

/* ===== ui/eco team ===== (2026-10-14, owner: "fix the bugs and make the UI easy to read"): market, mail, storage, guild,
   party / friends / couple, player menu, trade, private shop, item shop, tavern, herald, ranks, login calendar, premium, arena.
   Logic in src/ui.js (ECO_WIN) + src/eco-ui.js. */
/* primary buttons in these windows were drawn as a faint khaki box (style.css `.ok { background ... !important }` beat the
   gold of ui-v2.css), so «ซื้อ», «รับของ», «ลงขาย» looked disabled */
#panel:is([data-kind="market"], [data-kind="mailbox"], [data-kind="storage"], [data-kind="guild"], [data-kind="party"], [data-kind="trade"], [data-kind="vend"], [data-kind="vshop"], [data-kind="shop"], [data-kind="tavern"], [data-kind="herald"], [data-kind="rank"], [data-kind="login"], [data-kind="arena"]) #pbody button.ok:not(:disabled) {
  background: linear-gradient(#f0cd78, #b88a35) !important; color: #1d1608 !important; border-color: #ffe7a8 !important; font-weight: 700; }
#panel[data-kind] #pbody button.ok:disabled { opacity: .55; filter: saturate(.4); }
#panel[data-kind] #pbody .gold { color: #ffd86a; } #panel[data-kind] #pbody .pos { color: var(--ok); } #panel[data-kind] #pbody .neg, #pbody .bad { color: var(--bad); }
/* touch: every control of these windows is a 40 px target */
body:not(.pc) #panel:is([data-kind="market"], [data-kind="mailbox"], [data-kind="guild"], [data-kind="party"], [data-kind="trade"], [data-kind="vend"], [data-kind="vshop"], [data-kind="shop"], [data-kind="tavern"]) #pbody :is(button, input:not([type=checkbox]), select) { min-height: 40px; }
body:not(.pc) #panel #pbody .mkh { min-height: 40px !important; }
/* wallet line + "how it works" card */

  

  
/* the sticky action bar at the bottom of a window (send / open shop / trade buttons stay in reach) */

  

.trbar button { flex: 1; padding: 0 6px; }
/* confirmation dialogs: a summary table with the line that matters in gold */

.eco-it { display: inline-flex; align-items: center; gap: 6px; } .eco-it .pxi, .eco-it img { width: 28px; height: 28px; } .eco-it b { color: var(--au3); }
.eco-att { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; } .eco-att .eco-it { font-size: 12px; } .eco-att .eco-it .pxi { width: 22px; height: 22px; }
.eco-sum { display: grid; gap: 3px; margin: 6px 0 8px; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.eco-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; } .eco-sum span { color: var(--tx2); } .eco-sum b { color: var(--tx); font-variant-numeric: tabular-nums; text-align: right; }
.eco-sum .tot { margin-top: 3px; padding-top: 4px; border-top: 1px solid rgba(232, 194, 106, .3); } .eco-sum .tot b { color: #ffd86a; font-size: 15px; }
.eco-sum .neg b { color: #ff9a8a; } .eco-sum .pos b { color: var(--ok); }
.u-dlg .u-dlgb { max-height: min(60vh, 420px); overflow-y: auto; } .u-dlg .u-dlgb small { display: block; color: var(--tx3); font-size: 11px; }

/* market */

 
  
.mkmine { color: var(--au3) !important; background: rgba(232, 194, 106, .12) !important; border-color: rgba(232, 194, 106, .45) !important; }
.mksell { flex-wrap: wrap; } .mksell.locked { opacity: .6; }
.mksell .mkin { display: flex; align-items: flex-end; gap: 6px; } .mksell .mkin label { display: grid; gap: 1px; } .mksell .mkin label small { font-size: 10px; }
.mkcalc { display: block; margin-top: 3px; font-size: 11px; line-height: 1.45; color: var(--tx3); } .mkcalc.on { color: var(--tx2); } .mkcalc.on b { color: var(--tx); } .mkcalc em { color: #ffcf8a; font-style: normal; } .mkcalc.bad b { color: var(--bad); }
.mklock { display: block; margin-top: 3px; color: #ffcf8a !important; }
@media (max-width: 560px) { .mksell .mkin { width: 100%; } .mksell .mkin label:last-of-type { flex: 1; } .mksell .mkin .mkp { width: 100%; }  }
/* mail */
 

  
.mldel { color: #ffb0a8 !important; }
.mlform { display: grid; gap: 6px; margin-bottom: 6px; } .mlform label { display: grid; gap: 2px; } .mlform label small { font-size: 11px; }
.mlform input { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10, 14, 24, .6); color: #fff; }
.mlfr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .mlfr small { font-size: 11px; } .mlfr button { min-height: 32px; padding: 0 10px; border-radius: 999px; font-size: 12px; }
body:not(.pc) .mlfr button { min-height: 40px; }
 /* the window scrolls; the inner box left half a phone empty */
  

 
.vrow:has(input[data-vk^="g:"]) { grid-template-columns: 24px 32px 1fr 70px 100px; }
.vsrow .vstot { color: var(--au3); font-weight: 600; } .vsrow .vstot.bad { color: var(--bad); } .vsn { display: grid; gap: 1px; } .vsn small { font-size: 10px; } .vsrow .vn { width: 72px; }
/* storage */

/* trade */
.trsteps { margin-bottom: 8px; } .trsteps span { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; color: var(--tx3); border: 1px solid rgba(255, 255, 255, .12); }
.trsteps span.on { color: #1d1608; background: linear-gradient(#f0cd78, #b88a35); border-color: #ffe7a8; font-weight: 700; } .trsteps span.done { color: var(--ok); border-color: rgba(111, 227, 154, .5); }
.trsteps p { margin: 6px 0 0; font-size: 12px; color: var(--tx); }
.trside .trhd { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 4px; } .trside .trst { float: none; }
.trlist { display: grid; gap: 3px; min-height: 40px; }
.trln { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 2px 6px; text-align: left; border-radius: 6px; background: rgba(255, 255, 255, .05); border: 1px solid transparent; font-size: 12px; color: var(--tx); }
.trln .pxi { width: 26px; height: 26px; flex: none; } .trln span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .trln b { color: var(--au3); } .trln i { font-style: normal; color: var(--tx3); }
button.trln[data-act]:hover { border-color: rgba(255, 122, 122, .5); }
body:not(.pc) .trln { min-height: 40px; }
#trgold.bad { border-color: var(--bad) !important; }
.trsum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; } .trsum > div { display: grid; gap: 3px; align-content: start; padding: 6px; border-radius: 8px; background: rgba(0, 0, 0, .25); } .trsum > div > b { color: var(--au3); }
@media (max-width: 420px) { .trsum { grid-template-columns: 1fr; } }
/* guild */

 
.gdon { display: block; margin: -4px 0 10px; font-size: 11px; }
#pbody button.gtools { margin: 4px 0 8px; } #pbody button.gdanger, #pbody .gdanger { color: #ffb0a8 !important; border-color: rgba(255, 122, 122, .45) !important; }
#pbody .gnew .bad { display: block; margin-top: 4px; }
/* party / friends / couple */
 
#panel[data-kind="party"] .plist .pbar { width: min(160px, 60%); height: 5px; } #panel[data-kind="party"] .plist .pbar i { background: #58d26a; }
#panel[data-kind="party"] .plist em { color: #ffcf8a; font-style: normal; }
#pbody .cpdiv { margin-top: 18px; min-height: 40px; font-size: 12px; opacity: .85; }
/* player menu: never past the screen edge; two columns on short screens */
#pmenu { overflow-y: auto; }
#pmenu.two { width: 330px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; } #pmenu.two > b, #pmenu.two > small { grid-column: 1 / -1; }
/* item shop: the price on the button */
 

/* tavern / guide / herald */

 .gd .here { display: block; margin-top: 6px; color: var(--cr) !important; }
 /* the auto-daily sub line was pale blue on gold */

#panel.more:has(#pbody > .eco-bar) #moreCue { bottom: 72px; } /* the "scroll for more" cue sat on the send / open-shop button */
/* name / gold boxes and their button on one row (they were stacked: two full-width rows for one action) */
/* .ib = a row of one input + its button (ui.js marks them): an `.arow:has(> input + button)` here made every class change on any
   button of the HUD (the hotbar's cooldown classes, 20 times a second) re-match the HUD's buttons (fps-ui 2026-10-14) */
#panel:is([data-kind="guild"], [data-kind="party"], [data-kind="trade"], [data-kind="vend"]) #pbody .arow.ib { flex-direction: row; align-items: stretch; }
#panel:is([data-kind="guild"], [data-kind="party"], [data-kind="trade"], [data-kind="vend"]) #pbody .arow.ib > input { flex: 1; min-width: 0; }
#panel:is([data-kind="guild"], [data-kind="party"], [data-kind="trade"], [data-kind="vend"]) #pbody .arow.ib > button { flex: none; min-width: 110px; padding: 0 12px; }

/* ===== integrate ===== (2026-10-14, fix/integrate: rules of the six UI teams that fought after the merge; report INTEGRATE-REPORT.md) */
/* the scroll cue (.cue-b = mask that fades the last 34 px of a scroll box) also faded the sticky action bars the teams pinned to
   the bottom of those boxes: the bag sheet's Equip / Sell (ui/bag .inv-do, the bag footer showed through its text on phones),
   the send / open-shop bar (ui/eco .eco-bar in #pbody), the window's big gold button (tavern / herald / login) the status window's «ยืนยัน n แต้ม» (ui/chr .pend) and the skill footer «ใช้แต้ม». A sticky bar already says "more above";
   keep only the top fade there */
#pbody.cue-b:has(> .eco-bar, > button.big, .cs2-right > .pend), .cs2-right.cue-b:has(> .pend) { -webkit-mask-image: none; mask-image: none; }
#pbody.cue-t.cue-b:has(> .eco-bar, > button.big, .cs2-right > .pend), .cs2-right.cue-t.cue-b:has(> .pend) {
  -webkit-mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px); mask-image: linear-gradient(rgba(0,0,0,.12), #000 26px); }
/* gold primary buttons: ui/bag and ui/eco each fixed style.css `.ok { background ... !important }` for their own windows only, so
   the other windows kept dark text on a faint khaki wash (new player guide «พาไป ➜», shrine «ส่งเควสต์», PvP, equipment): one
   rule for every window; the two team rules are more specific and keep their own shade */
#panel #pbody button.ok:not(:disabled) { background: linear-gradient(#e9c56f, #b38633) !important; color: #20160a !important; border-color: #ffe7a8 !important; }
