:root {
  --bg: #0a090a;
  --ink: #e8dcc0;
  --muted: #9a8e74;
  --gold: #d8a84a;
  --gold-hi: #ffd84a;
  --panel: rgba(18, 14, 12, .95);
  --edge: #5a4628;
  --edge-hi: #8a6a38;
  --red: #c0302a;
  --blue: #2f5fd0;
}
* { box-sizing: border-box; }
html, body { cursor: var(--cur-point); margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: 'Grenze', Georgia, serif; user-select: none; }
canvas#cv { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#cvTop { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: var(--cur-hand); }
kbd { font: 600 13px 'Grenze', serif; border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: rgba(255, 255, 255, .05); color: var(--ink); }
.gold { color: var(--gold-hi); }
.good { color: #6fe36f; } .mid { color: #ffd84a; } .bad { color: #ff6a5a; }
.bar { height: 6px; background: rgba(0, 0, 0, .7); border: 1px solid #3a2e1c; position: relative; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, var(--gold-hi)); }

/* ---------------- HUD ---------------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #hud .slot { pointer-events: auto; }
#zoneLabel { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 6px #000; }
#zoneLabel b { display: block; font: 700 23px 'Grenze Gotisch', serif; color: #f2e2b8; letter-spacing: .06em; }
#zoneLabel span { font-size: 16px; color: var(--muted); }
#minimapWrap { position: absolute; top: 12px; right: 12px; border: 2px solid var(--edge); background: #060507; box-shadow: 0 4px 20px rgba(0, 0, 0, .7); }
#minimap { display: block; }
.mm-gold { position: absolute; bottom: -24px; right: 0; font-size: 16px; color: var(--gold-hi); text-shadow: 0 1px 3px #000; }
#targetFrame { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); width: 300px; background: var(--panel); border: 1px solid var(--edge); padding: 6px 10px 8px; text-align: center; }
#targetFrame > div:first-child { display: flex; justify-content: space-between; font-size: 17px; margin-bottom: 4px; }
#targetFrame b { color: #f2e2b8; }
#targetFrame span { color: var(--muted); font-size: 14px; }
#targetFrame .bar { height: 14px; }
#targetFrame .bar i { background: linear-gradient(180deg, #e04040, #7a1414); }
#targetFrame .bar span { position: absolute; inset: 0; font-size: 13px; line-height: 12px; color: #fff; text-shadow: 0 1px 2px #000; }
#targetFrame.boss { border-color: #8a3ad0; }
#targetFrame.boss .bar i { background: linear-gradient(180deg, #c35cff, #4a1a7a); }

#lure { position: absolute; right: 20px; top: 200px; width: 190px; text-align: right; opacity: 0; transform: translateX(20px); transition: opacity .25s, transform .25s; }
#lure.on { opacity: 1; transform: none; }
.lure-n b { font: 900 55px 'Grenze Gotisch', serif; color: var(--gold-hi); text-shadow: 0 0 18px rgba(255, 140, 40, .7), 0 3px 6px #000; line-height: 1; }
.lure-n span { display: block; font: 700 14px 'Grenze Gotisch', serif; letter-spacing: .25em; text-transform: uppercase; color: #ffb35a; text-shadow: 0 2px 4px #000; }
.lure-info { font-size: 16px; color: #f2e2b8; text-shadow: 0 1px 3px #000; margin: 2px 0 4px; }
#lure .bar i { background: linear-gradient(90deg, #ff6a2a, #ffd84a); }
#aggro { position: absolute; right: 20px; top: 172px; font-size: 16px; color: #ff9a7a; text-shadow: 0 1px 3px #000; }
#aggro.many { color: #ff5a3a; font-weight: 700; }
#playerFrame { position: absolute; left: 14px; top: 14px; display: flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; width: 300px;
  background: #17110d; box-shadow: 0 0 0 2px #050302, 0 0 0 4px #7a5a2c, 0 0 0 6px #3a2814, 0 0 0 8px #050302; }
#faceCv { width: 54px; height: 54px; image-rendering: pixelated; background: radial-gradient(circle at 50% 60%, #3a2a1a, #0e0a07); box-shadow: 0 0 0 1px #050302, inset 0 0 0 1px #4a3618; }
.pf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
/* (one line each, however long the name or title: what does not fit fades into an ellipsis) */
.pf-info b, .pf-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-info b { font-size: 18px; color: #ffe9b0; line-height: 1.1; }
.pf-info b .ptitle { font-size: 13px; }
.pf-info span { font-size: 14px; color: var(--muted); }
.pfbar { height: 7px; background: #0a0606; box-shadow: 0 0 0 1px #050302; }
.pfbar i { display: block; height: 100%; }
.pfbar.hp i { background: linear-gradient(180deg, #ff5a4a, #8a1010); }
.pfbar.mp i { background: linear-gradient(180deg, #6a9aff, #1a3aa0); }
.tt-prefix { color: #ffb35a; margin-top: 2px; }
.tt-qg { margin-top: 3px; } .tt-qg.empty { color: var(--muted); font-size: 14px; }
.qgrid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.qbtn { display: flex !important; flex-direction: column; align-items: center; gap: 1px; padding: 4px 6px !important; min-width: 78px; }
.qbtn img { width: 32px; height: 32px; image-rendering: pixelated; }
.qbtn span { font-size: 13px; } .qbtn small { font-size: 12px; color: var(--gold-hi); }
.small { font-size: 14px; color: var(--muted); }
.tt-dur { font-size: 14px; color: var(--muted); margin-top: 4px; } .tt-dur.warn { color: #ffb35a; } .tt-dur.bad { color: #ff5a4a; font-weight: 700; }
.smith.repair { margin-bottom: 10px; }
.reforge { margin-top: 10px; padding-top: 8px; border-top: 1px solid #2a1e10; display: grid; gap: 4px; }
.reforge .pre { color: #ffb35a; } .reforge .small { font-size: 14px; color: var(--muted); }
#durWarn { position: absolute; left: 290px; top: 30px; font-size: 17px; color: #ffb35a; text-shadow: 0 1px 3px #000; animation: pulse 0.8s infinite alternate; }
#durWarn.broken { color: #ff5a4a; font-weight: 700; }
#questTrack { position: absolute; left: 14px; top: 96px; width: 250px; font-size: 16px; text-shadow: 0 1px 3px #000; }
.qt { background: rgba(0, 0, 0, .45); border-left: 2px solid var(--gold); padding: 6px 10px; margin-bottom: 6px; }
.qt b { color: var(--gold-hi); font-family: 'Grenze Gotisch', serif; }
.qt .done, .done { color: #7dff9a; }
#log { position: absolute; left: 14px; bottom: 300px; width: 460px; font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
#log .line { text-shadow: 0 1px 3px #000, 0 0 2px #000; transition: opacity 1.4s; }
#log .line.fade { opacity: 0; }
#log .quest { color: #ffd84a; } #log .level { color: #ffe9a0; } #log .warn { color: #ff8a7a; } #log .combo { color: #ffb35a; } #log .egg { color: #b8ff8a; } #log .boss { color: #d89aff; }

#bottom { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 12px; padding-bottom: 8px; }
.orb { width: 116px; height: 116px; border-radius: 50%; position: relative; overflow: hidden; background: #120808; border: 3px solid var(--edge-hi); box-shadow: 0 0 0 2px #1a120a, 0 6px 24px rgba(0, 0, 0, .8), inset 0 0 20px #000; }
.orb.mp { background: #080a14; }
.orb .fill { position: absolute; left: 0; right: 0; bottom: 0; transition: height .15s; }
.orb.hp .fill { background: radial-gradient(circle at 40% 30%, #ff5a4a, #a01414 55%, #4a0606); }
.orb.mp .fill { background: radial-gradient(circle at 40% 30%, #6a9aff, #1a3aa0 55%, #08144a); }
.orb .gloss { position: absolute; inset: 8px 18px auto auto; width: 38px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .18); transform: rotate(-25deg); }
.orb span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 16px 'Grenze', serif; text-shadow: 0 1px 3px #000, 0 0 4px #000; }
#center { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-bottom: 4px; }
#expbar { width: 560px; height: 14px; background: rgba(0, 0, 0, .8); border: 1px solid var(--edge); position: relative; }
#expbar i { display: block; height: 100%; background: linear-gradient(180deg, #e8c060, #8a6a2a); float: left; }
#expbar #expRest { background: linear-gradient(180deg, rgba(110, 190, 255, .65), rgba(50, 110, 200, .65)); }
#expbar span { position: absolute; inset: 0; text-align: center; font-size: 13px; line-height: 12px; text-shadow: 0 1px 2px #000; }
#bar { display: flex; gap: 6px; align-items: center; background: linear-gradient(180deg, rgba(40, 30, 20, .95), rgba(16, 12, 10, .95)); border: 2px solid var(--edge); padding: 6px 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .7); }
#skillSlots { display: flex; gap: 6px; }
.slot, .pot { width: 54px; height: 54px; position: relative; background: #140f0b; border: 1px solid var(--edge-hi); display: grid; place-items: center; overflow: hidden; }
.slot .ic { width: 48px; height: 48px; image-rendering: pixelated; }
.slot .hk, .pot .pk { position: absolute; top: 1px; left: 3px; font-size: 13px; color: var(--gold); }
.slot .rm { position: absolute; bottom: 1px; right: 2px; font-size: 11px; color: #ffb35a; font-weight: 700; }
.slot.rmb { border-color: #ffb35a; box-shadow: inset 0 0 8px rgba(255, 179, 90, .4); }
.slot .cd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .7); pointer-events: none; }
.slot.nomp .ic { filter: grayscale(.8) brightness(.6) sepia(1) hue-rotate(180deg); }
.slot.locked .ic { filter: grayscale(1) brightness(.35); }
.slot .lk { position: absolute; bottom: 2px; font-size: 12px; color: var(--muted); }
.pot { font-size: 23px; position: relative; overflow: hidden; }
.pot.cooling::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .6); transform-origin: top; animation: potcd 2s linear forwards; pointer-events: none; }
@keyframes potcd { from { transform: scaleY(1); } to { transform: scaleY(0); } }
.pot b { position: absolute; bottom: 1px; right: 3px; font-size: 14px; text-shadow: 0 1px 2px #000; }
#menuBtns { display: flex; gap: 4px; }
#menuBtns button { background: rgba(20, 15, 10, .9); border: 1px solid var(--edge); padding: 3px 9px; font-size: 16px; position: relative; }
#menuBtns button:hover { border-color: var(--gold); }
#menuBtns button.badge::after { content: '!'; position: absolute; top: -8px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #e04040; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.2); } }

/* ---------------- panels ---------------- */
.panel { position: fixed; top: 60px; width: 380px; max-height: calc(100vh - 230px); overflow-y: auto; background: var(--panel); border: 2px solid var(--edge); box-shadow: 0 10px 40px rgba(0, 0, 0, .8), inset 0 0 0 1px #000; padding: 0 14px 14px; z-index: 5; }
.panel.left { left: 20px; top: 104px; max-height: calc(100vh - 270px); }
.panel.right { right: 20px; top: 190px; max-height: calc(100vh - 340px); }
.panel header { position: sticky; top: 0; background: var(--panel); display: flex; align-items: baseline; gap: 10px; padding: 12px 0 8px; border-bottom: 1px solid var(--edge); margin-bottom: 10px; z-index: 1; }
.panel h3 { font: 700 20px 'Grenze Gotisch', serif; margin: 0; color: var(--gold-hi); }
.panel header span { color: var(--muted); font-size: 17px; }
.panel .x { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 17px; }
.panel .x:hover { color: #fff; }
.panel button:not(.x) { background: linear-gradient(180deg, #3a2a18, #1e160c); border: 1px solid var(--edge-hi); padding: 3px 10px; }
.panel button:not(.x):hover:not(:disabled) { border-color: var(--gold-hi); color: #fff; }
.panel button:disabled { opacity: .35; cursor: var(--cur-point); }
.hint { font-size: 14px; color: var(--muted); margin-top: 10px; }
.pts { font-size: 17px; margin-bottom: 8px; color: var(--muted); }
.pts b { color: var(--gold-hi); font-size: 19px; }
.stats { display: grid; gap: 4px; }
.st { display: grid; grid-template-columns: 1fr 50px 80px 30px; align-items: center; background: rgba(255, 255, 255, .03); padding: 4px 8px; }
.st b { text-align: right; font-size: 17px; }
.st small { color: #6fe36f; font-size: 13px; text-align: right; }
.st button { padding: 0 !important; width: 24px; height: 22px; justify-self: end; }
.derived { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; margin-top: 12px; font-size: 16px; }
.derived div { display: flex; justify-content: space-between; border-bottom: 1px dotted #2a2216; padding: 2px 0; }
.derived span { color: var(--muted); }
.egg { display: flex; gap: 12px; align-items: center; margin-top: 14px; background: rgba(120, 200, 80, .06); border: 1px solid #3a4a28; padding: 8px 10px; }
.egg-ic { font-size: 37px; filter: drop-shadow(0 0 8px rgba(160, 255, 120, .5)); }
.egg b { color: #b8ff8a; font-family: 'Grenze Gotisch', serif; }
.egg small { display: block; color: var(--muted); font-size: 14px; margin: 2px 0 6px; }
.egg .bar i { background: linear-gradient(90deg, #4a8a2a, #b8ff8a); }

.paperdoll { display: flex; gap: 8px; margin-bottom: 10px; }
#dollCv { width: 96px; height: 120px; image-rendering: pixelated; flex: none; background: radial-gradient(ellipse at 50% 70%, rgba(255, 200, 120, .12), transparent 70%), #0e0a07; box-shadow: 0 0 0 1px #050302, inset 0 0 0 1px #4a3618; }
.equip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; flex: 1; }
.eslot { position: relative; height: 62px; border: 1px solid #3a2e1c; background: #100c08; display: grid; place-items: center; cursor: var(--cur-hand); }
.eslot small { position: absolute; bottom: 1px; font-size: 12px; color: var(--muted); }
.eslot .ph { font-size: 23px; opacity: .25; }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cell { position: relative; aspect-ratio: 1; border: 1px solid #2a2216; background: #0d0a07; display: grid; place-items: center; cursor: var(--cur-hand); }
.cell:hover, .eslot:hover { background: #1e170e; }
.cell.sel { outline: 2px solid var(--gold-hi); }
.ii { width: 48px; height: 48px; image-rendering: pixelated; }
.eslot .ii { width: 44px; height: 44px; }
.iw { position: absolute; bottom: 1px; left: 2px; font-size: 11px; font-weight: 700; color: #d8e8ff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.ip { position: absolute; top: 1px; right: 3px; font-size: 13px; font-weight: 700; color: #ffb35a; }
.il { position: absolute; bottom: 0; left: 3px; font-size: 12px; color: var(--muted); }
.invfoot { display: flex; justify-content: space-between; font-size: 16px; margin-top: 10px; color: var(--muted); }

.skrow { display: grid; grid-template-columns: 52px 1fr 56px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #2a2216; }
.skrow.off { opacity: .6; }
.skic { width: 52px; height: 52px; border: 1px solid var(--edge-hi); background: #140f0b; display: grid; place-items: center; position: relative; }
.skic img { width: 48px; height: 48px; image-rendering: pixelated; }
.skic small { position: absolute; top: 0; left: 3px; font-size: 13px; color: var(--gold); }
.skinfo b { font-family: 'Grenze Gotisch', serif; color: #f2e2b8; }
.skinfo .rank { color: var(--gold-hi); font-weight: 700; }
.skinfo .req { color: #ff8a7a; font-size: 14px; }
.skinfo p { margin: 2px 0; font-size: 16px; color: #c8bca0; }
.skinfo small { color: var(--muted); font-size: 14px; }
.skbtns { display: flex; flex-direction: column; gap: 4px; }
.skbtns button { font-size: 14px; padding: 2px 4px !important; }
.skbtns .rmbb.on { border-color: #ffb35a; color: #ffb35a; }

.qbox { background: rgba(255, 255, 255, .03); border: 1px solid #2a2216; padding: 10px 12px; margin-bottom: 10px; font-size: 17px; }
.qbox b { font-family: 'Grenze Gotisch', serif; color: var(--gold-hi); }
.qbox p { margin: 6px 0; color: #c8bca0; }
.qgiver { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.obj { color: #f2e2b8; }
.reward { margin: 8px 0; font-size: 16px; color: #c8bca0; }
.say { font-style: italic; color: #c8bca0; font-size: 17px; }
.shop { display: grid; gap: 4px; }
.ware { display: grid; grid-template-columns: 1fr 44px auto auto; gap: 6px; align-items: center; background: rgba(255, 255, 255, .03); padding: 4px 8px; font-size: 17px; }
.ware small { display: block; font-size: 13px; color: var(--muted); }
.ware.off { opacity: .5; }
.row { display: flex; gap: 6px; margin-top: 10px; }
.big { font: 700 18px 'Grenze Gotisch', serif !important; padding: 8px 18px !important; margin-top: 8px; background: linear-gradient(180deg, #6a4a1a, #2e1e0a) !important; border: 1px solid var(--gold) !important; color: #ffe9b0 !important; }
.big:hover:not(:disabled) { filter: brightness(1.2); }
.big:disabled { opacity: .4; }
.smith { background: rgba(255, 255, 255, .03); border: 1px solid #2a2216; padding: 10px 12px; display: grid; gap: 6px; font-size: 17px; }
.smith-item { font: 700 17px 'Grenze Gotisch', serif; }
.smith-empty { color: var(--muted); padding: 20px; text-align: center; border: 1px dashed #3a2e1c; }

#tooltip { position: fixed; z-index: 20; max-width: 300px; background: rgba(8, 6, 5, .97); border: 1px solid var(--edge-hi); padding: 10px 12px; font-size: 16px; pointer-events: none; box-shadow: 0 6px 24px #000; }
.tt-name { font: 700 18px 'Grenze Gotisch', serif; }
.tt-name .plus { color: #ffb35a; }
.tt-sub { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.tt-main { margin: 2px 0; } .tt-main b { color: #fff; }
.tt-aff { color: #8aa8ff; }
.tt-set { color: #4cff6a; margin-top: 6px; }
.tt-setb { color: #4a6a4a; font-size: 14px; } .tt-setb.on { color: #4cff6a; }
.tt-req { margin-top: 6px; font-size: 14px; color: var(--muted); } .tt-req.bad { color: #ff5a4a; }
.tt-val { color: var(--gold); font-size: 14px; margin-top: 4px; }
.gear { display: grid; gap: 3px; }
.tierhead { font: 700 16px 'Grenze Gotisch', serif; margin: 10px 0 2px; border-bottom: 1px solid #2a2216; padding-bottom: 2px; }
.tierhead.locked { opacity: .5; }
.gearrow { grid-template-columns: 40px 1fr 64px auto; }
.gic { width: 48px; height: 48px; image-rendering: pixelated; background: #0d0a07; border: 1px solid #2a2216; }
.tt-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.tt-head img { width: 48px; height: 48px; image-rendering: pixelated; background: #0d0a07; border: 1px solid #3a2e1c; }
.th { display: inline !important; color: #ffb35a !important; font-weight: 700; }
.ii.other { opacity: .45; filter: grayscale(.6); }
.aoe { font-size: 12px; font-weight: 700; color: #1a1408; background: #ffb35a; padding: 0 5px; border-radius: 2px; }
.up { color: #6fe36f; } .down { color: #ff6a5a; }

/* ---------------- overlays ---------------- */
.overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 0, 0, .7); }
.mapbox, .helpbox, .deathbox { background: var(--panel); border: 2px solid var(--edge); padding: 18px 24px; text-align: center; box-shadow: 0 10px 50px #000; max-width: 96vw; }
.mapbox h2, .helpbox h2 { font: 700 25px 'Grenze Gotisch', serif; color: var(--gold-hi); margin: 0 0 10px; }
.mapbox canvas { max-width: 90vw; max-height: 72vh; border: 1px solid #2a2216; }
.mapbox p, .helpbox .close { color: var(--muted); font-size: 16px; }
.helpbox { width: 640px; text-align: left; max-height: 80vh; overflow-y: auto; }
.htabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; } .htabs button { padding: 4px 10px; font-size: 14px; background: rgba(20,16,12,.9); color: #e8d8b0; border: 1px solid #6a4a2a; border-radius: 3px; cursor: var(--cur-hand); } .htabs button:hover { background: rgba(60,44,24,.95); } .htabs button.on { box-shadow: inset 0 0 0 2px #ffd84a; color: #ffe9a0; }
.hpage p { font-size: 16px !important; }
.helpbox .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.helpbox h4 { font: 700 18px 'Grenze Gotisch', serif; color: #f2e2b8; margin: 4px 0 8px; }
.helpbox p { font-size: 17px; color: #c8bca0; margin: 6px 0; line-height: 1.5; }
.helpbox .close { text-align: center; }
.deathbox h1 { font: 900 45px 'Grenze Gotisch', serif; color: #c0302a; margin: 0 0 10px; text-shadow: 0 0 30px rgba(200, 30, 20, .5); }
.deathbox p { color: var(--muted); }
.overlay.start { background: radial-gradient(ellipse at 50% 40%, rgba(10, 6, 4, .25), rgba(5, 4, 4, .9) 75%); overflow-y: auto; align-items: start; padding: 4vh 16px; }
.startbox { max-width: 1180px; text-align: center; }
.startbox h1 { font: 900 clamp(48px, 8vw, 92px) 'Grenze Gotisch', serif; margin: 0; color: var(--gold); text-shadow: 0 0 40px rgba(255, 120, 30, .35), 0 4px 0 #3a2008; letter-spacing: .04em; }
.tag { font-style: italic; color: var(--muted); font-size: 19px; margin: 4px 0 24px; }
.startbox h3 { font: 700 19px 'Grenze Gotisch', serif; color: #f2e2b8; margin: 20px 0 12px; }
#continueBox { display: block; max-width: 720px; margin: 0 auto 10px; background: var(--panel); border: 1px solid var(--gold); padding: 10px 18px; }
#continueBox h3 { margin: 0 0 8px; }
.herolist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.hero { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--c); background: rgba(0,0,0,.3); text-align: left; }
.hero canvas { width: 48px; height: 48px; image-rendering: pixelated; }
.hero span { flex: 1; display: flex; flex-direction: column; } .hero small { opacity: .8; }
.hero .big { margin: 0; padding: 6px 16px; }
.hero .del { background: none; border: 1px solid #6a3a30; color: #e08a7a; cursor: var(--cur-hand); padding: 4px 8px; }
#classPick { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.ccard { width: 210px; background: var(--panel); border: 1px solid #3a2e1c; border-top: 3px solid var(--c); padding: 12px; text-align: center; transition: transform .15s, border-color .15s; }
.ccard:hover { transform: translateY(-3px); }
.ccard.on { border-color: var(--gold-hi); box-shadow: 0 0 0 1px var(--gold-hi), 0 0 30px rgba(255, 200, 80, .2); }
.ccard canvas { image-rendering: pixelated; display: block; margin: 0 auto 4px; background: radial-gradient(circle, rgba(255, 200, 120, .12), transparent 70%); }
.ccard b { font: 700 19px 'Grenze Gotisch', serif; color: #f2e2b8; }
.ccard p { font-size: 16px; color: #b8ac90; line-height: 1.45; min-height: 76px; }
.cskills { display: flex; gap: 3px; justify-content: center; }
.cskills img { width: 28px; height: 28px; image-rendering: pixelated; }
.create { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 20px; }
.create input { font: 600 17px 'Grenze', serif; background: #0d0a07; color: var(--ink); border: 1px solid var(--edge-hi); padding: 9px 12px; width: 220px; }
.create .big { margin: 0; }

/* ---------------- armory ---------------- */
.armorybox { width: min(1100px, 96vw); max-height: 90vh; overflow-y: auto; padding: 0 18px 18px; text-align: left; }
.armorybox header { position: sticky; top: 0; display: flex; align-items: baseline; gap: 12px; padding: 12px 0 8px; background: #17110d; border-bottom: 2px solid #3a2814; z-index: 1; }
.armorybox h3 { margin: 0; color: var(--gold-hi); font-size: 23px; }
.armorybox header span { color: var(--muted); }
.armorybox .x { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 19px; }
.armorybox h4 { color: #f2e2b8; margin: 14px 0 8px; font-size: 17px; }
.armtabs { display: flex; gap: 6px; margin-top: 10px; }
.armtabs button { padding: 4px 14px; background: #1e160e; border: none; box-shadow: 0 0 0 2px #050302, inset 0 2px 0 #5a4220; color: var(--muted); }
.armtabs button.on { color: #ffe9b0; box-shadow: 0 0 0 2px #050302, inset 0 0 0 2px #ffd84a; }
.armsets { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }
.armset { display: flex; gap: 8px; align-items: center; padding: 6px 8px; background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px #2a1e10; }
.armset.locked, .armwpn.locked { opacity: .55; }
.setdoll { width: 60px; height: 92px; image-rendering: pixelated; flex: none; background: radial-gradient(ellipse at 50% 75%, rgba(255, 200, 120, .12), transparent 70%), #0e0a07; }
.setinfo { display: flex; flex-direction: column; gap: 3px; }
.setinfo small { color: var(--muted); font-size: 14px; }
.seticons { display: flex; gap: 3px; }
.seticons img, .armwpn img { width: 48px; height: 48px; image-rendering: pixelated; background: #0e0a07; box-shadow: 0 0 0 1px #050302, inset 0 0 0 1px #4a3618; }
.armweapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.armwpn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; background: rgba(255, 255, 255, .025); }
.armwpn small { font-size: 13px; color: var(--muted); }

/* ---------------- admin ---------------- */
#adminPanel { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 40; }
.adminbox { width: min(1100px, 96vw); max-height: 86vh; }
.adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 8px; }
.adgrid section { background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px #2a1e10; padding: 4px 10px 10px; }
.adgrid h4 { margin: 8px 0 6px; }
.adrow { display: flex; gap: 6px; align-items: center; margin: 5px 0; flex-wrap: nowrap; font-size: 16px; }
.adrow.wrap { flex-wrap: wrap; }
.adrow input[type=number] { width: 64px; }
.adrow input, .adrow select { font: inherit; background: #0d0a07; color: var(--ink); border: none; box-shadow: 0 0 0 1px #4a3618; padding: 3px 5px; }
.adrow select { max-width: 160px; }
.adrow button { background: #2a1e10; color: var(--ink); border: none; box-shadow: 0 0 0 2px #050302, inset 0 2px 0 #8a6a3a; padding: 3px 8px; font: inherit; font-size: 14px; }
.adrow button:hover { color: #fff; box-shadow: 0 0 0 2px #050302, inset 0 0 0 2px #ffd84a; }

/* ---------------- pixel-art skin ---------------- */
html, body { font-family: 'Grenze', 'Grenze', sans-serif; }
.panel, #tooltip, #targetFrame, .mapbox, .armorybox, .helpbox, .deathbox, #bar, .ccard, #continueBox, .qt {
  border: none;
  border-radius: 0;
  background-color: #17110d;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 4px);
  box-shadow: 0 0 0 2px #050302, 0 0 0 4px #7a5a2c, 0 0 0 6px #3a2814, 0 0 0 8px #050302, 0 12px 40px rgba(0, 0, 0, .7);
}
.panel { margin: 8px; }
.panel header { background: #17110d; border-bottom: 2px solid #3a2814; }
.panel h3, .tt-name, .skinfo b, .qbox b, .tierhead, .smith-item, .ccard b, .startbox h3, .mapbox h2, .helpbox h2, .helpbox h4, #zoneLabel b, .egg b, .qt b {
  font-family: 'Grenze', sans-serif; font-weight: 700; letter-spacing: .02em;
}
.panel button:not(.x), #menuBtns button, .create input {
  border-radius: 0; border: none;
  box-shadow: 0 0 0 2px #050302, inset 0 2px 0 #8a6a3a, inset 0 -2px 0 #1a120a;
  font-family: 'Grenze', sans-serif;
}
.big { box-shadow: 0 0 0 2px #050302, inset 0 2px 0 #ffd88a, inset 0 -3px 0 #3a2008 !important; border: none !important; font-family: 'Grenze', sans-serif !important; font-size: 17px !important; letter-spacing: .04em; }
.slot, .pot, .eslot, .cell, .skic, .gic, .tt-head img {
  border: none !important; border-radius: 0;
  box-shadow: 0 0 0 1px #050302, inset 0 0 0 1px #4a3618, inset 2px 2px 0 rgba(0, 0, 0, .5);
  background: #0e0a07;
}
.eslot { box-shadow: 0 0 0 1px #050302, inset 0 0 0 2px #5a4220, inset 3px 3px 0 rgba(0, 0, 0, .5); }
.slot.rmb { box-shadow: 0 0 0 1px #050302, inset 0 0 0 2px #ffb35a; }
.cell.sel { outline: none; box-shadow: 0 0 0 2px #ffd84a; }
.orb { box-shadow: 0 0 0 3px #050302, 0 0 0 6px #7a5a2c, 0 0 0 8px #050302, 0 6px 24px rgba(0, 0, 0, .8), inset 0 0 20px #000; border: none; }
.orb span { font-family: 'Grenze', sans-serif; font-size: 17px; }
#expbar { border: none; box-shadow: 0 0 0 2px #050302, 0 0 0 3px #7a5a2c; height: 16px; }
#expbar i { background: repeating-linear-gradient(90deg, #e8c060 0 6px, #c89a3a 6px 7px); }
#expbar span { font-size: 13px; line-height: 16px; font-weight: 700; color: #fff8e8; letter-spacing: .2px; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 1px 1px #000; }
.bar { border: none; box-shadow: 0 0 0 1px #050302, 0 0 0 2px #4a3618; }
#minimapWrap { border: none; box-shadow: 0 0 0 2px #050302, 0 0 0 4px #7a5a2c, 0 0 0 6px #050302; }
#minimap { image-rendering: pixelated; }
.lure-n b { font-family: 'Grenze', sans-serif; font-weight: 700; }
.lure-n span { font-family: 'Grenze', sans-serif; }
#banner, .time { font-family: 'Grenze', sans-serif; }
.st, .ware, .qbox, .smith, .egg { background: rgba(255, 255, 255, .025); border: none; box-shadow: inset 0 0 0 1px #2a1e10; }
.ccard { margin: 6px; }
.ccard.on { box-shadow: 0 0 0 2px #050302, 0 0 0 4px #ffd84a, 0 0 0 6px #050302, 0 0 40px rgba(255, 200, 80, .25); }
#log .line { font-size: 17px; }

/* online play */
#netPanel { left: 50%; transform: translateX(-50%); top: 110px; width: 400px; z-index: 8; }
#netPanel p { margin: 6px 0 10px; line-height: 1.4; }
#netPanel .muted { color: var(--muted); font-size: 16px; }
#netPanel .netcode { font: 700 47px Menlo, Consolas, 'Courier New', monospace; letter-spacing: 12px; padding: 10px 0 10px 12px; text-align: center; color: #fff; background: #000; border: 2px solid var(--gold-hi); margin: 4px 0 8px; user-select: all; text-shadow: none; }
#netPanel .netcopy { display: block; margin: 0 auto 10px; }
#netPanel .netjoin { display: flex; gap: 8px; margin: 12px 0 4px; }
#netPanel .netjoin input { flex: 1; font: 700 25px Menlo, Consolas, 'Courier New', monospace; color: #fff !important; letter-spacing: 6px; text-transform: uppercase; background: #120e0b; color: var(--gold-hi); border: 1px solid var(--edge); padding: 6px 10px; }
#netPanel .netlist { list-style: none; padding: 0; margin: 0 0 12px; }
#netPanel .netlist li { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
#netPanel .netlist span { color: var(--muted); font-size: 16px; margin-left: 6px; }
#chatBox { position: fixed; left: 14px; bottom: 112px; width: 430px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; background: rgba(10,8,6,.85); border: 1px solid var(--edge); padding: 6px 10px; z-index: 9; }
#chatBox span { color: var(--gold-hi); font-size: 16px; }
#chatBox input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font: 17px 'Grenze', serif; }
#netPanel .netlist li { display: flex; align-items: center; gap: 6px; }
#netPanel .netgo { margin-left: auto; padding: 2px 10px; }
#fps { position: absolute; left: 14px; top: 98px; font: 600 14px Menlo, Consolas, monospace; padding: 2px 7px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
#fps.good { color: #7aff8a; } #fps.ok { color: #ffd84a; } #fps.bad { color: #ff6a5a; }
#netInfo { position: absolute; left: 14px; top: 122px; font: 600 14px Menlo, Consolas, monospace; padding: 2px 7px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
#netInfo.on { color: #7affd8; } #netInfo.off { color: #a8a090; }
#chatLines { position: absolute; left: 14px; bottom: 146px; width: 430px; height: 140px; overflow-y: auto; box-sizing: border-box; padding: 6px 9px; font-size: 16px; line-height: 1.35; background: rgba(8,6,4,.55); border: 1px solid rgba(255,255,255,.08); pointer-events: auto; scrollbar-width: thin; }
#chatLines:empty::before { content: 'Chat: press Enter to talk · /p or /party for party'; color: #8a8270; font-style: italic; }
#chatLines .cl { text-shadow: 0 1px 2px #000; word-wrap: break-word; }
#chatLines .cl b { font-weight: 700; }
#chatLines .world { color: #f2ead8; } #chatLines .world b { color: #9ad8ff; }
#chatLines .party { color: #b8ffc0; } #chatLines .party b { color: #7aff8a; }
#chatLines .system { color: #ffd88a; font-style: italic; }
#partyBox { position: absolute; left: 14px; top: 148px; width: 170px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#partyBox .pm { background: rgba(0,0,0,.6); border: 1px solid rgba(122,255,138,.35); padding: 3px 6px; font-size: 14px; color: #b8ffc0; }
#partyBox .pm i { color: #8a9a88; font-style: normal; }
#partyBox .pbar { height: 4px; background: #300; margin-top: 2px; } #partyBox .pbar i { display: block; height: 100%; background: #4ad84a; }
#netPanel .netinvite { background: rgba(122,255,138,.1); border: 1px solid rgba(122,255,138,.4); padding: 8px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#netPanel .partyline { color: #b8ffc0; }
#netPanel .pt { margin-left: auto; color: #7aff8a; font-size: 14px; }
#netPanel .netinv { margin-left: auto; padding: 2px 10px; }
#netPanel .netinv + .netgo, #netPanel .pt + .netgo { margin-left: 4px; }

/* readable text: a little weight and a dark edge on everything over the game world */
html, body { font-weight: 500; }
#hud { text-shadow: 0 1px 2px #000, 0 0 3px rgba(0,0,0,.8); }

/* paths and the collection book */
.pathbox { max-width: 760px; }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0; }
.pathcard { background: rgba(255,255,255,.03); border: 1px solid var(--edge); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pathcard h4 { margin: 0; font: 700 20px 'Grenze Gotisch', serif; color: var(--gold-hi); }
.pathcard p { margin: 0; color: #d8ccb0; }
.pskill { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.3); padding: 6px; }
.pskill img { width: 48px; height: 48px; image-rendering: pixelated; }
.pskill small { display: block; color: var(--muted); font-size: 14px; }
.pbonus { color: #9aff9a; font-size: 15px; }
.pathcall { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 216, 74, .08); border: 1px solid var(--gold); padding: 8px 10px; margin-bottom: 10px; }
.aoe.path { background: #3a2a5a; color: #d8c8ff; }
#bookPanel { left: 50%; transform: translateX(-50%); top: 80px; width: 560px; z-index: 8; }
#bookPanel h4 { margin: 14px 0 6px; font: 700 17px 'Grenze Gotisch', serif; color: #f2e2b8; }
#bookPanel h4 small { font: 500 14px 'Grenze', sans-serif; color: var(--muted); margin-left: 6px; }
.brow { display: grid; grid-template-columns: 1fr 70px 110px; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.brow.unseen { opacity: .55; }
.brow .bn small { display: block; color: var(--muted); font-size: 13px; }
.brow .bn i { font-style: normal; }
.brow .bs { color: var(--gold-hi); letter-spacing: 2px; }
.brow .bc { text-align: right; font-size: 14px; }
.brow .bbar { grid-column: 1 / -1; height: 4px; background: rgba(0,0,0,.6); }
.brow .bbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, #e8c060); }

/* ---------- touch screens ---------- */
#joy, #tActions, #tMenu, #rotate { display: none; }
html, body { touch-action: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.touch kbd, body.touch .pk, body.touch .slot .hk, body.touch #fps { display: none !important; }
body.touch #joy { display: block; position: absolute; left: calc(18px + env(safe-area-inset-left)); bottom: 18px; width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.06), rgba(0,0,0,.35)); border: 2px solid rgba(232, 192, 96, .45); pointer-events: auto; touch-action: none; }
body.touch #joyKnob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e8c060, #7a5a2a); box-shadow: 0 2px 8px #000; }
body.touch #tActions { display: grid; grid-template-columns: repeat(2, 56px); gap: 8px; position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: 16px; pointer-events: auto; }
body.touch #tActions button { width: 56px; height: 56px; border-radius: 50%; font-size: 24px; background: rgba(20, 15, 10, .82); border: 2px solid var(--edge-hi); box-shadow: 0 2px 8px #000; touch-action: none; }
body.touch #tActions #tAttack { grid-column: span 2; width: 120px; border-radius: 28px; font-size: 28px; border-color: #c8302a; }
body.touch #tMenu { display: block; position: absolute; right: calc(12px + env(safe-area-inset-right)); top: 112px; width: 46px; height: 46px; font-size: 24px; background: rgba(20, 15, 10, .9); border: 2px solid var(--edge-hi); pointer-events: auto; }
/* the bottom bar: the orbs make way for the bars in the player frame, the menu folds into the menu button */
body.touch .orb { display: none; }
body.touch #bottom { padding-bottom: 6px; }
body.touch #expbar { width: min(560px, 52vw); }
body.touch #bar { padding: 4px 5px; gap: 4px; }
body.touch .slot, body.touch .pot { width: 44px !important; height: 44px !important; }
body.touch .slot .ic { width: 40px; height: 40px; }
body.touch #menuBtns { display: none; }
body.touch.menuopen #menuBtns { display: grid; grid-template-columns: repeat(5, auto); gap: 6px; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 20; background: rgba(12, 9, 7, .96); border: 2px solid var(--edge-hi); padding: 14px; pointer-events: auto; }
body.touch.menuopen #menuBtns button { padding: 12px 14px; font-size: 18px; }
body.touch #chatLines { display: none; }
body.touch #log { bottom: 150px; left: 160px; width: min(420px, 50vw); }
body.touch #log .line { font-size: 15px; }
body.touch #questTrack { top: 90px; width: 210px; font-size: 14px; }
body.touch .panel { left: 8px !important; right: 8px; width: auto !important; transform: none !important; top: 8px !important; max-height: calc(100vh - 16px) !important; z-index: 15; }
body.touch #chatBox { left: 50%; transform: translateX(-50%); bottom: 50%; width: min(460px, 90vw); }
/* small screens (phones): everything a size smaller */
@media (max-height: 520px), (max-width: 760px) {
  body.touch #playerFrame { transform: scale(.82); transform-origin: top left; }
  body.touch #minimapWrap { transform: scale(.66); transform-origin: top right; }
  body.touch .mm-gold { display: none; }
  body.touch #tMenu { top: 104px; }
  body.touch #zoneLabel b { font-size: 17px; } body.touch #zoneLabel span { font-size: 13px; }
  body.touch #targetFrame { top: 52px; width: 230px; }
  body.touch #lure { transform: scale(.75); transform-origin: top right; }
  body.touch #joy { width: 112px; height: 112px; }
  body.touch #questTrack { display: none; }
  body.touch #netInfo, body.touch #partyBox { top: 78px; }
}
/* (portrait phones play too since 2026-11-15: see the portrait layout at the end) */
/* big windows (armory, admin, paths, map) fit on small screens and scroll */
@media (max-height: 520px), (max-width: 760px) {
  .armorybox, .mapbox, .deathbox, .startbox, #startScreen > div { max-height: calc(100vh - 16px); overflow-y: auto; box-sizing: border-box; }
  .paths { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pathcard { padding: 8px; gap: 5px; } .pathcard p { font-size: 14px; }
}
/* touch layout, tuned for phones held sideways */
body.touch #tActions { display: block; width: 150px; height: 150px; right: calc(8px + env(safe-area-inset-right)); bottom: 8px; }
body.touch #tActions button { position: absolute; width: 50px; height: 50px; font-size: 22px; }
body.touch #tActions #tAttack { width: 74px; height: 74px; right: 0; bottom: 0; border-radius: 50%; font-size: 32px; }
body.touch #tActions #tPick { right: 82px; bottom: 4px; }
body.touch #tActions #tSit { right: 70px; bottom: 60px; }
body.touch #tActions #tRide { right: 14px; bottom: 84px; }
body.touch #tActions #tChat { right: 92px; bottom: 112px; width: 40px; height: 40px; font-size: 18px; }
body.touch #tMenu { top: 12px; right: calc(232px + env(safe-area-inset-right)); }
body.touch #log { top: 64px; bottom: auto; left: 50%; transform: translateX(-50%); width: min(520px, 56vw); text-align: center; align-items: center; }
body.touch #log .line { font-size: 13px; }
body.touch #bottom { left: calc(50% - 20px); }
@media (max-height: 520px), (max-width: 760px) {
  body.touch #tMenu { right: calc(158px + env(safe-area-inset-right)); top: 8px; }
  body.touch #log .line:nth-last-child(n+4) { display: none; }
  body.touch #netInfo { display: none; }
  body.touch #joy { bottom: 8px; left: calc(10px + env(safe-area-inset-left)); }
  body.touch .slot, body.touch .pot { width: 40px !important; height: 40px !important; }
  body.touch .slot .ic { width: 36px; height: 36px; }
  body.touch #expbar { width: min(460px, 46vw); }
}
body.touch .panel { max-width: 560px; margin: 0 auto; }
body.touch.menuopen #menuBtns { top: 44%; }

/* quest tracker: a clear box under the player frame, with a progress bar per objective */
#fps { top: 128px; }
#netInfo { top: 154px; left: 14px; }
#questTrack { top: 128px; width: 260px; font-size: 15px; }
#partyBox { left: auto; right: 14px; top: 330px; }
.qt { background: rgba(10, 8, 6, .78); border: 1px solid rgba(232, 192, 96, .35); border-left: 3px solid var(--gold); padding: 7px 10px 8px; margin-bottom: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.qt b { display: block; font-size: 16px; margin-bottom: 3px; }
.qt.complete { border-left-color: #7dff9a; }
.qobj { display: flex; justify-content: space-between; gap: 8px; color: #e8dcc0; }
.qobj span:last-child { color: var(--gold-hi); font-weight: 700; }
.qbar { height: 4px; background: rgba(0,0,0,.7); margin: 2px 0 3px; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, #e8c060); }
.qt.complete .qbar i { background: #7dff9a; }

/* touch: shop and bag side by side; a compact bag */
body.touch.twopanes .panel.left { right: calc(50% + 3px) !important; left: 6px !important; max-width: none; margin: 0; }
body.touch.twopanes .panel.right { left: calc(50% + 3px) !important; right: 6px !important; max-width: none; margin: 0; }
body.touch #invPanel .paperdoll { gap: 4px; margin-bottom: 6px; }
body.touch #invPanel #dollCv { width: 64px; height: 80px; }
body.touch #invPanel .equip { gap: 3px; grid-template-columns: repeat(5, 1fr); }
body.touch #invPanel .eslot { height: 44px; }
body.touch #invPanel .eslot .ii { width: 32px; height: 32px; }
body.touch #invPanel .eslot small { font-size: 10px; }
body.touch #invPanel .grid { grid-template-columns: repeat(8, 1fr); gap: 3px; }
body.touch #invPanel .ii { width: 34px; height: 34px; }
body.touch #invPanel .invfoot, body.touch #invPanel .hint { font-size: 12px; }
body.touch .panel { padding: 0 10px 10px; }
body.touch .panel header { padding: 8px 0 6px; margin-bottom: 6px; }
body.touch .panel h3 { font-size: 17px; }
body.touch .ware { font-size: 14px; }
/* touch: the quest tracker stays visible, small, under the player frame */
body.touch #questTrack { display: block !important; top: 66px; left: 8px; width: 186px; font-size: 12px; }
body.touch .qt { padding: 4px 7px 5px; margin-bottom: 4px; }
body.touch .qt b { font-size: 12.5px; }
body.touch .qt:nth-child(n+3) { display: none; }
body.touch #log { width: min(400px, 44vw); }
#netInfo { left: 14px; }
body.touch #questTrack { top: 76px; }

/* quest tracker and exp feed share a column under the player frame */
#leftCol { position: absolute; left: 14px; top: 182px; width: 270px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#leftCol #questTrack { position: static; width: auto; }
.qwhere { font-size: 13px; color: #b8c8d8; margin: 1px 0 3px; }
#expFeed { display: flex; flex-direction: column; gap: 2px; }
#expFeed .xp { font-size: 14px; background: rgba(10, 8, 6, .62); padding: 2px 8px; border-left: 2px solid #ffd84a; transition: opacity 1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#expFeed .xp.fade { opacity: 0; }
#expFeed .xp b { color: #ffd84a; } #expFeed .xp span { color: #d8ccb0; }
#expFeed .xp i { font-style: normal; font-size: 12px; margin-left: 4px; } #expFeed .rs { color: #8ad8ff; } #expFeed .cb { color: #ffb35a; } #expFeed .pt { color: #7aff8a; }
body.touch #leftCol { top: 76px; left: 8px; width: 196px; }
body.touch #leftCol #questTrack { position: static; top: auto; left: auto; width: auto; }
body.touch #expFeed .xp { font-size: 12px; padding: 1px 6px; }
body.touch .qwhere { font-size: 11px; }

/* one column on the left: quests, then the exp of your last kills, then the messages, ending above the chat */
#leftCol { bottom: 296px; width: 460px; overflow: hidden; }
#leftCol #questTrack, #leftCol #expFeed { width: 270px; }
#leftCol #log { position: static; width: 460px; margin-top: auto; }
body.touch #leftCol { bottom: auto; width: 196px; overflow: visible; }
body.touch #leftCol #questTrack, body.touch #leftCol #expFeed { width: 196px; }
body.touch #leftCol #log { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(400px, 44vw); margin: 0; }

#scrollPanel { left: 50%; transform: translateX(-50%); top: 120px; width: 360px; z-index: 9; }
.scrolllist { display: flex; flex-direction: column; gap: 6px; }
.scrolllist button { text-align: left; } .scrolllist small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }

#riftHud { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(8, 10, 20, .8); border: 1px solid #5a8ab8; padding: 6px 18px 8px; box-shadow: 0 0 20px rgba(80, 160, 255, .25); }
#riftHud b { display: block; font: 700 18px 'Grenze Gotisch', serif; color: #c8e8ff; }
#riftHud span { font-size: 16px; color: #e8ecf4; } #riftHud span i { font-style: normal; font-weight: 700; }
#riftHud small { display: block; font-size: 13px; color: #8aa8c8; }

#shopPanel { left: 50%; transform: translateX(-50%); top: 90px; width: 440px; z-index: 9; }
.shoplist { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.shoplist .ware { grid-template-columns: 52px 1fr auto auto; }
.shopprice { width: 90px; background: #120e0b; color: var(--gold-hi); border: 1px solid var(--edge); padding: 4px 6px; font: inherit; }
#shopTitle { flex: 1; background: #120e0b; color: #fff; border: 1px solid var(--edge); padding: 6px 8px; font: inherit; }
.listed { position: absolute; top: 0; left: 2px; font-size: 13px; }

#partyBox { width: 210px; }
#partyBox .ptitle { font: 700 14px 'Grenze Gotisch', serif; color: #7aff8a; text-shadow: 0 1px 2px #000; }
#partyBox .pm small { display: block; font-size: 12px; color: #a8c8a8; }
#partyBox .pm.dead { opacity: .55; }

.keysel { background: #120e0b; color: var(--gold-hi); border: 1px solid var(--edge); font: inherit; font-size: 13px; padding: 1px 2px; margin-top: 3px; }
.skic.pas { display: grid; place-items: center; font-size: 28px; width: 48px; height: 48px; background: #120e0b; border: 1px solid var(--edge); }
.pashead { margin: 14px 0 6px; font: 700 16px 'Grenze Gotisch', serif; color: #c8b8ff; }
.aoe.pasv { background: #2a3a5a; color: #c8d8ff; }
.slot.empty { opacity: .5; }
hr.thin { border: 0; border-top: 1px solid var(--edge); margin: 10px 0; }

#chatLines .guild { color: #ffd0a0; } #chatLines .guild b { color: #ffb060; }
#chatLines .whisper { color: #e8c8ff; } #chatLines .whisper b { color: #d0a0ff; }
#netPanel .nethead { margin: 12px 0 4px; font: 700 15px 'Grenze Gotisch', serif; color: var(--gold-hi); }
#homePanel { left: 50%; transform: translateX(-50%); top: 140px; width: 380px; z-index: 9; }
.bankgrid { grid-template-columns: repeat(6, 1fr); margin-top: 6px; }
#bigmap { cursor: grab; touch-action: none; } #bigmap:active { cursor: grabbing; }
.mapbox { position: relative; } .mapctl { position: absolute; right: 18px; top: 52px; display: flex; flex-direction: column; gap: 4px; } .mapctl button { min-width: 38px; padding: 4px 8px; font-size: 16px; background: rgba(20,16,12,.85); color: #ffe9b0; border: 1px solid #8a6a3a; border-radius: 4px; cursor: var(--cur-hand); } .mapctl button:hover { background: rgba(60,44,24,.95); } .mapctl button.on { background: rgba(90,64,28,.95); border-color: #ffd84a; } .mapctl [data-mapview] { font-size: 13px; }
.dragghost { position: fixed; z-index: 9999; width: 40px; height: 40px; pointer-events: none; transform: translate(-50%, -50%); image-rendering: pixelated; filter: drop-shadow(0 2px 4px #000); }
#invPanel .cell img { -webkit-user-drag: none; user-select: none; } #invPanel .cell { touch-action: none; user-select: none; }
.cell.dragging { opacity: .35; } body.dragitem, body.dragitem * { cursor: grabbing !important; }
#dropPanel { z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); }
#dropPanel[hidden] { display: none; }
.dropbox.panel { position: relative; top: auto; left: auto; width: 340px; max-width: calc(100vw - 32px); margin: 0; }
.droprow { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.droprow .cell { width: 48px; height: 48px; flex: none; display: grid; place-items: center; position: relative; }
.droprow b { display: block; font-size: 18px; } .droprow small { color: var(--muted); font-size: 14px; }
.dropcount { display: flex; gap: 6px; margin: 6px 0 12px; }
.dropcount input { width: 70px; text-align: center; background: #0c0806; color: var(--ink); border: none; box-shadow: 0 0 0 2px #050302, inset 0 0 0 1px #4a3618; font: 600 17px 'Grenze', sans-serif; }
.dropcount button { min-width: 34px; font-size: 17px; }
.dropbtns { display: flex; gap: 10px; align-items: center; } .dropbtns .big { margin: 0; } .dropbtns button:not(.big) { padding: 8px 16px; font-size: 16px; }
.dropcount input::-webkit-inner-spin-button, .dropcount input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } .dropcount input { -moz-appearance: textfield; }
#tradePanel { left: 50%; transform: translateX(-50%); top: 90px; width: 360px; z-index: 55; }
.tradegrid { grid-template-columns: repeat(6, 1fr); margin: 4px 0; }
.tradegeons { margin: 4px 0 10px; color: var(--gold-hi); } .tradegeons input { width: 90px; background: #0c0806; color: var(--ink); border: none; box-shadow: 0 0 0 2px #050302, inset 0 0 0 1px #4a3618; font: 600 16px 'Grenze', sans-serif; text-align: right; }
.tok { color: #7aff8a; font-style: normal; font-size: 14px; margin-left: 6px; }
.tradeask { left: 50%; transform: translateX(-50%); top: 120px; width: 320px; z-index: 56; }
.slot.nocharge .ic { filter: grayscale(.7) brightness(.55); }
.slot .chg { position: absolute; right: 2px; top: 1px; font: 700 12px 'Grenze', sans-serif; color: #ffcf5a; text-shadow: 0 1px 2px #000, 0 0 3px #000; pointer-events: none; }
.slot .chg.full { color: #fff27a; text-shadow: 0 0 6px #ffb43a, 0 1px 2px #000; }
.chgnote { color: #ffcf5a; font-style: normal; }
.friendadd { display: flex; gap: 6px; margin-bottom: 8px; } .friendadd input { flex: 1; min-width: 0; background: #0c0806; color: var(--ink); border: none; box-shadow: 0 0 0 2px #050302, inset 0 0 0 1px #4a3618; padding: 4px 8px; font: 500 16px 'Grenze', sans-serif; }
.skic.drag { cursor: grab; } .skic.drag:hover { filter: brightness(1.2); }
.inbar { font-size: 13px; color: var(--gold-hi); padding: 2px 6px; box-shadow: inset 0 0 0 1px #4a3618; white-space: nowrap; }
body.dragskill #skillSlots .slot { outline: 1px dashed rgba(255, 216, 120, .5); }
#skillSlots .slot { cursor: grab; } #skillSlots .slot.empty { cursor: var(--cur-point); }
/* ---------- phones: compact windows, side by side, and a small log in the corner ---------- */
body.touch .panel { zoom: .78; max-height: calc((100vh - 16px) / .78) !important; }
body.touch .panel.left { right: auto !important; width: calc((50vw - 12px) / .78) !important; }
body.touch .panel.right { left: auto !important; right: 8px !important; width: calc((50vw - 12px) / .78) !important; }
body.touch #npcPanel, body.touch #netPanel, body.touch #shopPanel, body.touch #tradePanel, body.touch #pathPanel { left: 8px !important; right: auto !important; width: calc((50vw - 12px) / .78) !important; }
body.touch #tooltip { zoom: .8; }
body.touch .overlay > div { zoom: .82; }
body.touch #log { top: auto; bottom: 168px; left: calc(12px + env(safe-area-inset-left)); width: min(330px, 40vw); max-height: 96px; overflow: hidden; text-align: left; }
body.touch #log .line { font-size: 12px; line-height: 1.3; }
body.touch #expFeed { zoom: .8; }
.eggpick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; } .eggopt { text-align: left; padding: 6px 8px !important; } .eggopt b { display: block; color: var(--gold-hi); } .eggopt small { color: var(--muted); font-size: 13px; }
.pkind { font-size: 13px; font-weight: 700; margin-bottom: 4px; } .pkind.solo { color: #8ad8a0; } .pkind.dps { color: #ff9a7a; }
#optionsPanel { left: 50%; transform: translateX(-50%); top: 90px; width: 380px; max-width: calc(100vw - 32px); }
#gameMenu { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 280px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
#gameMenu h3 { text-align: center; margin: 0 0 6px; }
#gameMenu button { padding: 9px; font-size: 16px; }
.keybind { display: grid; grid-template-columns: 1fr 120px; gap: 6px 10px; align-items: center; margin: 4px 0 6px 28px; }
.keybind button.wait { box-shadow: inset 0 0 0 2px var(--gold); }
.compatt { margin: 6px 0; padding-left: 16px; font-size: 13px; } .compatt li.locked { opacity: .45; }
#optionsPanel h4 { margin: 10px 0 4px; color: var(--gold); }
#optionsPanel .optrow { display: flex; gap: 10px; align-items: center; padding: 5px 0; cursor: var(--cur-hand); }
#optionsPanel .optrow span { display: flex; flex-direction: column; }
#optionsPanel .optrow small { opacity: .65; }
#optionsPanel input[type=range] { width: calc(100% - 28px); margin: 0 0 6px 28px; accent-color: var(--gold); }
.ware.fuse button { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 3px 8px; } .ware.fuse button small { font-size: 11px; opacity: .8; }
#pmenu { position: fixed; top: 0; left: 0; width: 210px; padding: 6px; z-index: 70; max-height: none; margin: 0; display: flex; flex-direction: column; gap: 4px; }
#pmenu .pmhead { padding: 4px 6px 6px; border-bottom: 1px solid #3a2814; margin-bottom: 2px; } #pmenu .pmhead b { display: block; color: var(--gold-hi); } #pmenu .pmhead small { color: var(--muted); }
#pmenu button { text-align: left; padding: 6px 10px !important; font-size: 15px; }
#deathScreen { background: rgba(60, 0, 0, .22); align-items: start; padding-top: 10vh; pointer-events: none; } #deathScreen .deathbox { pointer-events: auto; max-width: 440px; }
.moon { margin: 10px 0; padding: 10px 12px; background: rgba(120, 150, 220, .08); box-shadow: inset 0 0 0 1px #3a4a6a; }
.moon > b { color: #c8e0ff; font-size: 17px; } .moon .mpts { color: #ffd84a; font-size: 14px; margin-left: 6px; }
.moonbar i { background: linear-gradient(90deg, #6a8ad8, #c8e0ff) !important; }
.moongrid { display: grid; gap: 3px; margin: 8px 0 4px; } .mrow { display: grid; grid-template-columns: 1fr 60px 44px 30px; align-items: center; gap: 6px; font-size: 15px; }
.mrow b { color: #c8e0ff; text-align: right; } .mrow small { color: var(--muted); text-align: right; } .mrow button { padding: 0 6px; }
#expbar.sunon #expFill { background: linear-gradient(90deg, #c86a10, #ffc040, #fff0b0) !important; box-shadow: 0 0 10px rgba(255, 200, 80, .7); }
.moon.sun { border-color: #c8901a; }
.sunpts { margin-top: 8px; border-top: 1px solid #c8901a55; padding-top: 6px; } .sunpts .mpts { color: #ffd060; }
.sungrid { display: grid; gap: 6px; margin: 6px 0 4px; } .sungroup { display: grid; gap: 3px; align-content: start; }
.sungroup > i { color: #ffd060; font-style: normal; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; } .sungroup .mrow b { color: #ffe9a0; }
.sunbar i { background: linear-gradient(90deg, #c86a10, #ffc040, #fff0b0) !important; }
#expbar.moonon #expFill { background: linear-gradient(90deg, #4a6ab8, #9ab8f0, #e0ecff) !important; box-shadow: 0 0 8px rgba(160, 190, 255, .6); }
.moon .stars { color: #ffd84a; margin-left: 6px; letter-spacing: 1px; } .moon .big { margin-top: 8px; width: 100%; }
.petrow { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; } .petrow button.on { box-shadow: 0 0 0 2px #050302, inset 0 0 0 1px #ffd84a !important; color: #ffd84a; }
#petPanel { left: 50%; transform: translateX(-50%); top: 70px; width: 520px; }
#mountPanel { left: 50%; transform: translateX(-50%); top: 70px; width: 680px; max-width: calc(100vw - 32px); max-height: calc(100vh - 140px); overflow-y: auto; }
.petgrid.mountgrid { grid-template-columns: repeat(5, 1fr); } .mountgrid canvas { width: 120px; height: 96px; max-width: 100%; }
.petgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.petcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px #3a2814; text-align: center; }
.petcard canvas { width: 96px; height: 80px; image-rendering: pixelated; }
.petcard b { font-size: 14px; } .petcard small { color: var(--muted); font-size: 12px; }
.petcard.locked b { color: var(--muted); } .petcard.active { box-shadow: inset 0 0 0 2px #ffd84a; } .petcard button { padding: 2px 10px; }
#toast { position: fixed; left: 50%; bottom: 168px; z-index: 12; pointer-events: none; white-space: nowrap; font: 700 22px 'Grenze', sans-serif; text-shadow: 0 2px 4px #000, 0 0 12px rgba(0,0,0,.8); opacity: 0; transform: translate(-50%, 10px); transition: opacity .4s, transform .4s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
body.touch #toast { bottom: 130px; font-size: 17px; }

.banktabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.banktabs button { flex: 1; min-width: 70px; padding: 4px 6px; }
.banktabs button.on { border-color: #ffd84a; color: #ffe9a0; background: rgba(255, 216, 74, .12); }
.banktabs small { opacity: .7; font-size: 11px; }

/* the account box on the start screen: sign in with Google */
#accountBox { margin: 0 0 10px; }
#accountBox .acc { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: rgba(255, 255, 255, .04); border: 1px solid #3a3020; border-radius: 6px; padding: 8px 12px; font-size: 15px; }
#accountBox .acc.on { border-color: #4a6a3a; }
#accountBox .acc.imp { margin-top: 6px; border-color: #8a6a2a; }
#accountBox .acc small { opacity: .75; }
/* signing in with email and password, and choosing your own password */
#accountBox .acc:has(.pwform) { flex-wrap: wrap; }
#accountBox .acc:has(.pwform) > span { flex: 1 1 100%; }
#accountBox .pwform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; }
#accountBox .pwform input { flex: 1 1 180px; min-width: 0; padding: 9px 10px; font: 16px Georgia, serif; color: #f0e6d2; background: rgba(0, 0, 0, .55); border: 1px solid #6a5434; border-radius: 5px; }
#accountBox .pwform input:focus { outline: none; border-color: #e2b25a; }
#accountBox .pwform .forgot { color: #d8b878; font-size: 14px; }
#accountBox .good { color: #8ee08a; }
#accountBox .acc.pw > button[data-signout] { background: none; border: 1px solid #6a5434; color: #d8b878; border-radius: 5px; padding: 6px 12px; font: 14px Georgia, serif; cursor: pointer; }
#accountBox .bad { color: #ff8a6a; }
#gsiBtn { min-height: 40px; }

/* active buffs, above the exp bar */
#buffBar { display: flex; gap: 4px; justify-content: center; margin-bottom: 4px; min-height: 0; pointer-events: auto; }
#buffBar .buff { position: relative; width: 30px; height: 30px; border: 1px solid #7a5a2c; background: rgba(0, 0, 0, .7); box-shadow: 0 0 0 1px #050302; overflow: hidden; }
#buffBar .buff img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
#buffBar .buff span { display: block; text-align: center; font-size: 19px; line-height: 28px; }
#buffBar .buff i { position: absolute; left: 0; right: 0; top: 0; background: rgba(0, 0, 0, .55); }
#buffBar .buff small { position: absolute; right: 1px; bottom: -1px; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
#buffBar .buff.ending { animation: buffBlink .5s steps(2) infinite; }
@keyframes buffBlink { 50% { opacity: .45; } }

/* auto hunt button: lit while it runs */
#btnAuto b, #btnFight b { font-size: 10px; }
body.fighton #btnFight { border-color: #ffd84a; box-shadow: 0 0 10px rgba(255, 216, 74, .6); animation: autoPulse 1.2s ease-in-out infinite; }
body.autoon #btnAuto { border-color: #ffd84a; box-shadow: 0 0 10px rgba(255, 216, 74, .6); animation: autoPulse 1.2s ease-in-out infinite; }
@keyframes autoPulse { 50% { box-shadow: 0 0 2px rgba(255, 216, 74, .2); } }
/* the Heart of the Rift box sits at the bottom, just above the buff icons and the exp bar */
#riftHud { position: static; transform: none; margin: 0 auto 4px; width: max-content; max-width: 560px; padding: 3px 14px 4px; }
#riftHud b { display: inline; font-size: 14px; margin-right: 8px; } #riftHud span { font-size: 14px; } #riftHud small { display: inline; font-size: 12px; margin-left: 8px; }

/* the rankings */
#ranksPanel { left: 50%; transform: translateX(-50%); top: 70px; width: 520px; max-height: 76vh; overflow: auto; }
.ranklist { list-style: none; padding: 0; margin: 8px 0; }
.ranklist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; background: rgba(255, 255, 255, .03); margin-bottom: 2px; }
.ranklist li b { color: var(--gold); text-align: right; } .ranklist li small { opacity: .6; } .ranklist li em { font-style: normal; color: #e8dcc0; }
.ranklist li:nth-child(1) b { color: #ffd84a; } .ranklist li:nth-child(2) b { color: #d8dce8; } .ranklist li:nth-child(3) b { color: #d8945a; }
.ranklist li.me { background: rgba(255, 216, 74, .14); outline: 1px solid rgba(255, 216, 74, .4); }

/* the daily window */
#dailyPanel { left: 50%; transform: translateX(-50%); top: 70px; width: 560px; max-height: 80vh; overflow: auto; }
/* the Store */
#storePanel { left: 50%; transform: translateX(-50%); top: 60px; width: 640px; max-width: calc(100vw - 24px); max-height: 84vh; overflow: auto; }
#storePanel .jadebal, #storePanel .jadep { color: #6affb8; font-weight: 700; }
#storePanel .ware button { margin-left: 3px; }
#storePanel img.jd { width: 18px; height: 18px; vertical-align: -4px; }
#storePanel img.sti { width: 40px; height: 40px; float: left; margin: 0 8px 2px 0; }
#storePanel .pack > img { width: 72px; height: 72px; }
#storePanel .ware { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; }
#storePanel .jadep { white-space: nowrap; display: flex; align-items: center; gap: 3px; }
#storePanel .ware > span:first-child { flex: 1; min-width: 0; }
#storePanel .ware button { padding: 3px 7px; }
#btnStore.storebtn { color: #8affc8; border-color: #2a7a5a; }
.sttabs { display: flex; gap: 4px; margin: 8px 0; flex-wrap: wrap; }
.sttabs button { flex: 1; padding: 6px 4px; }
.sttabs button.on { background: #2a5a48; color: #fff; border-color: #6affb8; }
.packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid #2a7a5a; background: rgba(40, 90, 70, .18); }
.pack span { color: #6affb8; font-size: 18px; }
.stgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 4px 0 8px; }
.stitem { display: flex; flex-direction: column; gap: 3px; padding: 7px; border: 1px solid #3a3446; background: rgba(0, 0, 0, .25); }
.stitem.own { border-color: #2a7a5a; }
.stitem small { color: #a89c88; }
.stitem > div { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.stitem button small { color: #8a9a90; }
i.sw { display: inline-block; width: 26px; height: 10px; border: 1px solid #000; vertical-align: middle; }
.passgrid { display: grid; gap: 2px; margin: 6px 0; font-size: 13px; }
.passgrid > div { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 6px; align-items: center; padding: 3px 4px; background: rgba(0, 0, 0, .2); opacity: .6; }
.passgrid > div.reached, .passgrid > div.ph { opacity: 1; }
.passgrid > div.reached { background: rgba(120, 140, 220, .15); }
.passgrid button { padding: 1px 8px; }
.emotes { display: flex; flex-wrap: wrap; gap: 4px; }
.sthist { font-size: 12px; }
.sthist > div { display: grid; grid-template-columns: 90px 1fr 70px; gap: 6px; padding: 2px 0; border-bottom: 1px solid #2a2632; }
.sthist b { text-align: right; } .good { color: #6affb8; } .bad { color: #ff8a7a; }
@media (max-width: 640px) { .packs { grid-template-columns: repeat(2, 1fr); } .stgrid { grid-template-columns: 1fr; } }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0; }
.sday { background: rgba(255, 255, 255, .04); border: 1px solid #3a3020; padding: 4px; text-align: center; font-size: 12px; }
.sday b { display: block; font-size: 12px; } .sday small { font-size: 11px; opacity: .85; }
.sday.got { opacity: .5; } .sday.now { border-color: #ffd84a; box-shadow: 0 0 8px rgba(255, 216, 74, .4); }
.dbar { display: block; height: 4px; background: rgba(0, 0, 0, .5); margin-top: 3px; } .dbar i { display: block; height: 100%; background: #e8c060; }

.rbadge { height: 2em; width: auto; vertical-align: middle; margin: -0.6em -0.3em; image-rendering: auto; filter: drop-shadow(0 0 3px rgba(255,220,120,.6)); }
.ptitle { color: #ffd060; font-style: normal; font-weight: 700; }
.smith .upl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smith .smith-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the colour behind an item's icon: what kind of thing it is */
.ibg { position: absolute; inset: 1px; pointer-events: none; border-radius: 2px; }
.cell > img.ii { position: relative; } .cell > .ip, .cell > .il, .cell > .listed { z-index: 1; }
#invPanel { width: 440px; } .grid > .cell { min-width: 0; }
.ibg.c-junk { background: radial-gradient(circle, #3a3834 0%, #1a1916 75%); box-shadow: inset 0 0 0 1px #5a5650; }
.ibg.c-gear { background: radial-gradient(circle, color-mix(in srgb, var(--tc) 30%, transparent) 0%, transparent 72%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 55%, transparent); }
.ibg.c-rift { background: radial-gradient(circle, #6a2ab8 0%, #24103e 75%); box-shadow: inset 0 0 0 1px #b070ff, 0 0 6px #8a40ff; }
.ibg.c-seal { background: radial-gradient(circle, #8a6a18 0%, #2a1e06 75%); box-shadow: inset 0 0 0 2px #ffd060, 0 0 8px #ffc040; animation: sealglow 1.6s ease-in-out infinite alternate; }
.ibg.c-summon { background: radial-gradient(circle, #2a3a7a 0%, #0c1030 75%); box-shadow: inset 0 0 0 2px #8ab0ff, 0 0 6px #6a8aff; }
@keyframes sealglow { from { box-shadow: inset 0 0 0 2px #ffd060, 0 0 4px #ffc040; } to { box-shadow: inset 0 0 0 2px #fff0a0, 0 0 12px #ffd060; } }
.ibg.c-moon { background: radial-gradient(circle, #3a5a8a 0%, #121c30 75%); box-shadow: inset 0 0 0 1px #9ac8ff; }
.ibg.c-mat  { background: radial-gradient(circle, #1a5a5a 0%, #0c2222 75%); box-shadow: inset 0 0 0 1px #4ab8b0; }
.ibg.c-use  { background: radial-gradient(circle, #2a5a2a 0%, #102010 75%); box-shadow: inset 0 0 0 1px #6ac86a; }
.ibg.c-head { background: radial-gradient(circle, #6a3a12 0%, #24140a 75%); box-shadow: inset 0 0 0 1px #e08a3a; }
img.ii.dull { filter: grayscale(.7) brightness(.8); }
.duelcard.sun { border-color: #ffd060 !important; box-shadow: 0 0 10px rgba(255, 208, 96, .3); } .duelcard.bg { border-color: #ff8a6a !important; }
#duelHud { position: fixed; top: 70px; z-index: 6; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(20, 8, 6, .82); border: 1px solid #b8603a; padding: 6px 18px 8px; box-shadow: 0 0 20px rgba(255, 120, 60, .25); }
#duelHud b { display: block; font: 700 18px 'Grenze Gotisch', serif; color: #ffd8b0; } #duelHud span { display: block; font-size: 16px; color: #fff0e0; } #duelHud small { color: #e8c8a8; }
#arenaPanel { left: 50%; transform: translateX(-50%); top: 90px; width: 460px; max-width: calc(100vw - 32px); }
.duelgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; } .duelcard { background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px #4a3018; padding: 10px; text-align: center; }
.duelcard b { display: block; font: 700 20px 'Grenze Gotisch', serif; color: #ffd8b0; } .duelcard .rating { font-size: 26px; font-weight: 700; color: #ffd84a; } .duelcard small { display: block; color: var(--muted); margin-bottom: 6px; }
#warHud { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 6; text-align: center; background: rgba(20, 12, 4, .82); border: 1px solid #c8902a; padding: 6px 18px 8px; box-shadow: 0 0 20px rgba(255, 180, 60, .25); }
#warHud b { display: block; font: 700 18px 'Grenze Gotisch', serif; color: #ffe0a0; } #warHud span { display: block; font-size: 16px; color: #fff0d8; } #warHud small i { font-style: normal; font-weight: 700; }
#warPanel { left: 50%; transform: translateX(-50%); top: 90px; width: 460px; max-width: calc(100vw - 32px); }
.warrow { display: flex; justify-content: space-between; padding: 4px 8px; background: rgba(0,0,0,.25); margin: 3px 0; } .warrow b { font-weight: 700; }
#guildPanel { left: 50%; transform: translateX(-50%); top: 90px; width: 440px; max-width: calc(100vw - 32px); }
#buffBar .buff.debuff { border-color: #d83a2a; box-shadow: 0 0 0 1px #050302, 0 0 6px rgba(255, 60, 40, .6); }
/* a talisman chosen with a right-click, and the pieces it fits */
.cell.talpick { box-shadow: inset 0 0 0 2px #ffd84a; }
.cell.taltarget, .eslot.taltarget { box-shadow: inset 0 0 0 2px #6aff8a, 0 0 8px rgba(106, 255, 138, .5); animation: talpulse 1s ease-in-out infinite alternate; }
@keyframes talpulse { from { filter: brightness(1); } to { filter: brightness(1.35); } }
/* the Elementalist's overview: elements (or Qigong kinds) down, grades across */
.gemgrid { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 3px; align-items: center; margin: 4px 0 8px; } .gemgrid.q { grid-template-columns: 52px repeat(5, minmax(0, 1fr)); }
.gemgrid.q .gem { flex-direction: column; gap: 1px; } .gemgrid.q .gem button { margin: 0; }
.gemgrid > b { font-size: 12px; color: var(--muted); text-align: center; } .gemgrid > span { font-size: 14px; font-weight: 700; }
.gem { display: flex; align-items: center; gap: 3px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px #3a2a18; padding: 2px 3px; }
.gem { min-width: 0; } .gem img { width: 24px; height: 24px; image-rendering: pixelated; } .gem i { font-style: normal; font-weight: 700; font-size: 13px; } .gem button { padding: 0 3px; font-size: 10px; margin-left: auto; min-width: 0; }

/* a talisman waiting to be set into a piece: its scroll is the cursor everywhere */
body.talmode, body.talmode * { cursor: var(--cur-tal) !important; }

/* no weapon worn: the skills cannot be used (castSkill), so the bar shows them greyed out */
body.noweapon #skillSlots > * { filter: grayscale(1) brightness(.55); }

/* ---------------- painted skin (2026-11-02) ----------------
   The UI in the look of the painted world and the smooth 3D figures: dark lacquered wood panels (assets/ui), a heavy
   bronze frame with a bevel, bolder type, deep slots, rich bars and painted orbs. Icons are drawn smooth now. */
.panel, #tooltip, #targetFrame, .mapbox, .armorybox, .helpbox, .deathbox, #bar, .ccard, #continueBox, .qt {
  background-color: #140e0a;
  background-image: linear-gradient(180deg, rgba(255, 220, 160, .05), rgba(0, 0, 0, .35)), url(../assets/ui/ui-panel.jpg);
  background-size: auto, 420px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #070403, 0 0 0 4px #a07a3a, 0 0 0 5px #e0b862, 0 0 0 7px #5a3e1a, 0 0 0 9px #070403,
    inset 0 0 0 1px rgba(255, 210, 130, .18), inset 0 0 28px rgba(0, 0, 0, .75), 0 14px 44px rgba(0, 0, 0, .8);
}
.panel header { background: linear-gradient(180deg, rgba(120, 80, 30, .35), rgba(20, 12, 6, .6)); border-bottom: 2px solid #8a6430; }
.panel h3, .mapbox h2, .helpbox h2, .startbox h3, #zoneLabel b, .tt-name { font-family: 'Grenze Gotisch', serif !important; font-weight: 700; letter-spacing: .05em; color: #f6dc9a; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255, 180, 80, .25); }
html, body { font-weight: 600; }
b, strong { font-weight: 800; }
.panel button:not(.x), #menuBtns button, .create input {
  border-radius: 3px; font-weight: 700;
  background: linear-gradient(180deg, #4a3218, #24160a);
  box-shadow: 0 0 0 2px #070403, inset 0 0 0 1px #b8863e, inset 0 2px 0 rgba(255, 220, 150, .35), inset 0 -3px 0 rgba(0, 0, 0, .5);
}
.panel button:not(.x):hover, #menuBtns button:hover { background: linear-gradient(180deg, #6a4620, #33200e); color: #fff3d0; }
/* slots: deep wells with a bronze rim */
.slot, .pot, .eslot, .cell, .skic, .gic, .tt-head img {
  border-radius: 4px !important;
  background: radial-gradient(circle at 50% 40%, #2a1e14, #0a0705 75%) !important;
  box-shadow: 0 0 0 2px #070403, 0 0 0 3px #9a7236, inset 0 0 0 1px rgba(255, 210, 130, .15), inset 0 3px 8px rgba(0, 0, 0, .9) !important;
}
.slot .ic, .ii, .skic img, .gic, .tt-head img, .seticons img, .armwpn img, .cskills img, .qbtn img, #faceCv, #dollCv, .setdoll, .hero canvas, .ccard canvas { image-rendering: auto; }
.slot .ic, .skic img, .tt-head img { border-radius: 3px; }
/* bars: thicker, glossy */
.bar { height: 9px; border: none; border-radius: 3px; background: #0a0606; box-shadow: 0 0 0 2px #070403, 0 0 0 3px #6a4c22, inset 0 2px 4px #000; }
.bar i { border-radius: 2px; background: linear-gradient(180deg, #ffe08a, #c8902a 55%, #7a5014); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
#targetFrame { width: 340px; padding: 8px 12px 10px 74px; text-align: left; min-height: 74px; }
#targetFrame > div:first-child { font-size: 18px; }
#targetFrame b { font-family: 'Grenze Gotisch', serif; font-weight: 700; color: #f6dc9a; text-shadow: 0 2px 0 #000; }
#targetFrame .bar { height: 16px; }
#targetFrame .bar i { background: linear-gradient(180deg, #ff6a5a, #c02020 50%, #5a0808); }
#targetFrame.boss { box-shadow: 0 0 0 2px #070403, 0 0 0 4px #9a4ad8, 0 0 0 5px #e0a8ff, 0 0 0 7px #3a1a5a, 0 0 0 9px #070403, inset 0 0 28px rgba(0, 0, 0, .75), 0 0 30px rgba(170, 80, 255, .35); }
#tfPic { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a2a1a, #0a0705 75%); box-shadow: 0 0 0 2px #070403, 0 0 0 4px #a07a3a, 0 0 0 5px #e0b862, inset 0 2px 8px #000; }
/* the orbs: painted glass of blood and sapphire, in a heavy bronze ring */
.orb { border: none; box-shadow: 0 0 0 3px #070403, 0 0 0 7px #a07a3a, 0 0 0 8px #e0b862, 0 0 0 11px #4a3014, 0 0 0 13px #070403, 0 8px 30px rgba(0, 0, 0, .8), inset 0 0 22px #000; }
/* (always round; the painted liquid stands still in the orb and the fill only shows more or less of it: the picture
   hangs from the orb's bottom at the orb's full size, its own black rim cut off by zooming in) */
.orb { flex: none; width: 116px !important; height: 116px !important; aspect-ratio: 1; }
.orb .fill { overflow: hidden; background: none !important; }
.orb .fill::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 116px; background-size: 150% 150%; background-position: center; }
.orb.hp .fill::before { background-image: url(../assets/ui/ui-orb-hp.jpg), radial-gradient(circle at 40% 30%, #ff5a4a, #a01414 55%, #4a0606); }
.orb.mp .fill::before { background-image: url(../assets/ui/ui-orb-mp.jpg), radial-gradient(circle at 40% 30%, #6a9aff, #1a3aa0 55%, #08144a); }
/* the surface of the liquid: a thin bright line at the top of the fill */
.orb .fill::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255, 255, 255, .35); box-shadow: 0 0 6px rgba(255, 255, 255, .4); }
.orb span { font: 700 17px 'Grenze', sans-serif; }
#minimapWrap { border: none; border-radius: 4px; box-shadow: 0 0 0 2px #070403, 0 0 0 5px #a07a3a, 0 0 0 6px #e0b862, 0 0 0 8px #070403, 0 6px 24px rgba(0, 0, 0, .8); }
#targetFrame > div:first-of-type { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; }
#targetFrame > div:first-of-type b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#targetFrame > div:first-of-type span { white-space: nowrap; flex: none; }
.orb .gloss { display: none; }

/* ---- darker and heavier (2026-11-02, second pass) ---- */
.equip { grid-template-columns: repeat(3, 66px); grid-auto-rows: 66px; justify-content: start; flex: none; }
.eslot { width: 66px; height: 66px !important; aspect-ratio: 1; }
.eslot .ii { width: 48px; height: 48px; }
.eslot small { bottom: 2px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 2px #000; }
body.touch #invPanel .equip { grid-template-columns: repeat(5, 48px); grid-auto-rows: 48px; }
body.touch #invPanel .eslot { width: 48px; height: 48px !important; }
.panel, #tooltip, #targetFrame, .mapbox, .armorybox, .helpbox, .deathbox, #bar, .ccard, #continueBox, .qt {
  background-color: #0b0806;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .7)), url(../assets/ui/ui-panel.jpg);
  box-shadow: 0 0 0 3px #040202, 0 0 0 6px #6a4a1e, 0 0 0 7px #b8904a, 0 0 0 10px #2a1a0a, 0 0 0 12px #040202,
    inset 0 0 0 1px rgba(255, 200, 120, .12), inset 0 0 40px rgba(0, 0, 0, .9), 0 16px 50px rgba(0, 0, 0, .9);
}
.panel header { background: linear-gradient(180deg, rgba(70, 44, 16, .6), rgba(8, 5, 3, .8)); border-bottom: 3px solid #6a4a1e; box-shadow: 0 1px 0 #b8904a; }
.panel h3, .mapbox h2, .helpbox h2, .startbox h3, #zoneLabel b, .tt-name { font-weight: 700; color: #f0cf82; text-shadow: 0 2px 0 #000, 0 0 2px #000, 0 0 12px rgba(255, 160, 60, .3); }
html, body { font-weight: 700; text-shadow: 0 1px 1px rgba(0, 0, 0, .8); }
.panel button:not(.x), #menuBtns button, .create input {
  background: linear-gradient(180deg, #2e1e0e, #120a04);
  box-shadow: 0 0 0 2px #040202, 0 0 0 3px #6a4a1e, inset 0 1px 0 rgba(255, 210, 140, .25), inset 0 -3px 0 rgba(0, 0, 0, .6);
  font-weight: 800; letter-spacing: .02em;
}
.panel button:not(.x):hover, #menuBtns button:hover { background: linear-gradient(180deg, #4a3014, #1c1006); color: #ffe6a8; }
.slot, .pot, .eslot, .cell, .skic, .gic, .tt-head img {
  background: radial-gradient(circle at 50% 40%, #1c140c, #050302 75%) !important;
  box-shadow: 0 0 0 2px #040202, 0 0 0 4px #6a4a1e, 0 0 0 5px #a07c3e, inset 0 0 0 1px rgba(255, 200, 120, .1), inset 0 4px 10px rgba(0, 0, 0, 1) !important;
}
.bar { height: 10px; box-shadow: 0 0 0 2px #040202, 0 0 0 4px #6a4a1e, inset 0 2px 4px #000; }
#minimapWrap, #targetFrame, .orb { filter: saturate(.95); }
/* the hero's frame, the chat and the menu row in the same dark painted skin */
#playerFrame {
  border: none !important; border-radius: 4px;
  background-color: #0b0806 !important;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .7)), url(../assets/ui/ui-panel.jpg) !important; background-size: auto, 420px !important;
  box-shadow: 0 0 0 3px #040202, 0 0 0 6px #6a4a1e, 0 0 0 7px #b8904a, 0 0 0 10px #2a1a0a, 0 0 0 12px #040202, inset 0 0 30px rgba(0, 0, 0, .9), 0 10px 30px rgba(0, 0, 0, .8) !important;
}
#playerFrame b { font-family: 'Grenze Gotisch', serif; font-weight: 700; color: #f0cf82; text-shadow: 0 2px 0 #000; }
#faceCv { border-radius: 50%; box-shadow: 0 0 0 2px #040202, 0 0 0 4px #6a4a1e, 0 0 0 5px #b8904a, inset 0 2px 8px #000 !important; }
.pfbar { height: 10px !important; border-radius: 3px; border: none !important; background: #0a0606 !important; box-shadow: 0 0 0 2px #040202, 0 0 0 3px #6a4a1e, inset 0 2px 4px #000; overflow: hidden; }
.pfbar.hp i { background: linear-gradient(180deg, #ff6a5a, #c02020 50%, #5a0808) !important; }
.pfbar.mp i { background: linear-gradient(180deg, #7aa8ff, #2050c8 50%, #0a1a5a) !important; }
#chatLines { background: linear-gradient(180deg, rgba(8, 5, 3, .55), rgba(8, 5, 3, .8)) !important; border-radius: 4px; box-shadow: 0 0 0 2px rgba(4, 2, 2, .8), 0 0 0 3px rgba(106, 74, 30, .6); }
#menuBtns button { border: none !important; border-radius: 3px; background: linear-gradient(180deg, #2e1e0e, #120a04) !important; box-shadow: 0 0 0 2px #040202, 0 0 0 3px #6a4a1e, inset 0 1px 0 rgba(255, 210, 140, .25), inset 0 -3px 0 rgba(0, 0, 0, .6) !important; font-weight: 800; color: #f0dcae; }
/* the inventory: a big hero on the left, the worn pieces lined up on the right */
.paperdoll { align-items: stretch; }
#dollCv { width: 170px !important; height: 282px !important; flex: none; border-radius: 4px; box-shadow: 0 0 0 2px #040202, 0 0 0 4px #6a4a1e, 0 0 0 5px #a07c3e, inset 0 0 30px #000 !important; background: radial-gradient(ellipse at 50% 75%, rgba(255, 190, 110, .14), transparent 70%), #080503 !important; }
.paperdoll .equip { margin-left: auto; }
body.touch #dollCv { width: 110px !important; height: 182px !important; }
/* phones held sideways (2026-11-04): the world gets the room. Potions by the left thumb above the stick, auto hunt, auto
   fight and the scroll in a column by the right thumb, only the skills left in the bar, the exp a thin line along the
   bottom edge, a smaller hero frame and map */
@media (max-height: 520px) {
  body.touch #bottom { left: 0 !important; right: 0; transform: none; justify-content: center; padding-bottom: 7px; pointer-events: none; }
  body.touch #center { pointer-events: auto; gap: 3px; }
  body.touch #expbar { position: fixed; left: 0; right: 0; bottom: 0; width: auto !important; height: 4px !important; box-shadow: none; border: none; }
  body.touch #expText { display: none; }
  body.touch #bar { padding: 3px 4px; gap: 4px; }
  body.touch #bar .slot.empty { opacity: .45; }
  body.touch #potHp, body.touch #potMp { position: fixed; left: calc(14px + env(safe-area-inset-left)); width: 46px !important; height: 46px !important; }
  body.touch #potHp { bottom: 136px; } body.touch #potMp { bottom: 136px; left: calc(68px + env(safe-area-inset-left)); }
  body.touch #btnAuto, body.touch #btnFight, body.touch #potScroll { position: fixed; right: calc(8px + env(safe-area-inset-right)); width: 40px !important; height: 40px !important; font-size: 18px; }
  body.touch #btnAuto { bottom: 172px; } body.touch #btnFight { bottom: 218px; } body.touch #potScroll { bottom: 264px; }
  body.touch #bar .pot b { font-size: 10px; }
  body.touch #playerFrame { transform: scale(.6); }
  body.touch #minimapWrap { transform: scale(.5); }
  body.touch #tMenu { right: calc(128px + env(safe-area-inset-right)); top: 6px; width: 40px; height: 40px; font-size: 20px; }
  body.touch #zoneLabel { top: 6px; } body.touch #zoneLabel b { font-size: 14px; } body.touch #zoneLabel span { font-size: 11px; }
  body.touch #questTrack { top: 52px; width: 160px; }
  body.touch #targetFrame { top: 40px; }
  body.touch #buffBar { position: fixed; left: calc(8px + env(safe-area-inset-left)); top: 50px; }
}
/* the egg's own exp bar, above the hero's (green), and its row in the character window */
#eggbar { width: 560px; height: 12px; position: relative; background: rgba(0, 0, 0, .8); box-shadow: 0 0 0 2px #050302, 0 0 0 3px #4a6a2c; }
#eggbar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #9ad860 0 6px, #6aa83a 6px 7px); }
#eggbar span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 12px; font-weight: 700; color: #f0ffe0; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.eggrow { margin: 4px 0 10px; padding: 7px 10px; background: rgba(10, 8, 6, .6); border-left: 3px solid #9ad860; }
.eggrow b { color: #c8f0a0; } .eggrow small { color: #b8c8a8; } .eggrow .qbar i { background: linear-gradient(90deg, #5a8a2a, #9ad860); }
body.touch #eggbar { width: min(560px, 52vw); }
@media (max-height: 520px), (max-width: 760px) { body.touch #eggbar { width: min(460px, 46vw); } }
@media (max-height: 520px) { body.touch #eggbar { position: fixed; left: 0; right: 0; bottom: 4px; width: auto !important; height: 4px; box-shadow: none; } body.touch #eggText { display: none; } }
/* the minimap's zoom buttons, small in its bottom left corner */
.mm-zoom { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 3px; pointer-events: auto; }
.mm-zoom button { width: 22px; height: 22px; padding: 0; font: 700 15px/20px 'Grenze', sans-serif; color: #f0dcae; background: rgba(12, 9, 7, .85); border: 1px solid #6a4a1e; border-radius: 3px; cursor: pointer; }
.mm-zoom button:hover { background: #2e1e0e; color: #ffe6a8; }
body.touch .mm-zoom button { width: 30px; height: 30px; font-size: 20px; line-height: 28px; }
/* phones held sideways, round two (2026-11-04): the skills in an arc round the attack button under the right thumb
   (the first four close in, the fifth and picking up further out); auto hunt, auto fight and the scroll, and riding,
   sitting and the chat, in two short rows under the minimap; the target a slim bar under the zone name */
@media (max-height: 520px) {
  body.touch #bar { background: none !important; border: none !important; box-shadow: none !important; padding: 0; }
  body.touch #skillSlots .slot { position: fixed; width: 46px !important; height: 46px !important; border-radius: 50% !important; overflow: hidden; z-index: 6; box-shadow: 0 0 0 2px #040202, 0 0 0 3px #a07c3e, 0 2px 8px #000 !important; }
  body.touch #skillSlots .slot .ic { width: 42px; height: 42px; border-radius: 50%; }
  body.touch #skillSlots .slot:nth-child(1) { right: calc(132px + env(safe-area-inset-right)); bottom: 22px; }
  body.touch #skillSlots .slot:nth-child(2) { right: calc(117px + env(safe-area-inset-right)); bottom: 77px; }
  body.touch #skillSlots .slot:nth-child(3) { right: calc(77px + env(safe-area-inset-right)); bottom: 117px; }
  body.touch #skillSlots .slot:nth-child(4) { right: calc(22px + env(safe-area-inset-right)); bottom: 132px; }
  body.touch #skillSlots .slot:nth-child(5) { right: calc(186px + env(safe-area-inset-right)); bottom: 66px; }
  body.touch #tActions #tAttack { position: fixed; right: calc(8px + env(safe-area-inset-right)); bottom: 8px; width: 74px; height: 74px; }
  body.touch #tActions #tPick { position: fixed; right: calc(120px + env(safe-area-inset-right)); bottom: 161px; width: 44px; height: 44px; font-size: 20px; }
  body.touch #btnAuto, body.touch #btnFight, body.touch #potScroll, body.touch #tActions #tRide, body.touch #tActions #tSit, body.touch #tActions #tChat { position: fixed; top: 92px; bottom: auto !important; width: 40px !important; height: 40px !important; font-size: 18px; }
  body.touch #potScroll { right: calc(8px + env(safe-area-inset-right)); } body.touch #btnFight { right: calc(54px + env(safe-area-inset-right)); } body.touch #btnAuto { right: calc(100px + env(safe-area-inset-right)); }
  body.touch #tActions #tRide, body.touch #tActions #tSit, body.touch #tActions #tChat { top: 138px; border-radius: 50%; }
  body.touch #tActions #tRide { right: calc(8px + env(safe-area-inset-right)); } body.touch #tActions #tSit { right: calc(54px + env(safe-area-inset-right)); } body.touch #tActions #tChat { right: calc(100px + env(safe-area-inset-right)); }
  body.touch #aggro { top: 78px !important; right: auto !important; left: 50% !important; transform: translateX(-50%); font-size: 13px !important; }
  body.touch #targetFrame { box-shadow: 0 0 0 1px #070403, 0 0 0 3px #6a4a1e, 0 2px 10px rgba(0, 0, 0, .8) !important; }
  body.touch #targetFrame { top: 40px; width: 190px !important; min-height: 0 !important; padding: 3px 8px 4px 34px !important; }
  body.touch #targetFrame #tfPic { width: 26px; height: 26px; left: 4px; }
  body.touch #targetFrame > div:first-of-type { margin-bottom: 2px; }
  body.touch #targetFrame > div:first-of-type b { font-size: 12px; } body.touch #targetFrame > div:first-of-type span { font-size: 10px; }
  body.touch #targetFrame .bar { height: 8px !important; } body.touch #targetFrame .bar span { font-size: 9px; line-height: 8px; }
}
/* the quest log's list of every quest, town by town */
.qall h4 { margin: 14px 0 6px; font-family: 'Grenze Gotisch', serif; color: var(--gold-hi); }
.qall details { margin-bottom: 6px; background: rgba(10, 8, 6, .5); border: 1px solid rgba(232, 192, 96, .2); }
.qall summary { cursor: pointer; padding: 6px 9px; font-weight: 700; color: #f0dcae; }
.qall summary small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.qrow { padding: 5px 10px 6px; border-top: 1px solid rgba(255, 255, 255, .05); }
.qrow > div { display: flex; justify-content: space-between; gap: 8px; }
.qrow small { display: block; color: #c8bca0; font-size: 12px; }
.qrow .qpay { color: #d8c890; }
.qrow .qst { font-size: 12px; white-space: nowrap; }
.qrow.done { opacity: .5; } .qrow.done .qst { color: #7dff9a; }
.qrow.run .qst { color: #ffd84a; } .qrow.ready .qst { color: #ffd23a; font-weight: 700; }
.qrow.lock .qst { color: #a89a80; }
.qrow .sp { color: #8ad8ff; }
/* asked before going into a dungeon */
#portalAsk { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); width: 300px; z-index: 30; text-align: center; padding: 0 16px 14px; }
#portalAsk .row { display: flex; gap: 8px; justify-content: center; }
/* the auto questing switch beside Auto: dimmed when off */
/* (on: a gold box, like Auto while it runs; off: a plain one) */
#btnAutoQuest:not(.off) { box-shadow: 0 0 0 2px #040202, 0 0 0 4px #ffd84a, 0 0 0 5px #fff0b0, 0 0 10px rgba(255, 216, 74, .6) !important; }
#btnAutoQuest:not(.off) b { color: #ffe08a; }
#btnAutoQuest.off { opacity: .75; }
@media (max-height: 520px) { body.touch #btnAutoQuest { position: fixed; top: 92px; right: calc(146px + env(safe-area-inset-right)); width: 40px !important; height: 40px !important; font-size: 18px; } }
#chatLines .shout { color: #ffd8a0; } #chatLines .shout b { color: #ff9a3a; }
/* phones: the frame rate beside the hero frame, and the last chat lines small above the potions (2026-11-04) */
@media (max-height: 520px) {
  html body.touch #fps:not([hidden]) { display: block !important; position: fixed; top: 4px; left: calc(186px + env(safe-area-inset-left)); font-size: 10px; padding: 1px 4px; }
  html body.touch #chatLines { display: block !important; position: fixed; left: calc(8px + env(safe-area-inset-left)); bottom: 190px; top: auto; width: min(260px, 34vw); max-height: 72px; overflow: hidden; font-size: 11px; line-height: 1.25; padding: 3px 6px; pointer-events: none; background: rgba(8, 5, 3, .45) !important; }
  html body.touch #chatLines:empty { display: none !important; }
}
/* auto hunt and auto fight while they run: a green box (over the buttons' own frame) */
body.autoon #btnAuto, body.fighton #btnFight { box-shadow: 0 0 0 2px #040202, 0 0 0 4px #5aff6a, 0 0 0 5px #c8ffd0, 0 0 12px rgba(90, 255, 106, .65) !important; animation: none; }
body.autoon #btnAuto b, body.fighton #btnFight b { color: #9aff9a; }
/* the skill bar with its own bar beside it for Auto Quest, Auto and Fight */
#barRow { display: flex; gap: 10px; align-items: flex-end; }
#autoBar { display: flex; gap: 6px; align-items: center; background: linear-gradient(180deg, rgba(40, 30, 20, .95), rgba(16, 12, 10, .95)); border: 2px solid var(--edge); padding: 6px 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .7); }
#autoBar .pot b { font-size: 9px; white-space: nowrap; }
body.touch #autoBar { background: none; border: none; box-shadow: none; padding: 0; }
@media (max-height: 520px) { body.touch #btnAutoQuest b { font-size: 7px; letter-spacing: -.2px; } }
/* ---------- the start screen (2026-11-04): a painted background per view, the heroes standing as 3D figures ---------- */
.overlay.start { background-color: #050403; background-size: cover; background-position: center; transition: background-image .4s; }
#startScreen[data-view="title"] { background-image: linear-gradient(180deg, rgba(5, 4, 3, .15), rgba(5, 4, 3, .35) 45%, rgba(5, 4, 3, .88)), url(../assets/ui/bg-title.jpg); }
#startScreen[data-view="select"] { background-image: linear-gradient(180deg, rgba(5, 4, 3, .35), rgba(5, 4, 3, .15) 40%, rgba(5, 4, 3, .8)), url(../assets/ui/bg-select.jpg); }
#startScreen[data-view="create"] { background-image: linear-gradient(180deg, rgba(5, 4, 3, .35), rgba(5, 4, 3, .2) 40%, rgba(5, 4, 3, .85)), url(../assets/ui/bg-create.jpg); }
.startbox h1 { text-shadow: 0 0 50px rgba(255, 150, 50, .45), 0 4px 0 #2a1604, 0 8px 24px #000; }
.startbox .tag { text-shadow: 0 2px 6px #000; }
#continueBox { background: none !important; border: none !important; box-shadow: none !important; max-width: 1180px; }
#continueBox h3, #createBox h3 { text-shadow: 0 2px 8px #000; }
.herolist { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin: 6px 0 14px; }
.hcard { width: 200px; display: flex; flex-direction: column; align-items: center; padding: 0 0 12px; background: linear-gradient(180deg, rgba(10, 7, 5, 0), rgba(10, 7, 5, .82) 55%); border-bottom: 3px solid var(--c); box-shadow: 0 0 0 1px rgba(232, 192, 96, .25); transition: transform .15s, box-shadow .15s; }
.hcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px #ffd84a, 0 0 30px rgba(255, 200, 80, .25); }
.hcard canvas { width: 200px; height: 290px; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .8)); }
.hcard b { font: 700 19px 'Grenze Gotisch', serif; color: #f6dc9a; text-shadow: 0 2px 0 #000; margin-top: -6px; }
.hcard small { color: #d8c8a0; margin-bottom: 8px; }
.hcard .hbtns { display: flex; gap: 6px; }
.hcard .big { margin: 0; padding: 7px 22px; }
.hcard .del { background: rgba(0, 0, 0, .5); border: 1px solid #6a3a30; color: #e08a7a; cursor: var(--cur-hand); padding: 4px 9px; }
.newhero { font: 700 16px 'Grenze Gotisch', serif; padding: 10px 26px; color: #f0dcae; background: linear-gradient(180deg, #2e1e0e, #120a04); border: none; box-shadow: 0 0 0 2px #040202, 0 0 0 4px #6a4a1e, 0 0 0 5px #a07c3e; cursor: var(--cur-hand); }
.newhero:hover { color: #ffe6a8; }
.ccard { background: linear-gradient(180deg, rgba(10, 7, 5, .25), rgba(10, 7, 5, .88) 60%) !important; }
.ccard canvas { width: 180px; height: 250px; background: none !important; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .8)); }
#createBack { margin-right: 8px; padding: 8px 14px; background: rgba(0, 0, 0, .5); border: 1px solid #6a4a1e; color: #f0dcae; cursor: var(--cur-hand); }
#accountBox .acc { background: rgba(8, 5, 3, .78) !important; }
#titleBox { margin: 18px 0 0; }
#startScreen[data-view="title"] .startbox { padding-top: 18vh; }
/* a path reached but still locked: what it asks */
.pathreq { background: linear-gradient(180deg, rgba(255, 216, 74, .07), rgba(0, 0, 0, .25)); border: 1px solid rgba(214, 178, 92, .55); border-radius: 4px; padding: 10px 12px; margin-bottom: 10px; }
.pathreq .prh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pathreq .prh b { color: var(--gold); font-size: 15px; }
.pathreq .prh span { color: #cfc2a0; font-size: 13px; white-space: nowrap; }
.pathreq .prbar { height: 6px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(214, 178, 92, .35); border-radius: 3px; margin: 7px 0 6px; overflow: hidden; }
.pathreq .prbar i { display: block; height: 100%; background: linear-gradient(90deg, #a8781e, #ffd84a); }
.pathreq p { margin: 4px 0; color: #d8ccb0; font-size: 13px; }
.pathreq ul { list-style: none; margin: 4px 0 0; padding: 0; }
.pathreq li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-top: 1px solid rgba(214, 178, 92, .15); font-size: 13px; }
.pathreq li span { color: #f0e4c4; }
.pathreq li small { color: #a89c80; white-space: nowrap; }
.pathreq .prmore { color: #a89c80; font-style: italic; font-size: 12px; }
/* the big map's title: Kaldera › the zone (Kaldera goes back to the whole land) */
#mapPanel h2 .crumb { cursor: pointer; color: #c8b890; text-decoration: underline dotted; }
#mapPanel h2 .crumb:hover { color: var(--gold); }
#mapPanel h2 small { font-size: 60%; color: #c8b890; margin-left: 6px; }
/* the skill window in boxes: the class's own skills, each path, the passives */
.skbox { border: 1px solid rgba(214, 178, 92, .35); border-radius: 4px; background: rgba(0, 0, 0, .22); padding: 6px 8px 4px; margin-bottom: 10px; }
.skbox.chosen { border-color: rgba(214, 178, 92, .7); background: linear-gradient(180deg, rgba(255, 216, 74, .07), rgba(0, 0, 0, .22)); }
.skbox.locked { opacity: .92; }
.skbox .skbh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid rgba(214, 178, 92, .25); padding-bottom: 5px; margin-bottom: 4px; }
.skbox .skbh b { color: var(--gold); font-size: 15px; letter-spacing: .02em; }
.skbox .skbh span { color: #a89c80; font-size: 12px; white-space: nowrap; }
.skbox .skbh .pkind { margin: 0; font-size: 12px; }
.skbox .skpath { color: #f0e4c4; font-weight: 700; font-size: 14px; margin: 2px 0 4px; }
.skbox .skwait { color: #a89c80; font-style: italic; font-size: 13px; margin: 4px 0 6px; }
.skbox .skopen { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0 6px; }
.skbox .skopen p { margin: 0; color: #e8dcc0; font-size: 13px; }
.skbox .pathreq { margin: 4px 0 6px; }
/* the GM panel: tabs over the tools */
.adtabs { display: flex; gap: 6px; margin: 8px 0 2px; border-bottom: 1px solid #4a3618; padding-bottom: 6px; flex-wrap: wrap; }
.adtabs button { background: #1a120a; color: #c8b890; border: none; box-shadow: 0 0 0 1px #4a3618; padding: 5px 12px; font: inherit; font-size: 15px; cursor: pointer; }
.adtabs button.on { background: #3a2a14; color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.adgrid section.adwide { grid-column: 1 / -1; padding-top: 6px; }
.adrow select.wide { max-width: 100%; flex: 1; }
.adplayers { max-height: 260px; overflow-y: auto; }
.adpn { flex: 1; } .adpn small { color: #a89c80; }

/* painted item pictures at the merchants and on the potion buttons */
img.wimg { width: 34px; height: 34px; float: left; margin: 0 8px 0 0; }
img.potimg { width: 34px; height: 34px; display: block; margin: 0 auto; }
.pot i.potemo { font-style: normal; }
.panel > header { cursor: grab; touch-action: none; }

/* ===== HUD overhaul (2026-11-15): no HP/MP orbs (health and mana in the hero's frame, top left), the skill bar
   standing on the right edge, windows on the right moved in so they do not cover it ===== */
body:not(.touch) .orb { display: none; }
/* (the skill bar stays at the bottom; the auto hunt, auto quest and fight buttons stand on the right edge) */
body:not(.touch) #autoBar { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; pointer-events: auto; z-index: 4; }
body:not(.touch) .panel.right { right: 84px; }
/* (the bottom row is centred without a transform, so the skill bar inside it can stand fixed on the right edge) */
body:not(.touch) #bottom { left: 0; right: 0; transform: none; justify-content: center; }

/* ===== phones held upright (2026-11-15): the world fills the screen; the stick bottom left, the attack button and its
   skills bottom right, the skill bar and potions in a row above them, auto hunt above that on the right; the hero's
   frame and the minimap smaller at the top; every window full width, scrolling ===== */
@media (orientation: portrait) and (max-width: 760px) {
  body.touch #bottom { left: 0; right: 0; transform: none; bottom: calc(176px + env(safe-area-inset-bottom)); padding: 0 6px; justify-content: center; }
  body.touch #center { width: 100%; align-items: center; }
  body.touch #barRow { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
  body.touch #bar { max-width: calc(100vw - 12px); overflow-x: auto; flex-wrap: nowrap; }
  body.touch #bar .slot, body.touch #bar .pot { width: 44px !important; height: 44px !important; flex: none; }
  body.touch #autoBar { position: fixed; right: calc(8px + env(safe-area-inset-right)); bottom: calc(244px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
  body.touch #autoBar .pot { width: 44px !important; height: 44px !important; }
  body.touch #expbar { position: fixed; left: 0; right: 0; bottom: 0; width: auto !important; height: 5px; }
  body.touch #expText { display: none; }
  body.touch #joy { left: calc(14px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); }
  body.touch #tActions { bottom: calc(10px + env(safe-area-inset-bottom)); }
  body.touch #menuBtns { display: none; }
  body.touch #playerFrame { transform: scale(.72); transform-origin: top left; }
  body.touch #minimapWrap { transform: scale(.55); transform-origin: top right; }
  body.touch #leftCol { top: 84px !important; left: 6px !important; max-width: 62vw !important; font-size: 13px; transform: scale(.85); transform-origin: top left; }
  body.touch .panel, body.touch .panel.left, body.touch .panel.right { left: 6px !important; right: 6px !important; width: auto !important; max-width: none !important; top: 70px !important; max-height: calc(100vh - 260px) !important; transform: none !important; }
  body.touch.twopanes .panel.left, body.touch.twopanes .panel.right { left: 6px !important; right: 6px !important; }
  body.touch.twopanes .panel.left { top: 70px !important; max-height: calc(48vh - 70px) !important; }
  body.touch.twopanes .panel.right { top: 48vh !important; max-height: calc(52vh - 190px) !important; }
}

/* the menu bar in groups (2026-11-16): Hero, Journey and Together open a list upwards; a group with something new in
   it shows the mark too */
#menuBtns { align-items: flex-end; }
#menuBtns .mgroup { position: relative; }
#menuBtns .mhead::after { content: ' ▴'; font-size: 11px; opacity: .7; }
#menuBtns .mdrop { display: none; position: absolute; bottom: 100%; left: 0; flex-direction: column; gap: 3px; padding: 4px; margin-bottom: 4px; min-width: 150px; background: rgba(14, 10, 7, .96); border: 1px solid var(--edge); box-shadow: 0 6px 20px rgba(0,0,0,.7); z-index: 20; }
#menuBtns .mgroup.open .mdrop { display: flex; }
#menuBtns .mdrop button { text-align: left; width: 100%; white-space: nowrap; }
#menuBtns .mdrop button kbd { float: right; }
#menuBtns .mgroup:has(.badge) > .mhead::before { content: '!'; position: absolute; top: -8px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #e04040; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
#wingPanel { left: 50%; transform: translateX(-50%); top: 80px; width: 520px; max-width: calc(100vw - 24px); max-height: 80vh; overflow: auto; }
.wgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid #3a3446; background: rgba(0,0,0,.25); cursor: pointer; }
.wcard img { width: 72px; height: 72px; }
.wcard.on { border-color: #ffd84a; box-shadow: 0 0 10px rgba(255,216,74,.4); }
.wcard.locked { opacity: .35; cursor: default; }
@media (max-width: 640px) { .wgrid { grid-template-columns: repeat(3, 1fr); } }

/* phones, quieter (2026-11-16): no frame counter, the messages short and faint, sitting and chat in the menu; the menu
   (☰) shows its groups as sections */
body.touch #fps { display: none !important; }
body.touch #leftCol #log { max-height: 3.6em; overflow: hidden; opacity: .85; }
body.touch #tSit, body.touch #tChat { display: none !important; }
body.touch.menuopen #menuBtns { display: flex !important; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); gap: 10px; }
body.touch #menuBtns .mgroup { display: flex; flex-direction: column; gap: 4px; }
body.touch #menuBtns .mhead { pointer-events: none; background: none !important; border: none !important; color: var(--gold); font-size: 13px !important; padding: 2px !important; }
body.touch #menuBtns .mhead::after { content: ''; }
body.touch #menuBtns .mdrop { display: flex; position: static; margin: 0; padding: 0; background: none; border: none; box-shadow: none; min-width: 0; }
body:not(.touch) .touchonly { display: none !important; }
body.touch.menuopen #menuBtns { max-height: calc(100vh - 24px); overflow-y: auto; align-items: flex-start; padding: 10px; }
body.touch.menuopen #menuBtns button { padding: 6px 10px !important; font-size: 15px !important; }
body.touch.menuopen #menuBtns .mdrop button { min-width: 110px; }

/* the loading screen */
#loadScreen { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: #07060a; transition: opacity .6s; }
#loadScreen.gone { opacity: 0; pointer-events: none; }
#loadScreen .ld-bg { position: absolute; inset: 0; background: url(../assets/ui/map/world.jpg) center/cover; filter: blur(3px) brightness(.35) saturate(.8); }
#loadScreen .ld-box { position: relative; width: min(560px, 88vw); text-align: center; }
#loadScreen h1 { font: 700 54px 'Grenze Gotisch', serif; color: var(--gold-hi); letter-spacing: 6px; margin: 0 0 6px; text-shadow: 0 2px 12px #000, 0 0 30px rgba(200,40,40,.35); }
#loadScreen .ld-where { color: #d8c8a8; font-size: 18px; margin-bottom: 18px; }
#loadScreen .ld-bar { height: 10px; border: 1px solid var(--edge-hi); background: rgba(0,0,0,.6); box-shadow: 0 0 12px #000; }
#loadScreen .ld-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6a1010, #c83a2a, #ffb060); transition: width .25s; }
#loadScreen .ld-tip { color: #b8aa90; font-size: 15px; line-height: 1.45; margin-top: 18px; min-height: 3em; }

/* the Guide */
#guidePanel { left: 50%; transform: translateX(-50%); top: 70px; width: 780px; max-width: calc(100vw - 24px); max-height: 82vh; overflow: auto; }
#guidePanel .gd { display: grid; grid-template-columns: 200px 1fr; gap: 14px; }
#guidePanel nav { display: flex; flex-direction: column; gap: 4px; }
#guidePanel nav button { text-align: left; }
#guidePanel nav button.on { border-color: var(--gold); color: var(--gold-hi); }
#guidePanel article { font-size: 16px; line-height: 1.5; color: #e0d4bc; }
#guidePanel article h4 { font: 700 20px 'Grenze Gotisch', serif; color: var(--gold-hi); margin: 0 0 8px; }
#guidePanel article ul { padding-left: 18px; } #guidePanel article li { margin: 4px 0; }
@media (max-width: 640px) { #guidePanel .gd { grid-template-columns: 1fr; } #guidePanel nav { flex-direction: row; flex-wrap: wrap; } }

/* the kill stacks: each its own colour, glow and burst (Lure, Bloodbath, Massacre, Carnage, Eclipse) */
#lure .lure-n b { font-family: 'Grenze Gotisch', serif; -webkit-text-stroke: 1px rgba(0,0,0,.6); }
#lure[data-st="lure"] .lure-n b { color: #ffcf8a; text-shadow: 0 0 16px rgba(255,140,40,.7), 0 3px 6px #000; }
#lure[data-st="blood"] .lure-n b { color: #ff5a5a; text-shadow: 0 0 20px rgba(220,0,30,.9), 0 3px 6px #000; }
#lure[data-st="blood"] .lure-n span { color: #ff6a6a; } #lure[data-st="blood"] .bar i { background: linear-gradient(90deg, #5a0010, #ff2a3a); }
#lure[data-st="mass"] .lure-n b { color: #e0a0ff; text-shadow: 0 0 24px rgba(170,40,255,.9), 0 3px 6px #000; }
#lure[data-st="mass"] .lure-n span { color: #d080ff; } #lure[data-st="mass"] .bar i { background: linear-gradient(90deg, #3a0060, #c050ff); }
#lure[data-st="carn"] .lure-n b { color: #a0f0ff; text-shadow: 0 0 26px rgba(40,200,255,.95), 0 0 6px #fff, 0 3px 6px #000; }
#lure[data-st="carn"] .lure-n span { color: #80e0ff; } #lure[data-st="carn"] .bar i { background: linear-gradient(90deg, #003a5a, #40d0ff, #ffffff); }
#lure[data-st="ecl"] .lure-n b { color: #fff4d0; text-shadow: 0 0 30px rgba(255,220,120,1), 0 0 60px rgba(160,60,255,.8), 0 3px 6px #000; animation: eclpulse .9s infinite alternate; }
#lure[data-st="ecl"] .lure-n span { color: #ffe8a0; letter-spacing: .4em; } #lure[data-st="ecl"] .bar i { background: linear-gradient(90deg, #2a0040, #ffd84a, #ffffff); }
@keyframes eclpulse { from { transform: scale(1); } to { transform: scale(1.08); } }
#lure.burst .lure-n { animation: stackburst .55s ease-out; }
@keyframes stackburst { 0% { transform: scale(1.9); filter: brightness(2.2); } 60% { transform: scale(.95); } 100% { transform: scale(1); filter: none; } }
body:not(.touch) #lure, body:not(.touch) #aggro { right: 92px; }

/* the gothic skin (2026-11-16, painted on the PC, batch31): iron and blood frames round the windows, iron bars as
   buttons, the bat-winged ring round the hero's face, the skull bar under a target */
.panel, .mapbox, .helpbox, .deathbox, .armorybox {
  border-style: solid !important; border-color: transparent !important; border-width: 10px !important; border-radius: 0 !important;
  border-image: url(../assets/ui/gothic/frame.webp) 105 / 52px / 8px stretch !important;
  background: linear-gradient(180deg, rgba(28, 13, 12, .97), rgba(12, 6, 6, .97)) !important; box-shadow: 0 14px 40px rgba(0, 0, 0, .8) !important;
}
.panel header { background: linear-gradient(180deg, #1c0d0c 70%, rgba(28, 13, 12, 0)) !important; border-bottom: 1px solid rgba(200, 40, 40, .35) !important; box-shadow: none !important; }
.panel h3, .mapbox h2, .helpbox h2 { color: #f2d48a !important; text-shadow: 0 2px 0 #000, 0 0 14px rgba(220, 30, 30, .45) !important; }
#tooltip { border-style: solid !important; border-color: transparent !important; border-width: 6px !important; border-image: url(../assets/ui/gothic/frame-gold.webp) 55 / 26px / 6px stretch !important; background: linear-gradient(180deg, rgba(24, 11, 10, .97), rgba(10, 5, 5, .97)) !important; box-shadow: 0 8px 24px rgba(0, 0, 0, .8) !important; }
#menuBtns > button, #menuBtns .mhead, .big {
  border-style: solid !important; border-width: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important;
  border-image: url(../assets/ui/gothic/button.webp) 14 85 12 85 fill / 8px 26px 7px 26px / 4px 14px 4px 14px stretch !important;
  margin: 0 12px; color: #f4dca0 !important; text-shadow: 0 1px 2px #000;
}
#menuBtns > button:hover, #menuBtns .mhead:hover, .big:hover:not(:disabled) { filter: brightness(1.35) drop-shadow(0 0 6px rgba(255, 60, 40, .5)); }
.panel button:not(.x):not(.big) { background: linear-gradient(180deg, #2a2224, #0e0a0b) !important; box-shadow: 0 0 0 1px #040202, 0 0 0 2px #5a1a1a, inset 0 1px 0 rgba(255, 200, 200, .15) !important; }
.panel button:not(.x):not(.big):hover:not(:disabled) { box-shadow: 0 0 0 1px #040202, 0 0 0 2px #c03030, inset 0 1px 0 rgba(255, 200, 200, .2) !important; }
/* the hero's face in the bat-winged ring */
.pface { position: relative; flex: none; margin: 8px 20px 8px 22px; }
.pface::after { content: ''; position: absolute; left: -22px; top: -22px; width: 98px; height: 99px; background: url(../assets/ui/gothic/portrait.webp) center / 100% 100% no-repeat; pointer-events: none; }
.pface #faceCv { display: block; box-shadow: none !important; }
#targetFrame .bar { border-style: solid !important; border-width: 0 !important; box-shadow: none !important; border-image: url(../assets/ui/gothic/bar.webp) 9 40 12 47 / 9px 40px 12px 47px / 9px 40px 12px 47px stretch !important; overflow: visible !important; }
#targetFrame { padding-left: 50px !important; padding-right: 30px !important; }
/* the select hall: the heroes stand on its floor, no cards */
.hcard { background: none !important; border-bottom: none !important; box-shadow: none !important; position: relative; }
.hcard::before { content: ''; position: absolute; left: 30px; right: 30px; top: 252px; height: 34px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); z-index: -1; }
.hcard:hover { box-shadow: none !important; }
.hcard:hover canvas { filter: drop-shadow(0 0 14px rgba(255, 80, 50, .45)) drop-shadow(0 10px 12px rgba(0, 0, 0, .8)); }
.hcard b { font-size: 21px !important; }
.hcard small { color: #e8d8b4 !important; text-shadow: 0 1px 3px #000; }
#startScreen[data-view="select"] { background-position: center 30%; background-image: linear-gradient(180deg, rgba(5, 4, 3, .1), rgba(5, 4, 3, 0) 50%, rgba(5, 4, 3, .55)), url(../assets/ui/bg-select.jpg) !important; }
body.touch .panel { border-width: 8px !important; border-image-width: 40px !important; border-image-outset: 6px !important; }
.hcard .hbtns { gap: 24px !important; }

/* the HUD in the same iron as the windows: the old gold rims gone (2026-11-16) */
#playerFrame, #targetFrame, #bar, #minimapWrap, #chatLines, #autoBar, #partyBox:not([hidden]), #questTrack:not(:empty) {
  border-style: solid !important; border-color: transparent !important; border-width: 8px !important; border-radius: 0 !important;
  border-image: url(../assets/ui/gothic/frame.webp) 105 / 40px / 6px stretch !important;
  background: linear-gradient(180deg, rgba(28, 13, 12, .9), rgba(12, 6, 6, .92)) !important; box-shadow: none !important;
}
#minimap { box-shadow: none !important; border: none !important; }
.slot, .pot, .eslot, .cell, .skic, .gic, .tt-head img {
  background: radial-gradient(circle at 50% 40%, #1e1012, #050304 75%) !important;
  box-shadow: 0 0 0 1px #050304, 0 0 0 3px #2e2b30, 0 0 0 4px #7a1c20, inset 0 0 0 1px rgba(255, 120, 120, .08), inset 0 4px 10px #000 !important;
}
.bar, .pfbar, #expbar, #eggbar { box-shadow: 0 0 0 1px #050304, 0 0 0 3px #2e2b30, 0 0 0 4px #5a1418, inset 0 2px 4px #000 !important; border: none !important; }
.pfbar.hp i, #targetFrame .bar i { background: linear-gradient(180deg, #ff5a4a, #b01818 50%, #4a0606) !important; }
#expFill { background: linear-gradient(90deg, #4a0a10, #a02030, #e05a3a) !important; }
#playerFrame b, .hcard b, .startbox h1, .panel h3, .mapbox h2, #zoneLabel b { font-family: 'Grenze Gotisch', serif !important; letter-spacing: .02em; }
.startbox h1 { font-weight: 800 !important; color: #d8c08a !important; text-shadow: 0 0 40px rgba(200, 20, 20, .45), 0 4px 0 #1a0606, 0 8px 24px #000 !important; }
/* the Guide with pictures: a painted banner per page, and the game's own icons in rows */
#guidePanel .gban { height: 120px; margin: 0 0 12px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 10px 14px; box-shadow: inset 0 -60px 50px -10px rgba(10, 4, 4, .95), 0 0 0 1px #050304, 0 0 0 3px #2e2b30, 0 0 0 4px #7a1c20; }
#guidePanel .gban h4 { margin: 0 !important; font-size: 26px !important; text-shadow: 0 2px 0 #000, 0 0 14px #000; }
#guidePanel .grow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 12px; padding: 10px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(200, 160, 80, .18); }
#guidePanel .gstep { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; text-align: center; }
#guidePanel .gstep small { font-size: 13px; line-height: 1.15; color: #d8c8a0; }
#guidePanel .gi { width: 48px; height: 48px; object-fit: contain; background: radial-gradient(circle at 50% 40%, #1e1012, #050304 75%); box-shadow: 0 0 0 1px #050304, 0 0 0 3px #2e2b30, 0 0 0 4px #7a1c20; }
#guidePanel .gi.sk { object-fit: cover; }
#guidePanel .gorb { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, var(--c) 45%, #000 100%); box-shadow: 0 0 14px var(--c), 0 0 0 2px #2e2b30; margin: 4px; }
#guidePanel .glvl { display: grid; place-items: center; width: 48px; height: 48px; font: 800 22px 'Grenze Gotisch', serif; color: #f2d48a; background: radial-gradient(circle, #3a1214, #0a0405); box-shadow: 0 0 0 1px #050304, 0 0 0 3px #2e2b30, 0 0 0 4px #b8904a; border-radius: 50%; }
#guidePanel .glvl.star { color: #ffd84a; font-size: 28px; }
#guidePanel .garrow { font-size: 26px; color: #c83a2a; }
#guidePanel .gcycle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; padding: 10px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px rgba(200, 160, 80, .18); }
#guidePanel .gcycle .gstep { width: 92px; }
#loadScreen .ld-bg.painted { filter: brightness(.55) saturate(.95); background-size: cover; background-position: center; }
/* the switch between the two skill bars (area or single target, Z): a round medallion left of the bar, not a slot */
#btnBarSet { align-self: center; position: relative; width: 64px; height: 64px; border-radius: 50%; padding: 0; cursor: var(--cur-point, pointer); display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #3a1014, #120608 70%); border: 2px solid #b8893a; box-shadow: 0 0 0 2px #070304, 0 0 0 3px #6a1a1e, 0 4px 14px rgba(0, 0, 0, .8), inset 0 0 12px rgba(168, 24, 42, .6); transition: transform .12s, box-shadow .12s; }
#btnBarSet:hover { transform: scale(1.06); box-shadow: 0 0 0 2px #070304, 0 0 0 3px #a8182a, 0 4px 18px rgba(255, 140, 60, .35), inset 0 0 14px rgba(255, 120, 60, .5); }
#btnBarSet img { width: 34px; height: 34px; margin-top: -8px; filter: drop-shadow(0 0 4px rgba(255, 170, 60, .55)); }
#btnBarSet b { position: absolute; bottom: 7px; left: 0; right: 0; text-align: center; font-size: 12px; color: #ffd88a; text-shadow: 0 1px 2px #000; }
#btnBarSet small { position: absolute; top: -4px; left: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #120608; border: 1px solid #b8893a; font-size: 12px; color: #ffd88a; text-shadow: 0 1px 2px #000; pointer-events: none; }
#btnBarSet.one { border-color: #d0503a; }
#btnBarSet.one img { filter: drop-shadow(0 0 4px rgba(255, 60, 50, .6)); }
#btnBarSet.one b { color: #ff9a8a; }
@media (max-height: 520px) {
  body.touch #btnBarSet { position: fixed; right: calc(186px + env(safe-area-inset-right)); bottom: 122px; width: 44px; height: 44px; z-index: 6; }
  body.touch #btnBarSet img { width: 26px; height: 26px; margin-top: -4px; } body.touch #btnBarSet b, body.touch #btnBarSet small { display: none; }
}
/* the HP and mana numbers in the bars by the portrait */
.pfbar { position: relative; height: 15px !important; }
.pfbar span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 12px/1 'Grenze', serif; color: #fff4e0; text-shadow: 0 1px 2px #000, 0 0 3px #000; letter-spacing: .3px; pointer-events: none; }
/* ---- the select hall (2026-11-17): the heroes big and sharp on the hall's floor, one chosen, Play at the bottom ---- */
#startScreen[data-view="select"] #continueBox { max-width: none; width: 100%; padding: 0; margin: 0; }
#startScreen[data-view="select"] #continueBox h3 { text-align: center; font-size: 26px; margin: 0 0 4px; }
#continueBox .herolist { display: flex; flex-wrap: nowrap; justify-content: safe center; align-items: flex-end; gap: 0; height: min(64vh, 640px); overflow-x: auto; overflow-y: hidden; margin: 0 auto; padding: 0 20px 6px; scrollbar-width: thin; }
#continueBox .hcard { flex: 0 0 auto; width: clamp(180px, 19vw, 270px); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0; cursor: var(--cur-hand, pointer); position: relative; transform: none !important; transition: filter .2s; filter: brightness(.78) saturate(.85); }
#continueBox .hcard:hover { filter: brightness(.95); }
#continueBox .hcard.on { filter: none; }
#continueBox .hcard canvas { width: 100%; height: calc(100% - 54px); flex: 1 1 auto; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .75)); }
#continueBox .hcard::before { content: ''; position: absolute; left: 18%; right: 18%; top: auto; bottom: 46px; height: 30px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); z-index: -1; }
/* (the chosen one stands in a ring of light on the floor) */
#continueBox .hcard.on::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: 36px; height: 50px; border-radius: 50%; z-index: -1; background: radial-gradient(closest-side, rgba(255, 210, 120, .55), rgba(255, 150, 60, .18) 60%, rgba(255, 120, 40, 0)); box-shadow: 0 0 0 2px rgba(255, 216, 120, .55); animation: selglow 2.4s ease-in-out infinite; }
@keyframes selglow { 50% { opacity: .65; } }
#continueBox .hcard:hover canvas { filter: drop-shadow(0 0 14px rgba(255, 200, 90, .35)) drop-shadow(0 12px 14px rgba(0, 0, 0, .75)); }
#continueBox .hname { display: flex; flex-direction: column; align-items: center; height: 54px; justify-content: flex-start; }
#continueBox .hname b { font: 700 22px 'Grenze Gotisch', serif; color: #f6dc9a; text-shadow: 0 2px 0 #000, 0 0 10px #000; margin: 0; }
#continueBox .hname small { color: #d8c8a0; text-shadow: 0 1px 3px #000; }
#continueBox .hcard.on .hname b { color: #ffe9a8; text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 190, 80, .7); }
#continueBox .selbar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; width: min(720px, 94vw); z-index: 5; }
#continueBox .selbar .newhero { justify-self: end; margin: 0; }
#continueBox .selbar .del { justify-self: start; }
#continueBox .selbar .play { font-size: 28px; padding: 14px 70px; margin: 0; letter-spacing: 2px; }
@media (max-height: 560px), (max-width: 760px) {
  #startScreen[data-view="select"] #continueBox h3 { font-size: 18px; }
  #continueBox .herolist { height: 66vh; padding: 0 8px; }
  #continueBox .hcard { width: clamp(120px, 26vw, 190px); }
  #continueBox .hcard canvas { height: calc(100% - 40px); }
  #continueBox .hname { height: 40px; } #continueBox .hname b { font-size: 16px; } #continueBox .hname small { font-size: 11px; }
  #continueBox .hcard::before { bottom: 32px; } #continueBox .hcard.on::after { bottom: 24px; height: 34px; }
  #continueBox .selbar { bottom: calc(6px + env(safe-area-inset-bottom)); gap: 8px; }
  #continueBox .selbar .play { font-size: 20px; padding: 9px 40px; }
  #continueBox .selbar .newhero, #continueBox .selbar .del { font-size: 13px; padding: 6px 10px; }
}
/* (the hall's heroes stand above the bar at the bottom; the bar's buttons in the game's own style) */
#startScreen[data-view="select"] #continueBox { padding-bottom: 96px; }
#continueBox .herolist { height: clamp(300px, calc(100vh - 360px), 640px); }
#continueBox .selbar .play { min-width: 280px; font: 700 30px 'Grenze Gotisch', serif !important; padding: 12px 70px !important; color: #fff1c8 !important; text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 170, 60, .6); }
#continueBox .selbar .newhero, #continueBox .selbar .del { font: 600 17px 'Grenze', serif; padding: 9px 18px; background: linear-gradient(180deg, rgba(60, 14, 18, .92), rgba(20, 6, 8, .92)); color: #f0d8a8; border: 1px solid #8a6a32; box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, .6); cursor: var(--cur-hand, pointer); }
#continueBox .selbar .del { color: #e8a090; border-color: #6a3a30; }
#continueBox .selbar .newhero:hover, #continueBox .selbar .del:hover { filter: brightness(1.25); }
@media (max-height: 560px), (max-width: 760px) {
  #startScreen[data-view="select"] #continueBox { padding-bottom: 62px; }
  #continueBox .herolist { height: clamp(180px, calc(100vh - 150px), 420px); }
  #continueBox .selbar .play { min-width: 160px; font-size: 22px !important; padding: 7px 34px !important; }
  #continueBox .selbar .newhero, #continueBox .selbar .del { font-size: 13px; padding: 6px 10px; }
}
/* (in the hall the title is small and the sign-in line thin: the heroes have the room) */
#startScreen[data-view="select"] .startbox > h1 { font-size: 44px !important; margin: 4px 0 0 !important; line-height: 1.1; }
#startScreen[data-view="select"] .startbox > .tag { display: none; }
#startScreen[data-view="select"] #accountBox { padding: 4px 12px !important; margin: 4px auto !important; max-width: 760px; font-size: 13px; }
#startScreen[data-view="select"] .startbox { padding-top: 0 !important; }
#continueBox .herolist { height: clamp(260px, calc(100vh - 290px), 680px) !important; }
@media (max-height: 560px), (max-width: 760px) {
  #startScreen[data-view="select"] .startbox > h1 { font-size: 26px !important; }
  #startScreen[data-view="select"] #accountBox { font-size: 11px; padding: 2px 8px !important; }
  #continueBox .herolist { height: clamp(170px, calc(100vh - 170px), 440px) !important; }
}
/* ---- phones (2026-11-17): the skill bar along the very bottom (the skill set switch and both potions in it), the
   stick and the attack button beside it held sideways, above it held upright; everything on the screen ---- */
body.touch #barRow { position: fixed !important; left: 50% !important; right: auto !important; top: auto !important; bottom: calc(4px + env(safe-area-inset-bottom)) !important; transform: translateX(-50%) !important; display: flex !important; flex-direction: row !important; align-items: center !important; gap: 5px !important; width: auto !important; z-index: 6; pointer-events: auto; }
body.touch #bar { position: static !important; display: flex !important; flex-direction: row !important; align-items: center; gap: 4px !important; padding: 4px 5px !important; max-width: none !important; overflow: visible !important; background: rgba(12, 8, 6, .8) !important; border: 1px solid #6a4a1e !important; box-shadow: 0 0 0 1px #000, 0 4px 14px rgba(0, 0, 0, .6) !important; border-radius: 6px; }
body.touch #skillSlots { display: flex !important; gap: 4px !important; position: static !important; }
body.touch #skillSlots .slot, body.touch #bar .pot { position: static !important; inset: auto !important; width: var(--ts, 46px) !important; height: var(--ts, 46px) !important; border-radius: 6px !important; box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #6a4a1e !important; overflow: hidden; }
body.touch #skillSlots .slot .ic { width: calc(var(--ts, 46px) - 4px) !important; height: calc(var(--ts, 46px) - 4px) !important; border-radius: 4px !important; }
body.touch #potHp, body.touch #potMp { position: static !important; inset: auto !important; }
body.touch #bar .potimg { width: 70% !important; height: 70% !important; }
body.touch #btnBarSet { position: static !important; inset: auto !important; width: calc(var(--ts, 46px) + 6px) !important; height: calc(var(--ts, 46px) + 6px) !important; flex: none; }
body.touch #btnBarSet img { width: 60% !important; height: 60% !important; margin-top: -6px !important; }
body.touch #btnBarSet b { display: block !important; font-size: 9px; bottom: 3px; }
body.touch #btnBarSet small { display: none !important; }
/* held sideways: the stick at the left of the bar, the attack button at its right */
@media (max-height: 520px) {
  body.touch { --ts: 42px; }
  body.touch #joy { left: calc(10px + env(safe-area-inset-left)) !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; width: 104px !important; height: 104px !important; }
}
/* held upright: the bar the whole width at the bottom, the stick and the attack button above it */
@media (orientation: portrait) and (max-width: 760px) {
  body.touch { --ts: min(42px, calc((100vw - 96px) / 7)); }
  body.touch #joy { left: calc(14px + env(safe-area-inset-left)) !important; bottom: calc(70px + env(safe-area-inset-bottom)) !important; width: 112px !important; height: 112px !important; }
  body.touch #tActions { bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
  body.touch #autoBar { top: 196px !important; bottom: auto !important; right: calc(6px + env(safe-area-inset-right)) !important; }
  body.touch #autoBar .pot { width: 40px !important; height: 40px !important; }
}
/* (phones: no RMB mark, there is no right button; the potion counts small and inside their slot; the menu clear of the frame) */
body.touch #skillSlots .slot .rm { display: none !important; }
body.touch #bar .pot b { position: absolute !important; right: 2px !important; bottom: 1px !important; font-size: 11px !important; color: #fff; }
body.touch #bar .pot .pk { display: none !important; }
body.touch #barRow { max-width: calc(100vw - 8px); }
@media (orientation: portrait) and (max-width: 760px) {
  body.touch #playerFrame { transform: scale(.72) !important; transform-origin: top left; }
  body.touch #minimapWrap { transform: scale(.8); transform-origin: top right; }
}
@media (orientation: portrait) and (max-width: 760px) {
  body.touch #tMenu { top: calc(170px + env(safe-area-inset-top)) !important; right: calc(8px + env(safe-area-inset-right)) !important; }
  body.touch #autoBar { top: calc(224px + env(safe-area-inset-top)) !important; }
}
/* (auto hunt, auto fight and auto quest out of the bar: a small column on the right, under the minimap) */
body.touch #autoBar { position: fixed !important; right: calc(8px + env(safe-area-inset-right)) !important; left: auto !important; top: 104px !important; bottom: auto !important; display: flex !important; flex-direction: column !important; gap: 6px !important; width: auto !important; height: auto !important; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; z-index: 6; }
body.touch #autoBar .pot, body.touch #btnAuto, body.touch #btnFight, body.touch #btnAutoQuest { position: static !important; inset: auto !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; font-size: 18px; }
body.touch #autoBar .pot b, body.touch #autoBar .pot .pk { display: none !important; }
@media (max-height: 520px) { body.touch #tActions #tRide { top: auto !important; bottom: 168px !important; right: calc(8px + env(safe-area-inset-right)) !important; } }
@media (orientation: portrait) and (max-width: 760px) { body.touch #autoBar { top: calc(224px + env(safe-area-inset-top)) !important; } }
@media (max-height: 520px) { body.touch #tActions #tPick { right: calc(64px + env(safe-area-inset-right)) !important; bottom: 168px !important; } }
@media (max-height: 560px), (max-width: 760px) {
  #continueBox .hname { height: 46px !important; } #continueBox .hcard canvas { height: calc(100% - 46px) !important; }
  #startScreen[data-view="select"] #continueBox h3 { margin: 0 !important; }
}
/* ---- How to play (the guide) in the same look as on the website ---- */
#guidePanel { width: min(1060px, calc(100vw - 24px)) !important; top: 50px !important; max-height: calc(100vh - 100px) !important; padding: 0 !important; }
#guidePanel > header { padding: 10px 16px; }
#guidePanel .gd { grid-template-columns: 220px 1fr !important; gap: 0 !important; background: var(--panel, #120e10); box-shadow: inset 0 0 0 1px #4a2a22; }
#guidePanel nav { gap: 0 !important; background: rgba(0, 0, 0, .35); border-right: 1px solid #4a2a22; }
#guidePanel nav button { text-align: left; padding: 11px 16px !important; background: none !important; border: 0 !important; border-bottom: 1px solid #1e1412 !important; box-shadow: none !important; border-radius: 0 !important; color: #a89c88 !important; font: 600 17px 'Grenze', serif !important; }
#guidePanel nav button:hover { color: #ffd88a !important; background: rgba(168, 24, 42, .12) !important; }
#guidePanel nav button.on { color: #fff2d8 !important; background: linear-gradient(90deg, rgba(168, 24, 42, .45), transparent) !important; box-shadow: inset 3px 0 0 #e2b25a !important; }
#guidePanel article { padding: 18px 24px 24px; font: 17px/1.6 'Grenze', serif !important; color: #d8ccb8 !important; }
#guidePanel article b { color: #ffd88a; }
#guidePanel .gban { height: 170px !important; margin: 0 0 16px !important; padding: 12px 18px !important; }
#guidePanel .gban h4 { font-size: 34px !important; }
#guidePanel .gi { width: 56px !important; height: 56px !important; }
#guidePanel .gstep { width: 86px !important; } #guidePanel .gstep small { font-size: 14px !important; }
#guidePanel .gkeys { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
#guidePanel .gkeys div { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: rgba(0, 0, 0, .35); border: 1px solid #4a2a22; font-size: 15px; color: #a89c88; }
#guidePanel kbd, #guidePanel .gkeys kbd { min-width: 28px; padding: 2px 7px; text-align: center; font: 700 14px 'Grenze', serif; color: #fff2d8; background: linear-gradient(180deg, #5a1218, #2a080c); border: 1px solid #e2b25a; box-shadow: 0 2px 0 #000; }
@media (max-width: 760px), (max-height: 520px) { #guidePanel .gd { grid-template-columns: 1fr !important; } #guidePanel nav { flex-direction: row !important; overflow-x: auto; } #guidePanel nav button { white-space: nowrap; } #guidePanel .gban { height: 100px !important; } #guidePanel .gban h4 { font-size: 24px !important; } #guidePanel article { padding: 12px; font-size: 15px !important; } }
/* (a hero with a painting of its class and armour tier: the painting instead of the 3D render; it steps forward when chosen) */
#continueBox .hcard .hpic { display: none; }
#continueBox .hcard.painted canvas { display: none; }
#continueBox .hcard.painted .hpic { display: block; flex: 1 1 auto; width: 100%; min-height: 0; object-fit: contain; object-position: center bottom; -webkit-mask-image: radial-gradient(ellipse 60% 56% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 60% 56% at 50% 50%, #000 60%, transparent 100%); transition: transform .3s; }
#continueBox .hcard.painted.on .hpic { transform: scale(1.04); }
#continueBox .hcard.painted.act .hpic { animation: hstep .9s ease-out 1; }
@keyframes hstep { 0% { transform: scale(1); filter: brightness(1); } 25% { transform: scale(1.1) translateY(-8px); filter: brightness(1.5) drop-shadow(0 0 24px rgba(255, 200, 90, .9)); } 100% { transform: scale(1.04); filter: brightness(1); } }
/* ---- the select screen in the world (Hall in ui.js): the heroes on the plaza, plates under them ---- */
body.hallview #startScreen[data-view="select"] { background: radial-gradient(ellipse at 50% 55%, rgba(5, 4, 3, 0) 35%, rgba(5, 4, 3, .55) 80%, rgba(5, 4, 3, .85) 100%) !important; }
body.hallview #continueBox .herolist { position: fixed !important; inset: 0 !important; height: auto !important; display: block !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; pointer-events: none; }
body.hallview #continueBox .hcard { position: absolute !important; width: 120px !important; height: var(--fig, 140px) !important; transform: translate(-50%, calc(-1 * var(--fig, 140px) + 6px)) !important; padding: 0 !important; display: block !important; filter: none !important; pointer-events: auto; cursor: var(--cur-hand, pointer); animation: none !important; }
body.hallview #continueBox .hcard::before, body.hallview #continueBox .hcard canvas, body.hallview #continueBox .hcard .hpic { display: none !important; }
body.hallview #continueBox .hcard::after { content: '' !important; position: absolute !important; left: 50% !important; right: auto !important; bottom: -8px !important; width: 90px !important; height: 26px !important; transform: translateX(-50%); border-radius: 50%; background: none !important; box-shadow: none !important; animation: none !important; }
body.hallview #continueBox .hcard.on::after { box-shadow: 0 0 0 2px rgba(255, 216, 120, .8), 0 0 18px rgba(255, 190, 80, .6) !important; background: radial-gradient(closest-side, rgba(255, 200, 100, .35), rgba(255, 150, 60, 0)) !important; animation: selglow 2.4s ease-in-out infinite !important; }
body.hallview #continueBox .hname { position: absolute !important; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 12px; height: auto !important; white-space: nowrap; padding: 3px 12px 4px; background: rgba(10, 6, 4, .78); box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(184, 137, 58, .55); }
body.hallview #continueBox .hcard.on .hname { box-shadow: 0 0 0 1px #000, inset 0 0 0 1px #e2b25a, 0 0 14px rgba(255, 190, 80, .45); }
body.hallview #continueBox .hname b { font-size: 18px !important; }
body.hallview #continueBox .hname small { font-size: 12px !important; }
body.hallview #startScreen[data-view="select"] #continueBox h3 { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; font-size: 20px !important; }
@media (max-height: 560px), (max-width: 760px) {
  body.hallview #continueBox .hcard { width: 70px !important; }
  body.hallview #continueBox .hname { padding: 1px 6px 2px; margin-top: 6px; }
  body.hallview #continueBox .hname b { font-size: 12px !important; } body.hallview #continueBox .hname small { font-size: 9px !important; }
  body.hallview #startScreen[data-view="select"] #continueBox h3 { bottom: calc(52px + env(safe-area-inset-bottom)); font-size: 14px !important; }
}

/* ---------------- first steps (js/coach.js): one tip at a time, under the zone name ---------------- */
#coach { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100vw - 32px)); pointer-events: auto; z-index: 6;
  padding: 10px 16px 12px; text-align: center; background-color: #140e0a;
  background-image: linear-gradient(180deg, rgba(255, 220, 160, .07), rgba(0, 0, 0, .4)), url(../assets/ui/ui-panel.jpg); background-size: auto, 420px; border-radius: 4px;
  box-shadow: 0 0 0 2px #070403, 0 0 0 4px #a07a3a, 0 0 0 5px #e0b862, 0 0 0 7px #5a3e1a, 0 0 0 9px #070403, inset 0 0 24px rgba(0, 0, 0, .7), 0 14px 40px rgba(0, 0, 0, .8); }
#coach.in { animation: coachIn .35s ease-out; }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
#coach .cstep { display: block; color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
#coach b { display: block; font: 700 22px 'Grenze Gotisch', serif; color: var(--gold-hi); margin: 2px 0 4px; letter-spacing: .03em; }
#coach p { margin: 0 0 10px; font-size: 17px; line-height: 1.3; color: var(--ink); }
#coach .cbtns { display: flex; gap: 10px; justify-content: center; }
#coach .cbtns button { min-width: 110px; padding: 6px 14px; font-size: 16px; background: linear-gradient(180deg, #3a2412, #1a0e08); border: 1px solid #a07a3a; border-radius: 3px; color: #f2e2b8; }
#coach .cbtns button:hover { filter: brightness(1.3); }
#coach .cbtns [data-coff] { color: var(--muted); border-color: #5a3e1a; }
body.touch #coach { top: 64px; width: min(400px, calc(100vw - 32px)); padding: 6px 12px 8px; }
body.touch #coach .cstep { font-size: 10px; }
body.touch #coach b { font-size: 17px; margin: 0 0 2px; }
body.touch #coach p { font-size: 13px; margin-bottom: 6px; }
body.touch #coach .cbtns button { min-height: 36px; min-width: 96px; font-size: 14px; padding: 4px 10px; }
/* the stats: your class's main stat stands out, the cost line reads as help */
.stats .st.main span { color: var(--gold-hi); }
.pts small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
/* the start screen while the world is still being built: a line instead of the empty create form */
.startload { text-align: center; color: var(--gold); font-size: 20px; letter-spacing: .06em; text-shadow: 0 2px 6px #000; animation: startPulse 1.6s ease-in-out infinite; }
@keyframes startPulse { 50% { opacity: .45; } }
/* the Imelda Online logo (assets/ui/logo.webp) in place of the written title */
h1.logo { line-height: 0; text-shadow: none !important; margin: 0 auto; }
h1.logo img { display: block; width: min(460px, 78vw); height: auto; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .8)); }
.ld-box h1.logo img { width: min(380px, 70vw); }
body.touch .startbox h1.logo img { width: min(300px, 50vw); }

/* ================= the phone HUD, laid out once (2026-11-23) =================
   Everything below overrides the earlier touch rules: one place that says where each piece sits, so nothing lies over
   anything else. Landscape (the usual way to hold it):
     top left      the hero (portrait, HP, MP), the quests under it
     top middle    the place's name, the target under it, messages under that
     top right     menu button, minimap; under the minimap Auto Fight, ride and the Lure count
     bottom left   the joystick; the chat button above it (the chat shows over the game when it is on)
     bottom right  the attack button, the five skills in an arc round it, pick up beside it
     bottom middle the potions and the skill bar switch; the exp bar along the whole bottom edge */
body.touch { --sl: env(safe-area-inset-left); --sr: env(safe-area-inset-right); --sb: env(safe-area-inset-bottom); --st: env(safe-area-inset-top); }
html body.touch #fps#fps { display: none !important; }
/* the hero, top left; the quests under it, never over it */
body.touch #playerFrame { position: fixed !important; left: calc(6px + var(--sl)) !important; top: calc(4px + var(--st)) !important; transform: scale(.68) !important; transform-origin: top left !important; }
body.touch #buffBar { position: fixed !important; left: calc(8px + var(--sl)) !important; top: calc(52px + var(--st)) !important; transform: scale(.8); transform-origin: top left; }
body.touch #leftCol { position: fixed !important; left: calc(8px + var(--sl)) !important; top: calc(76px + var(--st)) !important; width: 178px !important; max-width: 178px !important; transform: none !important; zoom: 1; }
body.touch #leftCol #questTrack { display: block !important; width: 178px !important; font-size: 11.5px; }
body.touch #leftCol .qt:nth-child(n+3) { display: none; }
body.touch #leftCol #expFeed { width: 178px !important; }
/* messages: top middle, under the target, a few lines only */
body.touch #leftCol #log { position: fixed !important; top: calc(84px + var(--st)) !important; bottom: auto !important; left: 50% !important; transform: translateX(-50%) !important; width: min(380px, 46vw) !important; max-height: 4.2em !important; text-align: center; pointer-events: none; }
body.touch #zoneLabel { top: calc(4px + var(--st)) !important; }
body.touch #targetFrame { top: calc(40px + var(--st)) !important; left: 50% !important; transform: translateX(-50%) !important; }
/* top right: menu, minimap, and the column of round buttons under it */
body.touch #minimapWrap { position: fixed !important; right: calc(6px + var(--sr)) !important; top: calc(4px + var(--st)) !important; transform: scale(.62) !important; transform-origin: top right !important; }
body.touch #tMenu { position: fixed !important; right: calc(152px + var(--sr)) !important; top: calc(98px + var(--st)) !important; width: 40px !important; height: 40px !important; font-size: 20px !important; }
body.touch #autoBar { position: fixed !important; right: calc(8px + var(--sr)) !important; left: auto !important; top: calc(98px + var(--st)) !important; bottom: auto !important; flex-direction: row !important; gap: 8px !important; }
body.touch #tActions #tRide { position: fixed !important; top: calc(98px + var(--st)) !important; bottom: auto !important; right: calc(104px + var(--sr)) !important; width: 40px !important; height: 40px !important; font-size: 18px !important; }
body.touch #lure { position: fixed !important; right: calc(8px + var(--sr)) !important; top: calc(146px + var(--st)) !important; left: auto !important; width: 150px !important; transform: scale(.7) !important; transform-origin: top right !important; }
body.touch #aggro { top: calc(146px + var(--st)) !important; }
/* bottom left: the joystick, the chat button above it */
body.touch #joy { left: calc(12px + var(--sl)) !important; bottom: calc(14px + var(--sb)) !important; width: 112px !important; height: 112px !important; }
/* bottom right: attack, with the skills in an arc round it (from left round to straight up) */
body.touch #tActions #tAttack { position: fixed !important; right: calc(10px + var(--sr)) !important; bottom: calc(12px + var(--sb)) !important; width: 76px !important; height: 76px !important; }
body.touch #bar { position: static !important; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
body.touch #skillSlots .slot { position: fixed !important; inset: auto !important; width: 48px !important; height: 48px !important; border-radius: 50% !important; overflow: hidden !important; z-index: 6;
  box-shadow: 0 0 0 2px #040202, 0 0 0 3px #a07c3e, 0 2px 8px #000 !important; background: rgba(20, 15, 10, .85) !important; }
body.touch #skillSlots .slot .ic { width: 44px !important; height: 44px !important; border-radius: 50% !important; }
body.touch #skillSlots .slot:nth-child(1) { right: calc(159px + var(--sr)) !important; bottom: calc(26px + var(--sb)) !important; }
body.touch #skillSlots .slot:nth-child(2) { right: calc(149px + var(--sr)) !important; bottom: calc(78px + var(--sb)) !important; }
body.touch #skillSlots .slot:nth-child(3) { right: calc(120px + var(--sr)) !important; bottom: calc(122px + var(--sb)) !important; }
body.touch #skillSlots .slot:nth-child(4) { right: calc(76px + var(--sr)) !important; bottom: calc(151px + var(--sb)) !important; }
body.touch #skillSlots .slot:nth-child(5) { right: calc(24px + var(--sr)) !important; bottom: calc(161px + var(--sb)) !important; }
body.touch #skillSlots .slot:nth-child(n+6) { display: none !important; }
body.touch #skillSlots .slot .lk { font-size: 9px; bottom: 12px; }
body.touch #tActions #tPick { position: fixed !important; right: calc(214px + var(--sr)) !important; bottom: calc(14px + var(--sb)) !important; width: 44px !important; height: 44px !important; font-size: 20px !important; }
/* bottom middle: the two potions and the bar switch, above the exp bar */
/* (no transform here or on anything round the skills: a transform would catch their fixed places) */
body.touch #barRow { position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: calc(10px + var(--sb)) !important; transform: none !important; display: flex !important; flex-direction: row !important; justify-content: center !important; gap: 8px !important; align-items: center !important; pointer-events: none !important; }
body.touch #barRow > *, body.touch #potHp, body.touch #potMp { pointer-events: auto !important; }
body.touch #bottom, body.touch #center { transform: none !important; }
body.touch #potHp, body.touch #potMp { position: relative !important; inset: auto !important; width: 46px !important; height: 46px !important; border-radius: 50% !important; }
body.touch #btnBarSet { position: relative !important; inset: auto !important; }
body.touch #potHp b, body.touch #potMp b { position: absolute !important; right: 4px !important; bottom: 2px !important; }
body.touch #btnBarSet { width: 46px !important; height: 46px !important; }
body.touch #potHp { order: 1; } body.touch #btnBarSet { order: 2; } body.touch #potMp { order: 3; }
body.touch #bar { display: contents !important; }
/* the exp bar: the whole width, on the bottom edge, above everything */
body.touch #expbar { position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; width: auto !important; height: 6px !important; z-index: 30; border: none !important; box-shadow: none !important; margin: 0 !important; transform: none !important; }
body.touch #expText { display: none !important; }
body.touch #eggbar { bottom: 6px !important; }
/* the chat: a button (💬 with a little arrow) above the joystick shows or hides it over the game; tapping it writes */
#tChatToggle { display: none; }
body.touch #tChatToggle { display: flex; align-items: center; gap: 2px; position: fixed; left: calc(14px + var(--sl)); bottom: calc(136px + var(--sb)); height: 34px; padding: 0 9px; font-size: 16px; border-radius: 17px;
  background: rgba(20, 15, 10, .85); border: 2px solid var(--edge-hi); color: var(--gold-hi); pointer-events: auto; z-index: 6; }
body.touch #tChatToggle i { font-style: normal; font-size: 11px; transition: transform .2s; }
body.touch.chatshow #tChatToggle i { transform: rotate(180deg); }
html body.touch #chatLines#chatLines { display: none !important; }
html body.touch.chatshow #chatLines#chatLines { display: block !important; position: fixed !important; left: calc(12px + var(--sl)) !important; bottom: calc(176px + var(--sb)) !important; top: auto !important; right: auto !important;
  width: min(300px, 38vw) !important; max-height: 76px !important; border: none !important; border-image: none !important; box-shadow: none !important; overflow: hidden !important; font-size: 12px !important; line-height: 1.3 !important; padding: 4px 8px !important;
  background: rgba(8, 5, 3, .55) !important; border-radius: 6px; pointer-events: auto !important; z-index: 5; }
html body.touch.chatshow #chatLines#chatLines:empty::before { content: 'No messages yet. Tap here to write.'; color: var(--muted); font-style: italic; }
body.touch #chatBox { top: 30% !important; bottom: auto !important; }
/* the old row-bar rules no longer apply to the skill slots */
body.touch #skillSlots { display: block !important; position: static !important; }
/* held upright: the potions above the joystick, the arc as it is */
@media (orientation: portrait) {
  body.touch #barRow { left: calc(12px + var(--sl)) !important; right: auto !important; justify-content: flex-start !important; bottom: calc(140px + var(--sb)) !important; }
  body.touch #tChatToggle { bottom: calc(196px + var(--sb)); }
  html body.touch.chatshow #chatLines#chatLines { bottom: calc(236px + var(--sb)) !important; width: calc(100vw - 24px) !important; }
  body.touch #leftCol #log { top: calc(196px + var(--st)) !important; width: calc(100vw - 24px) !important; }
  /* (the place's name under the minimap, the target in the middle under the hero, the Lure count lower on the right) */
  body.touch #zoneLabel { top: calc(146px + var(--st)) !important; left: auto !important; right: calc(10px + var(--sr)) !important; transform: none !important; text-align: right; }
  body.touch #zoneLabel b { font-size: 15px !important; } body.touch #zoneLabel span { font-size: 11px !important; }
  body.touch #targetFrame { top: calc(146px + var(--st)) !important; left: calc(10px + var(--sl)) !important; transform: none !important; }
  body.touch #lure { top: calc(196px + var(--st)) !important; }
  body.touch #aggro { top: calc(240px + var(--st)) !important; }
}
/* the big map on a phone: the whole screen, a close button, the controls in a row over the map */
.mapclose { display: none; }
body.touch #mapPanel .mapbox { zoom: 1 !important; position: fixed; inset: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; padding: 6px 8px; border: none; box-sizing: border-box; overflow: hidden; }
body.touch #mapPanel h2 { font-size: 18px !important; margin: 2px 48px 6px; }
body.touch #mapPanel canvas { max-width: none; max-height: none; display: block; margin: 0 auto; }
body.touch #mapPanel p { display: none; }
body.touch #mapPanel .mapctl { position: absolute; left: 0; right: 0; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto; flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 6px; pointer-events: none; }
body.touch #mapPanel .mapctl button { pointer-events: auto; min-height: 40px; min-width: 44px; font-size: 15px; background: rgba(20, 14, 10, .9); }
body.touch .mapclose { display: block; position: absolute; top: calc(4px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 40px; height: 40px; font-size: 20px; background: rgba(20, 14, 10, .9); border: 2px solid var(--edge-hi); color: var(--gold-hi); }

/* the duel's big letters in the middle of the screen: the count down, FIGHT!, VICTORY / DEFEAT (js/wduel.js) */
#duelBanner { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 30; pointer-events: none; text-align: center; animation: duelPop .45s cubic-bezier(.2, 1.6, .4, 1); }
#duelBanner b { display: block; font: 700 76px/1 'Grenze Gotisch', serif; color: #ffd88a; letter-spacing: 3px; text-shadow: 0 0 18px rgba(255, 140, 40, .7), 0 3px 0 #3a1608, 0 0 3px #000; }
#duelBanner small { display: block; margin-top: 6px; font: 600 18px 'Crimson Pro', serif; color: #fff0dc; text-shadow: 0 2px 6px #000; }
#duelBanner.count b { font-size: 96px; }
#duelBanner.fight b { color: #ff7a3a; font-size: 88px; }
#duelBanner.win b { color: #ffe27a; text-shadow: 0 0 26px rgba(255, 210, 80, .9), 0 3px 0 #3a2608, 0 0 3px #000; }
#duelBanner.loss b { color: #c8c0b8; text-shadow: 0 0 18px rgba(120, 20, 10, .9), 0 3px 0 #1a0804, 0 0 3px #000; }
#duelBanner[hidden] { display: none; }
@keyframes duelPop { from { opacity: 0; transform: translate(-50%, -50%) scale(1.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (max-width: 700px) { #duelHud { top: calc(150px + env(safe-area-inset-top)); padding: 4px 12px 5px; max-width: calc(100vw - 32px); } #duelHud b { font-size: 15px; } #duelHud span { font-size: 14px; } #duelHud small { display: none; } #duelBanner b { font-size: 54px; } #duelBanner.count b { font-size: 70px; } #duelBanner.fight b { font-size: 62px; } #duelBanner small { font-size: 15px; } }

/* waiting in an arena queue (js/duel.js queueBar) */
#queueHud { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; background: rgba(20, 8, 6, .88); border: 1px solid #c8a040; border-radius: 6px; box-shadow: 0 0 18px rgba(255, 190, 80, .3); white-space: nowrap; }
#queueHud b { font: 700 17px 'Grenze Gotisch', serif; color: #ffd88a; }
#queueHud small { color: #e8d0b0; font-size: 14px; }
#queueHud button { padding: 4px 12px; font: 600 14px 'Crimson Pro', serif; color: #ffd8b0; background: #3a1a10; border: 1px solid #b8603a; border-radius: 4px; cursor: pointer; }
#queueHud .qdot { width: 10px; height: 10px; border-radius: 50%; background: #ffb040; box-shadow: 0 0 8px #ffb040; animation: qPulse 1.2s ease-in-out infinite; }
#queueHud[hidden] { display: none; }
@keyframes qPulse { 50% { opacity: .25; transform: scale(.7); } }
@media (max-width: 700px) { #queueHud { flex-wrap: wrap; justify-content: center; gap: 4px 8px; max-width: calc(100vw - 32px); white-space: normal; text-align: center; top: calc(150px + env(safe-area-inset-top)); } #queueHud b { font-size: 15px; } #queueHud small { font-size: 12px; } }

/* ================= the phone HUD, second round (2026-11-24, the user's playtest list) =================
   Held upright (the usual way):
     top left      the hero; the target, small, under it; the quests under that; messages under those
     top right     the minimap; under it ☰ (a drop-down: armory, how to play, war, ranks, options) and the windows used
                   most in two columns (hero, skills, bag, pets, mounts, wings, quests, map, party, friends, guild,
                   arena, store); the place's name and the Lure count under them
     right         above the skills: Auto attack and ride
     bottom right  fight, the five skills in an arc round it, the single/area switch beside it, sit
     bottom left   the joystick; the potions above it; the exp bars (the pet's over the hero's) above those; chat
   On its side the same, but the windows used most in two rows at the top in the middle. */
html body.touch #targetFrame { top: calc(84px + var(--st)) !important; left: calc(8px + var(--sl)) !important; right: auto !important; transform: scale(.55) !important; transform-origin: top left !important; }
html body.touch #leftCol { top: calc(152px + var(--st)) !important; }
/* the ☰ and the quick windows */
html body.touch #tMenu { position: fixed !important; top: calc(104px + var(--st)) !important; right: calc(52px + var(--sr)) !important; left: auto !important; width: 40px !important; height: 40px !important; font-size: 20px !important; z-index: 8; }
#tQuick, #tMenuDrop { display: none; }
body.touch #tQuick { display: grid; grid-template-columns: repeat(2, 40px); grid-auto-rows: 40px; gap: 4px; position: fixed; top: calc(104px + var(--st)); right: calc(8px + var(--sr)); z-index: 7; pointer-events: auto; }
body.touch #tQuick button:first-child { grid-column: 2; }
body.touch #tQuick button { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; width: 40px; height: 40px; font: 600 8.5px/1 'Crimson Pro', serif; color: #ecd9b0; letter-spacing: 0;
  background: rgba(20, 15, 10, .84); border: 1px solid #8a6a34; border-radius: 8px; box-shadow: 0 1px 5px #000; touch-action: manipulation; }
body.touch #tQuick button i { font-style: normal; font-size: 17px; line-height: 1.05; margin-bottom: 1px; }
body.touch #tQuick button.store { border-color: #4ac0a8; color: #b8f0e0; }
body.touch #tMenuDrop:not([hidden]) { display: flex; flex-direction: column; gap: 4px; position: fixed; top: calc(104px + var(--st)); right: calc(100px + var(--sr)); z-index: 40; padding: 8px; min-width: 150px;
  background: rgba(14, 10, 7, .97); border: 2px solid var(--edge-hi); border-radius: 8px; box-shadow: 0 6px 20px #000; pointer-events: auto; }
body.touch #tMenuDrop button { padding: 10px 12px; font: 600 16px 'Crimson Pro', serif; text-align: left; color: #f0e0c0; background: rgba(40, 28, 18, .9); border: 1px solid #6a4c26; border-radius: 6px; }
html body.touch.menuopen #menuBtns { display: none !important; }
/* the place's name and the Lure count under the quick windows */
html body.touch #zoneLabel { top: calc(416px + var(--st)) !important; right: calc(10px + var(--sr)) !important; left: auto !important; transform: none !important; text-align: right; }
html body.touch #lure { top: calc(462px + var(--st)) !important; }
html body.touch #aggro { top: calc(510px + var(--st)) !important; }
/* messages under the quests, clear of the column on the right */
html body.touch #leftCol #log { top: calc(232px + var(--st)) !important; left: calc(8px + var(--sl)) !important; right: auto !important; transform: none !important; width: calc(100vw - 112px) !important; text-align: left; }
/* above the skills: Auto attack and ride */
html body.touch #autoBar { top: auto !important; bottom: calc(224px + var(--sb)) !important; right: calc(62px + var(--sr)) !important; }
html body.touch #autoBar #btnFight { width: auto !important; height: 40px !important; padding: 0 12px 0 8px !important; border-radius: 20px !important; display: flex !important; flex-direction: row !important; align-items: center; gap: 4px; font-size: 18px !important; }
html body.touch #autoBar #btnFight b { position: static !important; font-size: 13px !important; white-space: nowrap; display: inline !important; }
html body.touch #tActions #tRide { top: auto !important; bottom: calc(222px + var(--sb)) !important; right: calc(10px + var(--sr)) !important; width: 44px !important; height: 44px !important; }
/* bottom right: sit where pick up was, the single/area switch beside fight */
html body.touch #tActions #tSit { display: block !important; position: fixed !important; top: auto !important; left: auto !important; right: calc(214px + var(--sr)) !important; bottom: calc(14px + var(--sb)) !important; width: 44px !important; height: 44px !important; font-size: 20px !important; }
html body.touch #btnBarSet { position: fixed !important; right: calc(92px + var(--sr)) !important; bottom: calc(16px + var(--sb)) !important; left: auto !important; top: auto !important; width: 46px !important; height: 46px !important; z-index: 6; }
html body.touch #tActions #tChat { display: none !important; }
/* the potions: the count on one line, the cooldown inside the round button */
html body.touch #potHp b, html body.touch #potMp b { white-space: nowrap !important; right: 2px !important; bottom: 1px !important; font-size: 12px !important; line-height: 1 !important; width: auto !important; }
body.touch .pot.cooling::after { border-radius: inherit; }
html body.touch #bar #potHp, html body.touch #bar #potMp { position: relative !important; overflow: hidden !important; }
/* the exp bars above the potions: the hero's, the pet's over it, each with what you have and what is still needed */
html body.touch #expbar { left: calc(12px + var(--sl)) !important; right: auto !important; bottom: calc(194px + var(--sb)) !important; width: min(210px, 54vw) !important; height: 15px !important; border-radius: 3px; background: rgba(10, 6, 4, .8) !important; box-shadow: 0 0 0 1px #6a4c26 !important; z-index: 6; }
html body.touch #expText { display: block !important; position: absolute; inset: 0; font: 600 10px/15px 'Crimson Pro', serif !important; color: #fff2d8; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 0 4px; }
html body.touch #eggbar { position: fixed !important; left: calc(12px + var(--sl)) !important; right: auto !important; top: auto !important; bottom: calc(213px + var(--sb)) !important; width: min(210px, 54vw) !important; height: 15px !important; transform: none !important; margin: 0 !important; z-index: 6; }
html body.touch #eggText { font: 600 10px/15px 'Crimson Pro', serif !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.touch #tChatToggle { bottom: calc(238px + var(--sb)) !important; }
html body.touch.chatshow #chatLines#chatLines { bottom: calc(278px + var(--sb)) !important; width: calc(100vw - 112px) !important; }
/* on its side: the quick windows in two rows at the top in the middle, the exp bars and potions in the middle below */
@media (orientation: landscape) {
  body.touch #tQuick { grid-template-columns: repeat(7, 40px); grid-auto-rows: 40px; top: calc(4px + var(--st)); right: auto; left: 50%; transform: translateX(-50%); }
  html body.touch #tMenu { top: calc(4px + var(--st)) !important; right: auto !important; left: calc(50% - 152px) !important; }
  body.touch #tMenuDrop:not([hidden]) { top: calc(50px + var(--st)); right: auto; left: calc(50% - 152px); }
  html body.touch #zoneLabel { top: calc(96px + var(--st)) !important; left: 50% !important; right: auto !important; transform: translateX(-50%) !important; text-align: center; }
  html body.touch #leftCol #log { top: calc(130px + var(--st)) !important; left: 50% !important; transform: translateX(-50%) !important; width: min(380px, 46vw) !important; text-align: center; }
  html body.touch #lure { top: calc(110px + var(--st)) !important; }
  html body.touch #aggro { top: calc(150px + var(--st)) !important; }
  html body.touch #barRow { left: 0 !important; right: 0 !important; justify-content: center !important; bottom: calc(10px + var(--sb)) !important; }
  html body.touch #expbar, html body.touch #eggbar { left: 50% !important; transform: translateX(-50%) !important; width: min(300px, 36vw) !important; }
  html body.touch #expbar { bottom: calc(64px + var(--sb)) !important; }
  html body.touch #eggbar { bottom: calc(83px + var(--sb)) !important; }
  body.touch #tChatToggle { bottom: calc(136px + var(--sb)) !important; }
  html body.touch.chatshow #chatLines#chatLines { bottom: calc(176px + var(--sb)) !important; width: min(300px, 38vw) !important; }
}
/* the start screens, the same on a phone and a computer (2026-11-24): in the hero select and the create screen the logo small at the top left,
   the account (signed in as … · Sign out) small at the top right, nothing over the heroes */
#classDesc { display: none; }
#startScreen[data-view="select"] .tag, #startScreen[data-view="create"] .tag { display: none; }
#startScreen[data-view="select"] h1.logo, #startScreen[data-view="create"] h1.logo { position: fixed; top: calc(6px + env(safe-area-inset-top)); left: calc(8px + env(safe-area-inset-left)); margin: 0; z-index: 3; }
#startScreen[data-view="select"] h1.logo img, #startScreen[data-view="create"] h1.logo img { width: 128px !important; }
#startScreen[data-view="select"] #accountBox, #startScreen[data-view="create"] #accountBox { position: fixed; top: calc(6px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); left: auto; margin: 0 !important; max-width: min(56vw, 420px) !important; padding: 4px 8px !important; font-size: 12px !important; z-index: 3; text-align: right; }
#startScreen #accountBox .acc.on small { display: none; }
#startScreen #accountBox .acc.on { display: flex; align-items: center; gap: 8px; }
#startScreen #accountBox .acc.on button { padding: 4px 10px; font-size: 12px; }
/* the create screen: the five classes in a row, small, in the Sun King set; the chosen one's words under them */
#startScreen[data-view="create"] #createBox { margin-top: 74px; }
#startScreen[data-view="create"] #createBox h3 { margin: 0 0 6px; font-size: 18px; }
#startScreen #classPick { flex-wrap: nowrap !important; gap: 5px !important; justify-content: center; overflow: visible !important; }
#startScreen #classPick .ccard { width: calc((min(100vw, 640px) - 40px) / 5) !important; min-width: 0; margin: 0 !important; padding: 4px 2px 6px !important; flex: 0 0 auto; }
#startScreen #classPick .ccard canvas { width: 100% !important; height: auto !important; aspect-ratio: 180 / 250; margin: 0 auto 2px; }
#startScreen #classPick .ccard b { font-size: 13px !important; white-space: nowrap; }
#startScreen #classPick .ccard p, #startScreen #classPick .ccard .cskills { display: none !important; }
#startScreen #classDesc { display: block; max-width: 560px; margin: 8px auto 4px; padding: 8px 12px; text-align: center; background: rgba(10, 7, 5, .78); border: 1px solid #5a4424; border-radius: 6px; }
#startScreen #classDesc b { font: 700 18px 'Grenze Gotisch', serif; color: #f2e2b8; }
#startScreen #classDesc p { margin: 2px 0 6px; font-size: 14px; line-height: 1.35; color: #d8c8a8; }
#startScreen #classDesc .cskills img { width: 30px; height: 30px; margin: 0 2px; }
#startScreen[data-view="create"] .create { margin-top: 6px; }
@media (orientation: landscape) {
  #startScreen[data-view="create"] #createBox { margin-top: 30px; }
  #startScreen #classPick .ccard { width: min(110px, 13vw) !important; }
  #startScreen #classPick .ccard canvas { height: 24vh !important; width: auto !important; }
  #startScreen #classPick .ccard { width: auto !important; min-width: 84px; padding: 2px 8px 4px !important; }
  #startScreen[data-view="create"] #createBox h3 { font-size: 15px; margin: 0 0 2px; }
  #startScreen[data-view="create"] .create { margin-top: 2px; } #startScreen[data-view="create"] .create input, #startScreen[data-view="create"] .create button { padding-top: 6px !important; padding-bottom: 6px !important; }
  #startScreen #classDesc { margin: 4px auto 2px; padding: 4px 10px; } #startScreen #classDesc p { font-size: 12.5px; margin: 0 0 3px; } #startScreen #classDesc .cskills img { width: 24px; height: 24px; }
}
/* Sign out: readable everywhere (on a phone it showed white on white); Create account as its own link */
#accountBox button[data-signout] { -webkit-appearance: none; appearance: none; background: #2a1a10 !important; border: 1px solid #b8903a !important; color: #ffd88a !important; border-radius: 5px; padding: 6px 12px; font: 600 14px 'Crimson Pro', Georgia, serif; cursor: pointer; text-shadow: none; }
#accountBox .forgot.make { margin-left: 12px; color: #9ae0c0; }
/* ================= the phone HUD, third round (2026-11-24, the second list) =================
   A bar along the very top: where you are (in a Rift: the Rift and its floor, instead of the place name and the Rift
   box both); everything else moves down under it (--st grows by the bar). Auto attack beside fight, like the
   single/area switch; ride above sit; the kill counter (Lure) on the left; the quick windows can be folded away. */
body.touch { --st: calc(env(safe-area-inset-top) + 22px); }
html body.touch #zoneLabel { position: fixed !important; top: env(safe-area-inset-top) !important; left: 0 !important; right: 0 !important; transform: none !important; height: 22px; display: flex !important; align-items: center; justify-content: center; gap: 8px;
  padding: 0 10px; background: linear-gradient(180deg, rgba(8, 5, 3, .92), rgba(8, 5, 3, .7)); border-bottom: 1px solid rgba(200, 160, 64, .35); text-align: center; white-space: nowrap; overflow: hidden; z-index: 9; pointer-events: none; }
html body.touch #zoneLabel b { font-size: 14px !important; line-height: 22px; }
html body.touch #zoneLabel span { font-size: 11px !important; line-height: 22px; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; opacity: .85; }
/* in a Rift the Rift box is the bar (its floor, the riftborn left), the place name goes */
html body.touch.inrift #zoneLabel { display: none !important; }
html body.touch #riftHud:not([hidden]) { position: fixed !important; top: env(safe-area-inset-top) !important; left: 0 !important; right: 0 !important; transform: none !important; height: 22px; display: flex !important; align-items: center; justify-content: center; gap: 10px; margin: 0 !important;
  padding: 0 10px !important; background: linear-gradient(180deg, rgba(8, 5, 3, .92), rgba(8, 5, 3, .7)) !important; border: none !important; border-bottom: 1px solid rgba(200, 160, 64, .35) !important; box-shadow: none !important; white-space: nowrap; z-index: 9; font-size: 12px; }
html body.touch #riftHud b { font-size: 14px; } html body.touch #riftHud span, html body.touch #riftHud small { font-size: 12px; }
/* Auto attack beside fight (round, its name in it), ride above sit */
html body.touch #autoBar { top: auto !important; left: auto !important; right: calc(92px + var(--sr)) !important; bottom: calc(68px + var(--sb)) !important; }
html body.touch #autoBar #btnFight { width: 50px !important; height: 50px !important; padding: 0 !important; border-radius: 50% !important; flex-direction: column !important; justify-content: center; gap: 0; font-size: 16px !important; }
html body.touch #autoBar #btnFight b { font-size: 8.5px !important; line-height: 1.05; white-space: normal; text-align: center; width: 40px; }
html body.touch #tActions #tRide { right: calc(214px + var(--sr)) !important; bottom: calc(66px + var(--sb)) !important; }
/* the kill counter (Lure) on the left, under the messages */
html body.touch #lure { top: calc(300px + var(--st)) !important; left: calc(4px + var(--sl)) !important; right: auto !important; transform: scale(.66) !important; transform-origin: top left !important; }
/* fold the quick windows away */
#tQuickToggle { display: none; }
body.touch #tQuickToggle { display: block; position: fixed; top: calc(412px + var(--st)); right: calc(8px + var(--sr)); width: 84px; height: 22px; padding: 0; font-size: 13px; line-height: 20px; color: #ecd9b0; background: rgba(20, 15, 10, .8); border: 1px solid #8a6a34; border-radius: 0 0 8px 8px; z-index: 7; pointer-events: auto; }
body.touch.quickhide #tQuick { display: none !important; }
body.touch.quickhide #tQuickToggle { top: calc(148px + var(--st)); width: 40px; right: calc(52px + var(--sr)); border-radius: 0 0 8px 8px; }
@media (orientation: landscape) {
  html body.touch #lure { top: calc(100px + var(--st)) !important; left: 50% !important; transform: translateX(-50%) scale(.66) !important; transform-origin: top center !important; }
  body.touch #tQuickToggle { top: calc(4px + var(--st)); right: auto; left: calc(50% - 198px); width: 40px; height: 40px; border-radius: 8px; font-size: 16px; }
  body.touch.quickhide #tQuickToggle { top: calc(4px + var(--st)); left: calc(50% - 198px); right: auto; width: 40px; }
}
/* skills on a phone: drag a skill from the Skills window onto a round slot (the window fades and lets the slots through
   while you drag; its own scrolling does not take the finger); no keys and no RMB on a phone */
body.touch #skillPanel .skic.drag { touch-action: none; }
body.touch.dragskill #skillPanel { opacity: .12 !important; pointer-events: none !important; }
body.touch.dragskill #skillSlots .slot { box-shadow: 0 0 0 2px #040202, 0 0 0 4px #ffd84a, 0 0 14px #ffd84a !important; }
body.touch #skillPanel .rmbb, body.touch #skillPanel .inbar, body.touch #skillSlots .slot .rm { display: none !important; }
/* merchants (2026-11-24): their sections as tabs, one at a time; how many to buy or sell in a small window */
.shoptabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 4px; }
.shoptabs button { padding: 6px 10px; font: 600 14px 'Crimson Pro', serif; color: #d8c8a8; background: rgba(30, 20, 12, .85); border: 1px solid #5a4424; border-radius: 6px 6px 0 0; }
.shoptabs button.on { color: #ffe0a0; background: rgba(70, 44, 20, .95); border-color: #c8a040; }
.shop.tabbed { border-top: 1px solid #c8a040; padding-top: 4px; }
#qtyAsk { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; min-width: 260px; max-width: calc(100vw - 32px); padding: 10px 14px 12px; }
#qtyAsk .qrow { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 8px 0; }
#qtyAsk .qrow input { width: 90px; font-size: 20px; text-align: center; padding: 6px; }
#qtyAsk .qrow button { width: 40px; height: 40px; font-size: 20px; }
#qtyAsk .qquick { display: flex; gap: 6px; justify-content: center; }
#qtyAsk .qquick button { padding: 6px 10px; }
#qtyAsk .qtotal { text-align: center; color: #ffd88a; margin: 8px 0; }
#qtyAsk .row { display: flex; gap: 8px; justify-content: center; }
#qtyAsk[hidden] { display: none; }
/* ================= the phone HUD, fourth round (2026-11-24, the third list) =================
   ☰ and the fold button side by side above the quick windows; the potions by the fight button (no longer above the
   stick); the exp bars right above the stick, the messages between them and the chat; the kill counter under the
   target's portrait, and under it what you killed and the exp it gave (then the quests). */
body.touch #tQuick button:first-child { grid-column: auto !important; }
body.touch #tQuick::before { content: ''; grid-column: 1 / -1; height: 40px; }
html body.touch #tMenu { right: calc(52px + var(--sr)) !important; top: calc(104px + var(--st)) !important; }
body.touch #tQuickToggle, body.touch.quickhide #tQuickToggle { top: calc(104px + var(--st)) !important; right: calc(8px + var(--sr)) !important; left: auto !important; width: 40px !important; height: 40px !important; border-radius: 8px !important; font-size: 16px !important; }
/* the potions by the fight button: HP above it, MP beside that */
html body.touch #bar #potHp, html body.touch #bar #potMp { position: fixed !important; width: 40px !important; height: 40px !important; z-index: 6; }
html body.touch #bar #potHp { right: calc(12px + var(--sr)) !important; bottom: calc(96px + var(--sb)) !important; }
html body.touch #bar #potMp { right: calc(52px + var(--sr)) !important; bottom: calc(108px + var(--sb)) !important; }
html body.touch #autoBar { right: calc(94px + var(--sr)) !important; }
html body.touch #barRow { pointer-events: none !important; }
/* the exp bars right above the stick, the pet's over the hero's */
html body.touch #expbar { bottom: calc(140px + var(--sb)) !important; left: calc(12px + var(--sl)) !important; transform: none !important; width: min(200px, 52vw) !important; }
html body.touch #eggbar { bottom: calc(159px + var(--sb)) !important; left: calc(12px + var(--sl)) !important; transform: none !important; width: min(200px, 52vw) !important; }
/* the messages (Auto attack on, found …) between the exp bars and the chat */
html body.touch #leftCol #log { position: fixed !important; top: auto !important; bottom: calc(180px + var(--sb)) !important; left: calc(12px + var(--sl)) !important; right: auto !important; transform: none !important; width: min(220px, 56vw) !important; max-height: 5.4em !important; text-align: left !important; overflow: hidden; }
html body.touch #leftCol #log .line { font-size: 12px !important; line-height: 1.3 !important; }
body.touch #tChatToggle { bottom: calc(256px + var(--sb)) !important; }
html body.touch.chatshow #chatLines#chatLines { bottom: calc(296px + var(--sb)) !important; }
/* the kill counter under the target's portrait; what you killed and its exp under it, then the quests */
html body.touch #lure { top: calc(160px + var(--st)) !important; left: calc(4px + var(--sl)) !important; right: auto !important; transform: scale(.6) !important; transform-origin: top left !important; }
html body.touch #leftCol { top: calc(196px + var(--st)) !important; display: flex !important; flex-direction: column; }
html body.touch #leftCol #expFeed { order: -1; }
@media (orientation: landscape) {
  body.touch #tQuick { grid-template-columns: repeat(8, 40px) !important; }
  body.touch #tQuick::before { grid-column: span 2; }
  html body.touch #tMenu { top: calc(4px + var(--st)) !important; right: auto !important; left: calc(50% - 174px) !important; }
  body.touch #tQuickToggle, body.touch.quickhide #tQuickToggle { top: calc(4px + var(--st)) !important; right: auto !important; left: calc(50% - 130px) !important; }
  html body.touch #expbar { left: 50% !important; transform: translateX(-50%) !important; bottom: calc(10px + var(--sb)) !important; width: min(300px, 36vw) !important; }
  html body.touch #eggbar { left: 50% !important; transform: translateX(-50%) !important; bottom: calc(29px + var(--sb)) !important; width: min(300px, 36vw) !important; }
  html body.touch #leftCol #log { left: 50% !important; transform: translateX(-50%) !important; bottom: calc(52px + var(--sb)) !important; width: min(360px, 42vw) !important; text-align: center !important; }
  body.touch #tChatToggle { bottom: calc(136px + var(--sb)) !important; }
  html body.touch.chatshow #chatLines#chatLines { bottom: calc(176px + var(--sb)) !important; }
  html body.touch #lure { top: calc(120px + var(--st)) !important; }
  html body.touch #leftCol { top: calc(150px + var(--st)) !important; }
}
/* the gold ring under the chosen hero grows with the figure (on a phone they stand closer, so bigger) */
body.hallview #continueBox .hcard::after { width: calc(var(--fig, 140px) * .62) !important; height: calc(var(--fig, 140px) * .17) !important; bottom: calc(var(--fig, 140px) * -.06) !important; }
/* the hero select: no ring under the chosen hero (2026-11-24); its name plate stands out instead */
body.hallview #continueBox .hcard.on::after { display: none !important; }
body.hallview #continueBox .hcard.on .hname { background: linear-gradient(180deg, rgba(120, 76, 24, .95), rgba(60, 34, 12, .95)) !important; box-shadow: 0 0 0 1px #000, inset 0 0 0 2px #ffd060, 0 0 18px rgba(255, 200, 80, .75) !important; transform: translateX(-50%) scale(1.12); color: #fff3d0; }
body.hallview #continueBox .hcard:not(.on) .hname { opacity: .8; }
/* ================= the computer's HUD: the same menu as on a phone (2026-11-24) =================
   The windows used most in two rows at the top in the middle, ☰ (armory, how to play, war, ranks, settings, back to
   your heroes) and the fold button beside them; the old menu bar at the bottom goes. The place's name and the target
   under them. */
body:not(.touch) #menuBtns { display: none !important; }
body:not(.touch) #tQuick { display: grid; grid-template-columns: repeat(8, 44px); grid-auto-rows: 44px; gap: 4px; position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 7; pointer-events: auto; }
body:not(.touch) #tQuick::before { content: ''; grid-column: span 2; }
body:not(.touch) #tQuick button { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; width: 44px; height: 44px; font: 600 9.5px/1 'Crimson Pro', serif; color: #ecd9b0;
  background: rgba(20, 15, 10, .86); border: 1px solid #8a6a34; border-radius: 8px; box-shadow: 0 1px 5px #000; cursor: pointer; }
body:not(.touch) #tQuick button:hover { border-color: #ffd060; color: #fff0c8; }
body:not(.touch) #tQuick button i { font-style: normal; font-size: 19px; line-height: 1.05; margin-bottom: 2px; }
body:not(.touch) #tQuick button.store { border-color: #4ac0a8; color: #b8f0e0; }
body:not(.touch) #tMenu { display: block; position: fixed; top: 6px; left: calc(50% - 190px); width: 44px; height: 44px; font-size: 22px; z-index: 8; background: rgba(20, 15, 10, .9); border: 2px solid var(--edge-hi); color: var(--gold-hi); cursor: pointer; pointer-events: auto; }
body:not(.touch) #tQuickToggle { display: block; position: fixed; top: 6px; left: calc(50% - 142px); width: 44px; height: 44px; font-size: 16px; z-index: 8; color: #ecd9b0; background: rgba(20, 15, 10, .8); border: 1px solid #8a6a34; border-radius: 8px; cursor: pointer; pointer-events: auto; }
body:not(.touch).quickhide #tQuick { display: none !important; }
body:not(.touch) #tMenuDrop:not([hidden]) { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 56px; left: calc(50% - 190px); z-index: 40; padding: 8px; min-width: 200px;
  background: rgba(14, 10, 7, .97); border: 2px solid var(--edge-hi); border-radius: 8px; box-shadow: 0 6px 20px #000; pointer-events: auto; }
body:not(.touch) #tMenuDrop button { padding: 9px 12px; font: 600 16px 'Crimson Pro', serif; text-align: left; color: #f0e0c0; background: rgba(40, 28, 18, .9); border: 1px solid #6a4c26; border-radius: 6px; cursor: pointer; }
body:not(.touch) #tMenuDrop button:hover { border-color: #ffd060; }
body:not(.touch) #zoneLabel { top: 104px !important; }
body:not(.touch) #targetFrame { top: 150px !important; }
body:not(.touch).quickhide #zoneLabel { top: 56px !important; } body:not(.touch).quickhide #targetFrame { top: 102px !important; }
/* the kill counter and, under it, what you killed (2026-11-24: they lay over each other) */
html body.touch #leftCol { top: calc(232px + var(--st)) !important; }
@media (orientation: landscape) { html body.touch #leftCol { top: calc(186px + var(--st)) !important; } }
/* the gear merchants laid out like a bag (2026-11-24): a tab per class, every tier a row of pictures with the price under
   each, the chosen one shown under the grid with Buy */
.clstabs button { font-size: 13px; padding: 5px 8px; }
.gridshop { display: flex; flex-direction: column; gap: 6px; }
.gtier > b { display: block; font: 700 14px 'Grenze Gotisch', serif; margin: 2px 0 3px; }
.gtier.locked > b { opacity: .55; }
.gcells { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; }
.gcell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 0 2px; min-height: 58px; background: rgba(16, 11, 7, .85); border: 1px solid #4a3620; border-radius: 6px; cursor: pointer; }
.gcell img { width: 38px; height: 38px; object-fit: contain; }
.gcell small { font: 600 11px 'Crimson Pro', serif; line-height: 1.1; }
.gcell .th { position: absolute; top: 1px; right: 3px; font: 700 9px sans-serif; font-style: normal; color: #ffb060; }
.gcell.own { border-color: #6ad08a; }
.gcell.sel { border-color: #ffd060; box-shadow: 0 0 0 1px #ffd060, 0 0 10px rgba(255, 200, 80, .5); }
.gtier.locked .gcell img { filter: grayscale(.6) brightness(.7); }
.gdetail { margin-top: 8px; padding: 8px; background: rgba(10, 7, 5, .8); border: 1px solid #5a4424; border-radius: 6px; }
.gdetail .gdtip { font-size: 14px; }
.gdetail button.big { width: 100%; margin-top: 6px; }
/* merchants: never sideways scrolling, only up and down */
#npcPanel, #npcPanel .shop, #npcPanel .gridshop, #invPanel { overflow-x: hidden !important; }
#npcPanel .ware { min-width: 0; flex-wrap: wrap; }
#npcPanel .ware > span { min-width: 0; flex: 1 1 140px; }
/* on a phone the merchant and your bag one above the other (they lay over each other); side by side on its side */
@media (orientation: portrait) {
  body.touch.npcshop #npcPanel:not([hidden]) { position: fixed !important; top: calc(var(--st) + 2px) !important; left: 4px !important; right: 4px !important; bottom: auto !important; width: auto !important; max-width: none !important; height: 54vh !important; max-height: none !important; transform: none !important; zoom: 1 !important; overflow-y: auto !important; z-index: 21; }
  body.touch.npcshop #invPanel:not([hidden]) { position: fixed !important; top: calc(54vh + var(--st) + 6px) !important; left: 4px !important; right: 4px !important; bottom: calc(4px + var(--sb)) !important; width: auto !important; max-width: none !important; height: auto !important; max-height: none !important; transform: none !important; zoom: 1 !important; overflow-y: auto !important; z-index: 21; }
}
@media (orientation: landscape) {
  body.touch.npcshop #npcPanel:not([hidden]) { position: fixed !important; top: calc(var(--st) + 2px) !important; left: calc(4px + var(--sl)) !important; right: auto !important; bottom: calc(4px + var(--sb)) !important; width: calc(50vw - 8px) !important; max-width: none !important; height: auto !important; max-height: none !important; transform: none !important; zoom: 1 !important; overflow-y: auto !important; z-index: 21; }
  body.touch.npcshop #invPanel:not([hidden]) { position: fixed !important; top: calc(var(--st) + 2px) !important; right: calc(4px + var(--sr)) !important; left: auto !important; bottom: calc(4px + var(--sb)) !important; width: calc(50vw - 8px) !important; max-width: none !important; height: auto !important; max-height: none !important; transform: none !important; zoom: 1 !important; overflow-y: auto !important; z-index: 21; }
}
/* (your own shop opens from the ☰ menu on a phone; its button in the bag goes) */
body.touch #invPanel [data-openshop] { display: none !important; }
/* a tooltip held up on a phone: in the middle, until a tap beside it */
#tooltip.sticky { position: fixed !important; left: 50% !important; top: 45% !important; transform: translate(-50%, -50%) !important; max-width: min(92vw, 420px) !important; max-height: 80vh; overflow-y: auto; z-index: 90 !important; pointer-events: auto !important; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35), 0 8px 30px #000 !important; }
/* ☰ says Menu, the fold button Hero (2026-11-24); 14 hero buttons now (Shop too): the grid gets the room */
#tMenu b { display: block; font: 700 9px/1 'Crimson Pro', serif; margin-top: -2px; letter-spacing: .5px; }
body.touch #tMenu, body:not(.touch) #tMenu { line-height: 1 !important; padding-top: 3px !important; }
body.touch #tQuickToggle, body:not(.touch) #tQuickToggle { font: 700 11px/1 'Crimson Pro', serif !important; padding: 0 2px !important; }
/* the hero buttons' own painted icons (2026-11-24, assets/ui/menu) */
#tQuick button img { width: 26px; height: 26px; margin-bottom: 1px; border-radius: 4px; pointer-events: none; }
body:not(.touch) #tQuick button img { width: 28px; height: 28px; }
/* buying gear: a small window over the shop with the item and Buy */
#buyAsk { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 65; width: min(380px, calc(100vw - 24px)); max-height: 82vh; overflow-y: auto; padding: 10px 12px 12px; }
#buyAsk .row { display: flex; gap: 8px; margin-top: 8px; } #buyAsk .row .big { flex: 1; }
#buyAsk[hidden] { display: none; }
