/* Eclipse Shards · the UI kit (fixes1105, ui lane; Ariel item 8: "think about the overall UI of the game, I think there's still lots
   of room to improve it"). One set of building blocks in the style of the logo and the shard HUD, used by every screen:
   - the panel frame: the logo's thorned rose-bronze corners on a thin rail (assets/ui/kit/frame.webp, a 9-slice from a FLORA render,
     pipeline/notes/fixes1105/ui/build_kit.py), the crest (a dark shard between spear rails) set on the top rail;
   - headers (eyebrow between tapering bronze lines, Cinzel title), buttons (the primary: ember bronze in the HUD's slot frame; the
     ghost: a quiet bronze line), tabs (one underline with a lozenge), tooltips (a framed card: name in the tier colour, base, the main
     numbers big, affixes, requirements, flavour), slots, dividers;
   - three panel widths (--pw-s menus, --pw-m dialogs and lists, --pw-l sheets and atlases), small text at 10 px or more, no italics,
     a light veil behind dialogs (the scene stays readable).
   Loaded last (index.html, after ui/menus.css). The #game prefix lets these rules win over the styles town.js / quests.js /
   waytravel.js add to <head> at runtime. Ids and classes the game writes are untouched. */
:root{--bz-0:#120b08;--bz-1:#2e1c13;--bz-2:#5c3a28;--bz-3:#9a6a4e;--bz-4:#d2a27e;--bz-hi:#f0d0ae;--cream:#f1dfbb;
  --pw-s:540px;--pw-m:780px;--pw-l:1000px}

/* ---------------------------------------------------------------- no italics anywhere in the interface */
#game em,#game i,#game cite,#game .town-line,#game .ql small,#game #enemy-label>em,#game .way-act.sealed em,#game .way-pane-head p,#game .way-note,#game .town-way-panel .sub{font-style:normal}

/* ---------------------------------------------------------------- the veil behind dialogs: lighter, the scene stays readable */
#game .modal{backdrop-filter:blur(2px) saturate(.9);-webkit-backdrop-filter:blur(2px) saturate(.9);background:radial-gradient(ellipse 75% 70% at 50% 50%,#03070a7a,#02050899)}
#game .it-modal{backdrop-filter:blur(1.5px);background:radial-gradient(ellipse 80% 75% at 50% 50%,#03070a8c,#020508b0)}
#game .town-modal{backdrop-filter:none;-webkit-backdrop-filter:none;background:linear-gradient(transparent 40%,#02050877 72%,#020508c4)}
#game .death-modal{backdrop-filter:none;-webkit-backdrop-filter:none;background:radial-gradient(ellipse 70% 55% at 50% 48%,#0e05048c,transparent 75%),linear-gradient(transparent 30%,#100907d0)}
#game #pause-screen.help-only{backdrop-filter:blur(2px)}

