/* Base rules, first-pass panels, HUD, tooltip, dialog and menus, then the packed-art skin, title and character select. Later layers: the ui-*.css files linked after this one in index.html; cascade order matters. */
:root {
  --gold: #c8a86a;
  --gold2: #e8d4a0;
  --stone1: #1c1814;
  --stone2: #0e0c0a;
  --edge: #6a5433;
  --cell: 29px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; font-family: 'EB Garamond', Georgia, serif; color: #d8d0c0; user-select: none; -webkit-user-select: none; }
#game { position: fixed; left: 0; top: 0; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
.hidden { display: none !important; }
.dim { color: #8a8070; }
.gold { color: #e8c040; }
button { font-family: 'Cinzel', serif; background: linear-gradient(#3a2e20, #1e1810); color: var(--gold2); border: 1px solid var(--edge); padding: 3px 10px; cursor: pointer; margin-left: 6px; }
button:hover { border-color: var(--gold); color: #fff; }

/* ---------- panels ---------- */
.panel {
  position: fixed; top: 10px; width: 350px; max-height: calc(100% - 140px); overflow-y: auto; overflow-x: hidden; pointer-events: auto;
  background: linear-gradient(160deg, #221c16, #0c0a08 70%); border: 2px solid var(--edge);
  box-shadow: 0 0 0 1px #000, 0 0 30px rgba(0,0,0,.9), inset 0 0 40px rgba(0,0,0,.6); padding: 10px 10px 12px;
}
.panel.left { left: 10px; }
.panel.right { right: 10px; }
.panel::-webkit-scrollbar { width: 6px; } .panel::-webkit-scrollbar-thumb { background: #4a3a28; }
.ptitle { font-family: 'Cinzel', serif; color: var(--gold2); text-align: center; font-size: 17px; letter-spacing: 1px; border-bottom: 1px solid #3a2e20; padding-bottom: 6px; margin-bottom: 8px; position: relative; }
.px { position: absolute; right: 2px; top: -2px; cursor: pointer; color: #a08060; font-size: 15px; }
.px:hover { color: #fff; }
.hint { font-size: 12.5px; color: #8a8070; margin-top: 8px; line-height: 1.35; }
.goldline { margin-top: 8px; font-size: 15px; }

.grid { position: relative; margin: 0 auto; border: 1px solid #4a3a28; background-color: rgba(0,0,0,.55);
  background-image: linear-gradient(rgba(90,74,50,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(90,74,50,.35) 1px, transparent 1px);
  background-size: var(--cell) var(--cell); }
.gi { position: absolute; display: flex; align-items: center; justify-content: center; }
.gi img, .slot img, .bslot img { pointer-events: none; max-width: 100%; max-height: 100%; image-rendering: auto; }
.gi.q-magic, .slot.q-magic { background: rgba(60,60,170,.28); }
.gi.q-rare, .slot.q-rare { background: rgba(170,150,40,.22); }
.gi.q-unique, .slot.q-unique { background: rgba(170,120,50,.3); }
.qty { position: absolute; right: 1px; bottom: -1px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; pointer-events: none; }
#cursorItem .qty { right: 2px; bottom: 0; }
.gi.bad { background: rgba(170,20,20,.45) !important; }
.gi:hover, .slot:hover { outline: 1px solid rgba(232,212,160,.6); }
.equip { position: relative; height: 252px; width: 330px; margin: 0 auto; }
.slot { position: absolute; border: 1px solid #5a4a30; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 10px #000; }
.slotlbl { font-size: 10px; color: #4a4030; text-transform: uppercase; pointer-events: none; }
.stashwrap { display: flex; justify-content: center; }
.gamblegrid .gi { filter: saturate(0.6); }

/* character */
.charhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cname { font-family: 'Cinzel', serif; font-size: 20px; color: var(--gold2); }
.lvlbox { text-align: center; border: 1px solid var(--edge); padding: 2px 12px; }
.lvlbox .big { font-size: 24px; color: #fff; font-family: 'Cinzel', serif; }
/* The Stats tab's own rules are with the character window, in ui-windows.css. */
.skpts.glow { color: #ffd860; text-shadow: 0 0 8px #a07000; }

/* skills */
.skpts { text-align: center; font-size: 15px; margin-bottom: 4px; }
.tree { position: relative; width: 330px; height: 452px; margin: 0 auto; }
.treelines { position: absolute; left: 0; top: 0; pointer-events: none; }
.treelines line, .treelines polyline { fill: none; stroke: #5a4630; stroke-width: 3; }
.treehead { position: absolute; top: 18px; width: 88px; text-align: center; font-family: 'Cinzel', serif; font-size: 12px; color: var(--gold); }
.sknode { position: absolute; width: 44px; height: 44px; border: 2px solid #3a3020; cursor: pointer; background: #000; }
.sknode img { width: 100%; height: 100%; pointer-events: none; display: block; }
.sknode.locked img { filter: grayscale(1) brightness(.45); }
.sknode.has { border-color: var(--gold); }
.sknode.avail { border-color: #ffd860; animation: pulse 1.4s infinite; }
.sklvl { position: absolute; right: -8px; bottom: -8px; background: #000; border: 1px solid var(--edge); min-width: 18px; text-align: center; font-size: 12px; color: #fff; pointer-events: none; }
.sklvl:empty { display: none; }
.sklvl i { color: #8888ff; font-style: normal; }
.skreq { position: absolute; left: -2px; top: -2px; font-size: 10px; color: #a09070; background: rgba(0,0,0,.7); padding: 0 2px; pointer-events: none; }
.skreq:empty { display: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 2px #ffd860; } 50% { box-shadow: 0 0 12px #ffd860; } }

/* quests & waypoints */
.quest { border: 1px solid #3a2e20; background: rgba(0,0,0,.35); padding: 8px; margin-bottom: 8px; }
.quest .qname { font-family: 'Cinzel', serif; color: #a09070; display: flex; justify-content: space-between; }
.quest .qname span { font-family: 'EB Garamond', serif; font-size: 13px; }
.quest.active .qname { color: var(--gold2); } .quest.active .qname span { color: #ffd860; }
.quest.done .qname { color: #7a9a6a; } .quest.done .qname span { color: #8fce6f; }
.qdesc { font-size: 14px; margin: 4px 0; }
.qrew { font-size: 13px; color: #a09070; }
.wplist .wp { padding: 7px 10px; border: 1px solid #3a2e20; margin-bottom: 5px; background: rgba(0,0,0,.35); font-family: 'Cinzel', serif; font-size: 14px; }
.wp.on { color: var(--gold2); cursor: pointer; } .wp.on:hover { background: rgba(80,100,200,.25); border-color: #6080c0; }
.wp.off { color: #5a5040; } .wp.here { color: #80a0ff; }

/* ---------- HUD ---------- */




#bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: max-content; pointer-events: auto;
  background: linear-gradient(#2a221a, #120e0a); border: 2px solid var(--edge); box-shadow: 0 0 0 1px #000, 0 0 24px #000; padding: 4px 8px 6px; }
#xpbar { height: 7px; background: #0a0806; border: 1px solid #3a2e20; margin-bottom: 5px; }
#xpfill { height: 100%; background: linear-gradient(#e8c860, #8a6a20); width: 0; }
#barRow { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
#abar { display: flex; gap: 3px; }
.aslot { position: relative; width: 44px; height: 44px; border: 2px solid #4a3a24; background: rgba(0,0,0,.7); cursor: pointer; box-shadow: inset 0 0 8px #000; }
.aslot img { width: 100%; height: 100%; display: block; pointer-events: none; }
.aslot img.nomana { filter: grayscale(.7) brightness(.55) sepia(1) hue-rotate(-50deg); }
.aslot:hover { border-color: var(--gold2); }
.aslot.rmb { border-color: #8a7040; }
.aslot.empty { border-style: dashed; border-color: #3a2e20; }
.akey { position: absolute; left: 1px; top: -1px; font-family: 'Cinzel', serif; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; pointer-events: none; }
.amouse { position: absolute; right: 1px; bottom: 0; font-size: 9px; color: #ffd860; background: rgba(0,0,0,.75); padding: 0 2px; pointer-events: none; }
@media (max-width: 1080px) { .aslot { width: 38px; height: 38px; } .bslot { width: 36px; height: 36px; } }
.skillbtn { width: 56px; height: 56px; border: 2px solid var(--edge); cursor: pointer; background: #000; }
.skillbtn img { width: 100%; height: 100%; display: block; pointer-events: none; }
.skillbtn img.nomana { filter: grayscale(.7) brightness(.6) sepia(1) hue-rotate(-50deg); }
.skillbtn:hover { border-color: var(--gold2); }
#belt { display: flex; gap: 4px; }
.bslot { position: relative; width: 42px; height: 42px; border: 1px solid #5a4a30; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bslot:hover { border-color: var(--gold); }
.bslot.empty { border-style: dashed; border-color: #3a2e20; }
.bslot .bcnt { font-weight: 700; font-size: 12px; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.bkey { position: absolute; left: 2px; top: 0; font-size: 11px; color: #a09070; pointer-events: none; }
.bcnt { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; pointer-events: none; }
#tpBtn { position: relative; width: 36px; height: 42px; border: 1px solid #5a4a30; background: rgba(0,0,0,.6); cursor: pointer; display: flex; align-items: center; justify-content: center; }
#tpBtn img { pointer-events: none; }
#tpBtn span { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; pointer-events: none; }
#tpBtn:hover { border-color: var(--gold); }
#minis { display: grid; grid-template-columns: repeat(3, 30px); gap: 3px; }
.mini { width: 30px; height: 22px; border: 1px solid #5a4a30; background: linear-gradient(#3a2e20, #1a1410); font-family: 'Cinzel', serif; font-size: 12px; color: var(--gold2); text-align: center; line-height: 20px; cursor: pointer; }
.mini:hover { border-color: var(--gold2); color: #fff; }

#picker { position: fixed; bottom: 118px; pointer-events: auto; background: rgba(12,10,8,.96); border: 2px solid var(--edge); padding: 8px; max-width: 420px; }
#picker.center { left: 50%; transform: translateX(-50%); }
.pktitle { font-family: 'Cinzel', serif; font-size: 13px; color: var(--gold2); margin-bottom: 6px; }
.pkrow { display: flex; flex-wrap: wrap; gap: 5px; }
.pk { position: relative; width: 46px; height: 46px; border: 2px solid #3a3020; cursor: pointer; }
.pk img { width: 100%; height: 100%; display: block; pointer-events: none; }
.pk.cur { border-color: #ffd860; } .pk:hover { border-color: #fff; }
.pk.clear { display: flex; align-items: center; justify-content: center; color: #806050; font-size: 20px; background: rgba(0,0,0,.5); }
.hk { position: absolute; right: 1px; bottom: 0; font-size: 10px; color: #ffd860; background: rgba(0,0,0,.7); padding: 0 2px; pointer-events: none; }

#topbar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); width: 320px; text-align: center; background: rgba(0,0,0,.65); border: 1px solid #3a2e20; padding: 4px 8px 5px; }
#tbName { font-family: 'Cinzel', serif; font-size: 16px; }
#tbBar { height: 8px; background: #200; border: 1px solid #400; margin: 3px 0; }
#tbFill { height: 100%; background: linear-gradient(#e03030, #801010); }
#tbMods { font-size: 12.5px; color: #a0a0c0; }
#buffs { position: fixed; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 5px; max-width: min(390px, calc(100vw - 24px)); font-size: 12px; color: #b0c8ff; text-shadow: 0 0 3px #000; }
.hud-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 7px; border-radius: 12px; background: rgba(10, 13, 24, .74); box-shadow: inset 0 0 0 1px rgba(170, 196, 255, .28), 0 2px 6px rgba(0,0,0,.28); font-variant-numeric: tabular-nums; }.hud-chip.status { color: #f0d0a0; box-shadow: inset 0 0 0 1px rgba(232, 150, 100, .42), 0 2px 6px rgba(0,0,0,.28); }.hud-chip i { color: #dbe8ff; font-style: normal; }
#msgs { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); text-align: center; font-size: 17px; text-shadow: 0 0 4px #000, 0 0 2px #000; width: 700px; }
#areaTitle { position: fixed; top: 16%; left: 0; right: 0; text-align: center; font-family: 'Cinzel', serif; font-size: 44px; color: #e8d4a0; text-shadow: 0 0 20px #000, 0 0 6px #000; opacity: 0; letter-spacing: 3px; }
#areaTitle.fade { animation: fadeio 3.4s ease-out forwards; }
#banner { position: fixed; top: 26%; left: 0; right: 0; text-align: center; font-family: 'Cinzel', serif; font-size: 32px; color: #ffd860; text-shadow: 0 0 20px #803000, 0 0 4px #000; opacity: 0; }
#banner small { display: block; font-size: 18px; color: #e8d4a0; margin-top: 6px; }
#banner.fade { animation: fadeio 5s ease-out forwards; }
@keyframes fadeio { 0% { opacity: 0; transform: translateY(8px); } 12% { opacity: 1; transform: none; } 70% { opacity: 1; } 100% { opacity: 0; } }

#tooltip { position: fixed; z-index: 100; pointer-events: none; background: rgba(6,6,8,.95); border: 1px solid #504a40; padding: 8px 14px; text-align: center; font-size: 14.5px; max-width: 360px; line-height: 1.3; box-shadow: 0 0 20px #000; }
.tt-name { font-size: 16.5px; font-weight: 600; }
.tt-base { margin-bottom: 4px; }
.tt-mods { color: #7878ff; margin-top: 4px; }
.tt-bad { color: #ff4040; }
.tt-tip { margin-top: 8px; padding-top: 6px; border-top: 1px solid #5a452c; max-width: 300px; font-style: italic; }
.tt-dim { color: #909090; font-size: 13.5px; }
/* Orbs and quivers: whether the worn off-hand works beside the main hand (items/tooltip.js) */
.tt-offhand { margin-top: 4px; font: 600 14px Georgia, serif; }
.tt-offhand.on { color: #8fe08f; }
.tt-offhand.off { color: #ff8a6a; }
.tt-price { color: #e8d060; margin-top: 4px; }
.tt-sub { color: #e8d4a0; margin-top: 6px; font-family: 'Cinzel', serif; font-size: 13px; }
#cursorItem { position: fixed; pointer-events: none; z-index: 200; transform: translate(-50%, -50%); opacity: .92; }
#cursorItem img { display: block; }


/* ---------- overlays ---------- */
#overlay { position: fixed; inset: 0; pointer-events: auto; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); z-index: 50; }
#overlay.titlescr { background: transparent; }
.menubox { background: linear-gradient(160deg, #221c16, #0c0a08 70%); border: 2px solid var(--edge); padding: 22px 30px; min-width: 330px; text-align: center; box-shadow: 0 0 60px #000; }
.menubox h2, .menubox h3 { font-family: 'Cinzel', serif; color: var(--gold2); margin: 0 0 14px; }
.menubox h1 { font-family: 'Cinzel', serif; color: #ffd860; font-size: 44px; margin: 0 0 10px; }
.menubox p { font-size: 17px; max-width: 520px; line-height: 1.45; }
.mbtn { font-family: 'Cinzel', serif; font-size: 17px; letter-spacing: 1px; color: var(--gold2); cursor: pointer; border: 1px solid var(--edge); background: linear-gradient(#3a2e20, #16120c); padding: 8px 20px; margin: 8px auto; min-width: 220px; text-align: center; }
.mbtn:hover { color: #fff; border-color: var(--gold); box-shadow: 0 0 12px rgba(200,140,40,.5); }
.mbtn.small { min-width: 0; padding: 4px 12px; margin: 0; font-size: 14px; }
.mbtn.del { color: #c06050; }
.help table { text-align: left; font-size: 15.5px; border-collapse: collapse; margin-bottom: 10px; }
.help td { padding: 3px 12px; border-bottom: 1px dotted #2e261c; }
.help td:first-child { color: var(--gold2); font-family: 'Cinzel', serif; font-size: 13px; white-space: nowrap; }

.title { display: flex; flex-direction: column; align-items: center; }
.logo { font-family: 'Cinzel', serif; font-weight: 700; font-size: 92px; letter-spacing: 10px; margin: 0; background: linear-gradient(#fff2c0, #e0a040 45%, #8a3010); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255,100,20,.55)); }
.logo.small { font-size: 44px; letter-spacing: 5px; margin-bottom: 16px; }
.subtitle { font-family: 'Cinzel', serif; color: #a08060; letter-spacing: 6px; margin-bottom: 30px; font-size: 15px; text-transform: uppercase; }
select, input { font-family: 'EB Garamond', serif; font-size: 15px; background: #0a0806; color: var(--gold2); border: 1px solid var(--edge); padding: 4px 6px; }
.ccard { width: 240px; border: 2px solid #3a2e20; background: linear-gradient(160deg, #221c16, #0c0a08 70%); padding: 12px; text-align: center; cursor: pointer; transition: transform .15s; }
.ccard canvas { pointer-events: none; }
.ccard h3 { font-family: 'Cinzel', serif; color: var(--gold2); margin: 4px 0; pointer-events: none; }
.ccard p { font-size: 14.5px; min-height: 76px; pointer-events: none; }
.ccard:hover { border-color: #6a5433; transform: translateY(-3px); }
.ccard.sel { border-color: #ffd860; box-shadow: 0 0 20px rgba(255,180,60,.35); }
.victory p.gold { color: #ffd860; }

/* Combat feedback stays clear of the action bar and never intercepts input. */
.combat-level, .combat-combo { position: absolute; pointer-events: none; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
.combat-level[hidden], .combat-combo[hidden] { display: none; }
.combat-level { left: 50%; top: 17%; transform: translateX(-50%); text-align: center; width: min(90vw, 640px); color: #ffe4a0; text-shadow: 0 3px 3px #140900, 0 0 26px #ec9d25; }
.combat-level strong { position: relative; display: block; overflow: hidden; font: 900 clamp(32px, 5vw, 64px)/1.15 Cinzel, Georgia, serif; letter-spacing: .06em; }
.combat-level strong::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #fff8d5aa 50%, transparent 65%); transform: translateX(-120%); }
.combat-level span { display: block; margin-top: 14px; font: 600 clamp(13px, 1.8vw, 18px)/1.5 Georgia, serif; letter-spacing: .025em; color: #fff1d1; }
.combat-level.celebrate strong { animation: combat-level-pop var(--combat-pop) cubic-bezier(.2,.85,.3,1.2) both; }
.combat-level.celebrate strong::after { animation: combat-shine var(--combat-shine) var(--combat-delay) ease-out both; }
.combat-level.celebrate span { animation: combat-subtitle var(--combat-pop) var(--combat-delay) ease-out both; }
.combat-combo { right: 28px; top: 38%; text-align: right; color: #ffd684; filter: drop-shadow(0 2px 3px #100700); }
.combat-combo > div:first-child { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; }
.combat-combo strong { display: inline-block; transform-origin: right bottom; font: 900 clamp(34px, 4vw, 54px)/1 Georgia, serif; color: #fff0b4; }
.combat-combo span { font: 800 15px/1.2 sans-serif; letter-spacing: .08em; }
.combat-combo small { display: block; margin-top: 12px; font: 700 13px/1.4 sans-serif; }
.combat-combo-track { width: 146px; height: 3px; margin-top: 10px; margin-left: auto; background: #281c13bb; }
.combat-combo-track i { display: block; height: 100%; background: linear-gradient(90deg, #c67531, #ffe4a0); transform-origin: left; }
@keyframes combat-level-pop { from { opacity: 0; transform: scale(.65); } 65% { opacity: 1; transform: scale(1.08); } to { transform: scale(1); } }
@keyframes combat-shine { to { transform: translateX(120%); } }
@keyframes combat-subtitle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) { .combat-combo { right: 14px; top: 30%; } }
@media (prefers-reduced-motion: reduce) { .combat-level.celebrate strong, .combat-level.celebrate span, .combat-level.celebrate strong::after { animation: none; } }

/* ---------- packed Emberfall UI art ---------- */
html, body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body[data-cursor="default"] { cursor: image-set(url('assets/gen/ui/cursor.png') 1x, url('assets/gen/ui/cursor@2x.png') 2x) 3 0, auto; }
body[data-cursor="attack"] { cursor: image-set(url('assets/gen/ui/cursor_attack.png') 1x, url('assets/gen/ui/cursor_attack@2x.png') 2x) 5 0, crosshair; }
body[data-cursor="grab"] { cursor: image-set(url('assets/gen/ui/cursor_grab.png') 1x, url('assets/gen/ui/cursor_grab@2x.png') 2x) 9 0, grabbing; }

.panel, #picker, .menubox, #tooltip {
  border: 22px solid transparent;
  border-image: url('assets/gen/ui/panel_frame.webp') 350 350 375 350 fill / 48px 48px 51px 48px stretch;
  background-color: #130f0b;
  background-image: linear-gradient(rgba(10, 7, 4, .56), rgba(10, 7, 4, .76)), url('assets/gen/ui/panel_bg.webp');
  background-size: auto, 420px 420px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .72), inset 0 0 40px rgba(0, 0, 0, .58);
}
.panel { top: 12px; width: 400px; max-height: calc(100% - 314px); padding: 8px 10px 12px; }
.ptitle { min-height: 54px; border: 0; padding: 0 42px 33px; margin: 0 0 4px; background: url('assets/gen/ui/divider.webp') center calc(100% + 3px) / 150px auto no-repeat; text-wrap: balance; }
.px { width: 40px; height: 40px; right: -13px; top: -12px; display: grid; place-items: center; color: transparent; background: url('assets/gen/ui/close.webp') center / 32px 32px no-repeat; transition-property: filter, transform; transition-duration: .16s; }
.px:hover { filter: brightness(1.25); transform: scale(1.05); }
.goldline .gold { display: inline-block; width: 23px; height: 18px; color: transparent; vertical-align: -5px; background: url('assets/gen/ui/gold_icon.webp') center / contain no-repeat; }
.grid, .slot { border-color: rgba(139, 97, 44, .68); box-shadow: inset 0 0 14px #000; }
.slot { background: rgba(0, 0, 0, .48); }
.slot:hover { outline: 0; border-color: #f1c55f; box-shadow: inset 0 0 14px #000, 0 0 12px rgba(239, 180, 62, .35); }

/* The outer element holds a 1536 × 1024 artboard. All placement percentages
   are the measured HUD_ART_METRICS coordinates in ui.js divided by that size. */
#picker { bottom: max(118px, 18vh); padding: 13px; } .pk { border: 0; background: url('assets/gen/ui/slot.webp') center / 100% 100% no-repeat; }.pk:hover, .pk.cur { border: 0; background-image: url('assets/gen/ui/slot_hover.webp'); }.pk img { padding: 8%; }
#tooltip { border-width: 13px 18px 18px; border-image: url('assets/gen/ui/tooltip.webp') 24 26 30 fill stretch; min-width: 220px; padding: 10px 16px 13px; }
.tt-skill-icon { width: 32px; height: 32px; float: left; margin: -2px 7px 3px -2px; border-radius: 5px; outline: 1px solid rgba(255,255,255,.1); }
button, .mbtn { min-height: 40px; border: 0; background: url('assets/gen/ui/button.webp') center / 100% 100% no-repeat; background-size: 100% 100%; color: #ffe6a6; text-shadow: 0 2px 2px #120800; transition-property: transform, filter; transition-duration: .16s; }
button:hover, .mbtn:hover { border: 0; color: #fff9da; background-image: url('assets/gen/ui/button_hover.webp'); box-shadow: none; filter: brightness(1.08); }
button:active, .mbtn:active { background-image: url('assets/gen/ui/button_down.webp'); transform: scale(.96); }
.tab, [role="tab"] { min-width: 92px; min-height: 40px; padding: 9px 17px 6px; border: 0; color: #e8d4a0; background: url('assets/gen/ui/tab.webp') center / 100% 100% no-repeat; font: 700 13px/1 Cinzel, Georgia, serif; }
.tab.active, [role="tab"][aria-selected="true"] { color: #fff4c9; background-image: url('assets/gen/ui/tab_active.webp'); filter: brightness(1.1); }

/* Title and character selection */
#overlay.titlescr { --px: 0; --py: 0; overflow: hidden; align-items: center; background: #120704 url('assets/gen/ui/title_bg.webp') center / cover no-repeat; isolation: isolate; }
#overlay.charselect { background-image: url('assets/gen/ui/charselect_bg.webp'); }
#overlay.titlescr::before { content: ''; position: absolute; inset: -4%; z-index: -2; background: inherit; animation: title-drift 18s ease-in-out infinite alternate; }
#overlay.titlescr::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 36%, transparent 15%, rgba(8, 2, 0, .12) 59%, rgba(4, 0, 0, .75) 100%); pointer-events: none; }
.title { position: relative; z-index: 1; width: min(94vw, 1080px); max-height: 96vh; display: flex; flex-direction: column; align-items: center; overflow: auto; padding: 28px 12px 20px; }
.title-fg { position: fixed; inset: -3%; z-index: -1; pointer-events: none; background: url('assets/gen/ui/title_fg.webp') center / cover no-repeat; transform: translate(calc(var(--px) * 11px), calc(var(--py) * 8px)); transition: transform .18s ease-out; }
.embers { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }.embers i { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 3px; height: 3px; border-radius: 50%; background: #ffbd57; box-shadow: 0 0 8px #ff671f; opacity: .7; animation: ember-rise var(--d) linear var(--delay) infinite; }
.title > :not(.title-fg):not(.embers) { position: relative; z-index: 1; }.subtitle { margin: 0 0 15px; color: #f4d18a; text-shadow: 0 2px 5px #160500; }
.menubox { min-width: min(460px, 92vw); padding: 19px 28px 23px; }.menubox h2, .menubox h3 { min-height: 54px; padding: 0 28px 33px; margin-bottom: 8px; background: url('assets/gen/ui/divider.webp') center calc(100% + 3px) / 150px auto no-repeat; }.mbtn { width: min(270px, 80vw); margin: 5px auto; display: grid; place-items: center; padding: 8px 20px; }.mbtn.small { width: 72px; min-width: 52px; min-height: 40px; padding: 4px 8px; margin: 0; font-size: 12px; }.mbtn.del { width: 40px; min-width: 40px; color: #ffc0a0; }
.ccard { position: relative; isolation: isolate; width: 23.7%; min-width: 0; min-height: 447px; padding: 12px 10px 14px; overflow: hidden; border: 0; background: url('assets/gen/ui/card_frame.webp') center / 100% 100% no-repeat, linear-gradient(#1b100a, #070403); box-shadow: 0 12px 28px rgba(0,0,0,.42); transition-property: transform, filter, box-shadow; transition-duration: .18s; }.ccard::before { content: ''; position: absolute; inset: 5% 9% 7%; z-index: -1; background: var(--hero-art) center 4% / 106% auto no-repeat; opacity: .92; transition-property: opacity, transform, filter; transition-duration: .18s; }.ccard::after { content: ''; position: absolute; inset: 5% 8% 8%; z-index: -1; background: linear-gradient(transparent 29%, rgba(8,3,1,.1) 42%, rgba(8,3,1,.96) 75%); }.ccard h3 { font-size: clamp(17px, 1.8vw, 23px); margin: 0 0 5px; text-wrap: balance; }.ccard p { min-height: 0; margin: 4px 0; font-size: clamp(12px, 1.2vw, 15px); line-height: 1.15; }.ccard:hover, .ccard.sel { border: 0; transform: translateY(-6px); filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(255,229,152,.62), 0 0 27px rgba(250,167,43,.46), 0 16px 32px rgba(0,0,0,.6); }.ccard:hover::before, .ccard.sel::before { opacity: 1; transform: scale(1.03); filter: drop-shadow(0 0 12px rgba(255,199,91,.35)); }

/* Rogue combo pips. The compact card positions them below its portrait. */
.combo-pips { position: absolute; left: 11.2%; top: 55.6%; width: 10.4%; height: 4.5%; display: flex; justify-content: center; gap: 3%; pointer-events: none; }
.combo-pips i { width: 17%; aspect-ratio: .62; clip-path: polygon(50% 0, 88% 23%, 70% 100%, 50% 86%, 30% 100%, 12% 23%); background: linear-gradient(#4b2734, #190c14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 1px 3px #000; }
.combo-pips i:nth-child(1), .combo-pips i:nth-child(5) { transform: translateY(4px); }.combo-pips i:nth-child(2), .combo-pips i:nth-child(4) { transform: translateY(2px); }
.combo-pips i.full { background: linear-gradient(#ff8b91, #9c152d 70%, #4d0819); box-shadow: 0 0 8px rgba(236,48,75,.8), inset 0 0 0 1px rgba(255,230,210,.58); }

@keyframes globe-sheen { 0%, 55% { transform: translateX(-46%) rotate(-12deg); opacity: 0; } 66% { opacity: .7; } 82%, 100% { transform: translateX(70%) rotate(-12deg); opacity: 0; } }
@keyframes xp-shine { from { transform: translateX(-160%); } to { transform: translateX(520%); } }
@keyframes title-drift { from { transform: scale(1.04) translate(-.6%, -.4%); } to { transform: scale(1.08) translate(.7%, .5%); } }
@keyframes ember-rise { from { transform: translateY(22px) scale(.7); opacity: 0; } 18% { opacity: .78; } to { transform: translateY(-150px) scale(1.15); opacity: 0; } }
@media (max-height: 760px) { .title { padding-top: 12px; }.ccard { min-height: 390px; }.ccard p { line-height: 1.05; } }
@media (max-width: 760px) { .ccard { width: min(46%, 260px); min-height: 390px; }.menubox { min-width: min(92vw, 460px); } }
@media (prefers-reduced-motion: reduce) {.title-fg, .ccard, .ccard::before { transition: none; } }

@import url('quest.css');

