/* Sigil Online HUD: quiet ink-glass panels with a thin gold hairline; the game picture stays the star. */
/* Thai letters of the names drawn on the canvas: Prompt is loopless, so at 12 px "ธธธธธธ" read as "ssssss" (owner 2026-10-13).
   Noto Sans Thai Looped (OFL, Thai subset only, self-hosted so phones without Google Fonts get it too); Latin stays Prompt. */
@font-face { font-family: 'Sigil Thai'; src: url(assets/fonts/noto-sans-thai-looped-thai.woff2) format('woff2'); font-weight: 100 900;
  font-display: swap; unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
:root {
  --ink: rgba(14, 15, 24, .72); --ink2: rgba(14, 15, 24, .9); --line: rgba(255, 226, 160, .22); --line2: rgba(255, 226, 160, .5);
  --gold: #f4c96b; --txt: #eef0f6; --dim: #9ea3b8; --hp: #ff6b6b; --mp: #5ab0ff; --exp: #8fe3ff; --job: #f4c96b; --ok: #6fe0a0;
  --r: 14px;
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0c12; color: var(--txt);
  font: 13px/1.4 Prompt, "Leelawadee UI", Tahoma, sans-serif; touch-action: none; user-select: none; -webkit-user-select: none; }
#game { position: fixed; left: 0; top: 0; image-rendering: pixelated; image-rendering: crisp-edges; }
/* names and bubbles at full screen resolution over the pixel canvas (sharp text, owner's reference 2026-10-09) */
#txt { position: fixed; left: 0; top: 0; pointer-events: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
#hud { position: fixed; inset: 0; pointer-events: none; display: none; }
body.playing #hud { display: block; }
#hud > * { pointer-events: auto; }
#me, #target, #topr, #menu, #petFrame, #tame, .win, .tbox, #interactBtn, .bm-box {
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--r);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}

