/* ==========================================================================================================
   UI V2 design system (owner's "Premium MMORPG UI/UX V2" brief, 2026-10-10). Loaded after style.css.
   Dark navy + royal gold + crystal blue. Tokens first, then the window chrome every window shares, then the
   components of src/uikit.js (u-*), then the windows rebuilt on them (Status V2 .cs2, Equipment V2 .eq2).
   ========================================================================================================== */
/* 2026-10-14 UI Redesign V2: the tokens, the window chrome and the u-* components moved to sigil-ui.css (the one design system);
   the dead Equipment V2 (.eq2) and Skill tree V2 (.sk3) blocks were removed. */
/* ---------- Character Status V2 (.cs2) ---------- */
.cs2 { display: grid; grid-template-columns: minmax(290px, 1fr) minmax(300px, 1.15fr); gap: 12px; align-items: start; }
.cs2-left { display: flex; flex-direction: column; gap: 10px; }
.cs2-id { display: flex; flex-direction: column; gap: 6px; }
.cs2-id .nm { display: flex; align-items: baseline; gap: 8px; } .cs2-id .nm b { font-size: 17px; color: var(--au3); } .cs2-id .nm small { color: var(--tx3); }
.cs2-id .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cs2-id .bars { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.doll { position: relative; display: grid; grid-template-columns: 52px 1fr 52px; gap: 18px 10px; align-items: center; padding: 6px 4px 18px; }
.doll .col { display: flex; flex-direction: column; gap: 19px; }
.doll .stage { position: relative; height: 230px; display: grid; place-items: end center; border-radius: 10px; cursor: pointer;
  background: radial-gradient(ellipse at 50% 88%, rgba(116, 208, 255, .28), rgba(116, 208, 255, 0) 55%), radial-gradient(circle at 50% 40%, rgba(232, 194, 106, .1), transparent 60%); }
.doll .stage::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 18px; height: 14px; border-radius: 50%; border: 1px solid rgba(116, 208, 255, .45); box-shadow: 0 0 14px rgba(116, 208, 255, .35); }
.doll canvas.hero2 { width: 176px; height: 176px; margin-bottom: 14px; position: relative; z-index: 1; image-rendering: auto; }
.doll .turn { position: absolute; right: 6px; top: 6px; font-size: 10px; color: var(--tx3); }
.doll .bot { grid-column: 1 / -1; display: flex; justify-content: center; gap: 18px; }
.cs2 .radarbox { display: grid; place-items: center; }
.cs2-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

 /* «✦ แนะนำตามอาชีพ» broke mid-phrase on upright phones; the hint text wraps instead */
 
.attr2 { display: flex; flex-direction: column; gap: 5px; }

 
 

 

.flash-up { animation: uUp .5s var(--u-ease); }
@keyframes uUp { 0% { background: rgba(111, 227, 154, .35); } }

/* ---------- Equipment V2 (.eq2) ---------- */

