/* =====================================================================
   ENDLESS QI UI (loaded last, replaces jade.css). A reskin only: layout,
   sizes, the dock and the sliding sheets stay as the earlier files set them;
   ashfall.css still supplies the structure this file re-colours.
   Look: night over the sect mountains. Dark ink panels with a deep jade
   tint, thin aged-gold frames with cloud-scroll corners, cyan qi glow on
   what is active, vermilion seal stamps, deep violet and crimson for
   demonic foes, rice-paper text.
   Fonts: Marcellus SC (titles), Cinzel (buttons, numbers), Alegreya Sans (body).
   ===================================================================== */
@font-face { font-family: "Marcellus SC"; font-weight: 400; src: url("node_modules/@fontsource/marcellus-sc/files/marcellus-sc-latin-400-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Cinzel"; font-weight: 600; src: url("node_modules/@fontsource/cinzel/files/cinzel-latin-600-normal.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Cinzel"; font-weight: 800; src: url("node_modules/@fontsource/cinzel/files/cinzel-latin-800-normal.woff2") format("woff2"); font-display: block; }

:root {
  --stencil: "Marcellus SC", "Cinzel", Georgia, serif;     /* headings */
  --type: "Marcellus SC", "Cinzel", Georgia, serif;
  --mono: "Cinzel", Georgia, serif;                         /* numbers */
  --title: "Cinzel", Georgia, serif;                        /* buttons, small caps labels */
  --px: "Alegreya Sans", "Segoe UI", sans-serif;
  --body: "Alegreya Sans", "Segoe UI", sans-serif;
  --toon: "Alegreya Sans", "Segoe UI", sans-serif;

  /* palette: rice paper on dark jade ink */
  --bg: #070c0d;
  --panel: #0e1617;
  --panel2: #142022;
  --line: #2a3e3e;
  --text: #e8e4d6;            /* rice paper */
  --dim: #8fa39c;
  --accent: #e0503a;          /* vermilion seal, lit for dark */
  --seal: #b8321f;            /* vermilion fill */
  --gold: #d9b45a;            /* aged gold */
  --goldglow: #ecc865;
  --toxic: #5fe3ea;           /* cyan qi (text strength) */
  --qi: #48dde6;              /* cyan qi (glow strength) */
  --red: #e0485a;
  --violet: #9a52c8;
  --ink: #050909;
  --rust: #1e7a72;

  /* rarities: read on dark ink */
  --r-normal: #c9cfcc;        /* MORTAL */
  --r-magic: #4fd88e;         /* SPIRIT */
  --r-rare: #66aaff;          /* TREASURE */
  --r-epic: #b86bff;          /* EPIC: purple (user, 2026-11-25) */

  /* frames: thin aged gold; cyan qi when active */
  --bronze: inset 0 0 0 1px #8a6c2c, inset 0 0 0 2px #050909, inset 0 0 0 3px rgba(138, 108, 44, .3);
  --bronze-hi: inset 0 0 0 1px #2fd0da, inset 0 0 0 2px #041416, inset 0 0 0 3px rgba(72, 221, 230, .45), 0 0 10px rgba(72, 221, 230, .5);
  --bronze-red: inset 0 0 0 1px #f07a5a, inset 0 0 0 2px #2a0804, inset 0 0 0 3px rgba(240, 100, 70, .45), 0 0 10px rgba(230, 80, 50, .45);

  /* textures: faint, on dark */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .6  0 0 0 0 .85  0 0 0 0 .8  0 0 0 .05 0'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
  --blotch: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.02' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .3  0 0 0 0 .3  0 0 0 .5 -.18'/></filter><rect width='220' height='220' filter='url(%23b)'/></svg>");
  --brush: linear-gradient(rgba(255, 255, 255, .07), rgba(255, 255, 255, 0));
  --rustmap: none;
  --stain: none;
  --scan: none;
  --rivets: none;
  --hazard: linear-gradient(90deg, #8a6c2c, #d9b45a 50%, #8a6c2c);
  --paper: linear-gradient(180deg, #182426, #0e1617);
  /* faint cloud scrolls woven into the ink */
  --clouds: url(assets/ui/ui_clouds.png);   /* xiangyun scroll clouds drawn by Codex (assets/ui/clouds_tile.png), faint jade lines, seamless 360px tile */
  /* cloud-scroll corners in aged gold */
  --cTL: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><g fill='none' stroke='%23c9a24e' stroke-width='1.3' stroke-linecap='round'><path d='M1.5 22V7.5a6 6 0 0 1 6-6H22'/><path d='M5.5 13.5a4 4 0 0 1 4-4 3 3 0 0 1 3 3 1.8 1.8 0 0 1-1.8 1.8 1.1 1.1 0 0 1-1.1-1.1'/><path d='M12.5 5.5h4M5.5 12.5v4'/></g></svg>");
  --cTR: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><g transform='matrix(-1 0 0 1 24 0)' fill='none' stroke='%23c9a24e' stroke-width='1.3' stroke-linecap='round'><path d='M1.5 22V7.5a6 6 0 0 1 6-6H22'/><path d='M5.5 13.5a4 4 0 0 1 4-4 3 3 0 0 1 3 3 1.8 1.8 0 0 1-1.8 1.8 1.1 1.1 0 0 1-1.1-1.1'/><path d='M12.5 5.5h4M5.5 12.5v4'/></g></svg>");
  --cBL: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><g transform='matrix(1 0 0 -1 0 24)' fill='none' stroke='%23c9a24e' stroke-width='1.3' stroke-linecap='round'><path d='M1.5 22V7.5a6 6 0 0 1 6-6H22'/><path d='M5.5 13.5a4 4 0 0 1 4-4 3 3 0 0 1 3 3 1.8 1.8 0 0 1-1.8 1.8 1.1 1.1 0 0 1-1.1-1.1'/><path d='M12.5 5.5h4M5.5 12.5v4'/></g></svg>");
  --cBR: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><g transform='matrix(-1 0 0 -1 24 24)' fill='none' stroke='%23c9a24e' stroke-width='1.3' stroke-linecap='round'><path d='M1.5 22V7.5a6 6 0 0 1 6-6H22'/><path d='M5.5 13.5a4 4 0 0 1 4-4 3 3 0 0 1 3 3 1.8 1.8 0 0 1-1.8 1.8 1.1 1.1 0 0 1-1.1-1.1'/><path d='M12.5 5.5h4M5.5 12.5v4'/></g></svg>");
  --corners: var(--cTL) left 3px top 3px / 24px 24px no-repeat, var(--cTR) right 3px top 3px / 24px 24px no-repeat,
    var(--cBL) left 3px bottom 3px / 24px 24px no-repeat, var(--cBR) right 3px bottom 3px / 24px 24px no-repeat;
  --silk: var(--clouds) 0 0 / 360px 360px repeat, var(--grain) 0 0 / 120px 120px repeat,
    linear-gradient(180deg, #142022 0%, #0e1617 45%, #0a1213 100%);
  --gilt: linear-gradient(90deg, rgba(201, 162, 78, 0), #8a6c2c 15%, #d9b45a 50%, #8a6c2c 85%, rgba(201, 162, 78, 0));
  --btn: linear-gradient(180deg, #1d2b2c 0%, #142022 55%, #0b1415 100%);
  --btn-on: linear-gradient(180deg, #14474c 0%, #0d3236 55%, #082224 100%);
  --btn-red: linear-gradient(180deg, #8a2a1a 0%, #6a1e12 55%, #48120a 100%);
  --row: linear-gradient(180deg, rgba(26, 40, 42, .92), rgba(14, 22, 23, .92));
}

/* panel text is set per element below; the ashfall drop shadows go away */
#panel *, #dock *, .sheet *, .screen *, #toast, #status { text-shadow: none !important; }

html, body { background: #070c0d; }
body { font-family: var(--body); font-weight: 500; color: var(--text); }
#phone { background: #070c0d; }
#stage { background: #0a1112; }
@media (min-width: 980px) {
  #app { background: radial-gradient(ellipse at 50% 30%, #122022, #050909 70%); }
}

/* ---------------------------------------------------------------- currency marks */
/* spirit stones: a small glowing crystal */
i.chit, .floater.coin::after {
  width: 10px; height: 14px; border-radius: 0; vertical-align: -2px;
  clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .95) 0 22%, rgba(255, 255, 255, 0) 23%),
    linear-gradient(90deg, #4fe0e8 0 50%, #18a8b4 50%),
    #4fe0e8;
  filter: drop-shadow(0 0 2px rgba(72, 221, 230, .9));
}
.chip i.chit { width: 11px; height: 15px; }
/* dao insight: a golden pearl with a cyan heart */
.corei {
  width: 12px !important; height: 12px !important; border-radius: 50% !important;
  background: radial-gradient(circle at 50% 55%, #e6ffff 0 14%, #7fe9ee 22%, rgba(127, 233, 238, 0) 34%),
    radial-gradient(circle at 34% 30%, #fffbe6 0 14%, #f3d272 34%, #b8862a 82%) !important;
  box-shadow: 0 0 0 1px #5a420e, 0 0 7px rgba(236, 200, 101, .8) !important;
}

/* ---------------------------------------------------------------- arena overlay */
#hud { background: linear-gradient(rgba(5, 10, 11, .82) 0 40%, rgba(5, 10, 11, 0)); }
#floorBox small { font-family: var(--title); font-weight: 700; font-size: 12px; letter-spacing: 2px; color: #b9c8c2; text-shadow: 0 1px 2px #000; }
#floorBox b { font-family: var(--title); font-weight: 800; font-size: 26px; color: var(--gold); text-shadow: 0 1px 2px #000, 0 0 10px rgba(236, 200, 101, .5); }
#status { font-family: var(--px); background: rgba(10, 18, 19, .92); box-shadow: inset 0 0 0 1px #8a6c2c; color: var(--text); }
#toast {
  font-family: var(--px); font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--text);
  background: var(--corners), var(--gilt) top / 100% 1px no-repeat, var(--silk);
  box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .8), 0 0 0 1px #000, 0 6px 18px rgba(0, 0, 0, .6), 0 0 22px rgba(72, 221, 230, .2);
  padding: 13px 16px 11px;
}

/* stage progress: thin gold thread */
#enemyUnit .hp { background: rgba(5, 10, 11, .75); box-shadow: 0 0 0 1px rgba(138, 108, 44, .8); }
#enemyUnit .hp i {
  background: linear-gradient(90deg, #8a6418, #d9b45a 70%, #fff1c2) !important;
  box-shadow: 0 0 6px 1px rgba(236, 200, 101, .7), 0 0 14px 2px rgba(236, 200, 101, .25);
}
/* boss: demonic violet into crimson */
.unit.xpbar.bossing .hp i, #enemyUnit.bossing .hp i {
  background: linear-gradient(90deg, #4a1468, #8a2a9e 55%, #d0304a 92%, #ff9aa8) !important;
  box-shadow: 0 0 6px 1px rgba(200, 50, 120, .8), 0 0 14px 2px rgba(140, 40, 160, .45);
}
#enemyUnit.bossing .hp { box-shadow: 0 0 0 1px #6a2c8e, 0 0 8px rgba(140, 40, 160, .5); }

/* floating text: bright fills with a dark ink outline */
.floater {
  font-family: var(--px); font-weight: 800; letter-spacing: .3px;
  text-shadow: 0 2px 0 #050909, 2px 0 0 #050909, -2px 0 0 #050909, 0 -2px 0 #050909,
    1.5px 1.5px 0 #050909, -1.5px 1.5px 0 #050909, 1.5px -1.5px 0 #050909, -1.5px -1.5px 0 #050909, 0 0 8px rgba(0, 0, 0, .6);
}
.floater.dmg { color: #ffffff; }
.floater.crit { color: #ffd84a; }
.floater.hurt { color: #ff5a72; }
.floater.heal { color: #6effc0; }
.floater.shield, .floater.block { color: #a8f4ff; }
.floater.burn { color: #ff9a4a; }
.floater.big {
  font-family: var(--stencil); font-weight: 400; color: #fff6d6; letter-spacing: 2px;
  text-shadow: 0 2px 0 #050909, 2px 0 0 #050909, -2px 0 0 #050909, 0 -2px 0 #050909, 0 0 12px rgba(236, 200, 101, .9), 0 0 24px rgba(72, 221, 230, .5);
}
.floater.coin { color: #b8fbff; }
.floater.core { color: #ffe08a; }
.floater.loot-normal { color: #e4ece9; }
.floater.loot-magic { color: #5ff0a8; }
.floater.loot-rare { color: #7fb4ff; }
.floater.loot-epic { color: #ffc24a; }

/* overhead health: jade green (amber when low), violet-crimson for the boss */
.ob { background: rgba(5, 10, 11, .8); box-shadow: 0 0 0 1px #000, 0 0 0 2px rgba(201, 162, 78, .45); }
.ob i { background: linear-gradient(#a8ffd8, #22b47a) !important; box-shadow: 0 0 6px rgba(80, 230, 160, .55) !important; }
.ob.low i { background: linear-gradient(#ffe08a, #d08a1a) !important; box-shadow: 0 0 6px rgba(255, 190, 60, .5) !important; }
.ob.boss { box-shadow: 0 0 0 1px #000, 0 0 0 3px #6a2c8e, 0 0 10px rgba(140, 40, 160, .6); }
.ob.boss i { background: linear-gradient(#e0507a, #6a1a6e) !important; box-shadow: 0 0 6px rgba(200, 50, 120, .6) !important; }
.ob u { background: #ffffff; }

/* the edges of the view: night closing in */
#stage::after {
  background:
    radial-gradient(ellipse 84% 66% at 50% 50%, rgba(3, 7, 8, 0) 44%, rgba(3, 7, 8, .45) 74%, rgba(3, 7, 8, .88) 100%),
    linear-gradient(0deg, rgba(3, 7, 8, .55), rgba(3, 7, 8, 0) 14%);
}

/* ---------------------------------------------------------------- panels: dark ink, gold frame, cloud corners */
#panel, #dock, .screen.solid {
  background: var(--corners), var(--silk) !important;
}
#panel {
  background: var(--gilt) 0 0 / 100% 2px no-repeat, var(--corners), var(--silk) !important;
  box-shadow: 0 -1px 0 #000, 0 -10px 24px rgba(0, 0, 0, .55);
}
#dock {
  background: var(--gilt) 0 0 / 100% 2px no-repeat, var(--silk) !important;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, .5);
}
@media (min-width: 980px) {
  .side { background: var(--corners), var(--silk) !important; border-color: #2a3e3e; }
  .side h2 { font-family: var(--stencil); font-size: 16px; letter-spacing: 2px; color: var(--gold); text-shadow: none; }
  #stats { background: rgba(0, 0, 0, .25); font-family: var(--px); font-weight: 700; color: var(--text); }
  #stats dt { color: var(--dim); }
  #log li { background: rgba(0, 0, 0, .25); font-family: var(--px); font-weight: 600; color: var(--text); }
  #log li.good { color: var(--toxic); }
  #log li.bad { color: var(--red); }
}

/* ---------------------------------------------------------------- buttons: dark lacquer tablets with gold edges */
#dockBtns > button, #sheetClose, .plus, .skill .equip, #attrReset, #autoSell, .chip, .acts button, .crafts button,
.opt button, .back, #itemBody .x, button.big, .sheet .row button, #nodeInfo button, #prestige button, .clsPick button {
  background: var(--brush) top / 100% 40% no-repeat, var(--btn) !important;
  box-shadow: var(--bronze); color: var(--text); border: 0;
}
.dbtn.on, .skill .equip.on, .opt button.on, #upgBtn.ready, .clsPick button.on, .acts .primary {
  background: var(--brush) top / 100% 40% no-repeat, var(--btn-on) !important;
  box-shadow: var(--bronze-hi) !important; color: #c8fbff !important;
}
button.big.primary {
  background: var(--brush) top / 100% 40% no-repeat, var(--btn-red) !important;
  box-shadow: var(--bronze-red) !important; color: #fff2e6 !important;
}
button:disabled:not(.on) { filter: grayscale(.5) opacity(.55); }
.dbtn { font-family: var(--title); font-weight: 800; font-size: 14px; letter-spacing: 1px; color: var(--text); }
#dockBtns:has(#choiceBtn:not([hidden])) .dbtn { font-size: 12px; letter-spacing: .5px; }
.dbtn i, #lvBadge i { background: var(--seal); color: #fff; font-family: var(--px); font-weight: 800; box-shadow: 0 0 0 1px #050909, 0 0 0 2px rgba(240, 110, 80, .6); }
#dockBtns .icon img { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .8)); }
#upgBtn.ready::after { background: var(--qi); box-shadow: 0 0 6px var(--qi); }
.plus { color: var(--toxic) !important; font-family: var(--title) !important; font-weight: 800; }
.plus:disabled { color: #4f625e !important; }
.plus:not(:disabled) { box-shadow: var(--bronze-hi) !important; }

/* level badge: a dark jade disc in a gold ring; the realm reads under it */
#lvBadge {
  background: radial-gradient(circle at 50% 38%, #1d3335, #101c1d 60%, #091112 100%) !important;
  box-shadow: inset 0 0 0 1px #8a6c2c, inset 0 0 0 3px #050909, inset 0 0 0 4px rgba(201, 162, 78, .45), inset 0 0 14px rgba(72, 221, 230, .18);
}
#lvBadge::before {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, rgba(72, 221, 230, 0), var(--qi), rgba(72, 221, 230, 0)); opacity: .9;
}
#lvBadge small { font-family: var(--title); font-weight: 700; font-size: 9px; letter-spacing: 1.5px; color: var(--dim); }
#lvBadge b { font-family: var(--title); font-weight: 800; font-size: 26px; color: var(--gold); margin-bottom: 5px; text-shadow: 0 0 8px rgba(236, 200, 101, .45) !important; }
#lvBadge.on { box-shadow: inset 0 0 0 1px #2fd0da, inset 0 0 0 3px #050909, inset 0 0 0 4px rgba(72, 221, 230, .6), 0 0 10px rgba(72, 221, 230, .55); }
@keyframes apBlink { 50% { background: #ff7a50; } }

/* XP: a thin line of cyan qi */
#xpBar { background: rgba(3, 8, 9, .9); box-shadow: 0 0 0 1px rgba(138, 108, 44, .6); }
#xpFill {
  background: linear-gradient(90deg, #138e9a, #48dde6 80%, #eaffff) !important;
  box-shadow: 0 0 6px 1px rgba(72, 221, 230, .85), 0 0 14px 2px rgba(72, 221, 230, .4) !important;
}

/* ---------------------------------------------------------------- sheet head: a title with a vermilion seal */
#sheetTitle, .sheet h3 {
  font-family: var(--stencil); font-weight: 400; font-size: 18px; letter-spacing: 1.5px; color: var(--text);
  padding: 2px 4px 0 24px; background: none; transform: none; box-shadow: none; position: relative;
}
#sheetTitle::before, .sheet h3::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px; transform: rotate(-4deg);
  background:
    linear-gradient(#f6e6d6, #f6e6d6) 4px 4px / 3px 3px no-repeat, linear-gradient(#f6e6d6, #f6e6d6) 9px 4px / 3px 3px no-repeat,
    linear-gradient(#f6e6d6, #f6e6d6) 4px 9px / 8px 3px no-repeat,
    var(--seal);
  border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(255, 200, 180, .35), 0 0 6px rgba(224, 80, 58, .45);
}
.chip { font-family: var(--title); font-weight: 700; color: var(--text); }
#sheetClose { font-family: var(--px); font-weight: 800; color: var(--text); }

/* ---------------------------------------------------------------- bag and paper doll */
.bayHead { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--gold); }
.bayHead::before { background: var(--accent); box-shadow: none; transform: rotate(45deg); }
.bayHead::after { height: 1px; background: linear-gradient(90deg, #8a6c2c, rgba(138, 108, 44, .1)); opacity: 1; }
.bayHead i { font-family: var(--title); font-weight: 700; color: var(--dim); }
#bagSalvage {
  order: 5; margin-inline-start: auto; padding: 3px 6px; min-height: 25px;
  border: 1px solid #9b6955; background: #3b2623; color: #ffd0b9;
  font: 700 11px/1.1 var(--body); white-space: nowrap;
}
#bagSalvage[hidden] { display: none; }
.bayHead #autoSell { font-family: var(--px); font-weight: 700; color: var(--text); }
.bayHead #sellZone {
  font-family: var(--title); font-weight: 800; letter-spacing: 1px; color: #fff2e6 !important;
  background: var(--btn-red) !important;
  box-shadow: inset 0 0 0 1px #f07a5a, inset 0 0 0 2px #2a0804 !important;
}

#doll {
  background-image: radial-gradient(60% 70% at 50% 55%, rgba(72, 221, 230, .08), transparent 70%), var(--clouds) !important;
  background-size: auto, 360px 360px !important;
  background-color: #0a1213 !important;
  box-shadow: 0 0 0 1px #8a6c2c, 0 0 0 3px #050909, 0 0 0 4px rgba(138, 108, 44, .4);
}
#doll::before { background: radial-gradient(40% 45% at 50% 40%, rgba(72, 221, 230, .06), transparent 70%); }
#doll .slot { background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55), inset 0 0 10px rgba(0, 0, 0, .4); }
#doll .slot small { font-family: var(--title); font-weight: 700; color: #6f827c; }
#doll .slot .ghostIcon { filter: grayscale(1) brightness(1.4); opacity: .16; }
#doll .slot.dropHint { box-shadow: inset 0 0 0 2px var(--qi), 0 0 8px rgba(72, 221, 230, .6); }
.dollStats {
  font-family: var(--px) !important; font-weight: 700; color: var(--text);
  background: linear-gradient(180deg, #182426, #0e1617); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .6);
  padding-left: 6px !important; justify-content: center;
}
.dollStats, .dollStats span { font-size: 12px; line-height: 1.2; }
.dollStats b { font-family: var(--title) !important; font-weight: 800; color: var(--gold); letter-spacing: .5px; font-size: 12px; }

#inv {
  background-color: #0a1213 !important;
  background-image: linear-gradient(rgba(60, 92, 90, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 92, 90, .35) 1px, transparent 1px), var(--grain) !important;
  box-shadow: 0 0 0 1px #8a6c2c, 0 0 0 3px #050909, 0 0 0 4px rgba(138, 108, 44, .4);
}
#inv .tile.bagItem { background: color-mix(in srgb, var(--rc) 14%, #0e1718); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 60%, #0e1718); }
#inv .tile.bagItem.r-normal { background: #151e1f; box-shadow: inset 0 0 0 2px #4a5856; }
#doll .tile { background: color-mix(in srgb, var(--rc) 12%, #0e1718); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, #0e1718); }
.tile.r-epic { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 75%, #0e1718), 0 0 8px rgba(184, 107, 255, .5) !important; }
.tile.new::before { font-family: var(--px); font-weight: 800; background: var(--seal); color: #fff; }
.tile.up::after { border-bottom-color: var(--qi); }
.foot.ok { background: rgba(72, 221, 230, .16); box-shadow: inset 0 0 0 2px #2fd0da; }
.foot.bad { background: rgba(224, 80, 58, .18); box-shadow: inset 0 0 0 2px var(--accent); }
.ghostTile { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }

/* ---------------------------------------------------------------- rows and slots */
.skill, .attr, .opt, .sslot, .spts, .derived, .cmp, .rankList li, #nodeInfo {
  background-image: var(--row) !important;
  background-size: auto !important;
}
.skill, .attr, .opt { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .5); }
.skill.learned { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .65), inset 3px 0 0 #3fbfb6; }
.skill.worn { box-shadow: inset 0 0 0 1px #2fd0da, inset 4px 0 0 var(--qi), 0 0 8px rgba(72, 221, 230, .35) !important; }
.skill.locked { opacity: .6; }
.sicon { background: #050909; box-shadow: 0 0 0 1px #8a6c2c; }
.sicon.fire { box-shadow: 0 0 0 1px var(--qi), 0 0 10px var(--qi); }
.stxt b { font-family: var(--px); font-weight: 800; color: var(--text); }
.stxt em { font-family: var(--title); font-weight: 700; color: var(--gold); }
.stxt em i { color: var(--toxic); }
.stxt span { font-family: var(--px); font-weight: 600; color: var(--dim); }
.skill .equip { font-family: var(--title); font-weight: 800; letter-spacing: 1px; color: var(--text); }
.sslot, .spts { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .65); }
.sslot small, .spts small { font-family: var(--title); font-weight: 700; color: var(--accent); }
.sslot b { font-family: var(--px); font-weight: 800; color: var(--text); }
.sslot.empty b { color: #5d706b; }
.sslot img { box-shadow: 0 0 0 1px #8a6c2c; }
.spts b { font-family: var(--title); font-weight: 800; color: #5d706b; }
.spts.has b { color: var(--toxic); text-shadow: 0 0 8px rgba(72, 221, 230, .6) !important; }
.sgroup { font-family: var(--stencil); font-weight: 400; font-size: 14px; letter-spacing: 2px; color: var(--accent); }

/* character sheet */
.realm {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px 5px;
  background: linear-gradient(90deg, rgba(72, 221, 230, .14), rgba(72, 221, 230, 0) 70%);
  box-shadow: inset 2px 0 0 var(--qi);
}
.realm small { font-family: var(--title); font-weight: 700; font-size: 10px; letter-spacing: 1.5px; color: var(--dim); white-space: nowrap; }
.realm b { font-family: var(--stencil); font-weight: 400; font-size: 16px; color: var(--toxic); text-align: right; text-shadow: 0 0 8px rgba(72, 221, 230, .35) !important; }
.clsPick button { position: relative; padding-bottom: 20px !important; }
.clsPick b { font-family: var(--title); font-weight: 800; font-size: 12px; letter-spacing: .3px; color: var(--text); }
.clsPick button.on b { color: #c8fbff; }
.clsPick small { font-family: var(--px); font-weight: 600; color: var(--dim); }
.clsPick button.on small { color: #9fd8d6; }
.clsPick i {
  position: absolute; left: 5px; bottom: 5px; font-style: normal; font-family: var(--title); font-weight: 800; font-size: 10px; letter-spacing: 2px;
  color: #d8e0dc; background: #2a3e3e; padding: 1px 5px 0;
}
.clsPick button.on i { background: var(--seal); color: #fff; }
.apHead b { font-family: var(--title); font-weight: 800; color: #5d706b; }
.apHead.has b { color: var(--toxic); text-shadow: 0 0 8px rgba(72, 221, 230, .6) !important; }
.apHead span { font-family: var(--stencil); font-weight: 400; letter-spacing: 1px; color: var(--accent); }
.apHead small { font-family: var(--px); color: var(--dim); }
.attr .an b { font-family: var(--title); font-weight: 800; color: var(--text); letter-spacing: .5px; }
.attr .an small { font-family: var(--px); font-weight: 600; color: var(--dim); }
.attr .av { font-family: var(--title); font-weight: 800; color: var(--gold); }
.derived { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .5); font-family: var(--px); }
.derived dt { color: var(--dim); font-family: var(--px); font-weight: 700; }
.derived dd { color: var(--text); font-family: var(--title); font-weight: 700; }
#attrReset { font-family: var(--title); font-weight: 800; letter-spacing: .5px; color: var(--text); }

/* ---------------------------------------------------------------- item sheet and spirit market */
#itemSheet, #choice { background: rgba(2, 6, 7, .62); backdrop-filter: blur(1.5px); }
.sheet {
  background: var(--gilt) 0 0 / 100% 2px no-repeat, var(--corners), var(--silk) !important;
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .6);
  padding-top: 14px;
}
.iname { font-family: var(--title); font-weight: 800; letter-spacing: .3px; }
.iname.r-normal { color: var(--r-normal); }
.iname.r-magic { color: var(--r-magic); }
.iname.r-rare { color: var(--r-rare); }
.iname.r-epic { color: var(--r-epic); text-shadow: 0 0 10px rgba(184, 107, 255, .5) !important; }
.ibase { font-family: var(--title); font-weight: 700; letter-spacing: 1px; color: var(--dim); }
#itemBody ul { font-family: var(--px); font-weight: 700; }
#itemBody li { color: #7fd6e0; }
#itemBody li.imp { color: var(--text); }
#itemBody h4 { color: var(--dim); }
#itemBody h5 { font-family: var(--stencil); font-weight: 400; letter-spacing: 2px; color: var(--accent); }
#itemBody details summary { color: var(--dim); font-family: var(--title); font-weight: 700; }
.cmp { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .5); font-family: var(--title); font-weight: 700; color: var(--dim); }
.cmp .pos { color: #4fd88e; }
.cmp .neg { color: #ff6a5a; }
.acts button { font-family: var(--title); font-weight: 800; letter-spacing: 1px; }
#itemBody :is(#iEquip, .itemSalvage) { height: auto; min-height: 42px; min-width: 0; padding: 6px 8px; }
#itemBody .itemSalvage {
  display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: 4px 7px;
  background: #3b2623 !important; color: #ffd0b9; letter-spacing: normal;
}
#itemBody .itemSalvage > b { min-width: 0; overflow-wrap: anywhere; }
.acts .danger {
  background: var(--btn-red) !important;
  box-shadow: inset 0 0 0 1px #f07a5a, inset 0 0 0 2px #2a0804 !important; color: #fff2e6 !important;
}
.acts .danger i.chit { filter: drop-shadow(0 0 2px #fff); }
.crafts b { font-family: var(--title); font-weight: 800; letter-spacing: .5px; color: var(--text); }
.crafts small { font-family: var(--px); font-weight: 600; color: var(--dim); }
.crafts i { font-family: var(--title); font-weight: 700; color: var(--gold); font-style: normal; }
#itemBody .x { font-family: var(--px); font-weight: 800; color: var(--accent); }
#itemBody.flash { animation: qiFlash .5s ease-out; }
@keyframes qiFlash { 0% { box-shadow: inset 0 0 0 2px var(--qi), 0 0 24px var(--qi); } }

.sheet h3 { display: inline-block; align-self: flex-start; }
.sheet h3 small { color: var(--dim); font-family: var(--title); font-weight: 700; font-size: 12px; }
.card { background: #0e1617; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
.card .pic .tile { background: #070c0d; }
.card .price {
  font-family: var(--title); font-weight: 800; font-size: 15px; color: var(--text);
  background: var(--btn); box-shadow: var(--bronze); border: 0;
}
.card.poor .price { color: #e07a6a; opacity: .8; }
.card.sold .price { color: var(--dim); }
.upTag { color: var(--toxic); }
#choiceBtn { font-family: var(--title); font-weight: 800; color: var(--text); }
#choiceBtn.has { background: var(--btn-on) !important; box-shadow: var(--bronze-hi); color: #c8fbff; }
#choiceBtn.has b { background: var(--seal); color: #fff; }
.vinfo li { color: #7fd6e0; font-family: var(--px); font-weight: 700; }

/* ---------------------------------------------------------------- full pages */
.screen header {
  background: linear-gradient(180deg, #182628, #0e1617) !important; border-bottom: 0; position: relative;
}
.screen header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gilt); pointer-events: none; }
.screen header h2 { font-family: var(--stencil); font-weight: 400; letter-spacing: 2px; color: var(--text); }
.screen header .chip { color: var(--text); }
.back { font-family: var(--title); font-weight: 800; letter-spacing: 1px; }
.note { color: var(--dim); font-family: var(--px); font-weight: 600; font-style: italic; }
.rankList li { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .5); font-family: var(--px); font-weight: 700; color: var(--text); }
.rankList li .n { color: var(--dim); font-family: var(--title); font-weight: 700; }
.rankList li .f { color: var(--gold); font-family: var(--title); font-weight: 700; }
.rankList li:nth-child(-n+3) .n { color: var(--accent); }
.rankList li.me { background-image: linear-gradient(180deg, rgba(20, 71, 76, .9), rgba(8, 34, 36, .9)) !important; outline: 0; box-shadow: inset 0 0 0 1px #2fd0da, 0 0 8px rgba(72, 221, 230, .45); }
.rankList li.me .who { color: #c8fbff; }
.opt label { font-family: var(--title); font-weight: 800; letter-spacing: 1px; color: var(--text); }
.opt label small { font-family: var(--px); font-weight: 600; color: var(--dim); letter-spacing: 0; }
.opt button { font-family: var(--title); font-weight: 800; }
.volBox b { font-family: var(--title); font-weight: 800; color: var(--gold); }
#optList :is(.opt label, .volBox, .volBox input[type=range]) { min-width: 0; }
#optList .opt label { overflow-wrap: anywhere; }
@media (max-width: 380px) {
  #optList .opt.vol { flex-direction: column; align-items: stretch; }
  #optList .volBox { flex-basis: auto; }
}
.volBox input[type=range] {
  background: linear-gradient(90deg, #138e9a 0, var(--qi) var(--p, 50%), #1a2829 var(--p, 50%));
  box-shadow: 0 0 0 1px rgba(138, 108, 44, .7), 0 0 8px rgba(72, 221, 230, .25);
}
.volBox input[type=range]::-webkit-slider-thumb {
  background: radial-gradient(circle at 50% 40%, #2a4244, #142022 60%, #c9a24e 61%, #c9a24e 70%, #0e1617 71%);
  width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px #8a6c2c, 0 1px 3px rgba(0, 0, 0, .6), 0 0 8px rgba(72, 221, 230, .5);
}
.volBox input[type=range]::-moz-range-thumb { background: #142022; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 1px #c9a24e; }

#tree polyline { stroke: #2a3e3e; }
#tree polyline.on { stroke: var(--qi); filter: drop-shadow(0 0 1px var(--qi)); }
.branch { font-family: var(--stencil); font-weight: 400; letter-spacing: 1.5px; color: var(--gold); background: #0e1617; }
.node { background: #050909; box-shadow: 0 0 0 1px #8a6c2c, 0 0 0 3px #0e1617, 0 0 0 4px rgba(138, 108, 44, .5); }
.node img { filter: none; }
.node span { font-family: var(--title); font-weight: 800; background: #0e1617; color: var(--dim); box-shadow: 0 0 0 1px rgba(138, 108, 44, .7); }
.node.owned { box-shadow: 0 0 0 1px #2fd0da, 0 0 0 3px #0e1617, 0 0 0 4px rgba(72, 221, 230, .6); }
.node.can { box-shadow: 0 0 0 1px #2fd0da, 0 0 0 3px #0a2a2c, 0 0 12px rgba(72, 221, 230, .8); }
.node.maxed { box-shadow: 0 0 0 1px #c9a24e, 0 0 0 3px #2a2008, 0 0 10px rgba(236, 200, 101, .7); }
.node.maxed span { color: var(--gold); }
.node.sel { outline: 2px solid #e8e4d6; outline-offset: 3px; filter: drop-shadow(0 0 6px rgba(72, 221, 230, .6)); }
#nodeInfo { background-color: #0e1617 !important; box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .5); color: var(--text); }
#nodeInfo .t { font-family: var(--stencil); font-weight: 400; color: var(--text); }
#nodeInfo .t i { color: var(--gold); font-family: var(--title); font-weight: 800; font-style: normal; }
#nodeInfo p { font-family: var(--px); font-weight: 600; color: var(--dim); }
#nodeInfo p b { color: var(--toxic); }
#nodeInfo button, #prestige button { font-family: var(--title); font-weight: 800; letter-spacing: .5px; color: var(--text); }
#prestige p { font-family: var(--px); font-weight: 600; color: var(--dim); }
#prestige button { color: var(--accent); }

/* ---------------------------------------------------------------- main menu */
#screen-menu { background: linear-gradient(rgba(5, 10, 11, .72) 0%, rgba(5, 10, 11, .18) 26%, rgba(5, 10, 11, 0) 36%, #0a1213 40%) !important; }
.menuBody { border-top: 0 !important; background: var(--corners), var(--silk) !important;
  box-shadow: 0 -2px 0 #8a6c2c, 0 -3px 0 #000, 0 -10px 22px rgba(0, 0, 0, .55); }
.logo { font-family: var(--stencil); }
/* a flying sword crossing a ring of qi */
.logo .l0 {
  width: 64px; height: 64px; border-radius: 0; margin-bottom: 2px; opacity: 1; -webkit-mask: none; mask: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><defs><radialGradient id='g'><stop offset='0' stop-color='%23bdf6f8' stop-opacity='.55'/><stop offset='.55' stop-color='%2348dde6' stop-opacity='.25'/><stop offset='1' stop-color='%2348dde6' stop-opacity='0'/></radialGradient></defs><circle cx='32' cy='32' r='30' fill='url(%23g)'/><circle cx='32' cy='32' r='19' fill='none' stroke='%2348dde6' stroke-width='2'/><circle cx='32' cy='32' r='23' fill='none' stroke='%23c9a24e' stroke-width='1' stroke-dasharray='2 3'/><path d='M50 10 L27 37 L24 40 L27 37 Z' stroke='%23e6ffff' stroke-width='3.6' stroke-linecap='round'/><path d='M50 10 L27 37' stroke='%237ab8c4' stroke-width='1.2'/><path d='M22 35 L32 45' stroke='%23c9a24e' stroke-width='3' stroke-linecap='round'/><path d='M25 42 L17 50' stroke='%23e0503a' stroke-width='3' stroke-linecap='round'/><circle cx='16' cy='51' r='2' fill='%23c9a24e'/></svg>") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(72, 221, 230, .7));
}
.logo .l1 {
  font-family: var(--stencil); font-weight: 400; font-size: 50px; letter-spacing: 5px; color: #f2fbfa;
  text-shadow: 0 0 2px #041416, 0 2px 0 #041416, 0 0 14px rgba(72, 221, 230, .9), 0 0 30px rgba(72, 221, 230, .45) !important;
}
.logo small {
  font-family: var(--title); font-weight: 700; font-size: 13px; letter-spacing: 4px; color: #ecd08a;
  background: linear-gradient(90deg, rgba(5, 10, 11, 0), rgba(5, 10, 11, .85) 16%, rgba(5, 10, 11, .85) 84%, rgba(5, 10, 11, 0));
  padding: 5px 26px 3px; transform: none; box-shadow: none; border: 0;
}
#menuInfo { font-family: var(--title); font-weight: 700; font-size: 14px; color: var(--dim); }
#menuInfo b { color: var(--gold); font-weight: 800; }
#menuInfo .realmLine { display: block; margin-top: 4px; font-family: var(--stencil); font-weight: 400; font-size: 15px; color: var(--toxic); letter-spacing: 1px; }
button.big { font-family: var(--title); font-weight: 800; letter-spacing: 2px; color: var(--text); }
button.big.primary { color: #fff2e6 !important; }
.big i { color: var(--gold); font-family: var(--title); font-weight: 700; font-style: normal; }
.big i.can { color: #fff; background: var(--seal); }
.menuBody .foot { font-family: var(--title); color: #5d706b; }

/* ---------------------------------------------------------------- small phones: keep labels on one line */
@media (max-width: 380px) {
  .dbtn { font-size: 12px; letter-spacing: .5px; }
  #sheetTitle { font-size: 16px; }
  .logo .l1 { font-size: 42px; }
}

/* ---------------------------------------------------------------- fixes after the first look */
.screen header { box-shadow: none; }
#sheetTitle::before, .sheet h3::before { margin-left: 0; }
#skillHead .sslot b { font-family: var(--px); font-weight: 800; font-size: 13px; letter-spacing: 0; color: var(--text); }
#skillHead .sslot.empty b { color: #5d706b; font-weight: 700; }
#skillHead .spts b { font-family: var(--title); font-weight: 800; font-size: 20px; letter-spacing: 0; color: #5d706b; }
#skillHead .spts.has b { color: var(--toxic); }
.node.locked { opacity: .7; filter: grayscale(.75); }
.node.locked span { color: #6f827c; }


/* ---------------------------------------------------------------- the village */
#phone.inTown #floorBox, #phone.inTown #enemyUnit { display: none !important; }
#placeTag { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; pointer-events: none; }
#placeTag[hidden] { display: none !important; }
#placeTag small { font-family: var(--title); font-size: 8.5px; letter-spacing: 1.6px; color: var(--dim); }
#placeTag b { font-family: var(--stencil); font-size: 18px; letter-spacing: 2px; color: var(--gold); text-shadow: 0 0 8px rgba(0, 0, 0, .9), 0 1px 0 #000; }
#townBtn { position: absolute; left: 10px; top: 44px; z-index: 6; padding: 6px 10px; font-family: var(--title); font-size: 11px; letter-spacing: 1px;
  color: var(--text); background: var(--btn); border: 0; box-shadow: var(--bronze); cursor: pointer; }
#townBtn[hidden] { display: none !important; }
.npcTag { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; pointer-events: none; will-change: transform; }
.npcTag b { display: block; font-family: var(--title); font-size: 10px; letter-spacing: 1px; color: #e8d9a8; text-shadow: 0 0 3px #000, 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, .8); }
.npcTag small { display: block; font-family: var(--body); font-size: 9px; color: #8fd8d8; text-shadow: 0 0 3px #000, 0 1px 0 #000; }
.npcTag.near b { color: #ffe08a; }
#phone:not(.inTown) .npcTag { display: none; }
#wardenGuide {
  position: absolute; top: 0; left: 0; z-index: 4; width: 25px; height: 16px;
  pointer-events: none; filter: drop-shadow(0 2px 1px #111) drop-shadow(0 0 3px #e5a83b70);
}
#wardenGuide::before, #wardenGuide::after { content: ""; position: absolute; inset: 0; }
#wardenGuide::before {
  clip-path: polygon(
    10% 0, 20% 0, 20% 10%, 40% 10%, 40% 20%, 60% 20%, 60% 30%,
    80% 30%, 80% 40%, 100% 40%, 100% 60%, 80% 60%, 80% 70%,
    60% 70%, 60% 80%, 40% 80%, 40% 90%, 20% 90%, 20% 100%, 10% 100%
  );
  background: linear-gradient(#ffe597, #d39736);
}
#wardenGuide::after {
  clip-path: polygon(
    20% 20%, 30% 20%, 30% 30%, 50% 30%, 50% 40%, 70% 40%,
    70% 45%, 85% 45%, 85% 55%, 70% 55%, 70% 60%, 50% 60%,
    50% 70%, 30% 70%, 30% 80%, 20% 80%
  );
  background: linear-gradient(#f04a3c, #a91e24);
}
#npcSheet { position: absolute; inset: 0; z-index: 24; display: flex; align-items: flex-end; background: rgba(2, 6, 7, .5); }
#npcSheet.hidden { display: none; }
#npcSheet .sheet { position: relative; width: 100%; padding: 16px 14px 18px; }
#npcSheet .x { position: absolute; right: 17px; top: 16px; }
#npcName { margin: 0; padding-right: 52px; font-family: var(--stencil); font-size: clamp(17.6px, 4.32vw, 20.8px); letter-spacing: 1px; color: var(--gold); }
#npcTitle { display: block; margin-top: 4px; padding-right: 52px; font-family: var(--body); font-size: 11.2px; font-weight: 600; color: #8fd8d8; }
#npcLine { margin: 11px 0 14px; font-family: var(--body); font-size: clamp(13.6px, 3.52vw, 15.2px); line-height: 1.45; color: var(--text); font-style: normal; }
#npcActs { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 2px; }
#npcActs > * { flex-shrink: 0; }
#npcActs button { width: 100%; margin: 0; }
#npcActs button.big { min-height: 45px; padding: 9px 10px; font-size: clamp(12px, 3.52vw, 14.4px); line-height: 1.25; letter-spacing: .4px; }
#npcSheet .x { width: 38px; height: 36px; padding: 0; font-family: var(--title); font-size: 16px; color: var(--text) !important; background: var(--btn) !important; border: 0; box-shadow: var(--bronze); cursor: pointer; }

/* ---------------------------------------------------------------- the five paths: slide-through profile card */
.heroSlide { position: relative; display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 4px; margin: 8px 0 10px; }
.hsNav {
  height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2);
  color: var(--gold); font: 400 26px/1 var(--title); cursor: pointer;
}
.hsNav:active { background: #1c2c2e; color: #fff; }
.hsCard {
  position: relative; padding: 10px 10px 10px; border: 1px solid color-mix(in srgb, var(--tint) 45%, var(--line)); border-radius: 6px;
  background: radial-gradient(120% 90% at 18% 0%, color-mix(in srgb, var(--tint) 16%, transparent), transparent 60%), var(--panel);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), 0 0 14px color-mix(in srgb, var(--tint) 12%, transparent); touch-action: pan-y; user-select: none;
}
.hsTop { display: flex; gap: 10px; align-items: center; }
.hsArt {
  flex: 0 0 96px; height: 104px; position: relative; overflow: hidden; border-radius: 4px;
  background: radial-gradient(60% 34% at 50% 84%, color-mix(in srgb, var(--tint) 40%, transparent), transparent 70%), linear-gradient(#1c2a30, #0c1416);
  border: 1px solid var(--line);
}
.hsSprite { position: absolute; image-rendering: pixelated; background-repeat: no-repeat; }
.hsWho { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hsWho em { font: 700 9px/1.2 var(--title); letter-spacing: 1.5px; font-style: normal; color: var(--tint); }
.hsWho b { font: 400 17px/1.1 var(--stencil); letter-spacing: .5px; color: var(--text); white-space: nowrap; }
.hsWho small { font: 500 12px/1.25 var(--body); color: var(--dim); }
.hsTags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hsTags span {
  padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--tint) 60%, transparent); border-radius: 2px;
  font: 700 9px/1.3 var(--title); letter-spacing: 1px; color: var(--tint); background: color-mix(in srgb, var(--tint) 10%, transparent);
}
.hsCard p { margin: 8px 0; min-height: 3.9em; font: 500 13px/1.3 var(--body); color: #c8c4b6; }
.hsBars { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 9px; }
.hsBar { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hsBar span { font: 700 9px/1 var(--title); letter-spacing: 1px; color: var(--dim); }
.hsBar i { display: flex; gap: 2px; }
.hsBar u { width: 11px; height: 6px; background: #1a2628; border: 1px solid #2a3e3e; text-decoration: none; }
.hsBar u.on { background: var(--tint); border-color: var(--tint); box-shadow: 0 0 5px color-mix(in srgb, var(--tint) 60%, transparent); }
.hsPick {
  width: 100%; padding: 9px 6px; border: 1px solid var(--gold); border-radius: 3px; background: linear-gradient(#2a2412, #17140a);
  color: var(--gold); font: 700 12px/1 var(--title); letter-spacing: 2px; cursor: pointer;
}
.hsPick.on { border-color: var(--line); background: var(--panel2); color: var(--dim); cursor: default; }
.hsDots { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; padding-top: 2px; }
.hsDots i { width: 9px; height: 9px; border: 1px solid var(--line); background: #101a1b; transform: rotate(45deg); cursor: pointer; }
.hsDots i.mine { border-color: var(--gold); }
.hsDots i.on { background: var(--tint); border-color: var(--tint); box-shadow: 0 0 6px var(--tint); }

/* ---------------------------------------------------------------- language */
.langOpt { align-items: center; }
.langBox { display: flex; gap: 4px; }
.langBox button { min-width: 0 !important; padding: 8px 9px !important; font-size: 12px !important; letter-spacing: .5px !important; white-space: nowrap; }
/* Thai and Chinese: the Latin display faces have no glyphs for them, so name faces that do
   (system fonts first, so nothing has to be downloaded) and loosen what was tuned for capitals */
@font-face { font-family: "Anuphan"; font-weight: 400; src: url("node_modules/@fontsource/anuphan/files/anuphan-thai-400-normal.woff2") format("woff2"); unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC; font-display: swap; }
@font-face { font-family: "Anuphan"; font-weight: 500; src: url("node_modules/@fontsource/anuphan/files/anuphan-thai-500-normal.woff2") format("woff2"); unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC; font-display: swap; }
@font-face { font-family: "Anuphan"; font-weight: 600; src: url("node_modules/@fontsource/anuphan/files/anuphan-thai-600-normal.woff2") format("woff2"); unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC; font-display: swap; }
@font-face { font-family: "Anuphan"; font-weight: 700; src: url("node_modules/@fontsource/anuphan/files/anuphan-thai-700-normal.woff2") format("woff2"); unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC; font-display: swap; }
@font-face { font-family: "Anuphan"; font-weight: 400; src: url("node_modules/@fontsource/anuphan/files/anuphan-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; font-display: swap; }
@font-face { font-family: "Anuphan"; font-weight: 600; src: url("node_modules/@fontsource/anuphan/files/anuphan-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; font-display: swap; }
/* Thai: Anuphan everywhere (the user's pick), numbers keep the game's Cinzel */
html[data-lang="th"] {
  --stencil: "Anuphan", "Leelawadee UI", "Thonburi", "Noto Sans Thai", Tahoma, sans-serif;
  --type: var(--stencil); --mono: "Cinzel", "Anuphan", "Leelawadee UI", Tahoma, serif; --title: var(--stencil);
  --px: var(--stencil); --body: var(--stencil); --toon: var(--stencil);
}
html[data-lang="th"] * { letter-spacing: 0 !important; }
html[data-lang="th"] body { line-height: 1.45; }

html[data-lang="th"] .tile.new::before { content: "ใหม่"; }
html[data-lang="th"] .hsWho em, html[data-lang="th"] .hsBar span, html[data-lang="th"] .hsTags span { font-size: 11px; }
html[data-lang="th"] .realm small, html[data-lang="th"] #placeTag small { font-size: 12px; }
.langBox button { font-family: "Cinzel", "Anuphan", "Leelawadee UI", "Thonburi", "Noto Sans Thai", "Microsoft YaHei", "PingFang SC", sans-serif !important; }

/* ---------------------------------------------------------------- which land the stage is in */
#landTag { position: absolute; left: 12px; top: 76px; font-family: var(--title); font-weight: 700; font-size: 9.5px; letter-spacing: 1.6px; color: #b9c8c2; text-shadow: 0 1px 2px #000; pointer-events: none; }
#phone.inTown #landTag { display: none; }

/* ---------------------------------------------------------------- items: rendered art, grades, materials, the forge */
:root { --r-legend: #ff6a3a; }
.tile.r-legend { --rc: var(--r-legend); }
.iname.r-legend { color: var(--r-legend); text-shadow: 0 0 8px rgba(255, 106, 58, .5), 0 1px 0 #000; }
.floater.loot-legend { color: var(--r-legend); }
.tile { position: relative; }
.tile.art3d img { image-rendering: auto; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .7)); }
.card.vcard .pic .tile.art3d img, .fTile.art3d img { width: 92%; height: 92%; }
.plusTag { font-style: normal; font: 800 10px/1 var(--title); color: #ffe08a; text-shadow: 0 1px 0 #000, 0 0 4px #000; }
.tile .plusTag { position: absolute; right: 2px; bottom: 2px; pointer-events: none; }
.iname .plusTag { margin-left: 6px; font-size: 13px; }
.iq { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 2px; font: 700 9px/1.2 var(--title); letter-spacing: 1px; color: var(--dim); }
.iq b { color: var(--gold); font-size: 11px; margin-right: 8px; }
#itemBody ul li, .forgeItem ul li { display: flex; justify-content: space-between; gap: 8px; }
.rng { font-style: normal; font-size: .82em; color: #6f8a88; white-space: nowrap; }
.smithHint { margin: 10px 0 2px; font: 500 12px/1.35 var(--body); color: var(--dim); }
#sellZone { display: none !important; }
.matBar { display: flex; flex-wrap: wrap; gap: 3px 4px; margin: 6px 0 2px; }
.mc { display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px 1px 2px; border: 1px solid var(--line); border-radius: 3px; background: #0b1213; }
.mc img { width: 20px; height: 20px; image-rendering: auto; }
.mc b { font: 700 11px/1 var(--title); color: var(--text); }
.mc.none { opacity: .38; }
.mc.lack, .lack { color: #ff7b6a; }
.mc.lack { border-color: #8a3a30; }
.mc.lack b { color: #ff7b6a; }
#workSheet { position: absolute; inset: 0; z-index: 26; background: rgba(4, 8, 9, .8); display: flex; align-items: center; justify-content: center; padding: 16px 12px; }
#workSheet.hidden { display: none; }
#workBody { position: relative; width: 100%; max-width: 460px; max-height: 100%; overflow-y: auto; }
#workBody h3 { margin: 0 0 4px; padding-right: 36px; }
#workBody.forgeSheet {
  --forge-line: #735742;
  --forge-gold: #f1ca89;
  background: var(--clouds) 45px 60px / 330px 330px repeat,
    linear-gradient(#2d241e 0, #1a2323 220px, #101a1c 100%) !important;
  border: 1px solid #98774e;
  border-top: 2px solid #c59256;
  padding: 0 0 13px;
  scrollbar-width: thin;
}
.forgeHeader {
  display: flex; align-items: center; gap: 12px; min-height: 70px;
  padding: 13px 16px; border-bottom: 1px solid var(--forge-line);
  background: radial-gradient(ellipse at 10% 100%, #823f2761, transparent 75%), #241d1a;
}
#workBody.forgeSheet:has(> .forgeHeaderEnhance) { border-top-width: 1px; }
.forgeHeader.forgeHeaderEnhance {
  min-height: 0; padding: 7px 12px;
}
#workBody.forgeSheet h3 {
  flex: 1; min-width: 0; margin: 0; padding: 0; color: #ffe0ac;
  font: 700 clamp(15px, 4.1vw, 19px)/1.24 var(--title);
}
#workBody.forgeSheet h3::before { content: none; }
#workBody .forgeHeaderEnhance h3 { align-self: center; text-align: left; }
#workBody .forgeClose {
  display: grid; place-items: center; align-self: flex-start; width: 33px; height: 33px;
  flex: none; border: 1px solid #88674a; background: #2e231c; color: #ffe0ac;
  font: 22px/1 var(--body); cursor: pointer;
}
.forgeWallet { margin: 10px 12px; }
.forgeWallet > div { min-width: 0; padding: 6px 7px; border: 1px solid #7e63464f; background: #151b1bcb; }
.forgeWallet small { display: block; color: #d6b991; font-size: 11px; margin-bottom: 5px; }
.forgeBalance > b { display: flex; align-items: center; gap: 4px; color: var(--forge-gold); font-size: 15px; }
.forgeMaterials .matBar { margin: 0; gap: 3px; }
.forgeWallet .mc.none { opacity: .64; }
.forgeWallet .mc img { width: 15px; height: 15px; }
.forgeFlow { display: grid; gap: 10px; padding: 0 12px; }
.forgePicker, .forgeSelection, .forgeYield {
  padding: 9px; border: 1px solid #685c49; background: #111c1ddb; min-width: 0;
}
.forgeFlow h4 { margin: 0 0 7px; color: #f7d7a5; font: 700 13px/1.3 var(--title); }
.forgePicker h5 { margin: 5px 0 4px; color: #a6bfbc; font: 600 11px/1.25 var(--body); }
.forgeTray { display: flex; gap: 5px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.forgeTray > button { flex: none; }
.forgeSheet .fTile { width: 38px !important; height: 38px !important; }
.forgeSheet .fTile.sel { outline: 2px solid #ffd38e; box-shadow: none; }
.forgeSheet .forgeGrid .fTile.sel::after {
  content: '✓'; position: absolute; top: 1px; left: 1px; padding-inline: 3px; color: #23190e; background: #f8cc84;
  font: 700 12px/1.3 sans-serif;
}
.forgeSelected { display: flex; align-items: center; gap: 8px; }
.forgeSelected > img {
  flex: none; width: 49px; height: 49px; object-fit: contain; padding: 2px;
  border: 1px solid #7c6448; background: #0a1416;
}
.forgeSelected > div { min-width: 0; }
.forgeStriking { position: relative; }
.forgeStriking > img { animation: forgeStrike 450ms ease-out both; }
.forgeStriking::before {
  content: ''; position: absolute; z-index: 1; left: 24px; top: 4px;
  width: 39px; height: 16px; pointer-events: none; transform-origin: 88% 75%;
  background: linear-gradient(#b9ad97, #736c61 55%, #373637 60%) left center / 14px 16px no-repeat,
              linear-gradient(#b18960, #644331) right center / 26px 5px no-repeat;
  animation: forgeHammer 450ms ease-out both;
}
.forgeStriking::after {
  content: ''; position: absolute; z-index: 2; left: 24px; top: 24px; width: 3px; height: 3px; pointer-events: none;
  background: #fff3af; color: #ffbd64;
  box-shadow: -23px -8px, -12px -23px, 9px -21px, 23px -10px, 25px 7px, 9px 19px, -20px 14px;
  animation: forgeSparks 450ms ease-out both;
}
@keyframes forgeHammer {
  0% { opacity: 0; transform: rotate(64deg); }
  28% { opacity: 1; transform: rotate(54deg); }
  58% { opacity: 1; transform: rotate(-16deg); }
  100% { opacity: 0; transform: rotate(14deg); }
}
@keyframes forgeStrike {
  0%, 100% { transform: none; }
  27% { transform: translateY(-5px) rotate(-9deg); }
  58% { transform: translateY(3px) rotate(5deg); filter: brightness(1.7); }
  76% { transform: translateY(-1px) rotate(-3deg); }
}
@keyframes forgeSparks {
  0%, 52% { opacity: 0; transform: scale(.35); }
  59% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5); }
}
@media (prefers-reduced-motion: reduce) {
  .forgeStriking > img { animation: none; }
  .forgeStriking::before, .forgeStriking::after { display: none; }
}
.forgeSelected .iname { padding: 0; font-size: clamp(14px, 4vw, 18px); overflow-wrap: anywhere; }
.forgeSelected small { color: #a6bfbc; font-size: 11px; }
.forgeDetails { margin-top: 7px; border-top: 1px solid #64584287; }
.forgeDetails summary { padding-top: 6px; color: #eac48a; cursor: pointer; font-size: 12px; }
.forgeDetails .forgeItem { margin-top: 6px; padding: 6px 8px; font-size: 13px; }
.forgeDetails .iname { display: none; }
#workBody .forgeOp {
  display: flex; flex-direction: column; gap: 5px; text-align: left;
  width: 100%; min-height: 86px; padding: 9px 12px; color: #f9dfad;
  border: 1px solid #a97d4b; background: linear-gradient(#593829,#362923); cursor: pointer;
}
.forgeOpHeading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; justify-content: space-between; }
.forgeOpHeading > b { color: #ffe2af; font: 700 12px/1.3 var(--title); }
.forgeNext { font: 700 12px/1.1 var(--body); white-space: nowrap; }
.forgeOp small { color: #e0cbb2; font: 500 13px/1.35 var(--body); }
.forgeOp .cost { justify-content: flex-start; margin-top: auto; gap: 4px; }
.forgeTerms { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; }
.forgeChance { margin-inline-start: auto; color: #ffcc90; font: 700 13px/1.25 var(--body); }
.forgeRisk { margin-top: 5px; color: #e3c5a5; font: 500 12px/1.3 var(--body); }
#workBody .forgeOp:disabled { background: #171f20; border-color: #534c3e; cursor: default; filter: none; }
.forgeUnavailable { color: #ffb39c; font: 600 12px/1.25 var(--body); }
.forgeFeedback { margin-top: 4px; color: #aedfbd; font-size: 12px; }
.forgeFeedback.fail { color: #ffb39c; }
.forgeFeedback:empty { display: none; }
.forgeEmpty { margin: 3px 0; color: #a9b8b1; font-size: 13px; }
#workBody .forgeDanger {
  min-height: 37px; width: 100%; margin-top: 7px; padding: 5px 9px;
  border: 1px solid #a06350; background: #3d2623; color: #ffd1be; font: 700 12px/1.3 var(--title);
}
#workBody .forgeDanger:disabled { opacity: .55; cursor: default; }
.forgeGrades { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
#workBody .forgeGrades button {
  padding: 5px; font: 600 11px/1.25 var(--body); border: 1px solid #55574e;
  background: #1d2828; color: #d2d4c8;
}
.forgeGrades button b { margin-inline-start: 5px; color: #f6cf96; }
#workBody .forgeGrades button[aria-pressed="true"] { background: #624329; border-color: #c89858; }
#workBody .forgeGrades button:disabled { opacity: .52; }
.forgeSheet .forgeGrid { grid-template-columns: repeat(auto-fill, 38px); max-height: 136px; }
.forgeYield > div:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.forgeYield > div:first-child b { flex: none; color: #f4ca8b; font-size: 12px; }
.forgeYieldList { display: flex; flex-wrap: wrap; gap: 4px; }
.forgeYieldList > span {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 5px;
  border: 1px solid #655a44; background: #0e1819; color: #e6d3b4; font-size: 12px;
}
.forgeYieldList img { width: 21px; height: 21px; }
.forgeYieldList b { color: #fcd59b; }
.goldLine { display: flex; align-items: center; gap: 4px; margin: 4px 0 6px; font: 700 13px/1 var(--title); color: var(--gold); }
.forgeGrid { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 4px; max-height: 148px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: #070c0d; }
.fTile { width: 44px !important; height: 44px !important; padding: 0; }
.fTile img { width: 80%; height: 80%; object-fit: contain; }
.fTile.sel { outline: 2px solid var(--gold); outline-offset: -2px; box-shadow: 0 0 10px rgba(236, 200, 101, .5); }
.fTile.wornTag::before { content: 'E'; position: absolute; left: 2px; top: 2px; font: 800 8px/1 var(--title); color: #9ae8ff; text-shadow: 0 1px 0 #000; }
.forgeItem { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); }
.forgeItem.flash { animation: forgeFlash .5s ease-out; }
@keyframes forgeFlash { from { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(236, 200, 101, .7); } to { box-shadow: none; } }
.forgeItem h4 { margin: 0 0 4px; font: 700 9px/1 var(--title); letter-spacing: 1.5px; color: var(--dim); }
.forgeOps { grid-template-columns: repeat(2, 1fr) !important; margin-top: 8px; }
.forgeOps button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; }
.cost { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; font-style: normal; }
.cost > span:first-child { display: inline-flex; align-items: center; gap: 2px; font: 700 11px/1 var(--title); color: var(--gold); }
.cost > span.lack:first-child { color: #ff7b6a; }
button.wide { width: 100%; margin-top: 8px; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 8px; }
.bulk { display: grid; gap: 4px; margin-top: 10px; }
.bulk button { padding: 7px 6px; font: 700 10px/1 var(--title); letter-spacing: 1px; }
.matList { display: grid; gap: 4px; }
.matRow { display: grid; grid-template-columns: 30px 1fr auto auto 30px 34px 40px; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); }
.matRow.none { opacity: .45; }
.matRow img { width: 28px; height: 28px; }
.matRow .mn { display: flex; flex-direction: column; min-width: 0; }
.matRow .mn b { font: 700 12px/1.2 var(--body); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matRow .mn small { font: 500 10px/1.2 var(--body); color: var(--dim); }
.matRow .have { font: 700 12px/1 var(--title); color: var(--text); }
.matRow .each { display: inline-flex; align-items: center; gap: 2px; font: 700 11px/1 var(--title); color: var(--gold); }
.matRow button { padding: 6px 0; font: 700 10px/1 var(--title); }

/* ---------------------------------------------------------------- developer test panel */
#devPanel { position: fixed; right: 8px; top: 8px; z-index: 999; width: 318px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 8px; border: 1px solid #3a5a5c; border-radius: 6px; background: rgba(8, 14, 15, .96); color: #cfe0dc; font: 500 11px/1.3 ui-monospace, Consolas, monospace; box-shadow: 0 8px 30px rgba(0, 0, 0, .7); letter-spacing: 0 !important; }
#devPanel.hidden { display: none; }
#devPanel header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#devPanel header b { color: #ffd870; font-size: 13px; }
#devPanel header small { flex: 1; color: #6f8a88; }
#devPanel h6 { margin: 8px 0 3px; font: 700 10px/1 ui-monospace, Consolas, monospace; color: #7ae8ff; letter-spacing: 1px; }
#devPanel .row { display: flex; gap: 3px; margin-bottom: 3px; align-items: center; }
#devPanel .row.wrap { flex-wrap: wrap; }
#devPanel button { all: unset; box-sizing: border-box; padding: 4px 6px; border: 1px solid #2a4244; border-radius: 3px; background: #122022; color: #cfe0dc; font: 600 10px/1.1 ui-monospace, Consolas, monospace; cursor: pointer; text-align: center; }
#devPanel button:hover { background: #1c3336; }
#devPanel button.on { background: #6a4a10; border-color: #ffd870; color: #ffe9a8; }
#devPanel input, #devPanel select { box-sizing: border-box; min-width: 0; padding: 3px 4px; border: 1px solid #2a4244; border-radius: 3px; background: #050a0b; color: #fff; font: 600 11px/1.1 ui-monospace, Consolas, monospace; }
#devPanel input[type=number] { width: 56px; }
#devPanel select { flex: 1; }
#devPanel label { display: inline-flex; align-items: center; gap: 3px; color: #8aa; }
#devInfo { white-space: pre-wrap; padding: 5px 6px; border-radius: 3px; background: #050a0b; color: #9fe6c0; font-size: 10.5px; }
#devNote { margin: 6px 0 0; min-height: 14px; color: #ffd870; }
#workBody > h3::before { content: none; }
#workBody > h3 { padding-left: 0; }
#workBody > .x { position: absolute; right: 16px; top: 16px; }
.forgeItem .iname { padding-right: 0; }
.bulk button, .matRow button, #workBody button.wide {
  border: 1px solid var(--line); border-radius: 3px; background: linear-gradient(#18282a, #0e1819); color: var(--text); cursor: pointer;
}
#workBody button.wide { border-color: #8a3a30; color: #ffb4a4; font: 700 12px/1 var(--title); letter-spacing: 1.5px; }
#workBody button.wide b { font-weight: 700; }
.bulk button:disabled, .matRow button:disabled, #workBody button.wide:disabled { opacity: .35; cursor: default; }
.bulk button:active, .matRow button:active { background: #1c3336; }

.resetOpt button.danger { border: 1px solid #8a3a30; border-radius: 3px; background: linear-gradient(#3a1814, #20100e); color: #ffb4a4; padding: 8px 14px; font: 700 12px/1 var(--title); letter-spacing: 1.5px; cursor: pointer; }

/* ---------------------------------------------------------------- seclusion: time away being fought out */
#seclusion { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(4, 9, 10, .86); text-align: center; padding: 16px; }
#seclusion[hidden] { display: none; }
#seclusion small { font: 700 11px/1 var(--title); letter-spacing: 3px; color: var(--dim); }
#seclusion b { font: 400 30px/1.1 var(--stencil); letter-spacing: 2px; color: var(--gold); text-shadow: 0 0 12px rgba(236, 200, 101, .5); }
#seclusion span { font: 500 12px/1.4 var(--body); color: #b9c8c2; max-width: 260px; }
#toast { white-space: pre-line; }

/* ---------------------------------------------------------------- skills: 2 active + 6 passive; no tree */
#mUpgrade, #upgBtn { display: none !important; }
.shint { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel2); min-width: 0; }
.shint b { font: 700 11px/1 var(--title); letter-spacing: 1.5px; color: var(--gold); }
.shint span { font: 500 10px/1.2 var(--body); color: var(--dim); }
.skill.act { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.skill.act .sicon { box-shadow: 0 0 0 1px var(--gold), 0 0 10px rgba(236, 200, 101, .3); }
.skill.pas .sicon { transform: scale(.82); opacity: .92; }
.skill .stxt span { display: block; }
.skill .stxt .now { color: #cfe6dc; }
.skill .stxt .lore { color: var(--dim); font-style: italic; }
.skill .stxt .nxt { margin-top: 2px; color: #8fb4a8; font-size: .92em; }
.skill .stxt .nxt u { text-decoration: none; font: 700 8.5px/1 var(--title); letter-spacing: 1px; color: var(--gold); margin-right: 4px; }
.attrNote { margin: 4px 0 6px; font: 500 11.5px/1.35 var(--body); color: var(--dim); }
.arate { display: block; font: 700 8.5px/1.3 var(--title) !important; letter-spacing: 1px; color: #7fd6a8 !important; }
.arate.low { color: #ffb070 !important; }
/* ---------------------------------------------------------------- salvage switches and salvage-many */
.asv { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 2px; }
.asv > span { font: 700 9px/1 var(--title); letter-spacing: 1.2px; color: var(--dim); margin-right: 2px; width: 100%; }
.chk { --rc: var(--r-normal); display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px 4px 5px; border: 1px solid color-mix(in srgb, var(--rc) 55%, #1a2628); border-radius: 3px; background: #0b1213; color: var(--rc); font: 700 9.5px/1 var(--title); letter-spacing: .8px; cursor: pointer; }
.chk.r-magic { --rc: var(--r-magic); } .chk.r-rare { --rc: var(--r-rare); } .chk.r-epic { --rc: var(--r-epic); } .chk.r-legend { --rc: var(--r-legend); }
.chk i { width: 11px; height: 11px; border: 1px solid var(--rc); border-radius: 2px; background: #060a0b; }
.chk.on { background: color-mix(in srgb, var(--rc) 18%, #0b1213); }
.chk.on i { background: var(--rc); box-shadow: inset 0 0 0 2px #060a0b; }
.chk:disabled { opacity: .3; cursor: default; }
.modeTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 2px 0 6px; }
.modeTabs button { padding: 7px 4px; border: 1px solid var(--line); border-radius: 3px; background: #0e1819; color: var(--dim); font: 700 10px/1 var(--title); letter-spacing: 1.2px; cursor: pointer; }
.modeTabs button.on { border-color: var(--gold); color: var(--gold); background: linear-gradient(#2a2412, #17140a); }
.fTile.mark { outline: 2px solid #ff7b6a; outline-offset: -2px; }
.fTile.mark::after { content: 'X'; position: absolute; right: 3px; top: 2px; font: 800 10px/1 var(--title); color: #ff7b6a; text-shadow: 0 1px 0 #000; }

/* ---------------------------------------------------------------- skill cooldowns over the stage (clock sweep) */
#skillBar { position: absolute; right: 10px; bottom: 12px; z-index: 6; display: flex; gap: 8px; pointer-events: none; }
#skillBar[hidden] { display: none; }
.cdIcon { position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1c2c2e, #070c0d 75%);
  box-shadow: 0 0 0 2px #0a1011, 0 0 0 3px #4a5a52, 0 3px 8px rgba(0, 0, 0, .7); }
.cdIcon img { position: absolute; inset: 6px; width: 32px; height: 32px; image-rendering: pixelated; }
/* the part still to charge is dark; the charged part opens clockwise from the top */
.cdIcon .sweep { --p: 1; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0turn calc(var(--p) * 1turn), rgba(2, 6, 7, .72) calc(var(--p) * 1turn) 1turn); }
/* a thin bright edge marks the hand of the clock */
.cdIcon .sweep::after { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent calc(var(--p) * 1turn - .012turn), rgba(255, 236, 170, .9) calc(var(--p) * 1turn - .012turn) calc(var(--p) * 1turn), transparent calc(var(--p) * 1turn));
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%); mask: radial-gradient(circle, transparent 62%, #000 63%); }
.cdIcon.ready .sweep::after { display: none; }
.cdIcon.ready { box-shadow: 0 0 0 2px #0a1011, 0 0 0 3px var(--gold), 0 0 10px rgba(236, 200, 101, .45), 0 3px 8px rgba(0, 0, 0, .7); }
.cdIcon .secs { position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px/1 var(--title); color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.cdIcon .lvl { position: absolute; right: 50%; bottom: 1px; transform: translateX(50%); font: 700 8px/1 var(--title); color: var(--gold); text-shadow: 0 1px 1px #000; }
.cdIcon.fire { animation: cdFire .35s ease-out; }
@keyframes cdFire { 0% { filter: brightness(2.2); transform: scale(1.12); } 100% { filter: none; transform: none; } }

.skill.auto { border-style: dashed; }
.skill.auto em { color: #9fe6c0 !important; }

#skillHead { display: flex !important; justify-content: flex-end; grid-template-columns: none !important; }
#skillHead .spts { flex: 0 0 auto; }
/* cooldown: the skill icon alone (no round frame); the dark wedge still sweeps like a clock hand */
.cdIcon { width: 36px; height: 36px; border-radius: 0; background: none; box-shadow: none !important; overflow: hidden; }
.cdIcon img { inset: 0; width: 36px; height: 36px; image-rendering: auto; }
.cdIcon .sweep { border-radius: 0; }
.cdIcon .sweep::after { display: none; }
.cdIcon .lvl { display: none; }

/* ---------------------------------------------------------------- village lobby: chat box, other players */
#chatBox { position: absolute; left: 8px; bottom: 8px; z-index: 7; width: min(62%, 300px); display: flex; flex-direction: column; gap: 3px;
  padding: 5px 6px; border: 1px solid rgba(120, 160, 150, .28); border-radius: 5px; background: rgba(6, 12, 13, .72); backdrop-filter: blur(2px); }
#chatBox[hidden] { display: none; }
.chatHead { display: flex; align-items: center; gap: 6px; }
.chatHead b { font: 700 10px/1 var(--title); letter-spacing: 1.5px; color: var(--gold); cursor: pointer; }
.chatSt { flex: 1; font: 600 9px/1 var(--title); letter-spacing: .5px; color: #6f8a88; }
#chatBox[data-st="on"] .chatSt { color: #7fd6a8; }
.chatName, .chatFold { border: 1px solid var(--line); border-radius: 3px; background: #0e1819; color: #9fe6c0; font: 600 10px/1 var(--body); padding: 3px 6px; cursor: pointer; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatFold { color: var(--dim); }
.chatLog { max-height: 120px; overflow-y: auto; font: 500 12px/1.35 var(--body); color: #d8e6e0; overscroll-behavior: contain; }
.chatLine b { color: #8fd8d8; font-weight: 700; }
.chatLine.me b { color: var(--gold); }
.chatIn { display: flex; gap: 4px; }
.chatIn input { flex: 1; min-width: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 3px; background: #050a0b; color: #fff; font: 500 12px/1.2 var(--body); }
.chatIn button { padding: 5px 8px; border: 1px solid var(--gold); border-radius: 3px; background: linear-gradient(#2a2412, #17140a); color: var(--gold); font: 700 10px/1 var(--title); letter-spacing: 1px; cursor: pointer; }
#chatBox.collapsed .chatIn { display: none; }
#chatBox.collapsed .chatLog { max-height: 52px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 45%); mask: linear-gradient(transparent, #000 45%); }
#chatBox.collapsed .chatFold { transform: rotate(180deg); }
.pTag { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; will-change: transform; white-space: nowrap; }
.pTag[hidden] { display: none; }
.pTag b { font: 700 9.5px/1 var(--body); color: #9fe6ff; text-shadow: 0 0 3px #000, 0 1px 0 #000; }
.pTag .bub { max-width: 170px; white-space: normal; text-align: center; padding: 3px 7px; border-radius: 8px; background: rgba(240, 246, 240, .94); color: #14201e; font: 600 11px/1.3 var(--body); font-style: normal; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.pTag .bub[hidden] { display: none; }
#phone:not(.inTown) .pTag { display: none; }

/* ---------------------------------------------------------------- the warden's stage list */
.stagePick { max-height: 46vh; overflow-y: auto; margin-bottom: 6px; }
.stagePick h5 { margin: 8px 0 4px; font: 700 10px/1 var(--title); letter-spacing: 1.5px; color: var(--dim); }
.spRow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.spRow button { padding: 8px 0; border: 1px solid var(--line); border-radius: 3px; background: #0e1819; color: var(--text); font: 700 13px/1 var(--title); cursor: pointer; }
.spRow button.lord { border-color: #8a3a30; color: #ffb4a4; }
.spRow button.top { border-color: var(--gold); color: var(--gold); background: linear-gradient(#2a2412, #17140a); }
.land-snow button { background: #101820; } .land-cave button { background: #0b1612; } .land-fire button { background: #1a0f0c; } .land-sky button { background: #12122a; }

/* ---------------------------------------------------------------- damage numbers: every blow; criticals stand out */
@font-face {
  font-family: 'Qi Brush';
  src: url('assets/ui/damage-brush-regular.woff2') format('woff2');
  font-weight: 400;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: 'Qi Brush';
  src: url('assets/ui/damage-brush-bold.woff2') format('woff2');
  font-weight: 700;
  unicode-range: U+0030-0039;
}
.floater.dmg, .floater.burn, .floater.hurt, .floater.crit {
  font-family: 'Qi Brush', var(--px);
  font-weight: 400;
}
.floater.dmg, .floater.burn { font-size: 15px; }
.floater.dmg { color: #f2f2ec; }
.floater.crit {
  font-size: 21px; font-weight: 700; color: #ffe04a; letter-spacing: .5px; z-index: 2;
  -webkit-text-stroke: 3px #5a0a00; paint-order: stroke fill;
  text-shadow: 0 0 6px rgba(255, 120, 30, .85), 0 3px 0 #2a0400, 0 0 14px rgba(255, 200, 60, .55);
  animation: floatCrit .9s ease-out forwards !important;
}
@keyframes floatCrit {
  0% { transform: translate(-50%, -100%) scale(.4); opacity: 0; }
  12% { transform: translate(-50%, calc(-100% - 10px)) scale(1.45); opacity: 1; }
  28% { transform: translate(-50%, calc(-100% - 16px)) scale(1); }
  100% { transform: translate(-50%, calc(-100% - 42px)) scale(1); opacity: 0; }
}

/* ---------------------------------------------------------------- CHOOSE YOUR PATH (2026-11-23): big pixel hero, six portraits, stats */
#selectScreen { position: absolute; inset: 0; z-index: 60; overflow: hidden; user-select: none; touch-action: pan-y; display: flex; flex-direction: column;
  background: transparent; padding-bottom: env(safe-area-inset-bottom, 0px); }
#selectScreen[hidden] { display: none; }
.selBg { display: none; }
/* the live fight shows through the middle; the top and bottom are solid panels that fade into it */
.selHead { background: linear-gradient(#070c0e 0%, #070c0e 72%, rgba(7, 12, 14, 0) 100%); padding-bottom: 26px !important; }
.selBottom { background: linear-gradient(rgba(7, 12, 14, 0) 0, #070c0e 26px); padding-top: 20px; }
#selectScreen > *:not(.selBg) { position: relative; z-index: 1; }
.selHead { padding: 18px 20px 0; text-align: center; }
.selHead small { display: block; font: 700 11px/1 var(--title); letter-spacing: 4px; color: #c8b890; }
.selName { margin: 8px 0 4px; font: 400 28px/1.05 var(--stencil); letter-spacing: 3px; color: #f4ecd0; text-shadow: 0 2px 0 #000, 0 0 18px color-mix(in srgb, var(--tint) 55%, transparent); }
.selWho { display: block; font: 600 11.5px/1.3 var(--body); font-style: normal; color: var(--tint); }
.selTags { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.selTags span { padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--tint) 60%, transparent); border-radius: 2px; background: rgba(0, 0, 0, .45); font: 700 9.5px/1 var(--title); letter-spacing: 1.5px; color: var(--tint); }
.selAbout { max-width: 340px; margin: 8px auto 0; font: 500 12.5px/1.4 var(--body); color: #cfc9b6; }
.selStage { flex: 1 1 auto; min-height: 150px; position: relative; margin: -26px 0 -20px; }
.selThumbs { display: flex; justify-content: center; gap: 4px; padding: 6px 10px 2px; }
#selectScreen .selThumb { position: relative; flex: 0 0 auto; width: 46px; padding: 0; border: 0; background: none !important; box-shadow: none !important; min-width: 0; height: auto; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .15s; }
.selThumb .selHex { position: absolute; left: 3px; top: 0; width: 48px; height: 54px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%) !important;
  background: linear-gradient(#5a5038, #2a2618); }
.selThumb .selHex::after { content: ''; position: absolute; inset: 2px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%) !important; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tint) 30%, #1a2426), #0b1214); }
.selThumb canvas { position: relative; width: 40px; height: 40px; margin-top: 7px; image-rendering: pixelated; filter: brightness(.6) saturate(.6); }
.selThumb b { position: relative; margin-top: 7px; font: 700 8.5px/1 var(--title); letter-spacing: 1px; color: #7d8a84; }
.selThumb.on { transform: translateY(-4px) scale(1.12); }
.selThumb.on .selHex { background: linear-gradient(var(--tint), color-mix(in srgb, var(--tint) 40%, #000)); filter: drop-shadow(0 0 6px var(--tint)); }
.selThumb.on canvas { filter: none; }
.selThumb.on b { color: var(--tint); }
.selStatsHead { display: flex; align-items: center; gap: 10px; padding: 6px 22px 4px; font: 700 10.5px/1 var(--title); letter-spacing: 3px; color: #c8b890; }
.selStatsHead::before, .selStatsHead::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(214, 178, 90, .55), transparent); }
.selStats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; padding: 2px 22px 8px; }
.selStat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 8px; min-width: 0; }
.selStat span { font: 700 10px/1 var(--title); letter-spacing: 1px; color: #b8c4bc; }
.selStat b { font: 700 12px/1 var(--px); color: #f0e6c8; font-variant-numeric: tabular-nums; }
.selStat b.w { font: 600 11px/1 var(--body); color: var(--tint); white-space: nowrap; }
.selStat i { grid-column: 1 / -1; height: 6px; border-radius: 1px; background: #1a2426; box-shadow: inset 0 0 0 1px #2a3836; overflow: hidden; }
.selStat i u { display: block; height: 100%; background: linear-gradient(#7fe0a0, #3fae68); }
.selFoot { display: flex; justify-content: center; padding: 6px 16px 16px; }
.selFoot button { border: 1px solid var(--line); background: rgba(8, 14, 15, .8); color: var(--gold); cursor: pointer; }
.selGo { width: min(320px, 100%); height: 46px; padding: 0 16px; border-radius: 4px; border-color: var(--gold) !important; background: linear-gradient(#2a2412, #17140a) !important; font: 700 13px/1 var(--title); letter-spacing: 2px; }
@media (max-height: 700px) { .selAbout { display: none; } }
.openSelect { width: 100%; margin: 8px 0 0; padding: 9px; border: 1px solid var(--gold); border-radius: 3px; background: linear-gradient(#2a2412, #17140a); color: var(--gold); font: 700 11px/1 var(--title); letter-spacing: 2px; cursor: pointer; }


/* ---------------------------------------------------------------- the market: above the bottom bar, with a close X */
#choice { z-index: 24; align-items: center; justify-content: center; padding: 16px 12px; }
#choice .sheet { width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column; padding: 14px 16px; }
.shopHeader { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; margin-bottom: 8px; }
.shopRestock { margin: 0 0 7px; font-size: 13px; color: #c5b99e; }
.shopRestock time { color: #f2d28f; font-variant-numeric: tabular-nums; }
#choice .shopHeader h3 { min-width: 0; padding-left: 0; margin: 0; }
#choice .shopHeader h3::before { content: none; }
#choice #cards { min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
#choice #cards > *, #choice .row { flex-shrink: 0; }
#choiceX { flex: 0 0 38px; height: 36px; padding: 0; font-family: var(--title); font-size: 15px; color: var(--text) !important; background: var(--btn) !important; border: 0; box-shadow: var(--bronze); cursor: pointer; }

/* ---------------------------------------------------------------- designed items (assets/item, 32x48 pixel art) */
.tile.designed img { image-rendering: pixelated; object-fit: contain; width: 100%; height: 100%; }
.pic .tile.designed, .card .pic img { image-rendering: pixelated; }
#itemBody li.sig span::before { content: '◆ '; color: var(--gold); }
#itemBody li.sig { color: #f0d890; }
#itemBody li.uniq { display: block; margin: 4px 0; padding: 6px 8px; border-left: 2px solid #ff9a4a; background: rgba(255, 140, 60, .08); list-style: none; }
#itemBody li.uniq b { display: block; color: #ffb070; font: 700 12px/1.3 var(--title); letter-spacing: .5px; }
#itemBody li.uniq span { display: block; color: #f0e6d8; font-size: 12px; line-height: 1.4; }
#itemBody li.uniq em { display: block; margin-top: 2px; color: #9ab0b8; font-style: normal; font-size: 11px; }
#itemBody li.uniq.dormant { opacity: .55; border-left-color: #6a7880; }
.ibase .kUniq { color: #ff9a4a; } .ibase .kSig { color: #e8c870; }

/* ================================================================ the bag, redesigned (2026-11-22)
   Big and simple: the sheet fills the screen above the dock, the equipment sits round the hero
   with every slot labelled, and auto-salvage is a button that opens its own window. */
#panel.tall { top: 0; max-height: none; padding-top: calc(10px + env(safe-area-inset-top)); }
#panel.tall #tabGear { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 6px; }
#panel.tall #sheetTitle { font-size: 18px; }
#doll.eqBoard { position: relative; width: 100%; max-width: 460px; height: auto !important; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 12px 12px 10px; border-radius: 4px; }
#doll.eqBoard::before { display: none; }
.eqBoard .eqSide { display: flex; justify-content: center; }
.eqBoard .eqMid { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.eqBoard .eqRings { display: flex; gap: 12px; }
.eqBoard .eqHero { width: calc(var(--u) * 1.9); height: calc(var(--u) * 2.6); background: no-repeat 0 0 / 800% 100%; image-rendering: auto; opacity: .95; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.eqBoard .eqHero-warrior { background-image: url(assets/ui/select_warrior.png); }
.eqBoard .eqHero-hunter { background-image: url(assets/ui/select_hunter.png); }
.eqBoard .eqHero-mage { background-image: url(assets/ui/select_mage.png); }
#doll.eqBoard .slot { position: relative !important; left: auto !important; top: auto !important; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none !important; box-shadow: none !important; }
#doll.eqBoard .slot .face { position: relative; width: calc(var(--u) * 1.25); height: calc(var(--u) * 1.25); display: grid; place-items: center; border-radius: 4px;
  background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .7), inset 0 0 12px rgba(0, 0, 0, .5); }
#doll.eqBoard .slot.eqBig .face { width: calc(var(--u) * 1.9); height: calc(var(--u) * 2.85); }
#doll.eqBoard .slot.full .face { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc, #8a6c2c) 75%, #0e1718), 0 0 10px color-mix(in srgb, var(--rc, #8a6c2c) 25%, transparent); }
#doll.eqBoard .slot .tile { position: absolute; inset: 0; width: 100% !important; height: 100% !important; background: none !important; box-shadow: none !important; display: grid; place-items: center; }
#doll.eqBoard .slot small { display: block !important; position: static; font: 700 10px/1 var(--title); letter-spacing: 1px; color: #a8b8b0; text-transform: uppercase; }
#doll.eqBoard .slot .ghostIcon { width: 46%; max-width: none; opacity: .22; }
#doll.eqBoard .slot.dropHint .face { box-shadow: inset 0 0 0 2px var(--qi), 0 0 10px rgba(72, 221, 230, .7); }
#eqStats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; max-width: 460px; }
#eqStats span { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 5px 8px; border-radius: 3px; background: linear-gradient(180deg, #182426, #0e1617); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
#eqStats i { font: 700 9px/1 var(--title); letter-spacing: 1px; color: #8aa098; font-style: normal; }
#eqStats b { margin-top: 3px; font: 800 15px/1 var(--px); color: var(--gold); }
#panel.tall .bayHead { width: 100%; max-width: 480px; }
#panel.tall #matBarWrap { width: 100%; max-width: 480px; }
.asvBtn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 6px; padding: 10px 12px; border: 0; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#2a2412, #17140a); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); font: 700 12px/1.2 var(--title); letter-spacing: 1px; text-align: left; }
.asvBtn b { font-size: 16px; }
#asvPop { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 6, 7, .72); }
#asvPop[hidden] { display: none; }
#asvPop .sheet { position: relative; width: 100%; max-width: 380px; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
#asvPop h3 { margin: 0 34px 2px 0; font: 700 16px/1.2 var(--title); color: var(--gold); letter-spacing: 1px; }
#asvPop .x { position: absolute; right: 10px; top: 10px; width: 32px; height: 30px; padding: 0; border: 0; color: var(--text); background: var(--btn); box-shadow: var(--bronze); cursor: pointer; }
#asvPop .asvHelp { margin: 0 0 4px; color: #b8c4bc; font-size: 13px; line-height: 1.4; }
#asvPop .asvRow { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 0; border-radius: 3px; cursor: pointer; background: #0e1819;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, #0e1718); color: var(--rc); font: 700 14px/1 var(--title); letter-spacing: 1px; }
#asvPop .asvRow b { min-width: 48px; padding: 5px 8px; border-radius: 12px; background: #1b2526; color: #8a9a94; font-size: 12px; text-align: center; }
#asvPop .asvRow.on { background: color-mix(in srgb, var(--rc) 14%, #0e1819); }
#asvPop .asvRow.on b { background: #2fd0da; color: #06201f; }
#asvPop .asvDone { margin-top: 6px; padding: 12px; border: 1px solid var(--gold); border-radius: 3px; background: linear-gradient(#2a2412, #17140a); color: var(--gold); font: 700 13px/1 var(--title); letter-spacing: 2px; cursor: pointer; }
/* the item window: the item itself, large, at the top */
#itemBody .ipic { display: flex; justify-content: center; margin: 2px 0 8px; }
#itemBody .ipic .tile { position: relative; display: grid; place-items: center; border-radius: 4px; background: color-mix(in srgb, var(--rc) 12%, #0e1718); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rc) 60%, #0e1718); }
#itemBody .ipic .tile img { image-rendering: pixelated; }
.eqBoard .slot.r-normal, .asvRow.r-normal { --rc: var(--r-normal); } .eqBoard .slot.r-magic, .asvRow.r-magic { --rc: var(--r-magic); }
.eqBoard .slot.r-rare, .asvRow.r-rare { --rc: var(--r-rare); } .eqBoard .slot.r-epic, .asvRow.r-epic { --rc: var(--r-epic); } .eqBoard .slot.r-legend, .asvRow.r-legend { --rc: var(--r-legend); }

/* the equipment board, no figure: weapon and robe side by side, the jewellery stacked */
#doll.eqBoard { grid-template-columns: auto auto auto; justify-content: center; align-items: start; gap: 12px; }
.eqBoard .eqJewels { display: flex; flex-direction: column; gap: 6px; }
.eqBoard .eqJewels .slot .face { width: calc(var(--u) * 0.95) !important; height: calc(var(--u) * 0.95) !important; }
.eqBoard .eqJewels .slot small { font-size: 9px !important; }
/* detailed stats */
#eqDeep { width: 100%; max-width: 460px; border-radius: 3px; background: linear-gradient(180deg, #142022, #0c1415); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
#eqDeep > summary { padding: 10px 12px; cursor: pointer; list-style: none; font: 700 12px/1 var(--title); letter-spacing: 1.5px; color: var(--gold); }
#eqDeep > summary::after { content: ' ▾'; }
#eqDeep[open] > summary::after { content: ' ▴'; }
#eqDeep .dg { padding: 2px 12px 10px; }
#eqDeep h5 { margin: 6px 0 4px; font: 700 10px/1 var(--title); letter-spacing: 1.5px; color: #7f9a92; border-bottom: 1px solid rgba(138, 108, 44, .3); padding-bottom: 4px; }
#eqDeep .dr { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12.5px; color: #c8d4cc; }
#eqDeep .dr b { color: #f0e6c8; font-weight: 700; text-align: right; }
#eqDeep .du { padding: 4px 0 6px; font-size: 12px; line-height: 1.4; }
#eqDeep .du b { display: block; color: #ffb070; font: 700 11.5px/1.3 var(--title); }
#eqDeep .du span { color: #d8d0c0; }
/* dragging: a finger on an item drags it (the bag must not scroll instead), and the item floats
   above everything under the finger / mouse */
#inv .tile, #doll .tile { touch-action: none; }
.ghostTile { position: fixed !important; z-index: 90 !important; pointer-events: none; opacity: .97;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .65)) drop-shadow(0 0 8px rgba(72, 221, 230, .45)) !important; }
.ghostTile img { image-rendering: pixelated !important; }
.tile.dragging { opacity: .2 !important; outline: 1px dashed rgba(72, 221, 230, .6); outline-offset: -3px; }

/* ---------------------------------------------------------------- bag, round 2 */
/* the title without its seal icon; the corner holds only the close button, clear of the gilt corner */
#panel #sheetTitle { padding-left: 4px; }
#panel #sheetTitle::before { display: none !important; }
#panel #sheetHead { padding: 0 8px 0 4px; }
#panel #sheetClose { margin-left: auto; }
/* spirit stones: a cut crystal in pixel art (outline, two facets, a highlight, a soft glow) */
i.chit, .floater.coin::after {
  width: 12px; height: 16px; clip-path: none !important; border-radius: 0; vertical-align: -3px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23063b40' d='M5 0h2v1h1v1h1v1h1v1h1v8h-1v1h-1v1h-1v1H7v1H5v-1H4v-1H3v-1H2v-1H1V4h1V3h1V2h1V1h1z'/%3E%3Cpath fill='%2318a8b4' d='M6 1h1v1h1v1h1v1h1v8H9v1H8v1H7v1H6z'/%3E%3Cpath fill='%2357e6ee' d='M5 1h1v13H5v-1H4v-1H3v-1H2V4h1V3h1V2h1z'/%3E%3Cpath fill='%23b8fbff' d='M4 3h1v4H4zM3 4h1v2H3z'/%3E%3Cpath fill='%23ffffff' d='M4 4h1v1H4z'/%3E%3Cpath fill='%230f8a95' d='M6 8h4v1H9v1H8v1H7v1H6z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  image-rendering: pixelated; filter: drop-shadow(0 0 3px rgba(72, 221, 230, .75)) !important;
}
.chip i.chit { width: 12px; height: 16px; }
/* currency row: above the equipment */
#curBar { width: 100%; max-width: 480px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 3px;
  background: linear-gradient(180deg, #142022, #0c1415); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
#curBar .cGold { display: flex; align-items: center; gap: 6px; margin-right: 6px; padding-right: 10px; border-right: 1px solid rgba(138, 108, 44, .4); }
#curBar .cGold i.chit { width: 15px; height: 20px; }
#curBar .cGold b { font: 800 17px/1 var(--px); color: #9ff4f8; }
#curBar .mc { display: flex; align-items: center; gap: 3px; }
#curBar .mc img { width: 20px; height: 20px; image-rendering: pixelated; }
#curBar .mc b { font: 700 13px/1 var(--px); color: #e8e0c8; }
#curBar .mc.none { opacity: .4; }
/* equipment: symmetric, weapon | jewellery | robe */
#doll.eqBoard { grid-template-columns: auto auto auto !important; justify-content: space-evenly !important; align-items: center !important; gap: 8px !important; padding: 14px 10px 12px !important; }
.eqBoard .eqJewels { gap: 4px; align-items: center; }
.eqBoard .eqJewels .slot .face { width: calc(var(--u) * 0.82) !important; height: calc(var(--u) * 0.82) !important; }
.eqBoard .eqJewels .slot { gap: 2px !important; }
#doll.eqBoard .slot small { margin-top: 2px; }
#curBar { flex-wrap: nowrap; justify-content: space-between; gap: 4px; padding: 8px; }
#curBar .mc img { width: 18px; height: 18px; }
#curBar .mc b { font-size: 12px; }
#curBar .cGold { margin-right: 2px; padding-right: 8px; }

/* ================================================================ skills, in the bag's style */
#panel.tall #tabSkills { flex: 1 1 auto; height: auto !important; max-height: none !important; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 8px; }
#panel.tall #skillHead { width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 3px;
  background: linear-gradient(180deg, #142022, #0c1415); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
.skPts { display: flex; align-items: center; gap: 8px; }
.skPts span { font: 700 11px/1 var(--title); letter-spacing: 1.2px; color: #8aa098; }
.skPts b { min-width: 30px; padding: 4px 8px; border-radius: 12px; background: #1b2526; text-align: center; font: 800 16px/1 var(--px); color: #8a9a94; }
.skPts.has b { background: #2fd0da; color: #06201f; box-shadow: 0 0 8px rgba(72, 221, 230, .55); }
.skPath { font: 700 12px/1 var(--title); letter-spacing: 1.2px; color: var(--gold); }
#panel.tall #skillList { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 8px; overflow: visible; }
.skSec { margin: 4px 2px 0; font: 700 11px/1 var(--title); letter-spacing: 1.5px; color: #8aa098; border-bottom: 1px solid rgba(138, 108, 44, .35); padding-bottom: 5px; }
.skActs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skPas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.skCard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 8px; border-radius: 4px; text-align: center;
  background: linear-gradient(180deg, #182426, #0e1617); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
.skCard.learned { box-shadow: inset 0 0 0 1px rgba(214, 178, 90, .85), 0 0 10px rgba(214, 178, 90, .12); }
.skCard.locked { opacity: .5; }
.skCard .skTag { font: 700 9px/1 var(--title); letter-spacing: 1.2px; color: #7f9a92; }
.skCard .sicon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 4px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .7); }
.skCard .sicon img { width: 44px; height: 44px; image-rendering: pixelated; }
.skCard .skName { font: 700 12px/1.25 var(--title); color: #f0e6c8; }
.skCard .skLv { font: 700 10.5px/1 var(--px); font-style: normal; color: var(--gold); }
.skCard .skLv i { color: #7fe6a8; font-style: normal; }
.skCard .skNow { font-size: 11.5px; line-height: 1.35; color: #c8d4cc; }
.skCard .skNow.dim { color: #8a9a94; }
.skCard .skNext { font-size: 11px; line-height: 1.35; color: #9ab8c0; }
.skCard .skNext u { text-decoration: none; font: 700 9px/1 var(--title); letter-spacing: 1px; color: #2fd0da; margin-right: 3px; }
.skCard .skUp { margin-top: auto; width: 100%; height: 32px; border: 0; border-radius: 3px; cursor: pointer; font: 800 18px/1 var(--title); color: #06201f; background: #2fd0da; box-shadow: 0 0 8px rgba(72, 221, 230, .4); }
.skCard .skUp:disabled { background: #1b2526; color: #4a5856; box-shadow: none; cursor: default; }
.skCard.pas { align-items: stretch; text-align: left; }
.skCard.pas .skTop { display: flex; align-items: center; gap: 8px; }
.skCard.pas .skTop > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.skCard.pas .sicon { width: 40px; height: 40px; flex: 0 0 40px; }
.skCard.pas .sicon img { width: 34px; height: 34px; }
#panel.tall .tab.hidden { display: none !important; }

.skPts.has b { background: #2fd0da !important; color: #06201f !important; font: 800 16px/1 var(--px) !important; }
.skPts b { font: 800 16px/1 var(--px) !important; }
.resetHint { margin: 6px 2px 0; color: #8a9a94; font-size: 12px; line-height: 1.4; }
#npcActs button .chit { margin: 0 3px 0 6px; }

/* ---------------------------------------------------------------- compare: now -> after wearing it */
.cmp2 { margin: 10px 0 4px; padding: 8px 10px; border-radius: 3px; background: linear-gradient(180deg, #142022, #0c1415); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .55); }
.cmp2 h5 { margin: 0 0 6px; font: 700 10.5px/1 var(--title); letter-spacing: 1.4px; color: #8aa098; }
.cmp2 .cr { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid rgba(138, 108, 44, .15); }
.cmp2 .cr:first-of-type { border-top: 0; }
.cmp2 .ck { font-size: 13px; color: #c8d4cc; }
.cmp2 .cv { display: flex; align-items: center; gap: 7px; font: 700 15px/1 var(--px); }
.cmp2 .cv i { font-style: normal; color: #9aa8a4; }
.cmp2 .cv u { text-decoration: none; color: #6f827c; font-size: 13px; }
.cmp2 .cv b { min-width: 46px; text-align: right; }
.cmp2 .cr.up .cv b { color: #6ee08a; }
.cmp2 .cr.up .cv u { color: #6ee08a; }
.cmp2 .cr.down .cv b { color: #ff7a6a; }
.cmp2 .cr.down .cv u { color: #ff7a6a; }
.cmp2 .cr.same .cv b { color: #e8e0c8; }

#dragCmp { position: absolute; left: 0; top: 0; z-index: 85; width: min(300px, calc(100% - 16px)); padding: 8px 10px 4px; border-radius: 4px; pointer-events: none;
  background: linear-gradient(180deg, #182426, #0c1415); box-shadow: inset 0 0 0 1px var(--gold), 0 8px 24px rgba(0, 0, 0, .7); }
#dragCmp[hidden] { display: none; }
#dragCmp .dcName { font: 700 13px/1.2 var(--title); margin-bottom: 2px; }
#dragCmp .cmp2 { margin: 4px 0; padding: 0; background: none; box-shadow: none; }
#dragCmp .dcName.r-normal { color: var(--r-normal); } #dragCmp .dcName.r-magic { color: var(--r-magic); } #dragCmp .dcName.r-rare { color: var(--r-rare); }
#dragCmp .dcName.r-epic { color: var(--r-epic); } #dragCmp .dcName.r-legend { color: var(--r-legend); }

/* ---------------------------------------------------------------- skills: minimal list (replaces the cards) */
#panel.tall #skillList { gap: 2px; }
.skSec { margin: 10px 2px 2px !important; border-bottom: 0 !important; padding-bottom: 0 !important; font-size: 10px !important; color: #6f827c !important; }
.skList { display: flex; flex-direction: column; border-top: 1px solid rgba(138, 108, 44, .25); }
.skRow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(138, 108, 44, .25); }
.skRow.locked { opacity: .45; }
.skRow .sicon { flex: 0 0 40px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(138, 108, 44, .45); }
.skRow.learned .sicon { box-shadow: inset 0 0 0 1px rgba(214, 178, 90, .9); }
.skRow .sicon img { width: 32px; height: 32px; image-rendering: auto; }
.skTxt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.skHead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.skHead small { font: 700 9px/1 var(--title); letter-spacing: 1.2px; color: #6f827c; }
.skHead b { font: 700 13px/1.2 var(--title); color: #f0e6c8; }
.skHead em { margin-left: auto; font: 700 11px/1 var(--px); font-style: normal; color: var(--gold); white-space: nowrap; }
.skHead em i { color: #7fe6a8; font-style: normal; }
.skTxt .skNow { font-size: 12px; line-height: 1.35; color: #b8c4bc; }
.skTxt .skNext { font-size: 11px; line-height: 1.35; color: #6f9aa2; }
.skRow .skUp { flex: 0 0 34px; width: 34px; height: 34px; margin: 0; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  font: 800 20px/34px var(--title); text-align: center; color: #06201f; background: #2fd0da; box-shadow: 0 0 0 2px rgba(47, 208, 218, .25); }
.skRow .skUp:disabled { background: transparent; color: #3e4c4a; box-shadow: inset 0 0 0 1px #2a3836; cursor: default; }
/* the skills "+" as a vermilion lacquer seal: cut corners like a carved lattice, a double gold frame, a gold cross */
.skRow .skUp {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 0 !important; padding: 0; position: relative; cursor: pointer;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  background: radial-gradient(120% 90% at 30% 20%, #e0583e, #a8221a 60%, #6e1410) !important;
  box-shadow: inset 0 0 0 2px #e8c46a, inset 0 0 0 4px #7a1610, inset 0 0 0 5px rgba(232, 196, 106, .7) !important;
  color: #ffe9a8 !important; font: 900 22px/36px var(--title) !important; text-shadow: 0 1px 0 #5a0e0a, 0 0 6px rgba(255, 210, 120, .5) !important;
  transition: transform .08s, filter .15s;
}
.skRow .skUp:hover:not(:disabled) { filter: brightness(1.12); }
.skRow .skUp:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.skRow .skUp:disabled { background: linear-gradient(#22201c, #151310) !important; color: #4e463a !important; text-shadow: none !important;
  box-shadow: inset 0 0 0 2px #4a4032, inset 0 0 0 4px #151310, inset 0 0 0 5px rgba(74, 64, 50, .6) !important; cursor: default; }
/* the close X clear of the gilt corner (the corner art is 24px at the top right) */
#panel #sheetHead { padding: 6px 26px 0 8px !important; height: 36px; }
#panel #sheetClose { flex: 0 0 30px; width: 30px; height: 28px; margin: 0 0 0 auto; }

/* buy another bag row */
#bagBuy { margin-left: 8px; padding: 4px 9px; border: 0; border-radius: 3px; cursor: pointer; font: 700 11px/1 var(--title); letter-spacing: .8px; color: #06201f; background: #2fd0da; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#bagBuy[hidden] { display: none; }
#bagBuy .chit { width: 10px; height: 14px; filter: none !important; }
#bagBuy.poor { background: #1b2526; color: #6f827c; }

/* the Spear's War Spirit gauge (White Steed), above the skill buttons */
#mountGauge { position: absolute; right: 10px; bottom: 74px; z-index: 6; width: 132px; pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
#mountGauge[hidden] { display: none; }
#mountGauge span { font: 700 9px/1 var(--title); letter-spacing: 1.5px; color: #dfe8f5; text-shadow: 0 1px 2px #000; text-align: right; }
#mountGauge i { display: block; height: 7px; border-radius: 1px; background: rgba(8, 14, 15, .8); box-shadow: inset 0 0 0 1px rgba(214, 178, 90, .6); overflow: hidden; }
#mountGauge u { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c8d4e4, #ffffff); transition: width .15s; }
#mountGauge.full u { background: linear-gradient(90deg, #ffe6a0, #fff8e0); box-shadow: 0 0 8px #ffe6a0; }
#mountGauge.riding u { background: linear-gradient(90deg, #ffd060, #fff4c0); }
#mountGauge.riding span { color: #ffe6a0; }

/* eight paths: smaller hexes so the row fits a phone (2026-11-23) */
.selThumbs { gap: 2px; padding-left: 6px; padding-right: 6px; }
.selThumb .selHex { left: 2px; width: 42px; height: 48px; }
.selThumb canvas { width: 34px; height: 34px; margin-top: 7px; }
.selThumb b { font-size: 8px; letter-spacing: .5px; }
.selThumb.on { transform: translateY(-3px) scale(1.08); }

/* 1. item art centred in the equipment slots, never stretched (2026-11-23) */
#doll.eqBoard .slot .tile img { position: static !important; width: 84% !important; height: 84% !important; margin: 0 !important; object-fit: contain; transform: none !important; }
/* 2. auto-salvage: a small anvil button by the bag count */
#asvBtn.asvIcon { position: relative; width: 28px; height: 24px; margin: 0 8px 0 0; padding: 0; border: 0; border-radius: 3px; cursor: pointer; vertical-align: middle;
  background: rgba(8, 14, 15, .8) !important; box-shadow: inset 0 0 0 1px rgba(214, 178, 90, .55) !important; display: inline-grid; place-items: center; }
#asvBtn .anvil { width: 16px; height: 12px; display: block; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12' shape-rendering='crispEdges'%3E%3Cpath fill='%23d6b25a' d='M1 1h11v1h3v2h-3v1H9v3h2v2h1v2H3v-2h1V8h2V5H3V4H1z'/%3E%3Cpath fill='%23fff2b8' d='M1 1h11v1H1z'/%3E%3C/svg%3E") center / contain no-repeat; }
#asvBtn.off .anvil { filter: grayscale(1) brightness(.6); }
#asvBtn b { position: absolute; right: -5px; top: -5px; min-width: 13px; height: 13px; padding: 0 2px; border-radius: 7px; background: #2fd0da; color: #06201f; font: 800 9px/13px var(--px); text-align: center; }
#matBarWrap:empty { display: none; }
/* 3. the hover / long-press item card */
#itemTip { position: absolute; left: 0; top: 0; z-index: 86; width: min(260px, calc(100% - 12px)); padding: 10px 12px 6px; border-radius: 4px; pointer-events: none;
  background: linear-gradient(180deg, #182426, #0c1415); box-shadow: inset 0 0 0 1px var(--gold), 0 8px 24px rgba(0, 0, 0, .7); }
#itemTip[hidden] { display: none; }
#itemTip ul { margin: 6px 0 0; padding: 0; list-style: none; }

/* materials: fuse four of a grade into one of the next */
.matRow .fuse { min-width: 62px; padding: 4px 6px; font: 700 9.5px/1 var(--title); letter-spacing: .5px; }
.matRow button.fuse { background: #1c3a3c !important; color: #7fe6ee !important; box-shadow: inset 0 0 0 1px #2fd0da !important; }
.matRow button.fuse:disabled { opacity: .4; }

/* painted half-body portraits fill the hexes (user, 2026-11-23) */
.selThumb .selPortrait { position: absolute; left: 4px; top: 2px; width: 38px; height: 44px; object-fit: cover; object-position: 50% 12%; image-rendering: pixelated;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%) !important; filter: brightness(.55) saturate(.6); transition: filter .15s; }
.selThumb .selPortrait[hidden] { display: none; }
.selThumb.on .selPortrait { filter: none; }

/* the path picker: hexes 70% bigger, two rows of four (user, 2026-11-23) */
.selThumbs { display: grid !important; grid-template-columns: repeat(4, 78px); justify-content: center; column-gap: 12px; row-gap: 4px; padding: 8px 10px 4px; }
#selectScreen .selThumb { width: 78px; }
.selThumb .selHex { left: 3px; top: 0; width: 72px; height: 82px; }
.selThumb .selPortrait { left: 6px; top: 3px; width: 66px; height: 76px; }
.selThumb canvas { width: 58px; height: 74px; margin-top: 4px; }
.selThumb b { margin-top: 6px; font-size: 11px; letter-spacing: 1px; }
.selThumb.on { transform: translateY(-2px) scale(1.06); }

/* honeycomb: four over four, the lower row set half a hex across and nested into the upper (user, 2026-11-23) */
.selThumbs { grid-template-columns: repeat(9, 42px) !important; column-gap: 0 !important; row-gap: 0 !important; padding: 10px 6px 6px !important; }
#selectScreen .selThumb { width: 84px; height: 82px; gap: 0; }
.selThumb:nth-child(1) { grid-area: 1 / 1 / 2 / 3; } .selThumb:nth-child(2) { grid-area: 1 / 3 / 2 / 5; }
.selThumb:nth-child(3) { grid-area: 1 / 5 / 2 / 7; } .selThumb:nth-child(4) { grid-area: 1 / 7 / 2 / 9; }
.selThumb:nth-child(5) { grid-area: 2 / 2 / 3 / 4; } .selThumb:nth-child(6) { grid-area: 2 / 4 / 3 / 6; }
.selThumb:nth-child(7) { grid-area: 2 / 6 / 3 / 8; } .selThumb:nth-child(8) { grid-area: 2 / 8 / 3 / 10; }
.selThumb:nth-child(n+5) { margin-top: -12px; }
.selThumb .selHex { left: 6px; }
.selThumb .selPortrait { left: 9px; }
.selThumb canvas { position: absolute; left: 13px; top: 4px; margin: 0; }
.selThumb b { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); margin: 0; padding: 2px 6px 1px; border-radius: 2px; white-space: nowrap;
  background: rgba(6, 12, 13, .82); font-size: 9.5px; letter-spacing: 1px; }
.selThumb.on { z-index: 2; }

/* the fade under the path picker: long and soft, the fight shows through behind the hexes (user, 2026-11-23) */
.selBottom { background: linear-gradient(rgba(7, 12, 14, 0) 0, rgba(7, 12, 14, .22) 50px, rgba(7, 12, 14, .5) 110px, rgba(7, 12, 14, .82) 165px, #070c0e 205px) !important; padding-top: 34px; margin-top: -14px; position: relative; }

/* the hero sheet: one card for his own path, the painted portrait in the art box (user, 2026-11-23) */
.heroSlide.one { grid-template-columns: 1fr; }
.hsArt.portrait { background: #0c1416; }
.hsArt.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; image-rendering: pixelated; display: block; }
.heroSlide.one .openSelect { width: 100%; margin: 0; }
.heroSlide.one .openSelect:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }
.hsOnlyTown { display: block; margin-top: 5px; text-align: center; font: 600 11px/1.2 var(--body); color: #8a9a94; }

/* talking to a villager (user, 2026-11-23): the box in the middle of the frame, the villager's portrait
   standing at its left like a visual novel, no icon before the name */
#npcSheet { align-items: center !important; justify-content: center; padding: 0 12px; background: rgba(2, 6, 7, .62) !important; }
#npcSheet .sheet {
  display: flex; flex-direction: column; width: 100%; max-width: 460px;
  max-height: calc(100% - 32px); margin-top: 0;
  padding: 17px 16px 18px; overflow: visible;
}
#npcSheet :is(#npcName, #npcTitle, #npcLine) { flex-shrink: 0; }
#npcSheet #npcName::before { display: none !important; content: none !important; }
#npcPic { position: absolute; left: -4px; bottom: calc(100% - 4px); width: 190px; height: 190px; object-fit: contain; object-position: 0 100%;
  image-rendering: pixelated; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .65)); }
#npcPic[hidden] { display: none; }
#npcSheet #npcName { margin-left: 0; padding-left: 0 !important; }
/* the portrait stands ON the box's top edge and behind its frame ornaments, never over them (user, 2026-11-23) */
#npcSheet .sheet { z-index: 0; }
#npcPic { bottom: 100% !important; z-index: -1; }

/* ten paths: honeycomb five over five (user, 2026-11-23) */
.selThumbs { grid-template-columns: repeat(11, 36px) !important; padding: 10px 4px 6px !important; }
#selectScreen .selThumb { width: 72px; height: 74px; }
.selThumb .selHex { left: 4px; width: 64px; height: 74px; }
.selThumb .selPortrait { left: 7px; top: 3px; width: 58px; height: 68px; }
.selThumb canvas { left: 10px; width: 52px; height: 66px; }
.selThumb b { bottom: 6px; font-size: 8.5px; padding: 2px 4px 1px; }
.selThumb:nth-child(n) { margin-top: 0; }
.selThumb:nth-child(1) { grid-area: 1 / 1 / 2 / 3; } .selThumb:nth-child(2) { grid-area: 1 / 3 / 2 / 5; }
.selThumb:nth-child(3) { grid-area: 1 / 5 / 2 / 7; } .selThumb:nth-child(4) { grid-area: 1 / 7 / 2 / 9; }
.selThumb:nth-child(5) { grid-area: 1 / 9 / 2 / 11; }
.selThumb:nth-child(6) { grid-area: 2 / 2 / 3 / 4; } .selThumb:nth-child(7) { grid-area: 2 / 4 / 3 / 6; }
.selThumb:nth-child(8) { grid-area: 2 / 6 / 3 / 8; } .selThumb:nth-child(9) { grid-area: 2 / 8 / 3 / 10; }
.selThumb:nth-child(10) { grid-area: 2 / 10 / 3 / 12; }
.selThumb:nth-child(n+6) { margin-top: -11px; }

/* Mountain Crusher's charge gauge: orange, over the health bar (user, 2026-11-23) */
.ob.charge { height: 5px !important; width: 54px; box-shadow: 0 0 0 1px #000, 0 0 0 2px rgba(255, 154, 60, .7) !important; }
.ob.charge i { background: linear-gradient(#ffe0a0, #ff8a2a) !important; box-shadow: 0 0 6px rgba(255, 150, 50, .7) !important; }
.ob.charge u { display: none; }
.ob.charge.full { animation: chargeFull .25s steps(2) infinite; }
@keyframes chargeFull { 50% { filter: brightness(1.8); } }

/* the smith (user, 2026-11-25): white base stats, blue random stats; reforge with materials; craft new gear */
.forgeItem ul li { color: #7fd6e0; }
.forgeItem ul li.imp { color: #f2ece0; }
.forgeItem ul li.sig { color: #f0d890; }
#itemBody li.imp .rng, .forgeItem li.imp .rng { color: #ffcc90; font-style: normal; }
#workBody .forgeReforge { margin-top: 8px; min-height: 72px; background: linear-gradient(#24414a,#1d2c31); border-color: #4f8a98; }
#workBody .forgeReforge .forgeOpHeading > b { color: #a8ecf5; }
.forgeOp .mcIcon { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: -3px; margin-right: 3px; }
.forgeWallet .forgeMaterials { margin-top: 4px; }
.forgeCraft { margin-top: 10px; padding-top: 8px; border-top: 1px solid #64584287; }
.forgeCraft h4 { margin: 0 0 4px; color: #eac48a; font: 700 12px/1.3 var(--title); }
.forgeHint { margin: 0 0 6px; color: #c9bba6; font-size: 12px; }
#workBody .forgeCraftRow {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 6px 9px; text-align: left;
  border: 1px solid #a97d4b; background: linear-gradient(#593829,#362923); color: #f9dfad; cursor: pointer;
}
#workBody .forgeCraftRow:disabled { background: #171f20; border-color: #534c3e; cursor: default; opacity: .7; }
.forgeCraftRow img { width: 22px; height: 22px; image-rendering: pixelated; }
.forgeCraftRow > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.forgeCraftRow b { font: 700 12px/1.25 var(--body); }
.forgeCraftRow small { color: #c9bba6; font-size: 11px; }
.forgeCraftRow i { font-style: normal; color: #c9bba6; }
.forgeCraftRow em { font-style: normal; font: 700 12px/1.25 var(--body); white-space: nowrap; }
.forgeCraft .r-normal { color: var(--r-normal, #ddd); } .forgeCraft .r-magic { color: var(--r-magic); } .forgeCraft .r-rare { color: var(--r-rare); }
.forgeCraft .r-epic { color: var(--r-epic); } .forgeCraft .r-legend { color: var(--r-legend); }

/* the forge's tabs (user, 2026-11-25) */
.forgeTabs { display: flex; gap: 4px; margin: 8px 0 2px; }
#workBody .forgeTabs button {
  flex: 1; min-height: 34px; padding: 6px 4px; border: 1px solid #534c3e; background: #171f20; color: #c9bba6;
  font: 700 12px/1.2 var(--title); letter-spacing: .5px; cursor: pointer;
}
#workBody .forgeTabs button.on { border-color: #d7a35e; background: linear-gradient(#593829,#362923); color: #ffe2af; }
.forgeLines { margin-top: 7px; padding: 6px 8px; font-size: 13px; }
.forgeLines .iname { display: none; }

/* item sheet in two parts (user, 2026-11-25): white base stats, a line, then the grade's lines in the grade's colour */
.isec { margin-top: 5px; }
.isec h6 { margin: 0 0 2px; font: 700 9px/1.3 var(--title); letter-spacing: 1.5px; color: #a9b3ae; }
.isec ul { margin: 0; }
.isecRar { margin-top: 6px; padding-top: 5px; border-top: 1px solid color-mix(in srgb, var(--lc) 70%, transparent); }
.isecRar h6 { color: var(--lc); }
#itemBody .isecRar li, .forgeItem .isecRar li, #itemBody .isecRar li.sig, .forgeItem .isecRar li.sig { color: var(--lc); }
#itemBody .isecBase li.imp, .forgeItem .isecBase li.imp { color: #f2ece0; }
/* the hover tooltip shows the same two parts as the item sheet */
#itemTip ul li { display: flex; justify-content: space-between; gap: 8px; }
#itemTip .rng { font-style: normal; font-size: 11px; opacity: .8; }
#itemTip .isecBase li.imp { color: #f2ece0; }
#itemTip .isecRar li, #itemTip .isecRar li.sig { color: var(--lc); }
#itemTip .isec ul { margin-top: 2px; }
#itemTip li.uniq { display: block; margin: 4px 0; padding: 5px 7px; border-left: 2px solid #ff9a4a; background: rgba(255, 140, 60, .08); }
#itemTip li.uniq b { display: block; color: #ffb070; font: 700 11px/1.3 var(--title); letter-spacing: .5px; }
#itemTip li.uniq span { display: block; color: #f0e6d8; font-size: 11px; line-height: 1.35; }
#itemTip li.uniq em { display: block; margin-top: 2px; color: #9ab0b8; font-style: normal; font-size: 10px; }
/* END GAME map card at the Gate Warden (user, 2026-11-25) */
#npcLine .mapName { display: block; color: #ffe2af; font: 700 14px/1.3 var(--title); letter-spacing: 1px; }
#npcLine .mapLv { display: block; margin: 2px 0 6px; color: #c9bba6; font-size: 12px; }
#npcLine .mapCon { display: block; color: #ff8a7a; font-weight: 700; }
#npcLine .mapCon::before { content: '▼ '; }
#npcLine .mapPro { display: block; color: #8ae6a0; font-weight: 700; }
#npcLine .mapPro::before { content: '▲ '; }
#npcLine .mapNone { display: block; color: #a9b3ae; font-style: italic; }
#npcLine .mapReset { display: block; margin-top: 6px; color: #c9bba6; font-size: 11px; }
#npcLine .mapPro + .mapCon { margin-top: 4px; }

/* Granny Liu's cards show the same two parts */
.vinfo .isec h6 { font-size: 8px; }
.vinfo .isec ul { margin: 0; padding: 0; list-style: none; }
.vinfo .isec li { display: flex; justify-content: space-between; gap: 6px; }
.vinfo .isecBase li.imp { color: #f2ece0; }
.vinfo .isecRar li, .vinfo .isecRar li.sig { color: var(--lc); }
.vinfo .rng { font-style: normal; font-size: 10px; opacity: .8; }
.vinfo li.uniq { display: block; }
.vinfo li.uniq b { display: block; color: #ffb070; } .vinfo li.uniq span { display: block; color: #f0e6d8; font-size: 11px; } .vinfo li.uniq em { display: block; color: #9ab0b8; font-style: normal; font-size: 10px; }

/* ---- fixes (user, 2026-11-25) ---- */
/* Granny Liu's materials: two lines per material, so the fuse and sell buttons never collide or wrap */
.matRow { grid-template-columns: 30px minmax(0, 1fr) auto 34px 38px 52px; grid-template-rows: auto auto; row-gap: 4px; column-gap: 5px; padding: 6px 8px; }
.matRow img { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.matRow .mn { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.matRow .have { grid-column: 3 / span 2; grid-row: 1; justify-self: end; }
.matRow .each { grid-column: 5 / span 2; grid-row: 1; justify-self: end; }
.matRow .fuse { grid-column: 3; grid-row: 2; min-width: 66px; white-space: nowrap; }
.matRow button[data-n="1"] { grid-column: 4; grid-row: 2; }
.matRow button[data-n="10"] { grid-column: 5; grid-row: 2; }
.matRow button[data-n="all"] { grid-column: 6; grid-row: 2; white-space: nowrap; }
.matRow button { min-height: 26px; padding: 5px 4px; }
.matRow .mn b { white-space: normal; overflow: visible; line-height: 1.15; }   /* the whole name, on two lines if it must */
/* the X of that window: the same dark button as every other panel */
#workBody > .x { width: 34px; height: 32px; padding: 0; border: 0; border-radius: 3px; font: 800 14px/1 var(--title); color: var(--text); background: var(--btn, #1a2a2c); box-shadow: var(--bronze, inset 0 0 0 1px #6b5a2c); cursor: pointer; }
/* options: a long button label (RETURN TO LOGIN) keeps inside its button */
.opt button.wideOpt { flex: 0 0 auto; height: auto; min-height: 34px; min-width: 132px; max-width: 55%; padding: 6px 12px; white-space: normal; line-height: 1.2; font-size: 11px; letter-spacing: .5px; }