/* ---------------------------------------------------------------- the panel frame */
#game .panel,#game .it-inv,#game .it-side{
  border:1px solid transparent;border-image:url(../assets/ui/kit/frame.webp) 168 / 52px / 10px stretch;
  background:radial-gradient(ellipse 70% 40% at 50% 0%,rgba(150,92,58,.10),transparent 70%) padding-box,linear-gradient(#121110f5,#08090af7) padding-box;
  box-shadow:inset 0 0 0 1px #0009,inset 0 0 70px #0007,0 34px 100px -14px #000e}
/* the crest on the top rail (was a ✧ on a plate) */
#game .panel::before{content:'';top:-25px;width:min(380px,74%);height:40px;padding:0;background:url(../assets/ui/kit/crest.webp) center/contain no-repeat;font-size:0;filter:drop-shadow(0 2px 3px #000c);pointer-events:none;z-index:1}
#game .it-inv::before,#game .it-side::before{content:'';position:absolute;left:50%;top:-19px;width:min(270px,62%);height:29px;transform:translateX(-50%);background:url(../assets/ui/kit/crest.webp) center/contain no-repeat;filter:drop-shadow(0 2px 3px #000c);pointer-events:none;z-index:1}
/* content clears the corner knots */
#game .panel{padding-top:max(34px,var(--pt,34px))}
#game .it-inv,#game .it-side{padding:22px 24px 16px}
#game .it-x{right:20px;top:14px;width:30px;height:30px;border:1px solid var(--line-2);border-radius:50%;background:#0b0d0ecc;font:20px/1 var(--serif);color:var(--bz-4);display:grid;place-items:center;z-index:2}
#game .it-x:hover{border-color:var(--bz-4);color:var(--bz-hi)}
/* fixes1106 (ui lane, Ariel item 10: "Some things are not centered like the 'x' for closing the inventory, also every other menu has back
   instead, so inconsistent too"): ONE way out of every panel: a "‹ Back" button, centred at the bottom of the panel, in the pause menu's
   Back style (the pack, the stash and the shops, the character sheet and the skills, the quest log, the map, the waystones, Settings);
   Esc does the same everywhere. No corner crosses. */
/* fixes1108 (panels lane, Ariel: "the back is not centered with the <, looks really bad (it's all back buttons I think)"): the '‹' was
   EB Garamond's glyph, 8 px tall and sitting 2 px under the caps' middle, and the label's trailing letter-spacing pushed the pair
   left. Now the chevron is drawn (a mask in the label's colour), as tall as Cinzel's caps (.72 em) and on their middle line
   (Cinzel's caps sit .06 em above the line box's centre: measured, baseline .80 em, cap height .72 em), and the trailing
   letter-spacing is taken back (::after), so chevron + label are one unit centred in the button. */
#game .es-back,#game #equip-back,#game :is(#pause-screen,#shrine-screen) .menu-back,#game #select .select-title{position:relative;display:flex;align-items:center;justify-content:center;gap:0;width:auto;min-width:200px;height:var(--btn-h,44px);min-height:0;margin:16px auto 0;padding:.11em 28px 0;flex:none;background:linear-gradient(90deg,rgba(30,22,17,.75),rgba(14,12,11,.55));border:1px solid rgba(154,106,78,.4);border-radius:0;box-shadow:none;color:#d8ccad;font:400 13px/1 var(--display);letter-spacing:.18em;text-transform:uppercase;text-align:center;white-space:nowrap;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
#game .es-back::before,#game #equip-back::before,#game :is(#pause-screen,#shrine-screen) .menu-back::before,#game #select .select-title::before{content:'';flex:none;width:.46em;height:.72em;margin:0 .62em 0 0;padding:0;background:var(--gold);font:inherit;transform:translateY(-.06em);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M5.2 .6 1 5l4.2 4.4' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M5.2 .6 1 5l4.2 4.4' fill='none' stroke='%23000' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% 100% no-repeat}
#game .es-back::after,#game #equip-back::after,#game :is(#pause-screen,#shrine-screen) .menu-back::after,#game #select .select-title::after{content:'';flex:none;width:0;height:0;margin:0 0 0 -.18em;padding:0;border:0;background:none;box-shadow:none;animation:none;position:static}
#game .es-back:hover,#game .es-back:focus-visible,#game #equip-back:hover,#game :is(#pause-screen,#shrine-screen) .menu-back:hover,#game #select .select-title:hover,#game #select .select-title:focus-visible{border-color:var(--bz-4);background:linear-gradient(90deg,rgba(92,58,40,.4),rgba(30,22,17,.5));color:var(--bz-hi)}
#game .es-back:hover::before,#game :is(#pause-screen,#shrine-screen) .menu-back:hover::before,#game #select .select-title:hover::before{background:var(--bz-hi)}
#game .it-inv>.es-back{margin-top:10px}
#game .rpg-actions{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px}
#game .rpg-actions .ra{display:flex;align-items:center;gap:10px;min-width:0}#game .rpg-actions .ra.r{justify-content:flex-end}
#game .rpg-actions .es-back{margin:0}
@media (max-height:820px){#game .es-back,#game #equip-back,#game :is(#pause-screen,#shrine-screen) .menu-back{margin-top:12px}#game .it-inv>.es-back{margin-top:8px}}

/* ---------------------------------------------------------------- headers */
#game .eyebrow{font-size:12px;letter-spacing:.36em;color:#cda77f}
#game .panel .eyebrow::before,#game .panel .eyebrow::after,#game .it-head .eyebrow::before,#game .it-head .eyebrow::after{content:'';flex:0 0 36px;height:5px;background:linear-gradient(90deg,transparent,var(--bz-3)) center/100% 1px no-repeat,radial-gradient(circle,var(--bz-4) 0 1.6px,transparent 2.2px) right center/5px 5px no-repeat}
#game .panel .eyebrow::after,#game .it-head .eyebrow::after{background:linear-gradient(90deg,var(--bz-3),transparent) center/100% 1px no-repeat,radial-gradient(circle,var(--bz-4) 0 1.6px,transparent 2.2px) left center/5px 5px no-repeat}
#game .it-head .eyebrow{display:flex;align-items:center;justify-content:center;gap:14px}
#game .panel h2{color:#e6d3ac;text-shadow:0 2px 14px #000}
/* a divider: a hairline that fades at both ends with a lozenge in the middle */
#game .k-div,#game .menu-sep{display:block;height:9px;border:0;margin:10px 0;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='%23e3b892'/%3E%3C/svg%3E") center/9px 9px no-repeat,linear-gradient(90deg,transparent,rgba(154,106,78,.55) 30% 70%,transparent) center/100% 1px no-repeat}

/* ---------------------------------------------------------------- buttons */
/* the primary: ember bronze in the HUD's thorned slot frame, cream type */
#game .primary,#select .primary,#title .primary{background:linear-gradient(180deg,#6e472e 0%,#462b1c 46%,#2a1910 100%) padding-box;border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 12px / 3px stretch;color:var(--cream);text-shadow:0 1px 2px #000;font-weight:600;
  box-shadow:inset 0 1px 0 rgba(240,200,160,.22),inset 0 0 22px #0009,0 10px 26px -10px #000}
#game .primary::before,#game .primary::after,#select .primary::before,#select .primary::after,#title .primary::before,#title .primary::after{background:var(--bz-4);opacity:.85;width:6px;height:6px}
#game .primary:hover:not(:disabled),#select .primary:hover:not(:disabled),#title .primary:hover:not(:disabled){filter:brightness(1.2);box-shadow:inset 0 1px 0 rgba(240,200,160,.3),inset 0 0 22px #0007,0 0 22px -6px rgba(232,160,100,.6),0 12px 28px -10px #000}
#game .primary:focus-visible,#select .primary:focus-visible,#title .primary:focus-visible{outline:1px solid var(--bz-hi);outline-offset:4px}
/* the ghost / text buttons: a quiet bronze line */
#game .ghost,#game .text-button,#select .ghost{border-color:rgba(154,106,78,.5);color:#dcc8a4;background:linear-gradient(#17120f99,#0b0a0999)}
#game .ghost:hover,#game .text-button:hover,#select .ghost:hover{border-color:var(--bz-4);color:var(--bz-hi);background:linear-gradient(#2a1c1499,#140f0c99)}
#game .text-button{background:transparent;border-color:transparent;color:#bfae92}
#game .text-button:hover{border-color:rgba(154,106,78,.45);background:rgba(90,58,40,.12)}
/* menu rows (pause, waystone) in the same bronze */
#game :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary),#game :is(#pause-screen,#shrine-screen) .menu-back{background:linear-gradient(90deg,rgba(30,22,17,.75),rgba(14,12,11,.55));border-color:rgba(154,106,78,.28)}
#game :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):hover:not(:disabled),#game :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):focus-visible,#game :is(#pause-screen,#shrine-screen) .menu-back:hover{border-color:var(--bz-4);background:linear-gradient(90deg,rgba(92,58,40,.4),rgba(30,22,17,.5))}
#game :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary)::before{content:'';position:absolute;left:-1px;top:50%;width:5px;height:5px;margin-top:-3px;background:var(--bz-3);transform:rotate(45deg);opacity:0;transition:opacity .15s}
#game :is(#pause-screen,#shrine-screen) .menu-list>button:not(.primary):is(:hover,:focus-visible):not(:disabled)::before{opacity:1}

/* ---------------------------------------------------------------- tabs: one underline with a lozenge */
#game #pause-screen .set-tabs,#game .rpg-tabs{display:flex;justify-content:center;gap:2px;border-bottom:1px solid rgba(154,106,78,.3)}
#game #pause-screen .set-tabs button,#game .rpg-tabs button{position:relative;height:44px;padding:0 22px;background:transparent;border:0;box-shadow:none;color:#958d7c;font:400 13px/1 var(--display);letter-spacing:.2em;text-transform:uppercase}
#game #pause-screen .set-tabs button:hover,#game .rpg-tabs button:hover{color:var(--pale)}
#game #pause-screen .set-tabs button[aria-selected=true],#game .rpg-tabs button[aria-selected=true]{color:var(--bz-hi);background:linear-gradient(transparent 40%,rgba(154,106,78,.12))}
#game #pause-screen .set-tabs button[aria-selected=true]::after,#game .rpg-tabs button[aria-selected=true]::after{content:'';position:absolute;left:14px;right:14px;bottom:-5px;height:9px;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='%23e3b892'/%3E%3C/svg%3E") center/9px 9px no-repeat,linear-gradient(90deg,transparent,var(--bz-4) 25% 75%,transparent) center/100% 2px no-repeat}

/* ---------------------------------------------------------------- panel sizes */
#game :is(#pause-screen,#shrine-screen) .menu-panel{width:min(var(--pw-s),100%)}
#game .victory-modal .panel{width:min(var(--pw-m),100%)}
/* fixes1108 (panels lane, Ariel: "Every screen is different size, character - skills - inventory...", "when you go to buy my inventory
   is smaller than the shop window"): ONE frame for every full screen. The character sheet, the skills, the pack, the quest log, the
   waystones (the town's and Travel), Settings: --frame-w x --frame-h, centred on the screen; the header and the Back row keep their
   place and the middle scrolls when it has more than fits. Two screens side by side (a merchant or the stash + the pack) are two
   frames of exactly the same size, --frame-half x --frame-h, which together cover the one frame. The menus (pause, a waystone's
   rest menu) are lists, not screens: they stay --pw-s. A new screen takes the class .es-frame. */
:root{--frame-w:min(1040px,calc(100vw - 32px));--frame-h:min(880px,calc(100vh - 48px));--frame-gap:20px;--frame-half:calc((var(--frame-w) - var(--frame-gap)) / 2);--btn-h:44px}
@media (max-height:820px) and (min-width:700px){:root{--btn-h:38px}}
#game :is(.rpg-modal,.it-modal,.town-way-panel,#pause-screen,#shrine-screen,#equip-screen){padding:20px 16px;place-items:safe center}
#game :is(.es-frame,.rpg-panel,.town-way-panel .panel,:is(#pause-screen,#shrine-screen) .menu-panel.wide,#equip-screen .panel){box-sizing:border-box;display:flex;flex-direction:column;width:var(--frame-w);max-width:none;height:var(--frame-h);min-height:0;max-height:none;margin:0;padding:36px 40px 22px}
#game :is(.es-frame,.rpg-panel,.town-way-panel .panel,.menu-panel.wide,#equip-screen .panel)>*{flex:none}
/* the part that takes the rest of the height (and scrolls if it must) */
#game :is(.es-frame>.es-body,.rpg-char-panel>.rpg-char-grid,.rpg-tree-panel>.rpg-tree-body,.town-way-panel .panel>:is(.ql-list,.town-acts),.menu-panel.wide>.menu-page:not([hidden]),.menu-panel.wide .set-body,#shrine-screen .menu-panel.wide #travel,#equip-screen .equip-grid){flex:1 1 auto;min-height:0;height:auto;max-height:none}
#game :is(.es-frame>.es-body,.rpg-char-panel>.rpg-char-grid,.town-way-panel .panel>:is(.ql-list,.town-acts),#shrine-screen .menu-panel.wide #travel){overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(154,106,78,.45) transparent}
#game .menu-panel.wide>.menu-page:not([hidden]){display:flex;flex-direction:column}
#game .rpg-char-panel .rpg-row{padding-top:4px;padding-bottom:4px}   /* (the sheet's numbers fit the frame at 1080 px without a scroll) */
#game .menu-panel.wide>.menu-page>*{flex:none}
#game .menu-panel.wide :is(.set-back,.travel-back),#game .town-way-panel .panel>.es-back{margin-top:16px}
/* the pack and the vendors: two equal frames side by side (the pair is as wide as the one frame), or the pack alone in the one frame */
#game .it-panel{gap:var(--frame-gap);align-items:stretch}
#game :is(.it-inv,.it-side){box-sizing:border-box;width:var(--frame-half);height:var(--frame-h);min-height:0;display:flex;flex-direction:column;align-items:center;padding:30px 24px 22px}
#game :is(.it-inv,.it-side)>*{flex:none}
#game :is(.it-inv,.it-side)>:is(.it-head,.it-wares,.it-keeper,.it-hint,.it-lock,.it-services,.it-gamble,.it-unmake,.it-svc.wide,.it-stashgold){align-self:stretch}
#game .it-inv>:is(.it-doll,.it-stats,.it-gold){box-sizing:border-box;width:calc(var(--cell) * 10 + 2px)}
#game .it-inv>.it-gold{margin-bottom:auto}
#game .it-side>.it-grid{margin-bottom:auto}   /* (what follows a vendor's wares stays at the frame's foot: buying a row away moves nothing else) */
#game .it-side>.it-grid{flex:0 1 auto;min-height:calc(var(--cell) * 3 + 2px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(154,106,78,.45) transparent}
#game .it-panel:not(:has(>.it-side))>.it-inv{width:var(--frame-w);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;justify-items:center;align-items:start;padding:36px 40px 22px;
  grid-template-rows:auto minmax(0,1fr) auto auto minmax(0,1fr) auto auto auto;grid-template-areas:"head head" ". ." "doll bag" "stats gold" ". ." "lock lock" "hint hint" "back back"}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-head{grid-area:head;justify-self:stretch}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-doll{grid-area:doll;margin:0}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-stats{grid-area:stats;margin:12px 0 0}
#game .it-panel:not(:has(>.it-side))>.it-inv>.g-bag{grid-area:bag}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-gold{grid-area:gold;margin:12px 0 0}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-lock{grid-area:lock}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-hint{grid-area:hint;justify-self:stretch}
#game .it-panel:not(:has(>.it-side))>.it-inv>.es-back{grid-area:back}
/* the head of every frame: the eyebrow, then the title in one size at one height (the pack alone shows its title too) */
#game :is(.es-frame,.rpg-panel,.town-way-panel .panel,.menu-panel.wide>.menu-page,#equip-screen .panel)>h2,#game .it-panel:not(:has(>.it-side)) .it-title{font:400 32px/1.15 var(--display);letter-spacing:.04em;color:#e6d3ac;text-shadow:0 2px 14px #000;text-align:center;margin:10px 0 8px}
#game .it-title{display:none}
#game .it-panel:not(:has(>.it-side)) .it-title{display:block}
#game .it-panel:not(:has(>.it-side))>.it-inv>.it-head{margin:0}
#game .it-panel:not(:has(>.it-side))>.it-inv::before{top:-25px;width:min(380px,74%);height:40px}   /* (alone, the pack wears the one frame's crest) */
/* the town's waystone and the quest log sat under the HUD (z 7: the quest tracker and the minimap's ring were drawn over the wider frame,
   and from the pause menu the quest log opened behind it): above the HUD and the pause menu, behind the same veil as every screen */
#game .town-way-panel{z-index:25;background:radial-gradient(ellipse 75% 70% at 50% 50%,#03070a7a,#02050899);backdrop-filter:blur(2px) saturate(.9);-webkit-backdrop-filter:blur(2px) saturate(.9)}
#game #quest-log{z-index:27}
#game .town-way-panel .town-back-row .town-back{width:auto;min-width:420px;margin:0 auto}
@media (max-height:820px) and (min-width:700px){
  #game :is(.es-frame,.rpg-panel,.town-way-panel .panel,:is(#pause-screen,#shrine-screen) .menu-panel.wide,#equip-screen .panel),#game .it-panel:not(:has(>.it-side))>.it-inv{padding:30px 34px 16px}   /* (the same selector list as the one size above, so this one wins) */
  #game :is(.it-inv,.it-side){padding:26px 20px 16px}
  /* (the pack beside a vendor fits the frame at 768 px: a few px less between its parts) */
  #game :is(.it-inv,.it-side)>.it-head{margin-bottom:6px}
  #game .it-inv>.it-doll,#game .it-inv>.it-stats{margin-bottom:6px}
  #game .it-inv>.it-gold{margin-top:6px;padding-top:3px}
  #game .it-inv>.es-back{margin-top:6px}
}

/* ---------------------------------------------------------------- tooltips: a framed card with a clear order */
#game .it-tip{min-width:250px;max-width:340px;padding:12px 18px 12px;border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 12px / 3px stretch;
  background:radial-gradient(ellipse 90% 60px at 50% 0%,color-mix(in srgb,var(--rc,#c9ad74) 14%,transparent),transparent) padding-box,linear-gradient(#100f0ef8,#070809fa) padding-box;
  box-shadow:0 16px 40px #000d;font:500 13px/1.45 var(--ui);color:#d9d2c2}
#game .it-tip .tn{font:600 17px/1.2 var(--display);letter-spacing:.04em;margin:0 0 3px;text-shadow:0 0 14px color-mix(in srgb,var(--rc) 40%,transparent),0 1px 2px #000}
#game .it-tip .tb{font:500 13px var(--serif);font-size:15px;color:color-mix(in srgb,var(--rc) 70%,#ddd)}
#game .it-tip .tt{font:400 10px var(--display);letter-spacing:.2em;text-transform:uppercase;color:#9b8f7c;margin:2px 0 0}
/* sections: the numbers, the affixes, the requirements, the flavour, the price (a divider before each group) */
#game .it-tip :is(.tt,.tb,.tn)+:is(.st,.md),#game .it-tip .st+:is(.md,.neg,.rq),#game .it-tip :is(.md,.neg:not(.rq))+.rq,#game .it-tip .lore{margin-top:7px;padding-top:7px;background:linear-gradient(90deg,transparent,rgba(154,106,78,.45),transparent) top/100% 1px no-repeat}
#game .it-tip .st{font-size:13px;color:#cfc8b6}
#game .it-tip .st em{font:700 17px/1.25 var(--ui);color:#fff6e2;letter-spacing:.01em}
#game .it-tip .md{color:var(--r-affix,#ecd39c);font-size:13px}
#game .it-tip .rq{font-size:12px;color:#b4ab97}
#game .it-tip .neg{color:#e8705c}
#game .it-tip .lore{font:400 16px/1.35 var(--serif);color:#c4ab82}
#game .it-tip .pr{font-size:13px}
#game .it-tip .pr em{font:600 14px var(--ui)}
#game .it-tip .eq{font-size:10px;color:#a08a6e;margin-bottom:6px}
/* the skill tree's detail and the HUD's titles use the same type */
#game .rpg-detail .rpg-cost{font-size:12px}

/* ---------------------------------------------------------------- slots (pack, doll, stash, shop) */
#game .it-slot{border-color:rgba(154,106,78,.38);background:radial-gradient(circle at 50% 40%,#1b1714,#070708 75%)}
#game .it-grid{border-color:rgba(154,106,78,.36);background:#060607}
#game .it-grid>.gc{border-color:rgba(154,106,78,.08);background:linear-gradient(135deg,#100e0d,#070708)}
#game .it-stats{border-color:rgba(154,106,78,.22);background:#0807068c}
#game .it-gold{border-top:0;background:linear-gradient(90deg,transparent,rgba(154,106,78,.4),transparent) top/100% 1px no-repeat}
#game .it-svc{border-color:rgba(154,106,78,.42);background:linear-gradient(#15110ed9,#0b0a09d9);color:#dccdb0}
#game .it-svc:hover:not(:disabled){border-color:var(--bz-4);background:linear-gradient(#251a13,#120e0b)}

/* ---------------------------------------------------------------- readable small text */
#game .it-hint{font-size:12px;color:#8f8a7e}
#game .it-stats span{font-size:11px}#game .it-stats small{font-size:11px}#game .it-stats b{font-size:15px}
#game .it-gold small{font-size:11px}
#game .it-svc small{font-size:12px}
#game .it-wares{font-size:12px}
#game .it-slot.empty>span{font-size:10px;color:#7d7362}
#game .ql i{font-size:10px}
#game .ql small{font-size:15px}
#game #hud-quest .qt b{font-size:10px}#game #hud-quest .qt span{font-size:15px}
#game .way-act small,#game .way-btn small,#game .town-act small{font-size:10px}
#game .town-plate span{font-size:10px;letter-spacing:.26em}
#game .town-plate b{font-size:16px}
#game #rpg-xp .bar em{font-size:10px}
#game .rpg-slot .mc{font-size:10px}
#game .rpg-hot kbd{font-size:9px}
#game #enemy-label>em{font-size:11px;letter-spacing:.06em}
#game .shard .val small{font-size:10px}
#game .keylist kbd,#game .menu-list kbd{font-size:10px}

/* ---------------------------------------------------------------- the HUD: buff icons and the minimap in the bronze */
#game #hud-buffs{gap:8px}
#game #hud-buffs .buff{width:38px;height:38px;border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 9px / 2px stretch;border-radius:0;
  background:radial-gradient(circle at 50% 45%,color-mix(in srgb,var(--c) 22%,#16110e),#060607 72%) padding-box;box-shadow:inset 0 0 10px #000,0 0 12px -4px var(--c)}
#game #hud-buffs .buff.aura{background:radial-gradient(circle at 50% 50%,color-mix(in srgb,var(--c) 26%,#16110e) 0 40%,#060607 70%) padding-box}
#game #hud-buffs .buff .rpg-icon{width:22px;height:22px}
#game #hud-buffs .buff b{right:50%;bottom:-11px;transform:translateX(50%);min-width:18px;padding:1px 4px;background:#0b0908;border:1px solid rgba(154,106,78,.6);font:600 11px/1.1 var(--ui);text-align:center}
#game #hud-buffs{bottom:30px}
/* the minimap: the thorned ring over the map's edge (ring.webp; its opening is 0.595 of its radius) */
#game #hud-side{--map:176px;right:58px;top:124px;gap:12px}
#game #hud-side::before{content:'';position:absolute;top:calc(var(--map) * -.31);right:calc(var(--map) * -.31);width:calc(var(--map) * 1.62);height:calc(var(--map) * 1.62);background:url(../assets/ui/kit/ring.webp) center/contain no-repeat;filter:drop-shadow(0 4px 8px #000);pointer-events:none;z-index:1}
#game #hud-side:has(>#hud-map[hidden])::before{display:none}
#game #hud-side>#hud-map:not([hidden])+#hud-quest,#game #hud-side>#hud-map:not([hidden])~#objective{margin-top:calc(var(--map) * .18)}
@media (max-height:820px) and (min-width:900px){#game #hud-side{--map:150px;top:112px;right:50px}}

/* the heir's bar: a beveled bronze trough with the skill bar's spear caps; the name in Cinzel over it */
#game #boss-hud>div:first-child{font-size:17px;letter-spacing:.14em;color:#efe0bf;margin-bottom:9px;padding:0 6px}
#game #boss-phase{font-size:12px;color:#d6ad80}
#game .boss-meter{height:16px;padding:3px;border:2px solid transparent;background:linear-gradient(#030404,#0e0f10) padding-box,linear-gradient(#c09468,#5d3d27 55%,#26170e) border-box;box-shadow:0 3px 10px #000a}
#game .boss-meter::before,#game .boss-meter::after{width:40px;height:34px;background:center/contain no-repeat;transform:translateY(-50%)}
#game .boss-meter::before{left:-38px;background-image:url(../assets/ui/hud/cap_l.webp)}
#game .boss-meter::after{right:-38px;background-image:url(../assets/ui/hud/cap_r.webp)}
#game .boss-meter i{background:linear-gradient(#e0705a,#9a2f25 55%,#4e1410);box-shadow:inset 0 1px 0 #ffb09a55}
/* a foe's plate: the same bevel, thinner */
#game #enemy-label{font-size:12px}
#game #enemy-label>div{height:7px;padding:1px;border:1px solid transparent;background:linear-gradient(#030404,#0e0f10) padding-box,linear-gradient(#b08a5e,#4d3121) border-box}

/* ---------------------------------------------------------------- town: name plates, the conversation panel */
#game .town-plate b{text-shadow:0 1px 3px #000,0 0 14px #000}
#game .town-plate span{color:#d0a77e}
#game .town-talk-panel{place-items:end center;padding:0 16px max(7vh,var(--talk-lift,170px))}   /* (clear of the HUD's bar: the shards stay visible under it) */
#game .town-talk-panel .panel.talk{width:min(var(--pw-m),94vw);padding:24px 40px 18px;text-align:left}
#game .talk-head{display:flex;align-items:center;gap:20px;margin:-6px 0 12px}
#game .talk-medal{position:relative;flex:none;width:108px;height:108px;margin:-64px 0 0 -18px;display:grid;place-items:center;background:radial-gradient(circle,#2a1d16 0 44%,#0d0a08 58%,transparent 59%)}
#game .talk-medal::after{content:'';position:absolute;inset:0;background:url(../assets/ui/kit/medal.webp) center/contain no-repeat;filter:drop-shadow(0 4px 8px #000)}
#game .talk-medal svg{position:relative;width:44px;height:44px;fill:none;stroke:#e6c393;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 6px rgba(232,170,110,.45))}
#game .talk-who{min-width:0}
#game .talk-who .eyebrow{display:block;text-align:left;font-size:11px;letter-spacing:.34em}
#game .talk-who .eyebrow::before,#game .talk-who .eyebrow::after{display:none}
#game .town-modal .talk h2{margin:4px 0 0;font-size:30px;letter-spacing:.05em;text-align:left}
#game .talk .town-line{position:relative;margin:0 0 16px;padding:12px 0 0;font:400 20px/1.5 var(--serif);color:#e4dccb;background:linear-gradient(90deg,rgba(154,106,78,.55),transparent 80%) top/100% 1px no-repeat}
#game .talk .town-actions{display:flex;flex-direction:column;align-items:stretch;gap:5px}
#game .talk .town-actions button{display:flex;align-items:center;gap:14px;width:100%;min-width:0;height:44px;margin:0;padding:0 16px 0 10px;text-align:left;background:linear-gradient(90deg,rgba(34,24,18,.85),rgba(14,12,11,.4));border:1px solid rgba(154,106,78,.26);border-image:none;box-shadow:none;color:#e1d2b4;font:400 18px/1 var(--serif);letter-spacing:0;text-transform:none;text-shadow:none;filter:none;transform:none}
#game .talk .town-actions button::before,#game .talk .town-actions button::after{content:none}
#game .talk .town-actions button kbd{flex:none;min-width:24px;margin:0;font-size:11px;padding:4px 6px 3px}
#game .talk .town-actions button>span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game .talk .town-actions button>small{flex:none;font:400 10px var(--display);letter-spacing:.24em;text-transform:uppercase;color:#a08a6e}
#game .talk .town-actions button:hover,#game .talk .town-actions button:focus-visible{outline:none;border-color:var(--bz-4);background:linear-gradient(90deg,rgba(92,58,40,.55),rgba(30,22,17,.4));color:var(--bz-hi)}
#game .talk .town-actions button.quest{border-color:rgba(232,190,120,.55);color:#f6e2b6;background:linear-gradient(90deg,rgba(92,62,32,.6),rgba(30,22,17,.35));box-shadow:inset 3px 0 0 #e0b56e}
#game .talk .town-actions button.quest>small{color:#f0c56e}
#game .talk .town-actions button.quest kbd{border-color:#e8c27a;color:#ffe2a8}
#game .talk .town-actions button.bye{color:#ab9f8c;background:transparent;border-color:rgba(154,106,78,.16)}
#game .town-modal .panel p.town-keys{margin:12px 0 0;text-align:right;font-size:10px;letter-spacing:.26em;color:#9a8f7c}
/* the town's Waystone and the quest log in the same panel */
#game .town-way-panel .panel{width:min(var(--pw-m),94vw)}
#game .town-act{background:linear-gradient(90deg,rgba(30,22,17,.8),rgba(14,12,11,.5));border-color:rgba(154,106,78,.28)}
#game .ql{background:linear-gradient(90deg,rgba(30,22,17,.8),rgba(14,12,11,.5));border-color:rgba(154,106,78,.24)}

/* ---------------------------------------------------------------- floating numbers: crisper over bright floors */
#game .damage-number{font-weight:700;text-shadow:0 0 2px #000,0 0 7px #000b,0 2px 4px #000}
#game .rpg-float{text-shadow:0 0 2px #000,0 0 7px #000b,0 2px 4px #000}
#game .rpg-float.crit{font-size:14px;text-shadow:0 0 10px #e0a04a,0 0 2px #000,0 2px 4px #000}

/* ---------------------------------------------------------------- the class screen: the cards and the stat bars in the bronze */
#game #select .class-card{border:1px solid transparent;border-image:url(../assets/ui/hud/slot.webp) 40 / 11px / 3px stretch;background:linear-gradient(#14100ef2,#080808f4) padding-box}
#game #select .class-card.selected{box-shadow:0 0 30px -6px rgba(232,160,100,.5),0 18px 40px -16px #000;filter:brightness(1.08)}
#game #select .class-card.selected::after{content:'';top:-6px;width:120px;height:14px;padding:0;background:url(../assets/ui/kit/crest.webp) center/contain no-repeat;transform:translate(-50%,-50%)}
#game .select-stats i{height:8px;border:0;padding:1.5px 2px;background:linear-gradient(#a27c55,#5b3b26 55%,#24160d);clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 50%,calc(100% - 5px) 100%,5px 100%,0 50%)}
#game .select-stats b{background:linear-gradient(90deg,#7a5232,#f0cf98);clip-path:polygon(3px 0,100% 0,100% 100%,3px 100%,0 50%)}

/* ---------------------------------------------------------------- death, act titles, toasts */
#game .death-copy>p{font-size:13px;letter-spacing:.4em;color:#cdb79a}
#game .death-copy>p::after{content:'';display:block;width:min(420px,80vw);height:44px;margin:18px auto -8px;background:url(../assets/ui/kit/crest.webp) center/contain no-repeat;opacity:.9;filter:sepia(.3) hue-rotate(-12deg) saturate(1.3) drop-shadow(0 2px 6px #000)}
#game .death-copy .primary{border-image:url(../assets/ui/hud/slot.webp) 40 / 12px / 3px stretch;background:linear-gradient(180deg,#4a2018,#2a120d) padding-box}
#game #area-title h2::after,#game #boss-card h2::after{height:22px;bottom:-11px;background:url(../assets/ui/kit/crest.webp) center/auto 100% no-repeat}
#game #area-title h2{padding-bottom:22px}
#game #toast{padding:12px 56px 14px;text-shadow:0 2px 8px #000,0 0 22px #000;background:radial-gradient(ellipse 50% 60% at 50% 50%,#020304a8,transparent 100%)}
/* the interaction prompt: a dark band between two fading bronze lines */
#game #prompt{border:0;padding:10px 30px;background:linear-gradient(90deg,transparent,rgba(154,106,78,.75),transparent) top/100% 1px no-repeat,linear-gradient(90deg,transparent,rgba(154,106,78,.75),transparent) bottom/100% 1px no-repeat,radial-gradient(ellipse 60% 100% at 50% 50%,#08090bf0,#08090b80 70%,transparent)}
#game #prompt kbd{border-color:var(--bz-3);color:var(--bz-hi)}
/* the quest tracker under the minimap: a bronze lozenge before each */
#game #hud-quest .qt{position:relative;padding:6px 12px 6px 14px;background:linear-gradient(270deg,#0b0a09d8,#0b0a0900);border-left:0;border-right:2px solid var(--bz-3)}
#game #hud-quest .qt.done{border-right-color:#ffd27a}
#game #hud-quest .qt b{color:#d4ac80}
#game #hud-quest,#game #hud-side #objective{max-width:290px}

/* ---------------------------------------------------------------- 1366 x 768 and smaller */
@media (max-height:820px) and (min-width:700px){
  #game .panel{padding-top:28px}
  #game .panel::before{top:-19px;height:30px}
  #game .town-talk-panel{--talk-lift:150px}
  #game .town-talk-panel .panel.talk{padding:20px 34px 14px}
  #game .talk .town-actions button{height:40px;font-size:17px}
  #game .talk .town-line{font-size:18px;margin-bottom:12px}
  #game .talk-medal{width:92px;height:92px;margin-top:-54px}
  /* the character sheet and the skill tree did not fit 768 px (their buttons fell under the screen's edge): the whole sheet a size smaller */
  /* (fixes1108: the frame itself keeps the one size; only what is inside it is drawn a size smaller) */
  #game .rpg-modal .panel>:not(.rpg-actions,.eyebrow,h2){zoom:.86}
  #game :is(.es-frame,.rpg-panel,.town-way-panel .panel,.menu-panel.wide>.menu-page,#equip-screen .panel)>h2,#game .it-panel:not(:has(>.it-side)) .it-title{font-size:28px;margin:6px 0 6px}
  #game .it-inv::before,#game .it-side::before{top:-12px;height:20px}
  #game .it-panel:not(:has(>.it-side))>.it-inv::before{top:-19px;height:30px}
  /* the right column stays clear of the heir's bar */
  #game #hud-quest .qt{padding:4px 10px 4px 12px}
  #game #hud-quest .qt span{font-size:14px;line-height:1.25}
  #game #hud-side #objective p{font-size:16px;margin:4px 0}
}
@media (max-width:600px){
  #game .panel,#game .it-inv,#game .it-side{border-image-width:40px;border-image-outset:8px}
  #game .talk-medal{display:none}
}

/* ================================================================ fixes1108 (panels lane): centring, one-line labels, nothing bumps ================================================================ */
/* the "+" in the round buttons of the character sheet is drawn, on the exact centre of the circle (Garamond's "+" sat high and to one
   side); the skill tree's "+" is the content lane's SVG shard (rpg/ui.js PLUS), centred the same way */
#game .rpg-stat button{position:relative;font-size:0;line-height:0;color:var(--gold-3)}
#game .rpg-stat button::before,#game .rpg-stat button::after{content:'';position:absolute;left:50%;top:50%;width:12px;height:2px;margin:-1px 0 0 -6px;background:currentColor;border-radius:1px}
#game .rpg-stat button::after{width:2px;height:12px;margin:-6px 0 0 -1px}
/* (the map's round zoom buttons: the same drawn "+" and "-", on the circle's centre; 36 px buttons, bars of 12 x 2) */
#game #map-screen .map-tools button:is([data-z=in],[data-z=out]){position:relative;font-size:0;line-height:0}
#game #map-screen .map-tools button:is([data-z=in],[data-z=out])::before,#game #map-screen .map-tools button[data-z=in]::after{content:'';position:absolute;left:50%;top:50%;width:12px;height:2px;margin:-1px 0 0 -6px;background:currentColor;border-radius:1px}
#game #map-screen .map-tools button[data-z=in]::after{width:2px;height:12px;margin:-6px 0 0 -1px}
/* labels on one line at one height ("CHARACTER [L] 5", "AUTO-ASSIGN" wrapped to two lines): the label, its key and its count badge are
   one centred unit; the badge sits inside the button without making it taller */
#game :is(.ghost,.text-button){white-space:nowrap}
#game .rpg-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--btn-h);min-height:0;margin:0;padding:.11em 20px 0;flex:none;white-space:nowrap;line-height:1}
#game .rpg-actions .ghost kbd{margin:0;transform:translateY(-.08em)}
#game .rpg-actions .ghost em{display:inline-grid;place-items:center;box-sizing:border-box;min-width:22px;height:18px;margin:0;padding:0 5px;font:600 11px/1 var(--ui);letter-spacing:0;color:#1a140a;background:var(--gold-3);transform:translateY(-.08em)}
#game .rpg-actions .rpg-pts{margin:0;white-space:nowrap}
#game .rpg-actions .ra.l>.ghost{order:-1}   /* (Auto-assign first, at the edge: the points count after it can change width without moving it) */
#game .rpg-tabs button small{display:inline-block;min-width:2.2ch;text-align:left;font-variant-numeric:tabular-nums}   /* (a tab's count going 9 -> 10 no longer re-centres the tabs) */
#game .rpg-actions .ra .ghost{box-sizing:border-box;width:176px;padding-left:10px;padding-right:10px}
#game .rpg-actions .ra .ghost:is([data-act=char],[data-act=tree]){width:216px}   /* (one width each, so a count badge coming or going never moves the button's edge) */
/* nothing lifts or jumps on hover, click or selection (the gold button rose 1 px on hover, a class card 2 px on hover and 4 px once chosen) */
#game .primary:hover:not(:disabled),#game .primary:active,#game .class-card,#game .class-card:hover,#game .class-card.selected{transform:none}

/* ---------------------------------------------------------------- the class screen (select.js): one view control that is always there */
/* Ariel: "it's really confusing to have 'face' and 'back' together, and when you press 'face' the button 'full figure' appears and the UI
   moves". The view is a segmented control under the figure (Full figure · Face · Back), the chosen one lit, every segment a fixed width;
   the way out is "‹ Return to title" beside Begin, in the Back style; Begin keeps one width for every label */
#game #select .select-actions{display:flex;align-items:center;gap:12px}
#game #select .select-title{margin:0;min-width:0}
#game #select #select-begin{box-sizing:border-box;width:330px;min-width:0;height:50px;min-height:0;padding:0 30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game #select .select-hint{height:1.35em;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}
#game #select .select-hint.warn{color:#e2b27a}
#game #select .select-views{position:absolute;left:66.6%;bottom:calc(4% + 41px);transform:translateX(-50%);display:flex;align-items:center;gap:14px;pointer-events:auto}
#game #select .select-views>span{font:400 11px/1 var(--display);letter-spacing:.34em;text-transform:uppercase;color:#a99a80;text-shadow:0 1px 4px #000}
#game #select .select-views .seg{display:flex;height:40px;border:1px solid rgba(154,106,78,.55);background:linear-gradient(#120e0cd9,#0a0908e6);box-shadow:0 8px 24px -10px #000}
#game #select .select-views .seg button{box-sizing:border-box;width:124px;flex:none;height:100%;margin:0;padding:.11em 0 0;border:0;border-left:1px solid rgba(154,106,78,.35);background:transparent;color:#a39885;font:400 12px/1 var(--display);letter-spacing:.2em;text-transform:uppercase;white-space:nowrap;text-align:center;box-shadow:none;transition:color .15s,background .15s}
#game #select .select-views .seg button:first-child{border-left:0}
#game #select .select-views .seg button:hover{color:var(--bz-hi);background:rgba(154,106,78,.12)}
#game #select .select-views .seg button[aria-checked=true]{color:var(--bz-hi);background:linear-gradient(#5c3a2899,#2e1c1399);box-shadow:inset 0 0 0 1px var(--bz-3),inset 0 -2px 0 var(--bz-4)}
#game #select .select-views .seg button:focus-visible{outline:1px solid var(--bz-hi);outline-offset:-4px}
@media (max-height:820px){#game #select .select-views{bottom:calc(4% + 39px)}#game #select .select-views .seg{height:36px}#game #select .select-views .seg button{width:114px;font-size:11px;letter-spacing:.16em}}
/* 1366 x 768 and other short screens: the rank ran under the first stat and the class cards covered "Starting skill" (the title moved
   down for the bigger logo): the title a size smaller, the stats right under it, the portraits shorter */
@media (max-height:820px) and (min-width:700px){
  #game #select .select-top{top:104px}
  #game #select .select-top h2{font-size:38px;margin:8px 0 6px}
  #game #select .select-stats{top:212px;gap:7px}
  #game #select .class-card .portrait{height:112px}
  #game #select .select-bottom{gap:10px}
}
@media (max-width:900px){#game #select .select-views{left:auto;right:16px;transform:none;bottom:auto;top:84px}#game #select .select-views>span{display:none}#game #select .select-views .seg button{width:92px;letter-spacing:.12em}}