/* ---------- me (top left) ---------- */
#me { position: absolute; left: calc(10px + var(--sl)); top: calc(10px + var(--st)); display: flex; gap: 10px; align-items: center; padding: 6px 12px 6px 6px; }
#portrait { position: relative; width: 58px; height: 58px; flex: none; display: grid; place-items: center; }
#tenRing { position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); }
#portraitCv { position: relative; width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(#3a3f66, #191b2c); image-rendering: pixelated; }
#portrait::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid var(--line2); pointer-events: none; }
#portrait.charging { animation: shake .08s linear infinite; }
@keyframes shake { 50% { transform: translateX(1px); } }
#tenTxt { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font: 600 10px Prompt, sans-serif; color: #ffd0f4; text-shadow: 0 1px 2px #000; }
.meinfo { width: 168px; }
.r1 { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.r1 b { font-weight: 600; font-size: 14px; }
.r1 span { color: var(--dim); font-size: 11px; }
.r2 { display: flex; gap: 4px; margin: 1px 0 4px; }
.r2 em { font-style: normal; font-size: 10px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--gold); }
.bar { position: relative; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .45); overflow: hidden; margin-top: 3px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; transition: width .15s; }
.bar.hp i { background: linear-gradient(90deg, #ff8a7a, var(--hp)); }
.bar.mp i { background: linear-gradient(90deg, #7ac8ff, var(--mp)); }
.bar span { position: absolute; right: 4px; top: -1px; font: 500 8px/10px Prompt, sans-serif; text-shadow: 0 1px 2px #000; opacity: .9; }

#buffs { position: absolute; left: calc(12px + var(--sl)); top: calc(86px + var(--st)); display: flex; gap: 4px; pointer-events: none; }
.bf { position: relative; width: 24px; height: 24px; border-radius: 8px; background: var(--ink); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; }
.bf i { position: absolute; right: -3px; bottom: -5px; font: 600 9px Prompt, sans-serif; font-style: normal; text-shadow: 0 1px 2px #000; }
#petFrame { position: absolute; left: calc(10px + var(--sl)); top: calc(116px + var(--st)); display: flex; gap: 6px; align-items: center; padding: 3px 10px 3px 3px; }
#petFrame img { width: 34px; height: 34px; image-rendering: pixelated; object-fit: contain; }
#petFrame b { font-weight: 500; font-size: 11px; } #petFrame small { color: var(--dim); font-size: 10px; }
#petFrame.dead { opacity: .45; }
.pbar { width: 84px; height: 4px; background: rgba(0, 0, 0, .45); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.pbar i { display: block; height: 100%; background: #ff8ab8; }

/* ---------- target / zone (top middle) ---------- */
#target { position: absolute; left: 50%; top: calc(10px + var(--st)); transform: translateX(-50%); width: min(360px, 44vw); padding: 5px 12px 7px; }
.tgh { display: flex; justify-content: center; gap: 8px; align-items: baseline; font-size: 12px; font-weight: 500; }
.tgh small { color: var(--dim); font-weight: 400; font-size: 10px; }
.tgbar { position: relative; height: 6px; background: rgba(0, 0, 0, .45); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.tgbar i { position: absolute; inset: 0 auto 0 0; background: var(--hp); transition: width .15s; }
.tgbar span { display: none; }
/* M1 phones (2026-10-13): a width transition re-lays out the bar every frame while it runs, and with the HUD updating
   10-20 times a second the bars never stopped animating (+11% FPS on a 4x slower CPU without them); main.js sets
   html.fx-lo while the effect level is below high */
.fx-lo .bar i, .fx-lo .tgbar i, .fx-lo #tameBar, .fx-lo .u-bar i, .fx-lo .lb i { transition: none; }
#tgParty { display: none; font-size: 10px; color: var(--gold); text-align: center; margin-top: 3px; }
#target.boss { width: min(520px, 56vw); border-color: var(--line2); }
#target.boss .tgh { font-size: 14px; color: var(--gold); }
#target.boss .tgbar { height: 10px; }
#target.boss .tgbar span { display: block; position: absolute; inset: 0; text-align: center; font: 600 8px/10px Prompt, sans-serif; text-shadow: 0 1px 2px #000; }
#target.boss #tgParty { display: block; }
#zoneBanner { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; white-space: nowrap; }
#zoneBanner b { display: block; font: 600 22px Prompt, sans-serif; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
#zoneBanner small { color: var(--gold); font-size: 11px; letter-spacing: 3px; text-shadow: 0 1px 4px #000; }
#zoneBanner.show { animation: banner 3.2s ease-out; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, 8px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------- map + menu (top right) ---------- */
#topr { position: absolute; right: calc(10px + var(--sr)); top: calc(10px + var(--st)); width: 132px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#mapRing { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line2); box-shadow: inset 0 0 12px rgba(0, 0, 0, .6); cursor: pointer; }
#mini { width: 112px; height: 112px; display: block; image-rendering: pixelated; }
.clk { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; letter-spacing: 1px; }
#dayTxt { font-style: normal; font-size: 12px; }
#topr .gold { font-size: 12px; color: var(--dim); } #topr .gold b { color: var(--gold); font-weight: 600; }
#menuBtn { position: absolute; left: -48px; top: 0; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font-size: 18px; }
/* zoom bar under the minimap (owner's reference: − slider + and the percent) */
#zoomBar { display: flex; align-items: center; gap: 3px; width: 100%; }
#zoomBar button { width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--ink); border: 1px solid var(--line); font-size: 14px; line-height: 1; padding: 0; }
#zRange { flex: 1; min-width: 0; height: 22px; accent-color: #e8c66a; }
#zPct { flex: none; width: 30px; font-size: 10px; text-align: right; color: var(--gold); font-weight: 600; }
#zoomBtn { position: absolute; left: -48px; top: 48px; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); font-size: 18px; }
#menuDot { position: absolute; right: 6px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ff6b6b; display: none; }
#menuDot.on { display: block; }
#menu { position: absolute; right: calc(152px + var(--sr)); top: calc(54px + var(--st)); padding: 6px; display: flex; flex-direction: column; min-width: 180px; }
#menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 40px; border-radius: 10px; text-align: left; font-size: 13px; }
#menu button:hover { background: rgba(255, 255, 255, .06); }
#menu i { width: 20px; font-style: normal; color: var(--gold); text-align: center; }
#menu u { margin-left: auto; text-decoration: none; font-size: 10px; color: var(--dim); }
#menuStats.dot::after { content: '●'; color: #ff6b6b; font-size: 9px; margin-left: 4px; }

/* ---------- big map (tap the minimap; tap a spot to walk there) ---------- */
#bigMap { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(6, 7, 12, .55); }
.bm-box { padding: 10px; background: var(--ink2); display: flex; flex-direction: column; gap: 6px; max-width: 96vw; }
.bm-box header { display: flex; justify-content: space-between; align-items: center; padding-left: 6px; }
.bm-box h2 { margin: 0; font-size: 14px; font-weight: 600; }
.bm-box small { color: var(--dim); }
#bigCv { display: block; image-rendering: pixelated; border-radius: 10px; cursor: crosshair; touch-action: none; width: min(720px, 90vw, calc((88vh - 70px) * 4 / 3)); height: auto; }
#bmClose { width: 40px; height: 40px; border-radius: 12px; color: var(--dim); font-size: 16px; }

/* ---------- feed, log, prompts ---------- */
#log { position: absolute; left: calc(12px + var(--sl)); bottom: calc(18px + var(--sb)); width: 320px; max-height: 92px; overflow: hidden; font-size: 11px;
  display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 40%); mask-image: linear-gradient(transparent, #000 40%); }
#log div { text-shadow: 0 1px 2px #000, 0 0 4px rgba(0, 0, 0, .6); }
#loot { position: absolute; right: calc(12px + var(--sr)); top: calc(196px + var(--st)); display: flex; flex-direction: column; align-items: flex-end; gap: 3px; pointer-events: none; }
.li { display: flex; gap: 6px; align-items: center; padding: 2px 10px 2px 6px; border-radius: 10px; background: var(--ink); font-size: 11px;
  animation: lin .25s ease-out; transition: opacity .5s, transform .5s; }
.li i { font-style: normal; }
.li.out { opacity: 0; transform: translateX(16px); }
@keyframes lin { from { opacity: 0; transform: translateX(24px); } }
#interactBtn { position: absolute; left: 50%; bottom: calc(96px + var(--sb)); transform: translateX(-50%); padding: 8px 18px; min-height: 40px;
  color: var(--gold); font-weight: 500; border-color: var(--line2); }
#toast { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: 600 24px Prompt, sans-serif; color: var(--gold);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8); opacity: 0; pointer-events: none; white-space: nowrap; }
#toast.show { animation: toast 2.2s ease-out; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1.04); } 20% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
#tame { position: fixed; left: 50%; bottom: calc(110px + var(--sb)); transform: translateX(-50%); padding: 8px 12px; width: 300px; z-index: 5;
  display: grid; grid-template: "img txt" "img btn" / 60px 1fr; gap: 0 8px; align-items: center; }
/* knocked out: Rebirth Feather or back to the cathedral */
#deathBox { position: fixed; left: 50%; top: 24%; transform: translate(-50%, -50%); width: 300px; padding: 10px 12px; z-index: 6; text-align: center;
  background: var(--ink); border: 1px solid var(--line2); border-radius: 12px; }
#deathBox p { margin: 0 0 8px; font-size: 13px; }
#deathBox > div { display: flex; gap: 6px; }
#deathBox button { flex: 1; min-height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
#riseBtn { background: rgba(255, 225, 74, .2) !important; color: var(--gold); }
#riseBtn:disabled { opacity: .4; }
#tame.pop { animation: pop .3s ease-out; }
@keyframes pop { from { transform: translate(-50%, 16px); opacity: 0; } }
#tameImg { grid-area: img; width: 60px; height: 60px; image-rendering: pixelated; object-fit: contain; }
#tame p { grid-area: txt; font-size: 12px; margin: 0 0 6px; }
#tame > div { grid-area: btn; display: flex; gap: 6px; }
#tame button { flex: 1; min-height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
#tameYes { background: rgba(111, 224, 160, .25) !important; color: var(--ok); }

/* ---------- the sigil wheel (bottom right) ---------- */
#wheel { position: absolute; right: calc(8px + var(--sr)); bottom: calc(10px + var(--sb)); width: 250px; height: 250px; pointer-events: none; }
#wheel > *, #skills > * { pointer-events: auto; }
#skills { position: absolute; inset: 0; pointer-events: none; }
#wheel::before { content: ''; position: absolute; right: 22px; bottom: 22px; width: 130px; height: 130px; border-radius: 50%;
  border: 1px dashed rgba(255, 226, 160, .16); pointer-events: none; }
#atkBtn { position: absolute; right: 42px; bottom: 42px; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 220, 160, .3), rgba(30, 24, 30, .78)); border: 1px solid var(--line2); }
#atkBtn span { font-size: 30px; filter: drop-shadow(0 2px 3px #000); }
#atkBtn:active { transform: scale(.95); }
.sk { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line);
  font-size: 22px; display: grid; place-items: center; }
.sk.empty { opacity: .3; }
.sk.nomp .ic { filter: grayscale(1) brightness(.6); }
.sk .cd { position: absolute; inset: 0; border-radius: 50%; font: 600 13px Prompt, sans-serif; font-style: normal; display: grid; place-items: center; text-shadow: 0 1px 2px #000; }
.sk .key { position: absolute; right: -2px; bottom: -2px; width: 16px; height: 16px; border-radius: 50%; background: #0e0f18; border: 1px solid var(--line);
  font: 600 9px/14px Prompt, sans-serif; color: var(--gold); text-align: center; }
.sk:active { transform: scale(.93); }
/* centre of the attack button is (163, 163) inside the 250 px wheel; inner arc r = 84, outer arc r = 140 */
.sk.s0 { left: 79px; top: 163px; } .sk.s1 { left: 104px; top: 104px; } .sk.s2 { left: 163px; top: 79px; }
.sk.s3 { left: 28px; top: 127px; } .sk.s4 { left: 78px; top: 52px; } .sk.s5 { left: 151px; top: 25px; }
/* two pages of six on the wheel; ⇄ sits at the wheel's lower left */
#skills[data-page="0"] .sk:not(.pg0), #skills[data-page="1"] .sk:not(.pg1), #skills[data-page="2"] .sk:not(.pg2), #skills[data-page="3"] .sk:not(.pg3) { display: none; }
#skPage { position: absolute; left: 6px; top: 196px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line);
  font-size: 15px; pointer-events: auto; }
#skPage b { position: absolute; right: -2px; bottom: -2px; font: 600 9px/14px Prompt, sans-serif; color: var(--gold); width: 15px; height: 15px; border-radius: 50%; background: #0e0f18; }
body.pc #skPage { display: none; }
body.pc #skills .sk { display: grid !important; }

#quick { position: absolute; right: calc(14px + var(--sr)); bottom: calc(272px + var(--sb)); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
#quick button { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line); font-size: 18px; }
#autoBtn { width: 64px !important; border-radius: 22px !important; font-size: 12px !important; letter-spacing: 1px; }
#autoBtn.on { background: rgba(111, 224, 160, .28); border-color: var(--ok); color: var(--ok); box-shadow: 0 0 14px rgba(111, 224, 160, .35); }
#tenBtn { color: #ffb0ec; }
#tenBtn:active, #quick button:active { transform: scale(.93); }

#pills { position: absolute; right: calc(266px + var(--sr)); bottom: calc(16px + var(--sb)); display: flex; gap: 8px; }
#pills button { position: relative; width: 46px; height: 46px; border-radius: 14px; background: var(--ink); border: 1px solid var(--line); display: grid; place-items: center; }
#pills i { font-style: normal; font-size: 18px; }
#dashBtn i { font-size: 24px; color: #cfe8ff; }
#dashBtn.cool { opacity: .35; }
#pills b { position: absolute; right: 3px; bottom: 1px; font: 600 10px Prompt, sans-serif; text-shadow: 0 1px 2px #000; }
#pills u { position: absolute; left: 4px; top: 1px; font-size: 8px; color: var(--dim); text-decoration: none; }

#joy { position: absolute; left: calc(28px + var(--sl)); bottom: calc(28px + var(--sb)); width: 124px; height: 124px; border-radius: 50%;
  background: radial-gradient(rgba(255, 255, 255, .03), rgba(255, 255, 255, .1)); border: 1px solid rgba(255, 255, 255, .22); display: none; touch-action: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(255, 255, 255, .28);
  border: 1px solid rgba(255, 255, 255, .6); pointer-events: none; }

#xp { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .55); }
#xp i { position: absolute; left: 0; height: 2px; }
#expFill { top: 0; background: var(--exp); } #jexpFill { bottom: 0; background: var(--job); }
#xp span { position: absolute; bottom: 6px; font-size: 9px; color: var(--dim); text-shadow: 0 1px 2px #000; pointer-events: none; white-space: nowrap; }
#expTxt { left: 50%; transform: translateX(-104%); } #jexpTxt { left: 50%; transform: translateX(4%); }

/* ---------- windows ---------- */
#panel { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; }
/* first-open warm-up paint (src/smooth.js SM.warmPaint, ui.js warmShow): an already closed window shown for two frames behind the
   game canvas (which takes every tap there: nothing in it can be pressed) */
#panel.warmup[hidden] { display: grid !important; z-index: -1; opacity: .01; }
.win { pointer-events: auto; width: min(560px, 94vw); max-height: min(580px, 88vh); display: flex; flex-direction: column; background: var(--ink2); }
.win header { display: flex; justify-content: space-between; align-items: center; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.win h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .5px; }
#pclose { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; color: var(--dim); }
#pclose:hover { background: rgba(255, 255, 255, .06); color: var(--txt); }
#pbody { overflow-y: auto; padding: 12px 14px 14px; scrollbar-width: thin; }
#pbody button { min-height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid transparent; padding: 0 12px; }
#pbody button:hover:not(:disabled) { border-color: var(--line2); }
#pbody button:disabled { opacity: .3; cursor: default; }
#pbody button.on { background: rgba(244, 201, 107, .18); border-color: var(--line2); color: var(--gold); }
#pbody button.warn { background: rgba(255, 107, 107, .25); }
#pbody small { color: var(--dim); }

.who { margin-bottom: 4px; }
.pts b { color: var(--gold); font-size: 16px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.st { display: grid; grid-template-columns: 34px 30px 1fr auto; align-items: center; gap: 4px; padding: 6px 8px; background: rgba(255, 255, 255, .04); border-radius: 10px; }
.st b { color: var(--gold); font-weight: 600; font-size: 12px; }
.st .v { font-size: 16px; font-weight: 600; text-align: right; }
.st small { font-size: 9px; line-height: 1.15; }
.st button i { font-style: normal; font-size: 9px; color: var(--gold); }
.derived { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 11px; }
.derived span { background: rgba(255, 255, 255, .04); padding: 4px 8px; border-radius: 8px; color: var(--dim); }
.derived b { color: var(--txt); font-weight: 600; }
.skrow{ display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .04); margin-bottom: 6px; }
.skrow > div:nth-child(2){ flex: 1; min-width: 0; }
.skrow.lock { opacity: .4; }
.skrow em{ font-style: normal; color: var(--gold); font-size: 11px; white-space: nowrap; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.slots button { min-height: 28px !important; width: 30px; padding: 0 !important; }

.synth { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px; border: 1px dashed #ff8ab8; border-radius: 12px; }
.synth img { width: 36px; height: 36px; image-rendering: pixelated; object-fit: contain; }

.arow { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.arow > b { font-size: 12px; font-weight: 500; color: var(--gold); }

/* ---------- title: title.css (redesign 2026-10-14). .hint stays: the guide tip #coach.gd.hint still picks it up ---------- */
.hint { color: var(--dim); font-size: 10px; margin: 10px 0 0; }

/* ---------- touch / mouse ---------- */
@media (pointer: coarse) {
  #joy { display: block; }
  #log { display: none; }
  .sk .key, #pills u { display: none; }
}
@media (pointer: fine) {
  #tenBtn { display: none; }
}
/* landscape phones: everything a bit smaller so the picture keeps the middle */
@media (max-height: 500px) {
  #me { transform: scale(.86); transform-origin: top left; }
  #buffs { top: calc(74px + var(--st)); } #petFrame { top: calc(102px + var(--st)); }
  #topr { transform: scale(.78); transform-origin: top right; }
  #menu { right: calc(124px + var(--sr)); top: calc(44px + var(--st)); max-height: calc(100vh - 60px); overflow-y: auto; }
  #wheel { transform: scale(.8); transform-origin: bottom right; }
  #quick { right: calc(214px + var(--sr)); bottom: calc(70px + var(--sb)); flex-direction: row-reverse; }
  #pills { right: calc(214px + var(--sr)); }
  #loot { top: auto; bottom: calc(260px + var(--sb)); right: calc(80px + var(--sr)); }
  #target { top: calc(6px + var(--st)); }
  #zoneBanner { top: 18%; }
  #interactBtn { bottom: calc(80px + var(--sb)); }
}
/* portrait phones: pills move above the joystick */
@media (max-width: 600px) and (orientation: portrait) {
  #pills { right: auto; left: calc(14px + var(--sl)); bottom: calc(170px + var(--sb)); }
  .meinfo { width: 124px; }
  #topr { transform: scale(.8); transform-origin: top right; }
  #wheel { transform: scale(.88); transform-origin: bottom right; }
  #quick { bottom: calc(240px + var(--sb)); }
  #target { top: calc(150px + var(--st)); width: 80vw; }
  #loot { top: calc(170px + var(--st)); }
}

/* pixel icons (32 px art shown at whole-pixel sizes) */
.pxi { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; }
.sk .pxi { width: 38px; height: 38px; border-radius: 50%; }
.bf .pxi { width: 20px; height: 20px; border-radius: 6px; }
.li .pxi { width: 18px; height: 18px; }

#pills .pxi { width: 30px; height: 30px; }
.lootn { display: inline-flex; align-items: center; gap: 2px; } .lootn .pxi { width: 22px; height: 22px; }

/* ---------- pixel kit for item and skill windows: square slots, 2 px bevels, 8 px grid ---------- */
 .node, .sq, .itemcard, .skcard { image-rendering: pixelated; }
.bagtop { display: flex; justify-content: space-between; margin-bottom: 8px; } .bagtop b { color: var(--gold); }

.itemcard, .skcard { margin-top: 10px; padding: 10px; border-radius: 6px; background: #161826; border: 2px solid #34384f; display: flex; gap: 10px; align-items: center; }
.itemcard > div { flex: 1; }
.itemcard .pxi, .skhead .pxi { width: 48px; height: 48px; border-radius: 4px; }
.ok { background: rgba(244, 201, 107, .2) !important; border-color: var(--line2) !important; color: var(--gold); }

.sktree { display: flex; align-items: center; justify-content: center; gap: 0; padding: 10px 4px; background: #121420; border: 2px solid #2a2d40; border-radius: 6px; overflow-x: auto; }
.node { position: relative; width: 78px; min-height: 92px !important; padding: 6px 2px !important; border-radius: 6px !important; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #1b1d2b !important; border: 2px solid #34384f !important; box-shadow: inset 2px 2px 0 rgba(255,255,255,.06); }
.node .pxi { width: 40px; height: 40px; border-radius: 4px; }
.node small { font-size: 9px; line-height: 1.1; color: var(--txt) !important; text-align: center; }
.node.sel { border-color: var(--gold) !important; }
.node.add { box-shadow: 0 0 0 2px rgba(111,224,160,.5); }
.node.lock .pxi { filter: grayscale(1) brightness(.45); }
.node .lk { position: absolute; top: 4px; right: 6px; font-size: 12px; }
.pips { display: flex; gap: 2px; }
.pips i { width: 8px; height: 6px; background: #2c2f44; border: 1px solid #0b0c12; }
.pips i.have { background: var(--gold); } .pips i.new { background: var(--ok); }
.link { width: 22px; height: 4px; background: #2c2f44; flex: none; }
.link.on { background: var(--gold); }
.skcard { flex-direction: column; align-items: stretch; }
.skhead { display: flex; gap: 10px; align-items: center; }
.skstat { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--dim); }
.skstat b { color: var(--txt); font-weight: 500; }
.sklock { font-size: 11px; color: #ff9a8a; }

.slotlbl { font-size: 10px; color: var(--dim); margin-left: 8px; }
.sq { width: 34px; padding: 0 !important; border-radius: 4px !important; }
.skfoot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.skfoot span { flex: 1; } .skfoot b { color: var(--gold); font-size: 16px; }
@media (max-width: 460px) {   .node { width: 64px; } }

/* ---------- PC layout (mouse + wide screen, body.pc set in ui.js) ---------- */
#tip { position: fixed; z-index: 9; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: rgba(12, 13, 22, .96); border: 1px solid var(--line2);
  font-size: 12px; line-height: 1.45; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#tip b { color: var(--gold); font-weight: 600; } #tip small { color: var(--dim); }
#tenBtn u, #quick u { display: none; }
body.pc #joy, body.pc #atkBtn, body.pc #wheel::before { display: none !important; }
/* action bar: [dash] [1..6] [Q E] in one row at the bottom centre, AUTO / T / farm settings to its right */
body.pc #wheel { left: 50%; right: auto; bottom: calc(14px + var(--sb)); width: auto; height: auto; transform: translateX(-50%); }
body.pc #skills { position: static; display: grid; grid-template-columns: repeat(12, 52px); gap: 20px 6px; padding-bottom: 20px; padding: 6px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); }
body.pc .sk { position: relative; left: auto !important; top: auto !important; margin: 0; width: 52px; height: 52px; border-radius: 10px; background: #161826; }
body.pc .sk .pxi { width: 40px; height: 40px; border-radius: 6px; }
body.pc .sk .cd { border-radius: 10px; }
body.pc .sk .key { right: auto; left: 3px; top: 2px; bottom: auto; width: auto; height: auto; padding: 0 4px; border-radius: 4px; line-height: 13px; }
body.pc .sk:hover, body.pc #pills button:hover, body.pc #quick button:hover { border-color: var(--line2); }
body.pc #pills { right: auto; left: 50%; bottom: calc(20px + var(--sb)); transform: translateX(calc(-100% - 212px)); }
body.pc #pills button { width: 52px; height: 52px; border-radius: 10px; }
body.pc #pills u { display: block; font-size: 9px; color: var(--gold); }
body.pc #quick { right: auto; left: 50%; bottom: calc(20px + var(--sb)); transform: translateX(212px); flex-direction: row; align-items: center; }
body.pc #quick button { width: 52px; height: 52px; border-radius: 10px; }
body.pc #autoBtn { width: 72px !important; border-radius: 10px !important; }
body.pc #tenBtn { display: grid !important; place-items: center; position: relative; }
body.pc #tenBtn u { display: block; position: absolute; left: 4px; top: 1px; font-size: 9px; color: var(--gold); text-decoration: none; }
/* menu bar: always visible, bottom right, hotkeys shown */
/* menu: a column of buttons on the right edge under the map, out of the way of the action bar */
/* chat / log box bottom left */
body.pc #log { bottom: calc(16px + var(--sb)); width: 360px; max-height: 128px; padding: 8px 10px; border-radius: 12px; background: rgba(14, 15, 24, .55);
  -webkit-mask-image: none; mask-image: none; justify-content: flex-end; font-size: 12px; }
body.pc #loot { top: calc(196px + var(--st)); bottom: auto; right: calc(86px + var(--sr)); }
body.pc #interactBtn { bottom: calc(96px + var(--sb)); }
body.pc #tame { bottom: calc(150px + var(--sb)); }
body.pc #xp { height: 6px; } body.pc #xp i { height: 3px; }
body.pc #xp span { bottom: 8px; font-size: 10px; }
@media (max-width: 1240px) { body.pc #log { width: 260px; } }

/* ---------- online: chat bar, online count (title account / characters: title.css) ---------- */
#chatBar { position: absolute; left: calc(12px + var(--sl)); bottom: calc(150px + var(--sb)); display: flex; gap: 4px; width: min(420px, 70vw); z-index: 6; }
#chatBar select { min-height: 40px; border-radius: 10px; background: var(--ink2); color: var(--txt); border: 1px solid var(--line2); font: inherit; }
#chatBar input { flex: 1; min-height: 40px; border-radius: 10px; background: var(--ink2); color: var(--txt); border: 1px solid var(--line2); font: inherit; padding: 0 10px; outline: none; }
#onlineN { font-size: 11px; color: var(--ok); }

/* ==========================================================================================================
   Slate theme (owner's UI reference, 2026-10-09): slate-blue panels with a light hairline edge, square inset
   slots, a header band with icon + title + hotkey + a framed X. Loaded last, so it re-colours what is above.
   ========================================================================================================== */
:root {
  --ink: rgba(50, 60, 78, .88); --ink2: rgba(44, 53, 70, .97); --line: rgba(150, 172, 214, .38); --line2: rgba(178, 198, 238, .8);
  --txt: #eef2fa; --dim: #a9b4cc; --acc: #9cc0ff; --slot: #27303f; --slot-edge: #56688c; --hp: #5fd068;
}
#me, #target, #topr, #menu, #petFrame, #tame, .win, .tbox, #interactBtn, .bm-box {
  border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 0 0 1px rgba(10, 14, 24, .55), 0 8px 24px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* hp green, mp blue, numbers centred in the bar (the reference's look) */
.bar { height: 11px; border-radius: 3px; background: #1b2230; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
.bar i { border-radius: 2px; }
.bar.hp i { background: linear-gradient(#7be27f, #2fa83c); }
.bar.mp i { background: linear-gradient(#6ab8ff, #2a6fd0); }
.bar span { left: 0; right: 0; top: 0; text-align: center; font: 600 9px/11px Prompt, sans-serif; opacity: 1; }
#portraitCv { background: radial-gradient(#56709c, #26304a); }
.r2 em { background: rgba(156, 192, 255, .14); color: var(--acc); }

/* ---------- windows ---------- */
.win { background: var(--ink2); width: min(600px, 96vw); }
.win header { padding: 6px 6px 6px 12px; background: linear-gradient(rgba(255, 255, 255, .06), rgba(255, 255, 255, 0)); border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.win h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.win h2 small { color: var(--dim); font-weight: 500; font-size: 13px; }
.wic { display: grid; place-items: center; width: 30px; height: 30px; font-style: normal; font-size: 16px; color: var(--acc); background: var(--slot); border: 1px solid var(--slot-edge); border-radius: 6px; }
#pclose { width: 34px; height: 34px; border-radius: 6px; background: #e9eef8; color: #1c2230; font-weight: 700; font-size: 15px; border: 1px solid #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
#pclose:hover { background: #fff; color: #000; }
#panel[data-kind="stats"] .win { width: min(820px, 98vw); }
#pbody button { border-radius: 6px; background: rgba(255, 255, 255, .08); }
#pbody button.on { background: rgba(156, 192, 255, .2); border-color: var(--line2); color: #fff; }
 #pbody small { color: var(--dim); }

/* square inset slots shared by the bag, skill tree, equipment */
 .node, .eq { background: var(--slot) !important; border: 2px solid var(--slot-edge) !important; border-radius: 6px !important;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1px rgba(8, 10, 18, .6); }
 .node.sel { border-color: #fff !important; box-shadow: 0 0 0 1px var(--acc), inset 0 0 8px rgba(156, 192, 255, .4); }

.itemcard, .skcard { background: var(--slot); border: 1px solid var(--slot-edge); border-radius: 8px; }
.sktree { background: rgba(20, 26, 38, .6); border: 1px solid var(--slot-edge); border-radius: 8px; }
.pips i.have { background: var(--acc); } .link.on { background: var(--acc); }

/* inventory */
.bagtabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.bagtabs button { min-height: 32px !important; border-radius: 6px 6px 0 0 !important; background: none !important; border: 0 !important; color: var(--dim); padding: 0 14px !important; }
.bagtabs button.on { color: #fff; box-shadow: inset 0 -2px 0 var(--acc); }
.bagtabs span { margin-left: auto; padding-bottom: 6px; font-weight: 600; }
.bagfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.bagfoot b { color: #fff; } .bagfoot .coin { color: var(--gold); font-size: 14px; } .bagfoot .coin b { color: var(--gold); }

/* character window: equipment | hero + radar | equipment | status and attributes */
.chr { display: grid; grid-template-columns: 64px 180px 64px 1fr; gap: 10px; align-items: start; }
.eqcol { display: flex; flex-direction: column; gap: 6px; }
.eq { position: relative; width: 60px; height: 60px; display: grid; place-items: center; }
.eq > i { font-style: normal; font-size: 22px; filter: grayscale(1); opacity: .28; }
.eq.has > i { display: none; }
.eq canvas, .eq img { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; }
.eq small { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-size: 8px !important; line-height: 1; opacity: .8; }
.chrmid { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px;
  background: radial-gradient(ellipse at 50% 34%, rgba(156, 192, 255, .18), transparent 60%); }
.chrhero { width: 144px; height: 144px; image-rendering: pixelated; }
.chrname { text-align: center; line-height: 1.25; } .chrname b { display: block; font-size: 15px; } .chrname small { font-size: 11px; }
.radar { width: 168px; height: 164px; }
.chrstat h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.chrstat h3:not(:first-child) { margin-top: 12px; }
.strow { display: grid; grid-template-columns: 52px 76px 1fr; align-items: center; gap: 8px; margin-bottom: 5px; }
.strow .plus { justify-self: end; width: 34px; }
.strow > b { font-size: 13px; font-weight: 600; }
.pill { text-align: center; padding: 3px 0; border-radius: 8px; border: 1px solid var(--line2); background: rgba(20, 26, 38, .5); font-weight: 600; }
.plus { min-height: 30px !important; padding: 0 !important; background: none !important; color: #fff; font-size: 22px; line-height: 1; }
.plus:disabled { opacity: .2 !important; }
.ptsrow { font-size: 12px; color: var(--dim); } .ptsrow b { color: var(--acc); font-size: 15px; margin-left: 6px; }
.attr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12px; }
.attr span { display: flex; justify-content: space-between; color: #fff; font-weight: 600; }
.attr b { color: var(--acc); font-weight: 600; }
@media (max-width: 720px) {
  .chr { grid-template-columns: 64px 1fr 64px; }
  .chrstat { grid-column: 1 / -1; }
  .chrhero { width: 108px; height: 108px; }
}

/* skill / item card (tooltip) */
#tip { background: rgba(48, 58, 76, .98); border: 2px solid var(--line2); border-radius: 8px; max-width: 340px; padding: 10px 12px; }
#tip b { color: #fff; }
.tiph { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tiph .pxi { width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--slot-edge); background: var(--slot); }
.tiph b { font-size: 14px; flex: 1; }
.tiph span { color: var(--acc); font-weight: 600; font-size: 12px; }
.tipcard p { margin: 0 0 8px; font-weight: 500; }
.tipgrid { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 12px; font-size: 11px; font-style: italic; color: var(--dim); }
.tipgrid span { display: flex; flex-direction: column; } .tipgrid b { font-style: normal; color: #fff !important; font-weight: 500; }
.tipreq { margin-top: 6px; font-size: 11px; color: var(--dim); } .tipreq i { color: #ff9a8a; font-style: normal; }

/* PC action bar: framed square slots, the key under each one */
body.pc #skills { background: var(--ink); border-radius: 10px; padding: 8px 8px 18px; gap: 8px; }
body.pc .sk { background: var(--slot); border: 2px solid var(--slot-edge); border-radius: 6px; box-shadow: inset 0 2px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(8,10,18,.6); }
body.pc .sk .key { left: 0; right: 0; top: auto; bottom: -17px; background: none; border: 0; color: var(--dim); text-align: center; font-size: 10px; }
body.pc #pills button, body.pc #quick button { background: var(--slot); border: 2px solid var(--slot-edge); border-radius: 6px; }
body.pc #pills b { min-width: 16px; padding: 0 3px; border-radius: 8px; background: rgba(120, 150, 220, .85); font-size: 9px; line-height: 13px; text-shadow: none; }

/* chat box with tabs (PC); phones keep the plain fading log */
#logTabs { display: none; }
body.pc #logTabs { display: flex; position: absolute; left: calc(12px + var(--sl)); bottom: calc(148px + var(--sb)); width: 360px; background: rgba(28, 34, 46, .92);
  border-radius: 8px 8px 0 0; overflow: hidden; }
body.pc #logTabs button { flex: 1; min-height: 28px; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--dim); }
body.pc #logTabs button.on { background: rgba(255, 255, 255, .08); color: #fff; }
body.pc #log { border-radius: 0 0 8px 8px; background: rgba(40, 46, 58, .78); bottom: calc(16px + var(--sb)); height: 132px; max-height: 132px; }
#log[data-f="chat"] div:not([data-k="chat"]), #log[data-f="sys"] div[data-k="chat"] { display: none; }
@media (max-width: 1240px) { body.pc #logTabs { width: 260px; } }

/* the iron dragon button (knight line) */
#rideBtn.on { background: rgba(156, 192, 255, .3) !important; border-color: var(--acc) !important; box-shadow: 0 0 12px rgba(156, 192, 255, .4); }
body.pc #rideBtn { display: grid; place-items: center; position: relative; }
body.pc #rideBtn[hidden] { display: none !important; }
body.pc #rideBtn u { display: block; position: absolute; left: 4px; top: 1px; font-size: 9px; color: var(--gold); text-decoration: none; }

/* ---------- equipment (2026-10-09) ---------- */
button.eq { padding: 0; cursor: pointer; color: inherit; font: inherit; }
.eq .ref { position: absolute; top: 2px; right: 3px; font-size: 10px; color: #ffe28a; text-shadow: 1px 1px 0 #000; }
.eq.t2{ box-shadow: inset 0 0 0 1px #5fae6a; }
.eq.t3{ box-shadow: inset 0 0 0 1px #5a8fd8; }
.eq.t4{ box-shadow: inset 0 0 0 1px #9a6ad8; }
.eq.t5{ box-shadow: inset 0 0 0 1px #e09a3a, 0 0 8px rgba(255, 170, 60, .35); }

.pill em { font-style: normal; color: #8fe08a; margin-left: 3px; font-size: 11px; }
.cardi { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 4px; background: linear-gradient(160deg, #e8d6a8, #a8865a); box-shadow: inset 0 0 0 2px #5a4428; }
.cardi .pxi { width: 26px !important; height: 26px !important; }
.gearcard { align-items: flex-start; }
.gearcard .tipcard { background: none; border: 0; padding: 0; box-shadow: none; }
.gbtns { display: flex; flex-direction: column; gap: 6px; }
.gbtns button { min-height: 40px; min-width: 84px; }
.socket { margin-top: 8px; font-size: 12px; }
.refres { margin: 6px 0; padding: 8px; border-radius: 6px; text-align: center; font-weight: 700; }
.refres.ok { background: rgba(255, 210, 90, .16); color: #ffe28a; }
.refres.bad { background: rgba(255, 120, 120, .12); color: #ff9a9a; }
/* equipment window: RO-style slot list (owner's reference) */
.eqwin { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 8px; align-items: start; }
.eqside { display: flex; flex-direction: column; gap: 6px; }
.eqrow { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 8px 4px 4px !important; text-align: left; border-radius: 8px; background: var(--slot); border: 1px solid var(--slot-edge); color: inherit; }
.eqrow.on { border-color: #fff; box-shadow: 0 0 0 1px var(--acc), inset 0 0 10px rgba(156, 192, 255, .35); }
.eqic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; background: rgba(10, 14, 24, .55); }
.eqic .pxi { width: 34px; height: 34px; image-rendering: pixelated; }
.eqic i { font-style: normal; font-size: 20px; filter: grayscale(1); opacity: .35; }
.eqic.big { width: 54px; height: 54px; }
.eqic.big .pxi { width: 44px; height: 44px; }
.eqtx { display: flex; flex-direction: column; min-width: 0; }
.eqtx small { font-size: 10px; color: var(--acc); opacity: .85; }
.eqtx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eqrow.t2 .eqtx b { color: #8fe08a; } .eqrow.t3 .eqtx b { color: #7ab8ff; } .eqrow.t4 .eqtx b { color: #c792ff; } .eqrow.t5 .eqtx b { color: #ffb648; }
.eqmid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eqmid canvas { width: 108px; height: 108px; image-rendering: pixelated; }
.eqjob { text-align: center; font-size: 11px; letter-spacing: 1px; opacity: .8; }
.eqmid button { width: 100%; min-height: 40px; font-size: 12px; }
.eqbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--slot); border: 1px solid var(--slot-edge); }
.eqbar > div:nth-child(2) { flex: 1; min-width: 0; }
.eqpick { margin-top: 8px; }
.up { color: #8fe08a; }
@media (max-width: 560px) {
  .eqwin { grid-template-columns: 1fr 1fr; }
  .eqmid { grid-column: 1 / -1; grid-row: 1; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .eqmid canvas { width: 72px; height: 72px; }
  .eqmid button { width: auto; flex: 1; }
  .eqtx b { font-size: 12px; }
}

/* ---------- monster cards (owner's reference: rarity frames C/B/A/S) ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin: 8px 0; }
.cgrid.small { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.mcard { position: relative; aspect-ratio: 3 / 4; min-height: 84px; padding: 0 !important; border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  border: 3px solid var(--rc, #8a94a8) !important; background: radial-gradient(ellipse at 50% 35%, var(--rg, #3a4258), #141824 75%) !important; color: #fff; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 2px 0 rgba(0,0,0,.4); }
.mcard.rC { --rc: #8fb07a; --rg: #3a5236; }
.mcard.rB { --rc: #5a9aff; --rg: #22406e; }
.mcard.rA { --rc: #b07aff; --rg: #46286e; }
.mcard.rS { --rc: #ffc24a; --rg: #6e4a12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3), 0 0 10px rgba(255,190,70,.45); }
.mcard img { width: 70%; max-height: 62%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0,0,0,.5)); }
.mcard.unk img { filter: brightness(0) opacity(.55); }
.mcard.unk { --rc: #4a5064; --rg: #1c2030; }
.mcard.sel { outline: 2px solid #fff; outline-offset: 1px; }
.mcard .rk { position: absolute; left: 4px; top: 1px; font-style: normal; font-weight: 800; font-size: 14px; color: var(--rc); text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.mcard .clv { position: absolute; right: 3px; bottom: 16px; font-size: 9px; padding: 0 4px; border-radius: 6px; background: rgba(0,0,0,.6); }
.mcard u { position: absolute; right: 3px; top: 2px; font-size: 10px; text-decoration: none; background: rgba(0,0,0,.55); border-radius: 6px; padding: 0 4px; }
.mcard small { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px !important; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 2px; background: rgba(0,0,0,.5); }
.mcard.big { width: 96px; flex: none; }
.cdetail { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 8px; background: var(--slot); border: 1px solid var(--slot-edge); }
.cdetail > div:nth-child(2) { flex: 1; min-width: 0; }
.cst { margin: 6px 0; color: #9affb0; font-weight: 600; font-size: 13px; }
.cst small { color: #c8d0e0; font-weight: 400; }
.rtag { font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid; }
.rtag.rC { color: #8fb07a; } .rtag.rB { color: #5a9aff; } .rtag.rA { color: #b07aff; } .rtag.rS { color: #ffc24a; }
.cprog { margin: 6px 0; } .cprog .bar { margin: 4px 0; }
.cset { margin-bottom: 10px; padding: 8px; border-radius: 8px; background: var(--slot); border: 1px solid var(--slot-edge); }
.cset.done { border-color: #ffc24a; box-shadow: 0 0 8px rgba(255,190,70,.25); }
.csh { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.csh span { opacity: .8; } .csh em { margin-left: auto; font-style: normal; color: #9affb0; font-size: 12px; }
.cset:not(.done) .csh em { color: #8a94a8; }
@media (max-width: 560px) { .cdetail { flex-wrap: wrap; } .cdetail .gbtns { flex-direction: row; width: 100%; } .cdetail .gbtns button { flex: 1; } }

/* random options (blue lines) and the reroll box at the blacksmith */
.tipcard .opt, .opt { color: #8ac8ff; font-style: normal; }

.optbox { border-radius: 10px; margin-bottom: 6px; }
.optbox.on { background: rgba(138, 200, 255, .07); padding-bottom: 8px; }
.optline { display: block; width: calc(100% - 16px); margin: 4px 8px; min-height: 40px; text-align: left; color: #8ac8ff; }
.optline.lock { border-color: #ffd86a !important; color: #ffe8a0; background: rgba(255, 216, 106, .1) !important; }
.optline i { font-style: normal; margin-right: 6px; }
.optroll { display: block; width: calc(100% - 16px); margin: 6px 8px 0; min-height: 42px; }

/* server-wide announcement banner (top centre, like the owner's reference) */
#ann { position: fixed; left: 50%; top: 86px; transform: translateX(-50%); z-index: 40; pointer-events: none; text-align: center;
  padding: 8px 22px 10px; border-radius: 10px; background: linear-gradient(180deg, rgba(30, 44, 110, .92), rgba(16, 22, 60, .92));
  border: 1px solid rgba(255, 216, 106, .55); box-shadow: 0 6px 24px rgba(0, 0, 0, .45); animation: annIn 4s ease-out forwards; max-width: min(92vw, 640px); }
#ann.ann-refine { background: linear-gradient(180deg, rgba(110, 50, 20, .92), rgba(60, 24, 10, .92)); }
#ann em { display: inline-block; font-style: normal; font: 800 14px Prompt, sans-serif; letter-spacing: 3px; color: #fff; padding: 1px 12px; border-radius: 10px;
  background: linear-gradient(90deg, #3a6ad8, #6a9aff); margin-bottom: 4px; }
#ann div { display: flex; gap: 8px; align-items: center; justify-content: center; font: 700 17px Prompt, sans-serif; color: #ffe8a0; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
#ann i { font-style: normal; } #ann .pxi { width: 30px; height: 30px; image-rendering: pixelated; }
@keyframes annIn { 0% { opacity: 0; transform: translate(-50%, -12px) scale(.96); } 8% { opacity: 1; transform: translate(-50%, 0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* party frame under the player frame, invite prompt */
/* job quest tracker (top right, under the minimap block) */
#jqCard { position: absolute; right: calc(10px + var(--sr)); top: calc(232px + var(--st)); width: 168px; padding: 6px 9px; border-radius: 8px; z-index: 2;
  background: rgba(14, 18, 30, .78); border: 1px solid rgba(255, 225, 74, .4); font-size: 11px; color: #fff; pointer-events: none; }
#jqCard b { color: var(--gold); font-weight: 600; } #jqCard i { font-style: normal; color: var(--ok); }
body.pc #jqCard { top: calc(250px + var(--st)); }
#partyFrame { position: absolute; left: calc(10px + var(--sl)); top: calc(150px + var(--st)); display: flex; flex-direction: column; gap: 4px; width: 150px; pointer-events: none; }
#partyFrame .pmem { padding: 3px 8px 5px; border-radius: 8px; background: rgba(14, 18, 30, .72); border: 1px solid rgba(255,255,255,.12); font-size: 11px; color: #fff; }
#partyFrame .pmem b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#partyFrame .pmem small { font-size: 9px; opacity: .75; }
#partyFrame .pmem .pbar { height: 4px; margin-top: 2px; }
#partyFrame .pmem .pbar i { background: #58d26a; }
#partyFrame .pmem.away { opacity: .6; } #partyFrame .pmem.dead b { color: #ff8a8a; }
#pinv { position: fixed; left: 50%; top: 32%; transform: translateX(-50%); z-index: 45; padding: 14px 18px; border-radius: 12px; text-align: center;
  background: rgba(16, 22, 40, .95); border: 1px solid rgba(255, 216, 106, .5); color: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
#pinv div { display: flex; gap: 8px; justify-content: center; } #pinv button { min-height: 42px; min-width: 100px; }
#pname { flex: 1; min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10,14,24,.6); color: #fff; }
.wide { width: 100%; min-height: 42px; margin-top: 8px; }

/* central market */

 .mksell input { min-height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10,14,24,.6); color: #fff; }

.mksell input.mkp { width: 96px; } .mksell input.mkn { width: 56px; }
.gold { color: #ffd86a; }

/* skill window v2 (2026-10-09): rows by Job level, per-job points, passives, 12 slots; shrine job quests */

.sktree2 { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: rgba(20, 26, 38, .6); border: 1px solid var(--slot-edge); border-radius: 8px; max-height: 46vh; overflow-y: auto; }
.skrow2 { display: flex; align-items: center; gap: 8px; }
.skrow2 > div { display: flex; flex-wrap: wrap; gap: 6px; }
.skjl { flex: none; width: 46px; font-size: 10px; color: var(--dim); text-align: right; }
.node.pas { border-style: dashed !important; }
.node .lvtxt { font-size: 10px; color: var(--acc); font-weight: 600; }
.skreq { font-size: 11px; color: var(--dim); margin-top: 4px; }
.skreq .ok { color: var(--ok); } .skreq .no { color: #ff9a9a; }
.skslots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.skslots .sq { min-width: 30px; min-height: 30px !important; padding: 0 !important; }

 

/* tavern guide (field list with level ranges, monsters, boss) */
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 8px 0; }
.guide .gd { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10, 14, 24, .45); }
.guide .gd b { display: block; font-size: 13px; } .guide .gd .lv { font-size: 11px; color: #9ad8ff; }
.guide .gd .mons { font-size: 11px; color: #c8d0e0; margin-top: 4px; line-height: 1.35; }
.guide .gd .boss { font-size: 11px; color: #ffcf70; margin-top: 3px; }
.guide .gd.fit { border-color: rgba(255, 216, 106, .8); box-shadow: 0 0 0 1px rgba(255, 216, 106, .25) inset; }
.guide .gd.here { background: rgba(60, 90, 140, .35); }

/* guild window */

  

.gnew { padding: 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10, 14, 24, .45); margin: 8px 0; }
.gnew small { display: block; color: #9ad8ff; margin: 2px 0 6px; }
 
 
.ranks { margin-top: 10px; display: grid; gap: 3px; } .ranks > b { margin-bottom: 2px; }
.ranks .grk { display: flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 6px; background: rgba(10, 14, 24, .4); font-size: 12px; }
.ranks .grk i { width: 18px; text-align: right; color: #ffcf70; font-style: normal; } .ranks .grk b { flex: 1; } .ranks .grk.me { outline: 1px solid rgba(184, 240, 168, .6); }

/* daily quests (tavern) */

  
 

/* bag: category sidebar on wide screens (owner's Lumivara reference), tabs on top on phones */
.bagtabs button i { font-style: normal; margin-right: 4px; } .bagtabs button em { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 4px; }
@media (min-width: 700px) {
  .bagwrap { display: grid; grid-template-columns: 128px 1fr; gap: 12px; }
  .bagwrap .bagtabs { flex-direction: column; align-items: stretch; border-bottom: 0; border-right: 1px solid var(--line); padding-right: 8px; margin-bottom: 0; }
  .bagwrap .bagtabs button { min-height: 42px !important; border-radius: 6px !important; text-align: left; display: flex; align-items: center; padding: 0 10px !important; }
  .bagwrap .bagtabs button em { margin-left: auto; }
  .bagwrap .bagtabs button.on { background: rgba(255, 216, 106, .12) !important; box-shadow: inset 3px 0 0 var(--acc); }
  .bagwrap .bagtabs span { margin: 8px 0 0; padding: 0; text-align: center; color: var(--dim); font-size: 11px; }
}

/* square minimap (owner's reference, 2026-10-10): rounded square frame with a gold hairline, map name strip at the bottom */
#mapRing { position: relative; border-radius: 10px; border: 1px solid rgba(255, 216, 106, .45); box-shadow: inset 0 0 10px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .35); }
#mapRing::after { content: attr(data-zone); position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font: 600 9px Prompt, sans-serif;
  color: #ffe7a8; text-align: center; background: linear-gradient(transparent, rgba(8, 10, 18, .85)); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* account storage: bag on the left, the box on the right (stacked on phones) */

 

 

/* PC hotbar: 2 rows x 12 (24 slots, owner 2026-10-10); smaller slots, potions/dash and AUTO/ride pushed out to the sides */
body.pc #skills { grid-template-columns: repeat(12, 40px); gap: 18px 4px; }
body.pc .sk { width: 40px; height: 40px; }
body.pc .sk .pxi { width: 32px; height: 32px; }
body.pc #pills { transform: translateX(calc(-100% - 290px)); }
body.pc #quick { transform: translateX(290px); }
@media (max-width: 1100px) {
  body.pc #skills { grid-template-columns: repeat(12, 36px); gap: 18px 3px; } body.pc .sk { width: 36px; height: 36px; } body.pc .sk .pxi { width: 28px; height: 28px; }
  body.pc #pills { transform: translateX(calc(-100% - 260px)); } body.pc #quick { transform: translateX(260px); }
}

/* player menu (tap another player) */
#pmenu { position: fixed; z-index: 60; width: 180px; padding: 8px; border-radius: 10px; background: rgba(16, 22, 40, .96); border: 1px solid rgba(255, 216, 106, .5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); display: grid; gap: 4px; }
#pmenu b { font-size: 14px; } #pmenu small { color: #c8d0e0; margin-bottom: 4px; } #pmenu button { min-height: 40px; text-align: left; padding: 0 10px; }
/* trade window */
.trwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.trside { padding: 8px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(10, 14, 24, .45); min-width: 0; }
.trside .trst { float: right; font-size: 11px; color: var(--dim); } .trside.locked { border-color: rgba(255, 216, 106, .7); } .trside.ok { border-color: #6ad070; }
.trside .bag { grid-template-columns: repeat(auto-fill, 44px); justify-content: start; min-height: 50px; margin: 6px 0; }
.trside .cell, .trbag .cell { width: 44px; height: 44px; } .trgold { color: #ffd890; font-weight: 600; }
.trbag { grid-template-columns: repeat(auto-fill, 44px) !important; justify-content: start !important; max-height: 150px; overflow-y: auto; margin: 6px 0; }
.trbtns { display: flex; gap: 6px; } .trbtns button { flex: 1; min-height: 44px; }

/* main story window + tracker divider */
 
#jqCard hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

/* achievements window */

   
 

/* PC menu: 16 buttons no longer fit one column under the minimap -> two columns (owner's screens are 768+ tall) */
body.pc #jqCard { right: calc(156px + var(--sr)); top: calc(196px + var(--st)); }

/* daily login calendar */

   

  

/* leaderboards */

  
  

/* emote picker over the chat tabs */
#emoBtn { margin-left: auto; min-width: 36px; font-size: 16px; }
#emoBox { position: absolute; left: calc(12px + var(--sl, 0px)); bottom: calc(200px + var(--sb)); z-index: 40; display: grid; grid-template-columns: repeat(8, 40px); gap: 4px; padding: 6px;
  border-radius: 10px; background: rgba(16, 22, 40, .95); border: 1px solid rgba(255, 216, 106, .45); }
#emoBox button { width: 40px; height: 40px; font-size: 22px; padding: 0; }
#emoBox button.lock { opacity: .35; filter: grayscale(1); } /* a Fair Token shop emote this account has not bought (feat/night24) */

/* private shop: setup list and the buyer's view */

  
.vrow:has(input[data-vk^="g:"]) { grid-template-columns: 24px 32px 1fr 100px; }

.gcastle { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: linear-gradient(90deg, rgba(255, 200, 80, .22), rgba(255, 200, 80, .05)); border: 1px solid rgba(255, 200, 80, .55); color: #ffe7a8; font-weight: 600; }

/* mail */
  
.vrow.mlrow { grid-template-columns: 24px 32px 1fr 70px; }
#menuMail.dot::after { content: '●'; color: #ff6b6b; font-size: 9px; margin-left: 4px; }

/* monster league */
.lghead { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: rgba(10, 14, 24, .45); margin-bottom: 6px; }
.lghead small { display: block; color: #c8d0e0; }
.lgfight { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 8px; border: 1px solid var(--line2); margin-bottom: 6px; }
.lgside .gbar i { background: linear-gradient(90deg, #6ad070, #c8f070); transition: width .25s; } .lgside.foe .gbar i { background: linear-gradient(90deg, #ff6a6a, #ffb070); }
#lgResult { grid-column: 1 / 3; text-align: center; font-weight: 700; min-height: 20px; } #lgResult.win { color: #ffe14a; } #lgResult.lose { color: #ff9a9a; }
.lglog { grid-column: 1 / 3; max-height: 120px; overflow-y: auto; font-size: 11px; display: grid; gap: 1px; } .lglog .me { color: #b8f0a8; } .lglog .foe { color: #ffb0b0; text-align: right; }

/* skill evolution (part 4, 2026-10-10): two branch cards under the skill card */
.skevo { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.skevo .evoh { grid-column: 1 / -1; color: #ffd36a; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.skevo .evoh small { color: #a8b0c0; font-weight: 400; }
.skevo .evo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 6px 8px; text-align: left;
  background: rgba(30, 36, 50, .85); border: 1px solid #4a5468; border-radius: 6px; color: #e8ecf4; }
.skevo .evo i { font-style: normal; font-size: 18px; }
.skevo .evo small { color: #b8c0d0; font-size: 11px; line-height: 1.3; }
.skevo .evo.on { border-color: #ffd36a; box-shadow: 0 0 0 1px #ffd36a inset, 0 0 12px rgba(255, 211, 106, .35); }
.skevo .evo em { color: #ffd36a; font-style: normal; font-size: 11px; }
.skevo .evo:disabled:not(.on) { opacity: .5; }

/* Auto Battle 2.0 (part 5): one row per skill with its condition */

/* ---------- part 7: Modern UI (2026-10-10) ---------- */
/* the character hub tab strip */
#hubTabs { display: flex; gap: 4px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
#hubTabs[hidden] { display: none; }
#hubTabs button { flex: 1 0 auto; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px;
  background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; }
#hubTabs button i { font-style: normal; }
#hubTabs button u { text-decoration: none; font-size: 10px; opacity: .55; }
#hubTabs button.on { color: #fff; border-bottom-color: var(--gold); background: linear-gradient(rgba(255, 255, 255, 0), rgba(244, 201, 107, .1)); }
body:not(.pc) #hubTabs button u { display: none; }
/* the character windows share one size, so switching tabs doesn't jump */
#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(820px, 98vw); height: min(620px, 92vh); }
/* bigger tap targets */
.strow .plus { width: 40px; min-height: 36px !important; font-size: 18px; }
.strow { grid-template-columns: 52px 86px 44px 1fr; } .strow .plus { justify-self: start; }
/* skills: tree and detail side by side when there is room */
@media (min-width: 700px) {
  #panel[data-kind="skills"] #pbody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto auto; column-gap: 12px; align-content: start; }
   #panel[data-kind="skills"] #pbody > .skfoot { grid-column: 1 / -1; }
  #panel[data-kind="skills"] .sktree2 { grid-column: 1; max-height: none; min-height: 0; overflow-y: auto; }
  #panel[data-kind="skills"] .skcard { grid-column: 2; grid-row: 2 / 4; margin-top: 0; align-self: start; max-height: 100%; overflow-y: auto; }
}
/* landscape phones (short screens): windows use the whole height, a compact header, nothing cut off */
@media (max-height: 500px) {
  #panel .win, #panel[data-kind] .win { width: calc(100vw - 16px - var(--sl, 0px) - var(--sr, 0px)); height: calc(100vh - 12px); max-height: none; }
  .win header { padding: 2px 4px 2px 10px; } .win h2 { font-size: 14px; }
  #pclose { width: 40px; height: 40px; }
  #hubTabs { padding-top: 2px; } #hubTabs button { min-height: 36px; font-size: 12px; }
  #pbody { padding: 8px 10px; }
  #panel[data-kind="skills"] #pbody { grid-template-rows: auto 1fr auto; }
  #panel[data-kind="skills"] .sktree2 { grid-row: 2; }
  #panel[data-kind="skills"] .skcard { grid-row: 2; max-height: calc(100vh - 170px); }
  
  .chr { grid-template-columns: 56px 150px 56px 1fr; gap: 6px; }
}
/* the tab strip and header keep their height; only the body scrolls */
.win > header, #hubTabs { flex-shrink: 0; }
#pbody { flex: 1 1 auto; min-height: 0; }
@media (max-height: 500px) and (min-width: 700px) {
  #panel[data-kind="skills"] #pbody { overflow: hidden; grid-template-rows: auto minmax(0, 1fr) auto; }
  #panel[data-kind="skills"] .sktree2, #panel[data-kind="skills"] .skcard { max-height: 100%; min-height: 0; overflow-y: auto; }
}
@media (max-width: 500px) { #hubTabs button { padding: 0 6px; font-size: 12px; gap: 3px; } #hubTabs { gap: 0; padding: 4px 4px 0; } }

/* loading screen between maps (game.js drawLoadCard): the HUD steps back while the region's painting shows */
body.mapcard #hud { opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
#hud { transition: opacity .25s; }

/* 64 px painted icons (tools/icons-hd.py, owner 2026-10-13): smooth when the CSS shrinks them, pixelated made them jagged */
img[src*="assets/icons/"] { image-rendering: auto !important; }