.cands { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.cand { display: grid; grid-template-columns: 46px 1fr auto; gap: 8px; align-items: center; padding: 6px; border-radius: 8px; background: rgba(255, 255, 255, .035); border: 1px solid transparent; }
.cand.sel { border-color: rgba(232, 194, 106, .7); background: rgba(232, 194, 106, .08); }
.cand .nm { font-size: 13px; font-weight: 600; } .cand .df { font-size: 11px; line-height: 1.5; }
.cand .lk { font-size: 11px; color: var(--bad); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .cs2 { grid-template-columns: 1fr; }
  .doll .stage { height: 190px; } .doll canvas.hero2 { width: 150px; height: 150px; }
}
@media (max-height: 500px) { /* landscape phones: two columns side by side, smaller doll */
  .cs2 { grid-template-columns: minmax(250px, .9fr) minmax(280px, 1.1fr); gap: 8px; }
  .doll { gap: 14px 6px; padding: 2px 2px 14px; grid-template-columns: 46px 1fr 46px; } .doll .col { gap: 15px; }
  .doll .u-slot { width: 46px; height: 46px; } .doll .stage { height: 150px; } .doll canvas.hero2 { width: 132px; height: 132px; margin-bottom: 6px; }
  .cs2-id .bars { display: none; } .cs2 .radarbox { display: none; }
   
}
@media (prefers-reduced-motion: reduce) {
  #panel .win, .u-dlg, .u-modal, .u-toast, #tip, .flash-up, .u-slot.u-r4 { animation: none !important; }
  .u-slot, .u-bar i, #pbody button { transition: none !important; }
}
/* short screens: each column scrolls by itself; the compare card's buttons stay pinned in view */
@media (max-height: 500px) {
  #panel[data-kind="stats"] #pbody, #panel[data-kind="equip"] #pbody { overflow: hidden; display: flex; }
  .cs2 { flex: 1; min-height: 0; height: 100%; }
  .cs2 > div { min-height: 0; max-height: 100%; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }

}

/* ---------- Inventory V2 (.inv2) ---------- */

#panel[data-kind="bag"] #pbody { display: flex; overflow: hidden; }

.inv-top { display: flex; gap: 6px; align-items: center; }
.inv-top input { flex: 1; min-width: 0; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(116, 140, 200, .35); background: #0b1328; color: var(--tx); font: 13px var(--u-font); }
.inv-top input:focus { outline: none; border-color: var(--au); box-shadow: 0 0 0 2px rgba(232, 194, 106, .2); }
.u-seg { display: flex; } .u-seg button { min-height: 36px !important; border-radius: 0 !important; font-size: 12px; padding: 0 10px !important; }
.u-seg button:first-child { border-radius: 8px 0 0 8px !important; } .u-seg button:last-child { border-radius: 0 8px 8px 0 !important; }

.u-slot.u-fav::after { content: '★'; position: absolute; left: 3px; top: 0; font-size: 11px; color: #ffd860; text-shadow: 0 1px 2px #000; }
.u-slot.u-locked::before { content: '🔒'; position: absolute; left: 2px; bottom: 1px; font-size: 9px; z-index: 1; }
/* bag: lock toggle on the icon (src/ui.js invCell): faint outline = tap to lock, gold padlock = locked */
.u-slot .u-lkb { position: absolute; left: 1px; bottom: 1px; width: 17px; height: 19px; display: grid; place-items: center; z-index: 2; cursor: pointer; border-radius: 4px; }
.u-slot .u-lkb::after { content: ''; position: absolute; inset: -1px -2px -3px -3px; } /* a little bigger finger target, kept in the slot's lower-left quarter: the old -6/-8 px reached the middle of a 46 px phone slot, so tapping an item locked it instead of picking it */
.u-slot .u-lkb svg { width: 11px; height: 13px; overflow: visible; }
.u-slot .u-lkb .sh { fill: none; stroke: rgba(220, 228, 255, .55); stroke-width: 1.6; }
.u-slot .u-lkb .bd { fill: rgba(10, 16, 32, .55); stroke: rgba(220, 228, 255, .55); stroke-width: 1; }
.u-slot .u-lkb .kh { fill: rgba(220, 228, 255, .55); }
.u-slot .u-lkb:not(.on) { opacity: .45; } .u-slot:hover .u-lkb:not(.on), .u-slot.u-sel .u-lkb:not(.on) { opacity: .9; }
.u-slot .u-lkb.on .sh { stroke: #ffd860; } .u-slot .u-lkb.on .bd { fill: #e8b84a; stroke: #7a4e10; }
.u-slot .u-lkb.on .kh { fill: #6a3e08; }
.u-slot .u-lkb.on { filter: drop-shadow(0 0 3px rgba(255, 210, 90, .8)) drop-shadow(0 1px 1px #000); }

.inv-empty { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 10px; border: 1px dashed rgba(116, 140, 200, .3); color: var(--tx2); }
.inv-empty b { color: var(--au3); } .inv-empty small { line-height: 1.6; }
.idesc { margin: 8px 0 0; font-size: 12px; color: var(--tx2); line-height: 1.5; }
.inv-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .inv-acts .u-btn { font-size: 12px; padding: 0 8px; }
.inv-acts .u-btn.gold, .inv-acts .u-btn.danger { grid-column: 1 / -1; }

@media (max-height: 500px) { /* landscape phones: filter icons only, a slimmer detail column */

}
@media (max-width: 600px) and (min-height: 501px) { /* portrait phones: filters on top, detail under the grid */

  /* every category in view (S3, 2026-10-13: at 360 px the strip scrolled sideways with the last chips cut in half and no cue) */

}
@media (max-height: 500px) { #uToasts { top: auto; bottom: calc(8px + var(--sb, 0px)); right: 50%; transform: translateX(50%); align-items: center; } }

/* ---------- Monster cards V2 (.cd2) ---------- */
#panel[data-kind="cards"] #pbody { display: flex; overflow: hidden; }
.cd2-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; } .cd2-wrap > .u-tabs { margin: 0; }
.cd2-prog { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 8px 12px; }
.cd2-prog > b { font-size: 22px; color: var(--au3); } .cd2-prog > b small { font-size: 12px; color: var(--tx3); } .cd2-prog small { display: block; margin-top: 4px; font-size: 11px; color: var(--tx3); }
.cd2-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; }
.cd2-list { overflow-y: auto; min-height: 0; padding: 2px 4px 8px 2px; scrollbar-width: thin; } .cd2-side { overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.cd2-grid { display: grid; grid-template-columns: repeat(auto-fill, 86px); gap: 10px; } .cd2-grid.sm { grid-template-columns: repeat(auto-fill, 72px); gap: 8px; }
/* the card: portrait, a rarity frame, monster art on a tinted field, name ribbon, level stars */
.cd2 { --c1: #8e98ae; --c2: #4d566b; --cg: rgba(200, 210, 230, .15);
  position: relative; width: 86px; aspect-ratio: 3 / 4; padding: 0 !important; min-height: 0 !important; border-radius: 8px !important; overflow: hidden; display: block !important; cursor: pointer;
  background: linear-gradient(160deg, var(--c1), var(--c2)) !important; border: 0 !important; box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 3px 8px rgba(0, 0, 0, .45), 0 0 10px var(--cg) !important; transition: transform .12s; }
.cd2-grid.sm .cd2 { width: 72px; }
.cd2:hover { transform: translateY(-2px); }
.cd2 .art { position: absolute; inset: 4px 4px 22px; border-radius: 5px; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .22), rgba(10, 16, 32, .9) 75%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
.cd2 .art img { width: 82%; height: 82%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); }
.cd2 .rk { position: absolute; left: 4px; top: 3px; z-index: 1; font: 700 10px var(--u-font); color: #fff; text-shadow: 0 1px 2px #000; }
.cd2 .nm { position: absolute; left: 0; right: 0; bottom: 8px; padding: 0 3px; font-size: 9px; line-height: 12px; text-align: center; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.cd2 .st { position: absolute; left: 0; right: 0; bottom: 0; font-size: 7px; line-height: 8px; text-align: center; color: #ffe08a; letter-spacing: -.5px; }
.cd2 u { position: absolute; right: 4px; top: 3px; text-decoration: none; font: 600 10px var(--u-font); color: #fff; text-shadow: 0 1px 2px #000; }
.cd2.cr-B { --c1: #5ab8ff; --c2: #1f4d8a; --cg: rgba(90, 184, 255, .3); }
.cd2.cr-A { --c1: #d58cff; --c2: #5a2490; --cg: rgba(208, 96, 255, .38); }
.cd2.cr-S { --c1: #ffe39a; --c2: #b4641c; --cg: rgba(255, 170, 60, .5); }
.cd2.cr-S::after, .cd2.cr-A::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 48%, transparent 60%); background-size: 260% 100%; animation: uShine 3.2s ease-in-out infinite; }
@keyframes uShine { 0% { background-position: 130% 0; } 60%, 100% { background-position: -40% 0; } }
.cd2.unk { --c1: #3a4258; --c2: #1d2333; --cg: transparent; } .cd2.unk .art img { filter: brightness(0) opacity(.55); } .cd2.unk .rk { opacity: .5; }
.cd2.sel { box-shadow: 0 0 0 2px var(--au3), 0 0 16px rgba(232, 194, 106, .5) !important; }
.cd2.big { width: 132px; flex: none; } .cd2.big .nm { font-size: 11px; bottom: 10px; } .cd2.big .st { font-size: 10px; line-height: 11px; } .cd2.big .art { inset: 6px 6px 28px; }
.cd2-det { display: flex; flex-direction: column; align-items: center; gap: 10px; } .cd2-info { width: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.cd2-info .ttl { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .cd2-info .ttl b { font-size: 15px; }
.cd2-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 11px; color: var(--tx3); } .cd2-rows span { display: flex; flex-direction: column; } .cd2-rows b { color: var(--tx); font-size: 12px; }
.cd2-src { font-size: 11px; color: var(--tx2); } .cd2-src b { color: var(--cr); font-weight: 500; }
.cd2-eff { font-size: 12px; } .cd2-eff > small { color: var(--tx3); font-size: 10px; } .cd2-eff div { color: var(--ok); }
.cd2-set { font-size: 11px; color: var(--au3); padding: 4px 8px; border-radius: 6px; background: rgba(232, 194, 106, .08); }
.cd2-map { margin-bottom: 12px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(116, 140, 200, .18); }
.cd2-map.done { border-color: rgba(232, 194, 106, .55); background: rgba(232, 194, 106, .05); }
.cd2-map header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 12px; } .cd2-map header b { color: var(--tx); } .cd2-map header span { color: var(--au); font-weight: 600; }
.cd2-map header em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--tx3); } .cd2-map.done header em { color: var(--ok); }
/* rare card reveal */
.cd2-reveal { position: fixed; left: 50%; top: 38%; z-index: 58; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; animation: cdIn .45s var(--u-ease); transition: opacity .35s, transform .35s; }
.cd2-reveal.out { opacity: 0; transform: translate(-50%, -60%); }
.cd2-reveal b { font: 600 14px var(--u-font); color: var(--au3); text-shadow: 0 2px 6px #000; }
.cd2-reveal .burst { position: absolute; top: 50%; left: 50%; width: 260px; height: 260px; margin: -150px 0 0 -130px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 120, .55), rgba(255, 170, 60, 0) 65%); animation: cdBurst 1.2s ease-out; }
.cd2-reveal .burst.cr-A { background: radial-gradient(circle, rgba(208, 120, 255, .5), rgba(160, 60, 255, 0) 65%); }
@keyframes cdIn { from { opacity: 0; transform: translate(-50%, -50%) rotateY(90deg) scale(.7); } }
@keyframes cdBurst { from { transform: scale(.3); opacity: 0; } 30% { opacity: 1; } }
@media (max-height: 500px), (max-width: 760px) { .cd2-body { grid-template-columns: minmax(0, 1fr) 230px; } .cd2-prog { padding: 4px 10px; } .cd2-prog small { display: none; } .cd2.big { width: 96px; } }
@media (prefers-reduced-motion: reduce) { .cd2-reveal, .cd2-reveal .burst, .cd2::after { animation: none !important; } }
.cd2 .rk { background: none !important; border: 0 !important; padding: 0 !important; width: auto !important; height: auto !important; box-shadow: none !important; }
.cd2-reveal .burst { opacity: 1; filter: saturate(1.4); width: 340px; height: 340px; margin: -190px 0 0 -170px; }
.cd2-reveal .cd2 { box-shadow: 0 0 0 2px #fff0c2, 0 0 40px rgba(255, 190, 80, .8) !important; }

/* ---------- Main menu + HUD V2 ---------- */
/* HUD frames share the window look: navy glass with a gold hairline */

/* the menu: grouped list (touch) */
#menu { padding: 8px !important; gap: 6px !important; background: linear-gradient(180deg, rgba(22, 34, 63, .97), rgba(11, 18, 36, .97)) !important; border: 1px solid rgba(232, 194, 106, .55) !important; }
#menu .mgrp h4 { display: flex; align-items: center; gap: 6px; margin: 2px 2px 4px; font: 600 11px var(--u-font); color: var(--au); letter-spacing: .5px; }
#menu .mgrp h4 i { font-style: normal; }
#menu .mgrp:has(.dot) h4::after { content: '●'; color: #ff6b6b; font-size: 8px; }
#menu .mgrp > div { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
#menu .mgrp button { min-height: 40px; font-size: 12px; border-radius: 8px; background: rgba(255, 255, 255, .035); }
#menu .mgrp button:hover { background: rgba(232, 194, 106, .12); }
body:not(.pc) #menu { width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 70px); overflow-y: auto; }

/* hide part of the HUD (F2 / menu → ระบบ): chat log + feed, loot list, quest/party cards, buffs, the zoom bar */
body.hudlite #log, body.hudlite #logTabs, body.hudlite #loot, body.hudlite #jqCard, body.hudlite #partyFrame, body.hudlite #buffs, body.hudlite #zoomBar, body.hudlite #onlineN, body.hudlite #petFrame { display: none !important; }
/* touch control size (menu → ระบบ → ขนาดปุ่ม): scales the wheel, quick buttons, pills and joystick from their corners */
:root { --ctl: 1; }
body:not(.pc) #wheel { transform: scale(var(--ctl)); transform-origin: right bottom; }
body:not(.pc) #quick { transform: scale(var(--ctl)); transform-origin: right bottom; }
body:not(.pc) #pills { transform: scale(var(--ctl)); transform-origin: right bottom; }
body:not(.pc) #joy { transform: scale(var(--ctl)); transform-origin: left bottom; }
/* action bar, quick buttons, pills and the touch wheel in the V2 look; an empty slot stays quiet so the fight stays visible */
#menu { z-index: 8; } body:not(.pc) #menu:not([hidden]) ~ #wheel, body:not(.pc) #menu:not([hidden]) ~ #quick, body:not(.pc) #menu:not([hidden]) ~ #pills { opacity: .25; pointer-events: none; }

/* ---------- responsive (phase 8) ---------- */
#pclose { width: var(--u-tap); height: var(--u-tap); }  /* 40 px close everywhere */
@media (min-width: 1600px) and (min-height: 900px) { /* big desktops: windows grow with the screen */
  #panel[data-kind="bag"] .win, #panel[data-kind="skills"] .win, #panel[data-kind="equip"] .win, #panel[data-kind="cards"] .win, #panel[data-kind="stats"] .win { width: min(1080px, 70vw); height: min(760px, 78vh); max-height: none; }
}
body.pc #panel .win { resize: both; overflow: hidden; min-width: 640px; min-height: 420px; max-width: 96vw; max-height: 94vh; } /* drag the corner to resize */
@media (max-width: 600px) and (min-height: 600px) { /* portrait phones: a bottom sheet over the lower screen, HUD portrait stays visible */
  #panel { place-items: end center; }
  #panel .win, #panel[data-kind] .win { width: 100vw !important; height: calc(100vh - 92px - var(--st, 0px)) !important; max-height: none; border-radius: 16px 16px 0 0; border-bottom: 0; }
  #panel .win::after { display: none; }
  #panel:not([hidden]) .win { animation: uSheet .2s var(--u-ease); }
}
@keyframes uSheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #panel:not([hidden]) .win { animation: none !important; } }
#panel .win { max-height: 94vh; }

/* ---------- polish (phase 9) ---------- */
#pbody.u-tabin > * { animation: uTabIn .18s var(--u-ease); }
@keyframes uTabIn { from { opacity: 0; transform: translateY(4px); } }

@keyframes uPulse { 0% { box-shadow: 0 0 0 0 rgba(111, 227, 154, .9); transform: scale(1.06); } 100% { box-shadow: 0 0 0 14px rgba(111, 227, 154, 0); transform: none; } }
#pbody .u-btn:focus-visible, #pbody button:focus-visible, .u-slot:focus-visible { outline: 2px solid var(--cr); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #pbody.u-tabin > * { animation: none !important; } }
/* UI icon images (assets/icons/ui, Codex 2026-10-12) in place of the emoji glyphs */
.uic { width: 22px; height: 22px; object-fit: contain; display: block; pointer-events: none; }
#panel .wic .uic { width: 24px; height: 24px; }
.u-slot .u-glyph .uic { width: 70%; height: 70%; margin: auto; opacity: .55; }
.u-slot .u-glyph:has(.uic) { opacity: 1; filter: none; display: grid; place-items: center; width: 100%; height: 100%; }

#emoBtn .uic { width: 20px; height: 20px; margin: auto; }
.nw { white-space: nowrap; } /* a loanword / item name + count never split across lines (S1, Thai text check 2026-10-13) */
/* text boxes in windows that have no look of their own (guild notice / invite / donate, mail, trade gold) were the browser's
   white boxes on the dark window (online town check 2026-10-13); :where keeps this under every styled input */
:where(#pbody) :where(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  min-height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2, rgba(140, 160, 210, .35)); background: rgba(10, 14, 24, .6); color: #fff; font: inherit; }
:where(#pbody) :where(input, textarea)::placeholder { color: rgba(220, 228, 245, .5); }
/* menu > ระบบ: volume sliders (round 3) */
#menu .vols { margin: 8px 2px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 16px; margin-top: 8px; }
#menu .vols label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 10px; background: rgba(10, 14, 24, .45); border: 1px solid rgba(140, 160, 210, .25); }
#menu .vols span { width: 64px; flex-shrink: 0; font-size: 13px; }
#menu .vols input { flex: 1; min-width: 0; height: 32px; accent-color: #f4c96b; }
#menu .vols b { width: 42px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
/* touch: window buttons keep the 40 px tap height (style.css '#pbody button { min-height: 34px }' outranked .u-btn: confirm stat
   points, + อัป, ยืนยัน, สวมใส่ were 34 px; round 3 hand play) */
body:not(.pc) #pbody .u-btn { min-height: var(--u-tap); }
/* upright phones: toasts sat at top 150 px, right on the open window's tab strip ("อัปสเตตัสแล้ว" hid the bag tab); above the
   bottom edge instead, centred (round 3 hand play) */
body.m-port #uToasts { top: auto; bottom: calc(96px + var(--sb, 0px)); right: 50%; transform: translateX(50%); align-items: center; }
/* ---------- one notification queue (round 4 #1): #nq sits in the top lane (ui.js stackTop places it) ---------- */
#nq { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 24; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
#nq.held { opacity: 0; }
#nq .nqi { display: flex; align-items: center; gap: 6px; max-width: 100%; min-height: 30px; padding: 4px 10px 4px 8px; border-radius: 10px; font-size: 13px; line-height: 1.25;
  color: var(--tx, #e8eefc); background: rgba(10, 16, 32, .9); border: 1px solid rgba(140, 170, 230, .35); border-left: 3px solid #7aa8ff; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); animation: nqIn .18s ease-out; pointer-events: auto; }
#nq .nqi span { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#nq .nqi i { flex-shrink: 0; font-style: normal; display: flex; } #nq .nqi i .pxi, #nq .nqi i img { width: 22px; height: 22px; }
#nq .nqi em { flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 5px; color: #2a1a00; background: linear-gradient(#ffe7a0, #e9b44a); }
#nq .nqi .x { flex-shrink: 0; color: #ffd86a; font-size: 12px; } #nq .nqi .x:empty { display: none; }
#nq .nq-ok { border-left-color: #6fe39a; } #nq .nq-bad { border-left-color: #ff7a7a; } #nq .nq-rare, #nq .nq-ann { border-left-color: #f4c96b; background: rgba(36, 26, 8, .92); }
#nq .nq-ph { border-left-color: #ff9a4a; font-weight: 700; }
#nq .nqi.out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes nqIn { from { opacity: 0; transform: translateY(6px); } }
body:not(.pc) #nq { width: calc(100vw - 24px); } body:not(.pc) #nq .nqi { font-size: 12.5px; } body:not(.pc) #nq .nqi span { -webkit-line-clamp: 1; } /* touch: one line, the full text is in the chat log */
.nqdot { position: relative; }
.nqdot::after { content: ''; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 2px rgba(10, 16, 32, .9); }
/* ---------- item / monster names that open their card (round 4 #2) ---------- */
#log a.lk, #nq a.lk { color: #ffe39a; text-decoration: underline dotted; text-underline-offset: 2px; cursor: pointer; pointer-events: auto; }
#log { pointer-events: auto; }
#lkCard { position: fixed; z-index: 70; width: min(320px, calc(100vw - 24px)); padding: 8px; border-radius: 12px; background: rgba(10, 16, 32, .97); border: 1px solid rgba(232, 194, 106, .55); box-shadow: 0 10px 28px rgba(0, 0, 0, .55); }
#lkCard .tipcard { width: auto; }
#lkCard .lkx { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
#lkCard .u-btn { margin-top: 6px; width: 100%; }
body:not(.pc) #lkCard .lkx { width: 40px; height: 40px; }
#lkCard .tiph { padding-right: 40px; } body:not(.pc) #lkCard .tiph { padding-right: 46px; }
/* ---------- Sigil Codex (round 4 #3) ---------- */
.cx-from { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(140, 160, 210, .25); font-size: 12px; display: grid; gap: 3px; }
.cx-from > b { font-size: 11px; color: var(--au3, #f4c96b); }
.dr { font-style: normal; font-size: 10.5px; padding: 0 5px; border-radius: 5px; margin-left: 4px; white-space: nowrap; }
.dr.d0 { color: #bfe9c8; background: rgba(111, 227, 154, .14); } .dr.d1 { color: #cfe0ff; background: rgba(116, 168, 255, .16); }
.dr.d2 { color: #f6dc8a; background: rgba(244, 201, 107, .18); } .dr.d3 { color: #ffb4ff; background: rgba(214, 120, 255, .2); }
a.lk.unk { color: var(--tx3, #9aa6c0); }
.cx-q input { flex: 1; }
.cx-mon, .cx-item { margin-bottom: 8px; }
.cx-head { display: flex; align-items: center; gap: 10px; } .cx-head img, .cx-head .pxi { width: 48px; height: 48px; image-rendering: pixelated; }
.cx-head > div { flex: 1; display: grid; } .cx-head small { color: var(--tx2, #c3cbe0); font-size: 11.5px; }
.cx-head button { width: 40px; height: 40px; flex-shrink: 0; }
.cx-row { display: grid; grid-template-columns: 64px 1fr; gap: 6px; margin-top: 8px; font-size: 12.5px; } .cx-row > b { color: var(--au3, #f4c96b); font-size: 12px; }
.cx-drops { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-drop { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(140, 160, 210, .25); color: inherit; text-decoration: none; min-height: 32px; }
.cx-drop .pxi, .cx-drop img { width: 22px; height: 22px; }
 
/* ---------- market (round 4 #4) ---------- */

  

.mkadv { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 6px 0; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(140, 160, 210, .2); }
.mkadv label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; } .mkadv label select, .mkadv label input[type=number] { flex: 1 1 80px; min-width: 0; min-height: 38px; }
.mkadv label.ck input { width: 20px; height: 20px; min-height: 0; }
.mkadvb { display: flex; gap: 6px; justify-content: flex-end; grid-column: 1 / -1; } .mkadvb button { min-height: 40px; padding: 0 14px; }
 
 .mklog .gold { color: #ffd86a; }
.mkhist { color: var(--tx2, #c3cbe0); } .mkhist b { color: #ffd86a; }
.mkh { min-height: 32px !important; padding: 0 8px !important; font-size: 12px; margin-top: 2px; }
.mksell .mkn { width: 64px; } .mksell .mkp { width: 96px; }
@media (max-width: 420px) { .mksell { flex-wrap: wrap; } .mksell > div { flex-basis: calc(100% - 60px); } .mksell .mkn { flex: 0 0 64px; } .mksell .mkp { flex: 1; } }
 
.mkwatch input { width: 96px; min-height: 40px; }
#lkCard .lkrow { display: flex; gap: 6px; } #lkCard .lkrow .u-btn { flex: 1; }
/* ---------- tips that point at the real button (round 4 #5) ---------- */
#coachArr { position: fixed; z-index: 95; width: 28px; margin-left: -14px; text-align: center; font-size: 22px; line-height: 26px; color: #ffd36a; text-shadow: 0 0 8px rgba(255, 211, 106, .9), 0 2px 3px rgba(0, 0, 0, .8); pointer-events: none; animation: coachArr .8s ease-in-out infinite alternate; }
#coachArr.up { transform: rotate(180deg); animation-name: coachArrUp; }
@keyframes coachArr { to { margin-top: -8px; } } @keyframes coachArrUp { to { margin-top: 8px; } }
#menu .coach-hi, #pbody .coach-hi, #uConfirm .coach-hi { position: relative; z-index: 2; box-shadow: 0 0 0 2px #ffd36a, 0 0 16px 4px rgba(255, 211, 106, .55) !important; }
@media (prefers-reduced-motion: reduce) { #coachArr { animation: none; } }
/* quest card: ▶ ออโต้เควสต์ + เดินไป ➜ side by side (round 4 #5b) */
/* ---------- settings window (round 4 #5c) ---------- */
 

  
 
  

/* party pins / go-to strips (round 4 #6b) */
#nq .nqgo { flex-shrink: 0; min-height: 30px; padding: 0 10px; border-radius: 8px; font-weight: 700; color: #20160a; background: linear-gradient(#e9c56f, #b38633); border: 1px solid #ffe7a8; pointer-events: auto; }
body:not(.pc) #nq .nqgo { min-height: 36px; }
body.pinging #game { cursor: crosshair; } body.pinging #hud::after { content: '📍 แตะจุดที่จะปักหมุด'; position: fixed; left: 50%; bottom: 40%; transform: translateX(-50%); padding: 6px 12px; border-radius: 10px; background: rgba(10, 16, 32, .85); color: #ffd86a; font-weight: 700; pointer-events: none; z-index: 30; }
:lang(en) body.pinging #hud::after { content: '📍 Tap where to drop a pin'; } /* English page (i18n.js trDom sets <html lang="en">) */
/* guild weekly hunt (round 4 #6c) */
.gwme { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .gwme em { font-style: normal; color: #ffb46a; } .gwme em.on { color: #9affb0; }
.gwstep { display: grid; gap: 6px; margin-bottom: 8px; } .gwstep.done { border-color: rgba(111, 227, 154, .5); }
.gwh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; } .gwh small { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; } .gwh .pxi { width: 18px; height: 18px; }
.gwstep > button { min-height: 40px; justify-self: end; padding: 0 16px; }

/* round 5 #1: help window keywords (DODGE!, the safe middle) */
 
.guide .boss small { color: #ffb46a; font-weight: 400; margin-left: 4px; }
/* round 5 #1: upright phones: a coach tip may use the screen's width (at 62vw a two-sentence tip was 5 lines / 136 px, ran past the
   lane's floor and was held back for good) */
body.m-port #coach { width: max-content; max-width: calc(100vw - 24px); }
/* round 5 #2: boss bar: fighters / added HP chip, the move being wound up */
#tgCrowd { flex-shrink: 0; padding: 0 7px; border-radius: 999px; font: 700 11px/18px var(--u-font, Prompt), sans-serif; font-style: normal; color: #ffd9a0; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 170, 90, .55); white-space: nowrap; }
#tgMove { margin-top: 4px; padding: 2px 8px; border-radius: 8px; text-align: center; font: 800 13px/20px var(--u-font, Prompt), sans-serif; color: #fff; background: linear-gradient(90deg, rgba(190, 40, 30, .9), rgba(230, 110, 30, .9)); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); animation: tgMovePulse .5s ease-in-out infinite alternate; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes tgMovePulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { #tgMove { animation: none; } }
/* landscape phones: the one-row bar keeps its height; the chip sits after the name, the move hangs under the bar */
body.m-land #target.boss #tgCrowd { order: 2; font-size: 10px; line-height: 16px; padding: 0 5px; }
body.m-land #target.boss #tgMove { position: absolute; left: 0; right: 0; top: calc(100% + 3px); margin: 0; font-size: 12px; line-height: 18px; }
body.m-port #target .tgh #tgCrowd { margin-left: auto; }
/* round 5 #4b: the new system icons (Gemini, assets/icons/ui) inline in tabs / buttons / strips */
.uic.uin { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.uic.uin.solo { margin-right: 0; width: 20px; height: 20px; }
#logTabs .uic.uin { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; }
/* round 6 #4b: the zone banner ("ป่า Duskwood · ลานบอส") showed faintly under the boss / target bar on upright phones */
body.m-port.tgshow #zoneBanner { visibility: hidden; }
/* round 6 #4: touch screens, every button / field in a window at least 40 px (the sweep found window tabs, settings segments,
   shop ×1/×10, stat + and the bag filters at 32-38 px); item slots keep their grid size */
body:not(.pc) #panel :is(button, select, input:not([type=checkbox]):not([type=range]):not([type=hidden])):not(.u-slot):not(.u-slot *) { min-height: 40px !important; min-width: 40px; }
 /* the stat name opens its help */

/* ---------- Equipment V3 (.eq3, owner 2026-10-14: "too cramped, show everything incl. what I can swap in") ----------
   worn slots | bag pieces for the chosen slot | compare + Equip. Every part scrolls by itself, so nothing hides below the fold. */
#panel[data-kind="equip"] #pbody { overflow: hidden; display: flex; }

 /* «✦ สวมของที่ดีที่สุด» lost its last letters at 1280 x 720 and on landscape phones */
/* worn slots: icon + slot name + piece name in its rarity colour; ▲n = n better pieces wait in the bag */

 /* hud-v3 #pbody .u-empty (the empty-state card) also hit empty slots: 18 px margins pushed rows and the doll apart */

/* bag pieces for the slot: name, tier, best mark, lock reason and the change vs the worn piece, all on the row */

/* compare: worn over new, ten derived stats now -> if worn, buttons under them */

/* landscape phones: three narrow columns; worn slots two to a row, slot heading dropped (the tab already names the window) */

/* upright phones and narrow windows: slot grid on top, the bag list fills the middle, compare + buttons as a bar at the bottom */

