/* Eclipse Shards · items stage: the pack (paper doll + bag), tooltips, vendors and the stash, floor labels, the potion slot.
   The game's own vocabulary: Cinzel captions, Cormorant lore, gold hairlines on near-black.
   fixes1108 (content lane): the grade colours are the Eclipse Shards palette, one token each, used by every rule that colours an item
   (cells, tooltips, floor labels, toasts, the shops): bone (Plain), amber (Kindled), rose (Radiant), eclipse violet (Relic);
   --r-affix = the affix lines (corona gold, was D2's blue). The same values as items/data.mjs RARITY (tests/palette.test.mjs). */
:root{--cell:44px;--r-n:#d8d0c0;--r-m:#eea22f;--r-r:#f47ba3;--r-u:#b48cff;--r-affix:#ecd39c}
.r-n{--rc:var(--r-n)}.r-m{--rc:var(--r-m)}.r-r{--rc:var(--r-r)}.r-u{--rc:var(--r-u)}

/* ---- the modal: the pack on the right, a vendor / the stash on the left ---- */
.it-modal{place-items:safe center;background:#02060ac4;backdrop-filter:blur(6px);z-index:26;padding:18px}
.it-panel{display:flex;gap:18px;align-items:flex-start;max-width:100%;user-select:none;-webkit-user-select:none}
.it-inv,.it-side{position:relative;padding:16px 18px 14px;background:linear-gradient(#11161bf4,#070b0ef6);border:1px solid var(--line);box-shadow:0 0 0 4px rgba(8,12,16,.75),0 0 0 5px var(--line-2),0 30px 90px #000c}
.it-inv{width:calc(var(--cell)*10 + 38px)}
.it-side{width:calc(var(--cell)*10 + 38px);min-height:200px}
.it-inv>.it-head,.it-side>.it-head{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 10px;flex-direction:column}
.it-keeper{margin:4px 0 0;font:17px/1.3 var(--serif);color:#b9b3a1;text-align:center}
.it-x{position:absolute;right:8px;top:6px;width:28px;height:28px;border:0;background:none;color:#a99c7c;font:24px/1 var(--serif);cursor:pointer}
.it-x:hover{color:var(--gold-3)}
.it-hint{margin:8px 0 0;font:500 10px/1.5 var(--ui);letter-spacing:.06em;color:#7f8278;text-align:center}
.it-lock{margin:6px 0 0;font:600 11px var(--ui);letter-spacing:.06em;color:#d0796a;text-align:center}

/* ---- the paper doll ---- */
.it-doll{display:grid;grid-template-columns:repeat(10,var(--cell));grid-auto-rows:var(--cell);gap:0;margin:0 0 10px;position:relative;
  grid-template-areas:
   "main main . . helm helm . . off off"
   "main main . . helm helm amulet . off off"
   "main main . . armor armor . . off off"
   "main main . . armor armor . . off off"
   "gloves gloves ring1 . armor armor . ring2 boots boots"
   "gloves gloves charm . belt belt . . boots boots";
  background:radial-gradient(ellipse 30% 55% at 50% 45%,#c9ad7414,transparent 70%)}
.it-doll::before{content:'';position:absolute;left:50%;top:6%;width:36%;height:88%;transform:translateX(-50%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 6c9 0 15 7 15 16s-6 16-15 16-15-7-15-16 6-16 15-16zm-22 38h44l14 40-10 4-8-24v94H54V100h-8v58H32V64l-8 24-10-4z' fill='%23c9ad74' fill-opacity='.05'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}
.it-slot{position:relative;display:grid;place-items:center;margin:2px;border:1px solid rgba(201,173,116,.3);background:radial-gradient(circle at 50% 40%,#1a2026,#06090c 75%);box-shadow:inset 0 0 0 1px #000,inset 0 0 18px #000;overflow:hidden}
.it-slot.s-main{grid-area:main}.it-slot.s-off{grid-area:off}.it-slot.s-helm{grid-area:helm}.it-slot.s-amulet{grid-area:amulet}.it-slot.s-armor{grid-area:armor}
.it-slot.s-gloves{grid-area:gloves}.it-slot.s-ring1{grid-area:ring1}.it-slot.s-ring2{grid-area:ring2}.it-slot.s-belt{grid-area:belt}.it-slot.s-boots{grid-area:boots}.it-slot.s-charm{grid-area:charm}
.it-slot.empty>span{font:400 10px/1.3 var(--display);letter-spacing:.14em;text-transform:uppercase;color:#6d6656;text-align:center;padding:3px}
.it-slot.own>span{color:#9f9478;font:14px/1.15 var(--serif);letter-spacing:0;text-transform:none}
.it-slot>.it-cell{position:absolute;inset:0;width:auto;height:auto}
.it-slot.drop-ok{border-color:var(--gold);box-shadow:inset 0 0 0 1px #000,inset 0 0 18px #000,inset 0 0 0 2px rgba(201,173,116,.35)}
.it-slot.drop-bad{border-color:#9a4134;box-shadow:inset 0 0 0 1px #000,inset 0 0 18px #000,inset 0 0 26px rgba(150,40,30,.35)}

/* ---- grids and item cells ---- */
.it-grid{position:relative;display:grid;width:max-content;grid-template-columns:repeat(var(--cols),var(--cell));grid-template-rows:repeat(var(--rows),var(--cell));background:#05080b;border:1px solid rgba(201,173,116,.28);box-shadow:inset 0 0 22px #000}
.it-grid>.gc{border:1px solid rgba(201,173,116,.07);background:linear-gradient(135deg,#0c1115,#06090c)}
.it-grid>.it-cell{position:relative;z-index:1}
.it-cell{position:relative;width:calc(var(--cell)*var(--w,1));height:calc(var(--cell)*var(--h,1));cursor:grab;background:radial-gradient(ellipse at 50% 55%,color-mix(in srgb,var(--rc) 16%,transparent),transparent 70%);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rc) 38%,transparent)}
.it-cell>i{position:absolute;inset:3px;background:center/contain no-repeat;filter:drop-shadow(0 2px 3px #000c)}
.it-cell:hover{box-shadow:inset 0 0 0 1px var(--rc),inset 0 0 14px color-mix(in srgb,var(--rc) 30%,transparent)}
.it-cell.unid>i{filter:grayscale(.5) brightness(.7) drop-shadow(0 2px 3px #000c)}
.it-cell.unid::after{content:'?';position:absolute;right:3px;top:1px;font:600 13px var(--display);color:#d0796a}
.it-cell.nw::before{content:'';position:absolute;right:3px;top:3px;width:6px;height:6px;border-radius:50%;background:var(--gold-3);box-shadow:0 0 6px var(--gold)}
.it-cell.lifted{opacity:.25}
/* the cells an item on the cursor would take (fixes 2026-10-27b): gold = free, steel = a swap (that item goes on the cursor), red = blocked */
.it-target{position:absolute;inset:0;z-index:2;pointer-events:none}
.it-target.ok{background:rgba(201,173,116,.14);box-shadow:inset 0 0 0 1px rgba(214,190,138,.75)}
.it-target.swap{background:rgba(150,170,205,.13);box-shadow:inset 0 0 0 1px rgba(170,186,215,.75)}
.it-target.bad{background:rgba(160,46,34,.24);box-shadow:inset 0 0 0 1px rgba(200,84,66,.8)}
.it-cell.ghost{position:fixed;left:0;top:0;z-index:60;pointer-events:none;background:#0a0f13cc;box-shadow:inset 0 0 0 1px var(--rc),0 8px 26px #000}
.it-cell.req>i{filter:sepia(1) hue-rotate(-40deg) saturate(3) brightness(.6)}

/* ---- gold, stats ---- */
.it-gold{display:flex;align-items:center;gap:8px;margin-top:10px;padding:6px 4px 0;border-top:1px solid var(--line-2)}
.it-gold>span{color:var(--gold);font:24px var(--serif)}
.it-gold b{font:500 18px var(--ui);color:#eee0bc}
.it-gold small{font:400 10px var(--display);letter-spacing:.24em;color:#9fa296}
.it-gold .pots{margin-left:auto;font:600 11px var(--ui);color:#ecd08f;padding-left:16px;background:radial-gradient(circle at 5px 50%,#e0b04a 0 4px,transparent 5px)}
.it-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:4px 10px;margin:0 0 10px;padding:7px 8px;border:1px solid var(--line-2);background:#060a0dcc}
.it-stats p{margin:0;display:flex;flex-direction:column;gap:1px}
.it-stats span{font:400 10px var(--display);letter-spacing:.16em;text-transform:uppercase;color:#8c8470}
.it-stats b{font:600 14px var(--ui);color:#e6dcc4}
.it-stats small{font:500 10px var(--ui);color:#7f8278}
.it-stats .res{grid-column:1/-1;flex-direction:row;gap:14px;justify-content:center;padding-top:3px;border-top:1px solid var(--line-2)}
.it-stats .res i{font:600 11px var(--ui);font-style:normal;padding-left:13px;position:relative}
.it-stats .res i::before{content:'';position:absolute;left:0;top:50%;width:8px;height:8px;transform:translateY(-50%) rotate(45deg)}
.it-stats .res .f{color:#e9875a}.it-stats .res .f::before{background:#d2552a}
.it-stats .res .c{color:#8fc6e8}.it-stats .res .c::before{background:#4f8fd8}
.it-stats .res .l{color:#ead26a}.it-stats .res .l::before{background:#d8b636}
.it-stats .res .v{color:#b99be8}.it-stats .res .v::before{background:#8257c8}
/* fixes 2026-10-30 (difficulty): named resistances (after the act's penalty) wrap two to a line; the penalty in small type under them */
.it-stats .res{flex-wrap:wrap;gap:3px 12px}.it-stats .res.pen{border-top:0;padding-top:0}.it-stats .res.pen small{font:400 10px var(--ui);color:#c9a07a;letter-spacing:.04em}

/* ---- round1114g (inventory lane, Ariel: "The inventory screen could be improved, there's wasted space and idk.. looks kinda crappy") ----
   Every slot in the HUD's bronze slot frame; an empty one shows a faint drawing of what goes there (ui.js ICO, its name on hover), the
   starting kit its drawing and name, an off hand held by a two-handed weapon a dim copy of it. The corona flasks are named beside the
   gold. The pack alone (#it-panel.solo, no vendor beside it) fills the one frame (ui/kit.css --frame-w x --frame-h): a hero card (the
   portrait in the thorned medal, name, level, the paper doll round a figure) beside the pack card (larger cells; the spaces taken; gold
   and flasks at its foot), the stats in one band under both. Sizes come only from the frame and these vars: nothing moves on hover
   or click. #it-panel in the selectors: these win over ui/kit.css (loaded after this file). */
#game #it-panel .it-slot{border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 8px / 1px stretch;background:radial-gradient(circle at 50% 42%,#201a16,#090808 72%) padding-box;box-shadow:inset 0 0 14px #000}
#game #it-panel .it-slot>.ico{display:block;width:clamp(16px,50%,34px);aspect-ratio:1;background:#cfa47c;opacity:.24;-webkit-mask:var(--ico) center/contain no-repeat;mask:var(--ico) center/contain no-repeat;pointer-events:none}
#game #it-panel .it-slot.own>.ico{opacity:.5;margin-bottom:12px}
#game #it-panel .it-slot.held>.ico{opacity:.14}
#game #it-panel .it-slot.held>.hg{position:absolute;inset:8px 6px 22px;background:center/contain no-repeat;opacity:.22;filter:grayscale(.8)}
#game #it-panel .it-slot:is(.own,.held)>span{position:absolute;left:2px;right:2px;bottom:6px;padding:0;font:500 12px/1.2 var(--serif);letter-spacing:.01em;text-transform:none;color:#b8a27c;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;pointer-events:none}
#game #it-panel .it-slot.held>span{color:#857a68}
#game #it-panel .it-slot.drop-ok{box-shadow:inset 0 0 0 1px rgba(232,200,140,.75),inset 0 0 22px rgba(201,173,116,.3)}
#game #it-panel .it-slot.drop-bad{box-shadow:inset 0 0 0 1px rgba(210,90,70,.85),inset 0 0 24px rgba(150,40,30,.42)}
.it-gold .pots{display:flex;align-items:center;gap:8px;white-space:nowrap}
#game .it-gold .pots small{font:400 10px var(--display);letter-spacing:.2em;text-transform:uppercase;color:#9fa296}
#game .it-gold .pots b{font:600 13px var(--ui);color:#f2d896;font-variant-numeric:tabular-nums}
#game .it-gold .pots{padding-left:0;background:none}
.it-gold .pips{display:flex;gap:3px}
.it-gold .pips>i{width:9px;height:13px;background:#5a4630;-webkit-mask:var(--flask) center/contain no-repeat;mask:var(--flask) center/contain no-repeat;--flask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='9 3 22 34'%3E%3Cpath d='M16 4h8v11l5 9q6 12-9 12T11 24l5-9z' fill='%23000'/%3E%3C/svg%3E")}
.it-gold .pips>i.on{background:linear-gradient(#f6dc8e,#d9a441)}
/* the pack alone */
#game #it-panel.solo{--cell:52px;--du:40px;--dh:50px;--dg:4px;--pic:104px}
#game #it-panel.solo>.it-inv{display:flex;flex-direction:column;align-items:stretch}
#game #it-panel.solo>.it-inv>.it-body{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"hero pack" "stats stats";gap:16px 20px;margin:12px 0 0}
#game #it-panel.solo :is(.it-hero,.it-pack,.it-stats){position:relative;box-sizing:border-box;border:1px solid rgba(154,106,78,.26);background:radial-gradient(ellipse 80% 46% at 50% 0%,rgba(150,92,58,.08),transparent 70%),linear-gradient(#0f0d0cdb,#070708e8);box-shadow:inset 0 0 0 1px #0008,inset 0 0 44px #000a}
#game #it-panel.solo :is(.it-hero,.it-pack)::after{content:'';position:absolute;left:50%;top:-5px;width:9px;height:9px;transform:translateX(-50%);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 0L10 5 5 10 0 5z' fill='%23d2a27e'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}
/* the hero card: portrait, name, level; the doll centred under it */
#game #it-panel.solo .it-hero{grid-area:hero;display:flex;flex-direction:column;align-items:center;padding:14px 16px 16px}
#game #it-panel.solo .it-plate{align-self:stretch;display:flex;align-items:center;gap:14px;margin:0;padding:0 4px 12px;background:linear-gradient(90deg,transparent,rgba(154,106,78,.45) 20% 80%,transparent) bottom/100% 1px no-repeat}
#game #it-panel.solo .it-medal{position:relative;flex:none;width:var(--pic);height:var(--pic)}
#game #it-panel.solo .it-medal img{position:absolute;left:19%;top:19%;width:62%;height:62%;border-radius:50%;object-fit:cover;object-position:50% 20%;background:#0b0908}
#game #it-panel.solo .it-medal::after{content:'';position:absolute;inset:0;background:url(../assets/ui/kit/medal.webp) center/contain no-repeat;filter:drop-shadow(0 3px 6px #000)}
#game #it-panel.solo .it-who{margin:0;display:flex;flex-direction:column;gap:7px;min-width:0}
#game #it-panel.solo .it-who b{font:400 26px/1.1 var(--display);letter-spacing:.04em;color:#ecdcb8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 2px 10px #000}
#game #it-panel.solo .it-who small{font:500 11px/1 var(--ui);letter-spacing:.22em;text-transform:uppercase;color:#b48f6c;white-space:nowrap}
#game #it-panel.solo .it-doll{width:auto;margin:auto 0;grid-template-columns:repeat(8,var(--du));grid-template-rows:repeat(6,var(--dh));grid-auto-rows:var(--dh);gap:var(--dg);
  grid-template-areas:"main main charm helm helm amulet off off" "main main . helm helm . off off" "main main . armor armor . off off" "main main ring1 armor armor ring2 off off" "gloves gloves . armor armor . boots boots" "gloves gloves . belt belt . boots boots";
  background:radial-gradient(ellipse 32% 50% at 50% 46%,rgba(214,160,110,.10),transparent 72%)}
#game #it-panel.solo .it-doll::before{top:-3%;width:56%;height:106%;opacity:.8;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 6c9 0 15 7 15 16s-6 16-15 16-15-7-15-16 6-16 15-16zm-22 38h44l14 40-10 4-8-24v94H54V100h-8v58H32V64l-8 24-10-4z' fill='%23d6a874' fill-opacity='.09'/%3E%3C/svg%3E") center/contain no-repeat}
#game #it-panel.solo .it-slot{margin:0}
/* the pack card: its head (the spaces taken), the grid, gold and the corona flasks at its foot */
#game #it-panel.solo .it-pack{grid-area:pack;display:flex;flex-direction:column;align-items:center;padding:12px 16px 12px}
#game #it-panel.solo .it-sub{align-self:stretch;display:flex;align-items:center;gap:12px;margin:0 0 10px;font:400 12px/1 var(--display);letter-spacing:.32em;text-transform:uppercase;color:#cda77f;white-space:nowrap}
#game #it-panel.solo .it-sub::after{content:'';order:1;flex:1;height:1px;background:linear-gradient(90deg,rgba(154,106,78,.55),rgba(154,106,78,.08))}
#game #it-panel.solo .it-sub em{order:2;min-width:64px;font:500 12px/1 var(--ui);letter-spacing:.06em;color:#a0968a;text-align:right;font-variant-numeric:tabular-nums}
#game #it-panel.solo .it-pack>.g-bag{margin:auto 0}
#game #it-panel.solo .it-gold{align-self:stretch;display:flex;align-items:center;gap:9px;margin:12px 0 0;padding:11px 4px 0}
#game #it-panel.solo .it-gold>span{font:24px/1 var(--serif);color:var(--gold)}
#game #it-panel.solo .it-gold>b{font:600 20px/1 var(--ui);color:#f0e2bd;font-variant-numeric:tabular-nums}
#game #it-panel.solo .it-gold>small{font:400 11px/1 var(--display);letter-spacing:.24em;color:#9fa296}
#game #it-panel.solo .it-gold .pots{margin-left:auto}
#game #it-panel.solo .it-gold .pots b{font-size:15px}
/* the stats band: four numbers, then the resistances */
#game #it-panel.solo .it-stats{grid-area:stats;width:auto;margin:0;padding:16px 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,1.85fr);grid-template-rows:auto auto;gap:0}
#game #it-panel.solo .it-stats>.v{grid-row:1/3;align-self:stretch;justify-content:flex-start;gap:5px;padding:2px 22px;border-right:1px solid rgba(154,106,78,.2)}
#game #it-panel.solo .it-stats>.v span{display:flex;align-items:center;gap:8px;font:400 11px/1 var(--display);letter-spacing:.24em;text-transform:uppercase;color:#9a8e78;white-space:nowrap}
#game #it-panel.solo .it-stats>.v span::before{content:'';flex:none;width:6px;height:6px;transform:rotate(45deg);background:var(--sc,#9a6a4e)}
#game #it-panel.solo .it-stats>.v b{font:600 26px/1.1 var(--ui);color:var(--sv,#efe3c6);font-variant-numeric:tabular-nums;white-space:nowrap}
#game #it-panel.solo .it-stats>.v small{font:500 11px/1.2 var(--ui);color:#80827a;white-space:nowrap}
#game #it-panel.solo .it-stats>.life{--sc:#c8503a;--sv:#f2a48e}
#game #it-panel.solo .it-stats>.ess{--sc:#e0b04a;--sv:#f2d896}
#game #it-panel.solo .it-stats>.def{--sc:#a49a86}
#game #it-panel.solo .it-stats>.dmg{--sc:#d2a27e}
#game #it-panel.solo .it-stats>.res{grid-column:5;grid-row:1;display:grid;grid-template-columns:auto auto;justify-content:start;align-content:start;gap:7px 30px;margin:0;padding:2px 24px 0;border:0}
#game #it-panel.solo .it-stats>.res .rl{grid-column:1/-1;font:400 11px/1 var(--display);letter-spacing:.24em;text-transform:uppercase;color:#9a8e78;white-space:nowrap}
#game #it-panel.solo .it-stats>.res i{font:600 14px/1.2 var(--ui);white-space:nowrap}
#game #it-panel.solo .it-stats>.res.pen{grid-row:2;display:block;padding:7px 24px 0}
#game #it-panel.solo>.it-inv>.it-hint{margin:12px 0 0}
@media (max-height:820px){
  #game #it-panel.solo{--cell:46px;--du:42px;--dh:44px;--dg:4px;--pic:70px}
  #game #it-panel.solo>.it-inv>.it-body{gap:12px 18px;margin-top:8px}
  #game #it-panel.solo .it-hero{padding:10px 14px 12px}
  #game #it-panel.solo .it-plate{padding-bottom:9px;gap:12px}
  #game #it-panel.solo .it-who b{font-size:20px}
  #game #it-panel.solo .it-pack{padding:10px 14px 10px}
  #game #it-panel.solo .it-gold{margin-top:9px;padding-top:8px}
  #game #it-panel.solo .it-stats{padding:10px 0}
  #game #it-panel.solo .it-stats>.v b{font-size:21px}
}
@media (max-width:1060px){#game #it-panel.solo{--cell:40px;--du:36px;--dh:42px}}
@media (max-width:900px){#game #it-panel.solo>.it-inv>.it-body{grid-template-columns:auto;grid-template-rows:none;grid-template-areas:"hero" "pack" "stats";justify-content:center;overflow-y:auto}}

/* ---- tooltips ---- */
.it-tip{position:fixed;left:0;top:0;z-index:70;max-width:330px;min-width:220px;padding:11px 14px 10px;pointer-events:none;text-align:center;background:linear-gradient(#0d1216f8,#05080bfa);border:1px solid color-mix(in srgb,var(--rc,#c9ad74) 55%,#000);box-shadow:0 0 0 3px #000c,0 14px 40px #000;font:500 12px/1.42 var(--ui);color:#d9d4c6}
.it-tip p{margin:0}
.it-tip .tn{display:block;font:600 14px/1.25 var(--display);letter-spacing:.05em;margin-bottom:2px;text-shadow:0 0 12px color-mix(in srgb,var(--rc) 35%,transparent)}
.it-tip .tb{color:var(--rc);opacity:.85;font-size:12px}
.it-tip .tt{color:#9b9686;font-size:11px;margin-bottom:5px}
.it-tip .st{color:#e9e2d0}.it-tip .st em{font-style:normal;color:#fff;font-weight:600}
.it-tip .rq{color:#bdb7a7;font-size:11px}
.it-tip .neg{color:#e25a48}
.it-tip .md{color:var(--r-affix)}
.it-tip .lore{margin-top:7px;font:16px/1.3 var(--serif);color:#b9a77f}
/* fixes1109: the Ember Sea's three: the forged line under the name (Kindled amber, one line), the effect in the Relic violet, a warm rim in the bag */
.it-tip .te{margin:1px 0 3px;font:600 10px/1.3 var(--display);letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;color:var(--r-m);text-shadow:0 0 10px color-mix(in srgb,var(--r-m) 40%,transparent)}
.it-tip .fx{margin-top:7px;padding-top:6px;border-top:1px solid color-mix(in srgb,var(--r-u) 35%,transparent);color:color-mix(in srgb,var(--r-u) 80%,#fff)}
.it-tip .fx b{display:block;font:600 12px/1.3 var(--display);letter-spacing:.1em;text-transform:uppercase;color:var(--r-u)}
.it-cell.em{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--r-u) 60%,transparent),inset 0 -10px 16px -6px color-mix(in srgb,var(--r-m) 45%,transparent)}
.it-cell.em:hover{box-shadow:inset 0 0 0 1px var(--rc),inset 0 0 14px color-mix(in srgb,var(--rc) 30%,transparent),inset 0 -10px 16px -6px color-mix(in srgb,var(--r-m) 45%,transparent)}
.it-tip .pr{margin-top:6px;padding-top:5px;border-top:1px solid var(--line-2);color:#bdb7a7}.it-tip .pr em{font-style:normal;color:var(--gold-3)}
.it-tip .eq{font:400 10px var(--display);letter-spacing:.3em;color:#8c8470;margin-bottom:4px;text-transform:uppercase}
.it-tip.cmp{opacity:.93}

/* ---- vendors ---- */
.it-services,.it-gamble{display:flex;flex-direction:column;gap:7px}
.it-gamble{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}
.it-svc{display:flex;align-items:center;gap:10px;padding:9px 12px;background:#0a0f13;border:1px solid var(--line);color:#d6ccb2;text-align:left;cursor:pointer;font:400 13px var(--display);letter-spacing:.12em;text-transform:uppercase}
.it-svc span{display:flex;flex-direction:column;gap:2px;flex:1}
.it-svc small{font:500 11px var(--ui);letter-spacing:.02em;text-transform:none;color:#8f8a7a}
.it-svc b{font:600 12px var(--ui);letter-spacing:.02em;color:var(--gold-3);white-space:nowrap}
.it-svc:hover:not(:disabled){border-color:var(--gold);background:#11171c}
.it-svc:disabled{opacity:.45;cursor:default}
.it-svc.wide{width:100%}
.it-svc .ic{width:30px;height:30px;background:center/contain no-repeat}
.it-svc .ic.pot{background-image:url(../assets/icons/mana_potion.png)}
.it-svc .ic.flask{background-image:url(../assets/icons/health_potion.png)}
.it-svc .ic.corona{background-image:url(../assets/icons/mana_potion.png)}   /* fixes 2026-10-31 (hud): the PNG itself is Essence gold now: no hue-rotate */
.it-stashgold{display:flex;align-items:center;gap:10px;margin-top:10px;font:500 13px var(--ui);color:#cfc6ae}
.it-stashgold span{flex:1}.it-stashgold b{color:var(--gold-3)}
.it-stashgold .ghost{padding:7px 12px;font-size:9px}

/* ---- the floor: labels ---- */
#it-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3}
.it-label{position:absolute;left:0;top:0;padding:2px 7px 3px;border:1px solid #0008;background:#05080bd9;color:var(--rc);font:600 11px/1.2 var(--ui);letter-spacing:.02em;white-space:nowrap;pointer-events:auto;cursor:pointer;text-shadow:0 1px 2px #000;box-shadow:0 2px 6px #0008;opacity:.88}
.it-label.near{border-color:color-mix(in srgb,var(--rc) 70%,#000);opacity:1;box-shadow:0 0 10px color-mix(in srgb,var(--rc) 35%,transparent),0 2px 6px #000}
.it-toast{color:var(--rc);font-weight:600}

/* ---- the mana potion beside the flask ---- */
.it-potion{position:relative;width:40px;height:52px;padding:0;display:grid;place-items:center;background:radial-gradient(circle at 50% 40%,#151d24,#05080b 75%);border:1px solid rgba(201,173,116,.5);pointer-events:auto;cursor:pointer}
.it-potion i{width:30px;height:30px;background:url(../assets/icons/mana_potion.png) center/contain no-repeat}
.it-potion strong{position:absolute;right:3px;bottom:2px;font:600 11px var(--ui);color:#f4e3b4;text-shadow:0 1px 2px #000}
.it-potion kbd{position:absolute;left:-4px;top:-6px;font-size:8px;padding:2px 3px 1px;line-height:1}
.it-potion.off{opacity:.45}
/* the corona flask (fixes 2026-10-27; 2026-10-31: Essence gold, no blue): the dawn flask's bottle in the corona's gold */
.it-potion.corona{width:44px;background:linear-gradient(145deg,#1d242ac0,#060c10e0);border-color:rgba(224,176,74,.42);box-shadow:inset 0 0 0 1px #000,inset 0 0 18px #000}
.it-potion.corona svg{width:30px;height:30px;fill:#e0b45c22;stroke:#ecd08f;stroke-width:1.1}
.it-potion.corona.drinking svg{fill:#f2cf7450;filter:drop-shadow(0 0 4px #f2cf7488)}
.it-potion.corona strong{font-size:12px;right:4px}

@media (max-width:1100px),(max-height:800px){:root{--cell:38px}}
@media (max-height:800px){.it-modal{padding-top:8px;padding-bottom:8px}.it-inv>.it-hint{display:none}}   /* (fixes1106: the pack and its Back fit 1366x768 without a scroll) */
@media (max-width:980px){.it-panel{flex-direction:column;align-items:center}.it-modal{place-items:start center}}
@media (max-width:520px){:root{--cell:31px}.it-inv,.it-side{padding:12px 8px}}

/* ======================= the play-screen HUD (items stage, "Update 00:05"; shards since 2026-10-31): the bottom bar, buffs, the minimap ======================= */
/* no controls on screen: the key rows go (the pause menu keeps the full list) */
body.hud-v2 .combat-help,body.hud-v2 .quickslots small,body.hud-v2 .quickslots>div{display:none!important}
body.hud-v2:not(.hud-touch) .vitals{display:none}
body.hud-v2:not(.hud-touch) .quickslots{display:none}
/* fixes 2026-10-31 (hud, Ariel: "instead of orbs they should be Shards"): life and Essence are two tall crystal shards in the logo's
   thorned bronze setting (FLORA kit: assets/ui/hud/, pipeline/notes/fixes1031/hud/build_kit.py), filled to the share left with a
   line of liquid light at the level; the skill bar, the flasks and the slots in the same bronze; the experience a thin beveled bar */
/* fixes 2026-11-01 (hud, Ariel: "integrated with the skill bar like <lifebar/skillbar/manabar>"): the shards are cut short (the
   straight middle of the setting removed, pipeline/notes/fixes1101/hud/shorten_kit.py) to the bar's height plus the crown and the tip,
   centred on the bar, the spear caps pointing into them: one piece, nothing rises into the boss bar */
#hud-bar{--sh:150px;--slot:46px;position:absolute;left:50%;bottom:8px;transform:translateX(-50%);display:flex;align-items:center;gap:40px;pointer-events:none;filter:drop-shadow(0 4px 10px #000)}
#hud-bar .mid{display:flex;flex-direction:column;gap:6px;align-items:stretch;padding:9px 16px 7px;position:relative;
  background:radial-gradient(ellipse 70% 120% at 50% 0%,#1a15117a,transparent 70%),linear-gradient(#0c0d0ff0,#050607f6);background-clip:padding-box;
  border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 16px / 6px stretch}
#hud-bar .mid::before,#hud-bar .mid::after{content:'';position:absolute;top:50%;width:46px;height:40px;transform:translateY(-50%);background:center/contain no-repeat;pointer-events:none}
#hud-bar .mid::before{left:-46px;background-image:url(../assets/ui/hud/cap_l.webp)}
#hud-bar .mid::after{right:-46px;background-image:url(../assets/ui/hud/cap_r.webp)}
#hud-bar .row{display:flex;align-items:center;gap:8px}
#hud-bar .row.slots{pointer-events:auto}
/* the stamina line: a thin beveled bar, pointed at both ends */
#hud-bar .row.top .meter{flex:1;height:7px;padding:0;border:0;background:linear-gradient(#a27c55,#5b3b26 55%,#24160d);box-shadow:none;clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 50%,calc(100% - 5px) 100%,5px 100%,0 50%)}
#hud-bar .row.top .meter::before{display:block;content:'';position:absolute;inset:1.5px 2px;width:auto;height:auto;transform:none;background:#040506;box-shadow:none;clip-path:polygon(4px 0,calc(100% - 4px) 0,100% 50%,calc(100% - 4px) 100%,4px 100%,0 50%)}
#hud-bar .row.top .meter::after{display:none}
#hud-bar .row.top .meter>div{position:relative;z-index:1;margin:2px 0 0 3px;height:3px;max-width:calc(100% - 6px);box-shadow:inset 0 1px 0 #ffffff30;clip-path:polygon(2px 0,100% 0,100% 100%,2px 100%,0 50%)}
#hud-bar .sep{position:relative;width:12px;align-self:stretch;margin:0 1px;background:linear-gradient(rgba(201,173,116,0),rgba(201,173,116,.5) 30% 70%,rgba(201,173,116,0)) center/1px 100% no-repeat}
#hud-bar .sep::before{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;transform:translate(-50%,-50%) rotate(45deg);background:linear-gradient(135deg,#e3c58c,#7a5636);box-shadow:0 0 0 1px #0008}
/* bronze frames on the flasks and the skill slots (one 9-slice piece) */
#hud-bar .flask-slot,#hud-bar .it-potion,#hud-bar .rpg-slot{border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 11px / 3px stretch;background:radial-gradient(circle at 50% 40%,#1b1d1f,#060708 74%);background-clip:padding-box;box-shadow:inset 0 0 14px #000}
#hud-bar .flask-slot{position:relative;width:44px;height:54px}
#hud-bar .it-potion{width:44px;height:54px}
#hud-bar .flask-slot svg{width:30px;height:30px;fill:#c0402c66;stroke:#e0b07a}   /* the dawn flask: life red */
#hud-bar .it-potion.corona svg{fill:#f2cf7466;stroke:#f2cf74}                   /* the corona flask: Essence gold */
#hud-bar .flask-slot strong,#hud-bar .it-potion strong{right:4px;bottom:3px;font:600 12px var(--ui);color:#f4e8cc;text-shadow:0 1px 2px #000,0 0 4px #000}
#hud-bar .flask-slot kbd,#hud-bar .it-potion kbd{left:-5px;top:-7px;bottom:auto}
#hud-bar .rpg-hotbar{margin:0;gap:6px}
#hud-bar .rpg-slot{width:var(--slot);height:var(--slot)}
#hud-bar .rpg-slot.live{box-shadow:inset 0 0 14px #000,0 0 12px -2px var(--c)}
#hud-bar .rpg-slot.empty{border-style:solid;opacity:.62}
#hud-bar .row.xp{min-width:0}
/* the experience: a thin beveled bar with pointed ends (the text and the level stay rpg/ui.js's) */
#hud-bar #rpg-xp{position:static;transform:none;width:100%;filter:none}
#hud-bar #rpg-xp .bar{height:8px;border:0;background:none}
#hud-bar #rpg-xp .bar::before,#hud-bar #rpg-xp .bar::after{content:'';position:absolute;inset:0;clip-path:polygon(6px 0,calc(100% - 6px) 0,100% 50%,calc(100% - 6px) 100%,6px 100%,0 50%)}
#hud-bar #rpg-xp .bar::before{background:linear-gradient(#b08a5e,#5d3d27 55%,#26170e)}
#hud-bar #rpg-xp .bar::after{inset:1.5px 2px;background:linear-gradient(#020303,#0d0f10);clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 50%,calc(100% - 5px) 100%,5px 100%,0 50%)}
#hud-bar #rpg-xp .bar i{z-index:1;top:3px;bottom:3px;left:4px;max-width:calc(100% - 8px);background:linear-gradient(90deg,#6e4f22,#e8c77c);box-shadow:0 0 6px #e8c77c55;clip-path:polygon(3px 0,100% 0,100% 100%,3px 100%,0 50%)}
#hud-bar #rpg-xp.flash .bar::before{background:linear-gradient(#ffe6a8,#a07a36)}
#hud-bar #rpg-xp .bar em{z-index:2}
/* the shards: the empty crystal, the full one cut at the level, the line of light at the level, the setting on top; --f = the share left */
.shard{--f:1;--t:19.66%;--span:60.69%;position:relative;width:calc(var(--sh) * .3931);height:var(--sh);pointer-events:auto;flex:none}
.shard>i{position:absolute;inset:0;background:center/100% 100% no-repeat;pointer-events:none}
.shard .cr{background-image:url(../assets/ui/hud/shard_empty.webp)}
.shard .liq{clip-path:inset(calc(var(--t) + var(--span) * (1 - var(--f))) 0 0 0);transition:clip-path .2s ease-out}
.shard.life .liq{background-image:url(../assets/ui/hud/shard_life.webp)}
.shard.ess .liq{background-image:url(../assets/ui/hud/shard_ess.webp)}
.shard .lvl{--L:calc(var(--t) + var(--span) * (1 - var(--f)));background:linear-gradient(transparent calc(var(--L) - 3px),var(--glow) var(--L),transparent calc(var(--L) + 5px));-webkit-mask:url(../assets/ui/hud/shard_empty.webp) center/100% 100% no-repeat;mask:url(../assets/ui/hud/shard_empty.webp) center/100% 100% no-repeat;mix-blend-mode:screen}
.shard.life{--glow:#ff9a80}.shard.ess{--glow:#fff0c4}
.shard .frame{background-image:url(../assets/ui/hud/shard_frame.webp)}
.shard .val{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;padding:6px 6px 5px;border-radius:50%;background:radial-gradient(closest-side,#000000b8,#00000066 60%,transparent);text-shadow:0 1px 2px #000,0 0 5px #000;line-height:1;pointer-events:none}
.shard .val b{font:700 15px var(--ui);color:#fbf3e2;letter-spacing:.01em}
.shard .val small{margin-top:2px;padding-top:2px;border-top:1px solid #e8d2a08c;font:600 9px var(--ui);color:#e6d6b2;letter-spacing:.04em}
.shard.life.low .frame{animation:shard-low 1.1s ease-in-out infinite}
@keyframes shard-low{50%{filter:drop-shadow(0 0 6px #e0402a) brightness(1.15)}}
.shard .focus{position:absolute;left:0;right:0;bottom:16px;margin:0;justify-content:center;font-size:9px;gap:4px;text-shadow:0 1px 2px #000}
.shard .focus small{display:none}
#hud-bar .embers{position:absolute;left:100%;bottom:18px;white-space:nowrap;margin:0 0 0 14px;padding:0 0 4px;min-width:0;border-bottom:1px solid rgba(201,173,116,.3);gap:6px}
#hud-bar .embers>span{font-size:20px}#hud-bar .embers strong{font-size:16px}#hud-bar .embers small{font-size:7px;margin-bottom:3px}
/* buffs beside the life shard */
#hud-buffs{position:absolute;right:calc(50% + 336px);bottom:22px;display:flex;flex-direction:row-reverse;flex-wrap:wrap-reverse;gap:6px;max-width:240px;pointer-events:none}
body.hud-touch #hud-buffs{left:20px;bottom:auto;top:150px}
#hud-buffs .buff{position:relative;width:30px;height:30px;display:grid;place-items:center;background:radial-gradient(circle,#141b20,#05080b);border:1px solid color-mix(in srgb,var(--c) 60%,#000);box-shadow:0 0 10px -3px var(--c);color:var(--c)}
#hud-buffs .buff .rpg-icon{width:20px;height:20px}
#hud-buffs .buff b{position:absolute;right:-3px;bottom:-5px;font:600 10px var(--ui);color:#f0e6cc;text-shadow:0 1px 2px #000}
#hud-buffs .buff.aura{border-radius:50%}
/* the right column: minimap, quests, the objective */
#hud-side{position:absolute;right:22px;top:76px;display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none}
#hud-map{width:176px;height:176px;filter:drop-shadow(0 3px 8px #000)}
#hud-quest:empty{display:none}
#hud-quest{max-width:240px;text-align:right}
#hud-side #objective{position:static;max-width:240px;text-align:right}
/* toasts higher, clear of the action */
body.hud-v2 #toast{top:15%}
body.hud-v2 #prompt{bottom:178px;padding:8px 18px;font-size:16px}
body.hud-v2 #boss-hud{bottom:178px}
body.hud-v2 #prompt:not([hidden])~#boss-hud{bottom:230px}
@media (max-height:820px) and (min-width:900px){#hud-bar{--sh:134px;--slot:40px;gap:34px}#hud-bar .flask-slot,#hud-bar .it-potion{width:40px;height:48px}#hud-bar .mid::before,#hud-bar .mid::after{width:40px;height:35px}#hud-bar .mid::before{left:-40px}#hud-bar .mid::after{right:-40px}#hud-buffs{right:calc(50% + 300px)}#hud-map{width:150px;height:150px}body.hud-v2 #prompt,body.hud-v2 #boss-hud{bottom:162px}}
@media (max-width:1100px) and (pointer:fine){#hud-bar{--sh:126px;--slot:36px;gap:28px}#hud-bar .flask-slot,#hud-bar .it-potion{width:36px;height:44px}#hud-bar .mid::before,#hud-bar .mid::after{width:32px;height:28px}#hud-bar .mid::before{left:-32px}#hud-bar .mid::after{right:-32px}#hud-buffs{right:auto;left:16px;bottom:150px}}

/* fixes1106 (ui lane, Ariel item 6: "the order is wrong it should be the < that is decoration on the sides like this: << lifeshard skills
   essence shards >>"): ONE piece. Each shard sits on an end of the bar, its centre on the bar's edge (half over the bronze plate, the
   plate's rails running into its crown and tip, no corner of the bar left between them), and the spear-tips go OUTSIDE the shards,
   pointing out: << life | flasks · skills | Essence >>, the gold beyond the right tip. --ov = half a shard, --cap = a spear-tip. */
#hud-bar{--ov:calc(var(--sh) * .1966);--cap:46px;gap:0;padding:0 var(--cap)}
#hud-bar .shard{z-index:2}
#hud-bar .shard.life{margin-right:calc(-1 * var(--ov))}
#hud-bar .shard.ess{margin-left:calc(-1 * var(--ov))}
#hud-bar .mid{z-index:1;padding-left:calc(var(--ov) + 10px);padding-right:calc(var(--ov) + 10px);border-image-width:16px 0}
#hud-bar .mid::before,#hud-bar .mid::after{content:none}
#hud-bar::before,#hud-bar::after{content:'';position:absolute;top:50%;z-index:1;width:var(--cap);height:calc(var(--cap) * .87);transform:translateY(-50%);background:center/contain no-repeat;pointer-events:none}
#hud-bar::before{left:7px;background-image:url(../assets/ui/hud/cap_l.webp)}
#hud-bar::after{right:7px;background-image:url(../assets/ui/hud/cap_r.webp)}
@media (max-height:820px) and (min-width:900px){#hud-bar{--cap:40px}}
@media (max-width:1100px) and (pointer:fine){#hud-bar{--cap:32px}}

/* ---- fixes 2026-10-27c: the vendor's level line, the Unmaking (the alchemist's respec) and its confirmation ---- */
.it-wares{margin:0 0 8px;font:500 11px/1.5 var(--ui);letter-spacing:.04em;color:#8f8a7a;text-align:center}.it-wares b{color:var(--gold-3);font-weight:600}
.it-unmake{margin-top:14px;padding-top:12px;border-top:1px solid var(--line-2);display:flex;flex-direction:column;gap:7px}
.it-unmake .it-sub{margin:0;font:400 12px var(--display);letter-spacing:.2em;text-transform:uppercase;color:var(--gold-3);text-align:center}
.it-unmake .it-keeper{margin:0 0 4px;font-size:13px}
.it-svc .ic.unmake{background-image:url(../assets/icons/health_potion.png);filter:grayscale(.85) brightness(.8) contrast(1.2)}
.it-svc .ic.shard{background-image:url(../assets/icons/shard_unbecoming.png)}
.it-confirm{padding:12px 14px;background:#0a0f13;border:1px solid var(--gold);box-shadow:inset 0 0 0 1px #0007}
.it-confirm p{margin:0 0 6px;font:500 11px/1.5 var(--ui);color:#bdb7a7}
.it-confirm .q{font:400 14px var(--display);letter-spacing:.14em;text-transform:uppercase;color:#e6dcc0;margin-bottom:8px}
.it-confirm .row{display:flex;gap:8px;margin-top:10px}.it-confirm .row .it-svc{flex:1;justify-content:center}
.it-confirm .it-svc.go{border-color:var(--gold);color:var(--gold-3)}
