:root {
  --bg: #0e0a06; --bg2: #1c140c; --panel: #24190f; --panel2: #2e2114; --line: #5a4426;
  --gold: #e0b252; --gold2: #ffe08a; --gold3: #8a6420; --text: #f1ead8; --muted: #a8a294; --dim: #6f6a5f;
  --red: #e0434f; --green: #4cbf6b; --blue: #4f8df7; --purple: #a055e8; --orange: #f0a020;
  --c-common: #9aa3ad; --c-uncommon: #5cb85c; --c-rare: #3d8bfd; --c-epic: #a055e8; --c-legendary: #f0a020;
  --radius: 14px; --hud-h: 98px; --nav-h: 64px;
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif; --font-head: 'Reem Kufi', 'Cairo', serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; overscroll-behavior: none; }
body { background: radial-gradient(ellipse at top, #2a1d10 0%, var(--bg) 60%) fixed; }
button { font-family: inherit; }
#app { max-width: 560px; margin: 0 auto; height: 100%; position: relative; overflow: hidden; background: var(--bg); box-shadow: 0 0 60px #0008; }
.boot { height: 100%; display: grid; place-content: center; text-align: center; gap: 8px; }
.boot h1 { font-family: var(--font-head); color: var(--gold2); margin: 0; font-size: 34px; text-shadow: 0 2px 0 #000; }
.boot p { color: var(--muted); margin: 0; }
.boot-crown { width: 84px; height: 84px; margin: 0 auto; background: url(/icon.svg) center/contain no-repeat; animation: float 2.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Buttons & inputs ---------- */
.btn { appearance: none; border: 1px solid var(--gold3); background: linear-gradient(#f3cd6e, #c08f2c); color: #2a1a00; font-weight: 800; border-radius: 10px; padding: 9px 14px; font-size: 14px; cursor: pointer; box-shadow: 0 2px 0 #5c400c, inset 0 1px 0 #fff6; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #5c400c; }
.btn[disabled] { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.btn.sec { background: linear-gradient(#5a3f1f, #3a2814); color: var(--text); border-color: #7a5a2e; box-shadow: 0 2px 0 #121838, inset 0 1px 0 #fff2; }
.btn.green { background: linear-gradient(#5fd17f, #2f8f4c); color: #04210d; border-color: #1f6a35; box-shadow: 0 2px 0 #124a24; }
.btn.red { background: linear-gradient(#f06470, #b52a35); color: #fff; border-color: #7a1820; box-shadow: 0 2px 0 #5a1016; }
.btn.purple { background: linear-gradient(#b67af0, #7a3cc0); color: #fff; border-color: #5a2a90; box-shadow: 0 2px 0 #3c1a66; }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); box-shadow: none; }
input, select, textarea { font-family: inherit; font-size: 15px; background: #0c1020; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; }
input[type=range] { padding: 0; accent-color: var(--gold); }
label { display: block; color: var(--muted); font-size: 13px; margin: 10px 0 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .gold { color: var(--gold2); } .red { color: var(--red); } .green { color: var(--green); }
.small { font-size: 12px; } .tiny { font-size: 11px; } .center { text-align: center; } .bold { font-weight: 800; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
h2, h3 { font-family: var(--font-head); color: var(--gold2); margin: 4px 0 8px; font-weight: 700; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }

/* ---------- Auth ---------- */
.auth { height: 100%; overflow: auto; padding: 28px 20px 40px; background: linear-gradient(#0e0a06cc, #0e0a06), radial-gradient(circle at 50% 0, #3a2d10, transparent 60%); }
.auth .logo { text-align: center; margin: 14px 0 20px; }
.auth .logo .crown { width: 92px; height: 92px; margin: 0 auto 6px; background: url(/icon.svg) center/contain no-repeat; filter: drop-shadow(0 6px 18px #e0b25244); }
.auth .logo h1 { font-family: var(--font-head); font-size: 38px; margin: 0; color: var(--gold2); text-shadow: 0 3px 0 #000; }
.auth .logo p { margin: 4px 0 0; color: var(--muted); }
.card { background: linear-gradient(var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 6px 20px #0006; }
.card + .card { margin-top: 10px; }
.tabs { display: flex; gap: 4px; background: #0d0906; border-radius: 12px; padding: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1; white-space: nowrap; background: transparent; border: 0; color: var(--muted); padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; position: relative; }
.tabs button.on { background: linear-gradient(#5a3f1f, #3a2814); color: var(--gold2); }
.tabs .dot, .navbtn .dot, .badge { position: absolute; top: 2px; left: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; font-weight: 800; }
.code { font-family: ui-monospace, Consolas, monospace; direction: ltr; font-size: 20px; letter-spacing: 1px; background: #000; padding: 12px; border-radius: 10px; text-align: center; color: var(--gold2); border: 1px dashed var(--gold); user-select: all; }
.pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pick > * { border: 2px solid transparent; border-radius: 12px; cursor: pointer; padding: 2px; background: #0d0906; }
.pick > .on { border-color: var(--gold); box-shadow: 0 0 0 2px #e0b25255; }
.swatch { aspect-ratio: 1; border-radius: 9px; }

/* ---------- Game shell ---------- */
.game { height: 100%; display: flex; flex-direction: column; }
.hud { position: relative; z-index: 5; padding: 8px 10px 6px; background: linear-gradient(#1c140c, #0f1528ee); border-bottom: 1px solid #6b4f28; box-shadow: 0 4px 14px #0008; }
.hud-top { display: flex; align-items: center; gap: 8px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--gold); overflow: hidden; flex: none; background: #000; cursor: pointer; }
.avatar svg { width: 100%; height: 100%; display: block; }
.hud .who { flex: 1; min-width: 0; line-height: 1.15; }
.hud .who .n { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .who .p { font-size: 12px; color: var(--gold2); display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; }
.hud .who .p svg { width: 14px; height: 14px; flex: none; }
.kv svg, .row > svg, .t svg, .bold svg { width: 18px; height: 18px; vertical-align: middle; }
.btn svg { width: 18px; height: 18px; }
.ic > svg { width: 100%; height: 100%; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: #0d0906; border: 1px solid var(--line); border-radius: 20px; padding: 2px 8px 2px 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip.click { cursor: pointer; }
.chip.warn { border-color: var(--red); color: #ffb3b8; }
.chip.shield { border-color: var(--blue); color: #bcd6ff; }
.res-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; }
.res-row .chip { justify-content: center; padding: 2px 4px; }
.res-row .chip.full { border-color: var(--orange); }
.queue-bar { display: flex; gap: 6px; overflow-x: auto; padding: 6px 10px; background: #0d0906cc; scrollbar-width: none; position: relative; z-index: 4; min-height: 0; }
.queue-bar:empty { display: none; }
.queue-bar::-webkit-scrollbar { display: none; }
.qchip { flex: none; display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; font-size: 12px; cursor: pointer; position: relative; overflow: hidden; }
.qchip .bar { position: absolute; inset: auto 0 0 0; height: 3px; background: #0006; }
.qchip .bar i { display: block; height: 100%; background: var(--gold); }
.qchip.done { border-color: var(--green); }
.qchip.incoming { border-color: var(--red); background: #3a1018; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px #e0434f55; } }
.view { flex: 1; position: relative; overflow: hidden; }
.nav { height: var(--nav-h); display: grid; grid-template-columns: repeat(6, 1fr); background: linear-gradient(#1c140c, #0d0906); border-top: 1px solid #6b4f28; padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.navbtn { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; cursor: pointer; position: relative; }
.navbtn svg { width: 26px; height: 26px; }
.navbtn.on { color: var(--gold2); }
.navbtn.on svg { filter: drop-shadow(0 0 6px #e0b25288); }
.navbtn .dot { top: 6px; left: calc(50% - 22px); }

/* ---------- City ---------- */
.city { position: absolute; inset: 0; overflow: auto; scrollbar-width: none; touch-action: pan-x pan-y; }
.city::-webkit-scrollbar { display: none; }
.city svg.scene { display: block; }
.plot { cursor: pointer; }
.plot:hover .art { filter: brightness(1.12); }
.plot .lbl rect { fill: #0d0906e0; stroke: #e0b25288; }
.plot .lbl text { fill: var(--text); font: 700 15px var(--font); }
.plot .lbl .lv { fill: var(--gold2); }
.plot.locked { opacity: .5; }
.plot .bubble { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.plot .busy-ring { animation: spin 3s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.city-fab { position: absolute; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.fab { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(#3d2a15, #241910); border: 1px solid #7a5a2e; color: var(--gold2); display: grid; place-items: center; cursor: pointer; position: relative; box-shadow: 0 4px 12px #0008; font-size: 10px; font-weight: 800; }
.fab svg { width: 26px; height: 26px; }
.fab .badge { top: -4px; left: -4px; }
.quest-tip { position: absolute; z-index: 3; bottom: 10px; right: 10px; left: 70px; background: linear-gradient(90deg, #2b2410f2, #241910f2); border: 1px solid var(--gold3); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; cursor: pointer; box-shadow: 0 6px 16px #000a; }
.quest-tip .t { flex: 1; font-size: 13px; font-weight: 700; }
.quest-tip.done { border-color: var(--green); }
.fx { position: absolute; pointer-events: none; z-index: 20; font-weight: 800; color: var(--gold2); text-shadow: 0 2px 0 #000; animation: rise 1.2s ease-out forwards; }
@keyframes rise { to { transform: translateY(-50px); opacity: 0; } }
.sparkle { position: absolute; pointer-events: none; z-index: 20; width: 8px; height: 8px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 10px var(--gold); animation: spark .9s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* ---------- World ---------- */
.world { position: absolute; inset: 0; touch-action: none; background: #0a0e1a; }
.world canvas { display: block; width: 100%; height: 100%; }
.world .coords { position: absolute; top: 8px; right: 8px; z-index: 2; }
.world .wbtns { position: absolute; bottom: 12px; left: 10px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.world .legend { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 4px; flex-wrap: wrap; max-width: 60%; }

/* ---------- Sheets (bottom panels) ---------- */
#sheets { position: fixed; inset: 0; pointer-events: none; z-index: 50; display: flex; justify-content: center; }
.sheet-wrap { position: absolute; inset: 0; max-width: 560px; margin: 0 auto; pointer-events: auto; display: flex; flex-direction: column; justify-content: flex-end; background: #0008; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: linear-gradient(#22180e, #120c07); border-top: 2px solid var(--gold3); border-radius: 18px 18px 0 0; max-height: 92%; display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2, .9, .3, 1.1); box-shadow: 0 -10px 30px #000a; }
.sheet.full { height: 92%; }
@keyframes up { from { transform: translateY(40%); opacity: .4; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; border-bottom: 1px solid #4a3720; }
.sheet-head h2 { margin: 0; flex: 1; font-size: 19px; }
.sheet-head .x { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #0d0906; color: var(--text); font-size: 18px; cursor: pointer; }
.sheet-head .back { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #0d0906; color: var(--text); cursor: pointer; }
.sheet-body { overflow: auto; padding: 12px 14px 22px; overscroll-behavior: contain; }

/* ---------- Lists & items ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 10px; align-items: center; background: #160f09; border: 1px solid #4a3720; border-radius: 12px; padding: 9px 10px; }
.item.click { cursor: pointer; }
.item.click:hover { border-color: #7a5a2e; }
.item .ic { width: 46px; height: 46px; flex: none; border-radius: 10px; background: #0d0906; display: grid; place-items: center; overflow: hidden; border: 1px solid #4a3720; position: relative; }
.item .ic svg { width: 100%; height: 100%; }
.item .ic .q { position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; background: #000a; text-align: center; font-weight: 800; }
.item .t { font-weight: 800; }
.item .d { font-size: 12px; color: var(--muted); }
.item.locked { opacity: .55; }
.item.unread { border-right: 3px solid var(--gold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { background: #0d0906; border: 1px solid #4a3720; border-radius: 10px; padding: 8px; text-align: center; }
.stat .v { font-weight: 800; font-size: 16px; color: var(--gold2); }
.stat .k { font-size: 11px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #4a3720; font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.cost { display: flex; flex-wrap: wrap; gap: 6px; }
.cost .chip.lack { border-color: var(--red); color: #ffb3b8; }
.req { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; }
.req.ok::before { content: '✔'; color: var(--green); }
.req.no::before { content: '✖'; color: var(--red); }
.progress { height: 10px; background: #0d0906; border-radius: 6px; overflow: hidden; border: 1px solid #4a3720; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold3), var(--gold2)); transition: width .4s; }
.progress.green i { background: linear-gradient(90deg, #2f8f4c, #5fd17f); }
.progress.red i { background: linear-gradient(90deg, #8a1e28, #f06470); }
.pill { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #0d0906; border: 1px solid var(--line); font-weight: 700; }
.r-common { color: var(--c-common); border-color: var(--c-common); } .r-uncommon { color: var(--c-uncommon); border-color: var(--c-uncommon); }
.r-rare { color: var(--c-rare); border-color: var(--c-rare); } .r-epic { color: var(--c-epic); border-color: var(--c-epic); } .r-legendary { color: var(--c-legendary); border-color: var(--c-legendary); }
.stars { color: var(--gold2); letter-spacing: -1px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.notice { background: #2a2410; border: 1px solid var(--gold3); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.notice.red { background: #3a1018; border-color: var(--red); }
.notice.blue { background: #10223a; border-color: var(--blue); }

/* heroes */
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-card { background: #160f09; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; }
.hero-card .portrait { aspect-ratio: 3/4; }
.hero-card .portrait svg { width: 100%; height: 100%; display: block; }
.hero-card .nm { font-size: 12px; font-weight: 800; padding: 4px 6px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card .lv { font-size: 11px; padding: 0 6px 6px; color: var(--muted); }
.hero-card.locked { filter: grayscale(1) brightness(.5); }
.hero-card .tag { position: absolute; top: 4px; right: 4px; }
.skill { background: #0d0906; border: 1px solid #4a3720; border-radius: 10px; padding: 8px; }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.slot { aspect-ratio: 1; background: #0d0906; border: 2px dashed #4a3720; border-radius: 10px; display: grid; place-items: center; cursor: pointer; font-size: 10px; color: var(--muted); text-align: center; overflow: hidden; }
.slot.filled { border-style: solid; }
.slot svg { width: 80%; height: 80%; }

/* vault */
.vault-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px; background: radial-gradient(circle at 50% 100%, #3a2a12, #0b0a08 70%); border-radius: 14px; border: 1px solid #5a4422; }
.room { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; position: relative; cursor: default; background: #050403; border: 1px solid #2a2014; overflow: hidden; }
.room.adj { background: #1a130a; border-color: #8a6420; cursor: pointer; box-shadow: inset 0 0 14px #e0b25233; }
.room.adj::after { content: '؟'; color: #e0b25288; font-size: 22px; font-weight: 800; }
.room.explored { background: linear-gradient(#3a2c18, #241a0e); border-color: #6b4f28; }
.room.blocked { background: linear-gradient(#4a1a1a, #2a0e0e); border-color: var(--red); cursor: pointer; animation: pulse 1.6s infinite; }
.room svg { width: 70%; height: 70%; }
.room .hpb { position: absolute; bottom: 3px; left: 4px; right: 4px; height: 4px; background: #000; border-radius: 3px; overflow: hidden; }
.room .hpb i { display: block; height: 100%; background: var(--red); }
.torches { display: flex; align-items: center; gap: 8px; }

/* reports */
.rep-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rep-side { background: #0d0906; border: 1px solid #4a3720; border-radius: 10px; padding: 8px; font-size: 12px; }
.rep-side.win { border-color: var(--green); }
.rep-side.lose { border-color: var(--red); }
.rep-side table { width: 100%; border-collapse: collapse; }
.rep-side td { padding: 2px 0; }
.banner-res { text-align: center; font-family: var(--font-head); font-size: 26px; padding: 8px; border-radius: 12px; margin-bottom: 8px; }
.banner-res.win { background: linear-gradient(#2f8f4c55, transparent); color: #8ff0aa; }
.banner-res.lose { background: linear-gradient(#b52a3555, transparent); color: #ffb3b8; }
.rounds { display: flex; gap: 2px; align-items: flex-end; height: 50px; }
.rounds div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; }
.rounds i { display: block; border-radius: 2px 2px 0 0; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; padding: 4px; }
.msg { background: #160f09; border-radius: 10px; padding: 6px 9px; font-size: 13px; }
.msg .who { color: var(--gold2); font-weight: 800; font-size: 12px; }
.msg.mine { background: #3a2814; }

/* toasts */
#toasts { position: fixed; top: 110px; left: 0; right: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: #0d0906f2; border: 1px solid var(--gold3); color: var(--text); padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px #000a; animation: toast 3.2s forwards; max-width: 90%; text-align: center; }
.toast.err { border-color: var(--red); color: #ffd0d4; }
.toast.ok { border-color: var(--green); }
@keyframes toast { 0% { transform: translateY(-10px); opacity: 0; } 8%, 85% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.reveal { text-align: center; padding: 20px; animation: revealIn .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes revealIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.glow-legendary { filter: drop-shadow(0 0 18px #f0a020); }
.glow-epic { filter: drop-shadow(0 0 14px #a055e8); }

@media (min-width: 561px) { #app { border-left: 1px solid #3a2a16; border-right: 1px solid #3a2a16; } }

/* connection banner, gifts, accessibility, LTR */
.netbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: #8a1e28; color: #fff; text-align: center; padding: 8px 12px; font-weight: 700; font-size: 13px; display: flex; gap: 8px; justify-content: center; align-items: center; box-shadow: 0 4px 12px #000a; }
.netbar .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff6; border-top-color: #fff; animation: spin 0.8s linear infinite; }
.chip.gift { border-color: var(--gold); animation: pulse 1.6s infinite; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
[dir=ltr] .item.unread { border-right: 1px solid #4a3720; border-left: 3px solid var(--gold); }
[dir=ltr] .tabs .dot, [dir=ltr] .badge { left: auto; right: 4px; }
[dir=ltr] .quest-tip { left: 10px; right: 70px; }
[dir=ltr] .city-fab { left: auto !important; right: 10px; }
.hud-chips { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.hud-chips:empty { display: none; }
.hud-chips .chip { font-size: 11px; padding: 1px 7px 1px 5px; }
.hud-chips .chip svg { width: 14px; height: 14px; }
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.reward-grid .cost { justify-content: center; }
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }

/* ---------- 3D city ---------- */
.city3d { position: absolute; inset: 0; overflow: hidden; background: #e9dcc0; }
.c3-canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
.c3-canvas:active { cursor: grabbing; }
.c3-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.c3-lbl { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 4px; white-space: nowrap; will-change: transform;
  font-size: 11.5px; font-weight: 700; color: #fff7e6; padding: 2px 8px 2px 3px; border-radius: 999px;
  background: linear-gradient(#2a1d10e6, #0d0906e6); border: 1px solid #e0b25299; box-shadow: 0 2px 6px #0006; text-shadow: 0 1px 2px #000; }
.c3-lbl .lv { min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; padding: 0 4px; font-size: 11px; font-weight: 900;
  color: #2a1c05; background: linear-gradient(#ffe7a0, #c8952f); text-shadow: none; }
.c3-lbl .lk { width: 18px; text-align: center; font-size: 11px; }
.c3-lbl .tm { color: #ffe08a; font-variant-numeric: tabular-nums; padding-inline-start: 4px; border-inline-start: 1px solid #e0b25266; }
.c3-lbl.small { font-size: 10.5px; opacity: .92; }
.c3-lbl.locked { opacity: .62; border-color: #8886; }
.c3-overlay.mid .c3-lbl.small .nm { display: none; }
.c3-overlay.far .c3-lbl .nm { display: none; }
.c3-overlay.far .c3-lbl { padding-inline-end: 3px; }
.c3-bubble { position: absolute; left: 0; top: 0; pointer-events: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(#3a2814, #0d0906); border: 2px solid #e0b252; box-shadow: 0 3px 10px #0008; animation: c3bob 1.6s ease-in-out infinite; padding: 0; }
.c3-bubble.full { border-color: #e0434f; }
@keyframes c3bob { 50% { margin-top: -6px; } }
/* pre-rendered art in lists */
.art-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 3px #0008); }
.ic .unit-art, .stat .unit-art { transform: scale(1.25); }
.monster-art { height: 170px; margin: 4px 0 10px; border-radius: 14px; background: radial-gradient(ellipse at 50% 70%, #d8c39b 0%, #a88b5e 60%, #5e4a30 100%); padding: 8px; }
.world canvas { touch-action: none; }
.c2-canvas { position: absolute; inset: 0; display: block; touch-action: none; cursor: grab; }
.c2-glow { position: absolute; pointer-events: none; background-size: 100% 100%; opacity: 0; filter: brightness(1.6) drop-shadow(0 0 10px #ffd36b); }
.c2-glow.on { animation: c2glow .55s ease-out; }
@keyframes c2glow { 0% { opacity: .85; transform: scale(1.03); } 100% { opacity: 0; transform: scale(1); } }
.c2-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 999px; background: #0d0906d9; color: #ffe08a; font-weight: 700; border: 1px solid #e0b25288; pointer-events: none; opacity: 0; transition: opacity .3s; }
.c2-loading.on { opacity: 1; }
.unit-tier { height: 64px; margin: -4px -4px 2px; }
.unit-tier .unit-art { transform: none; }
.unit-hero { width: 120px; height: 140px; flex: none; border-radius: 14px; padding: 4px; background: radial-gradient(ellipse at 50% 75%, #d8c39b 0%, #a88b5e 55%, #3e3222 100%); border: 1px solid #e0b25266; }
.unit-hero .unit-art { transform: scale(1.15); transform-origin: 50% 60%; }
.world .track-chip { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(10,14,28,.85); border: 1px solid var(--gold, #e0b252); color: #ffe08a; font-size: 13px; font-weight: 700; cursor: pointer; }
.world .track-chip svg { width: 18px; height: 18px; }
.world .track-chip b { color: #fff; opacity: .7; }
.btn.sm svg { width: 16px; height: 16px; vertical-align: -3px; margin-inline-end: 3px; }
.look-next { display: flex; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(224,178,82,.16), rgba(224,178,82,.04)); border: 1px dashed rgba(224,178,82,.55); }
.look-next.done { justify-content: center; color: #ffe08a; font-weight: 700; font-size: 13px; }
.look-next .look-img { width: 74px; height: 66px; flex: none; }
.look-next .look-img img { width: 100%; height: 100%; object-fit: contain; }
.hero-art { position: relative; width: 100%; height: 100%; aspect-ratio: 360/468; overflow: hidden; border-radius: inherit;
  background: radial-gradient(120% 80% at 50% 28%, color-mix(in srgb, var(--hb) 55%, #fff 0%) 0%, var(--ha) 45%, color-mix(in srgb, var(--ha) 35%, #000) 100%); }
.hero-art::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -18px 24px -10px color-mix(in srgb, var(--hr) 55%, transparent), inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.item .ic .hero-art { aspect-ratio: auto; }
.item .ic .hero-art img { object-position: 50% 22%; transform: scale(1.35); transform-origin: 50% 25%; }

/* =====================================================================
   Royal skin: carved dark wood, gold trim, rendered 3D icons (tools/art/ui.py)
   ===================================================================== */
:root { --bg: #0e0a06; --bg2: #1a120b; --panel: #24190f; --panel2: #2e2114; --line: #5a4426; --gold3: #8a6420;
  --carved: url(/art/ui/carved.webp); --ring: url(/art/ui/ring.webp); --plaque: url(/art/ui/plaque.webp);
  --trim: linear-gradient(90deg, #3a2608, #c08f2c 12%, #ffe9a8 30%, #b8862a 50%, #ffe9a8 70%, #c08f2c 88%, #3a2608); }
body { background: #070504; }
#app { background: #0e0a06; }
svg.ic3d { overflow: visible; filter: drop-shadow(0 1.5px 1.5px #000b); }

/* buttons */
.btn { background: linear-gradient(#fff0b8 0%, #f0c560 22%, #c8902c 52%, #a8701c 56%, #e0b04a 100%); border: 1px solid #4a3008; color: #2a1600;
  border-radius: 8px; box-shadow: 0 2px 0 #2a1a04, inset 0 0 0 1px #ffe9a888, 0 3px 8px #0008; text-shadow: 0 1px 0 #fff6; }
.btn.sec { background: linear-gradient(#5a4026, #3a2614 50%, #2a1a0c 52%, #3a2816); color: #ffe7b0; border-color: #a87a2c; box-shadow: 0 2px 0 #0a0604, inset 0 0 0 1px #e0b25233, 0 3px 8px #0008; text-shadow: 0 1px 1px #000; }
.btn.red { background: linear-gradient(#d8423c, #8c1712 50%, #6e0e0a 52%, #a0201a); color: #fff1d0; border-color: #e0b252; box-shadow: 0 2px 0 #2a0604, inset 0 0 0 1px #ffd36b55, 0 3px 8px #0008; text-shadow: 0 1px 1px #000; }
.btn.green { background: linear-gradient(#7ad35a, #2f8a2a 50%, #226e1e 52%, #3c9a32); color: #fff; border-color: #e0b252; text-shadow: 0 1px 1px #000; box-shadow: 0 2px 0 #0a2a06, inset 0 0 0 1px #ffd36b55; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); box-shadow: none; text-shadow: none; }
input, select, textarea { background: #0b0805; border-color: #4a3720; }

/* top bar */
.hud { padding: 6px 8px 7px; background: linear-gradient(#0008, #000c), var(--carved) center / auto 100%, #120c07; border-bottom: 0; box-shadow: 0 6px 16px #000c; }
.hud::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--trim); box-shadow: 0 1px 3px #000; }
.hud-main { display: flex; gap: 6px; align-items: center; }
.hud-av { position: relative; width: 62px; height: 62px; flex: none; cursor: pointer; padding: 0; border: 0; background: none; }
.hud-av .av-img { position: absolute; inset: 7px; border-radius: 50%; overflow: hidden; background: #000; }
.hud-av .av-img svg { width: 100%; height: 100%; display: block; }
.hud-av::after { content: ''; position: absolute; inset: -1px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.hud-av .av-lv { position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); z-index: 1; min-width: 24px; height: 18px; line-height: 17px; padding: 0 5px; border-radius: 9px;
  font-size: 11px; font-weight: 900; color: #fff3cf; background: linear-gradient(#5a1a12, #2a0a06); border: 1px solid #e0b252; box-shadow: 0 2px 4px #000; }
.hud-mid { flex: 1; min-width: 0; }
.hud .res-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin: 0; }
.hud .res { display: flex; align-items: center; justify-content: center; gap: 1px; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 800; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; min-width: 0; }
.hud .res svg { width: 25px; height: 25px; flex: none; }
.hud .res.full .num { color: #ffb35a; }
.hud-line { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.hud .vip { flex: none; font-family: var(--font-head); font-weight: 900; font-size: 12px; color: #ffe08a; background: linear-gradient(#6a2a12, #2a0e06); border: 1px solid #c08f2c; border-radius: 5px;
  padding: 1px 7px; text-shadow: 0 1px 0 #000; cursor: pointer; box-shadow: inset 0 1px 0 #ffd36b44; direction: ltr; }
.hud .power { flex: 1; min-width: 0; height: 24px; display: flex; align-items: center; justify-content: center; gap: 3px; background: url(/art/ui/ribbon.webp) center / 100% 100% no-repeat;
  color: #fff; font-weight: 900; font-size: 13.5px; text-shadow: 0 1px 2px #000; padding: 0 14px; }
.hud .power svg { width: 18px; height: 18px; }
.hud-ic { position: relative; flex: none; width: 28px; height: 28px; padding: 2px; border-radius: 50%; border: 1px solid #a87a2c; background: radial-gradient(#3a2814, #0d0906); cursor: pointer; display: grid; place-items: center; }
.hud-ic svg { width: 22px; height: 22px; }
.hud-ic .dot { position: absolute; top: -5px; left: -5px; min-width: 15px; height: 15px; line-height: 15px; border-radius: 8px; background: #d22; color: #fff; font-size: 9.5px; font-weight: 800; padding: 0 3px; border: 1px solid #ffd36b; }
.hud-ic.gift { animation: pulse 1.6s infinite; }
.hud-ic.warn { border-color: #f33; animation: pulse 1s infinite; }
.hud-ic.shield { width: auto; border-radius: 14px; display: flex; gap: 2px; padding: 2px 6px 2px 3px; border-color: #5a8af0; }
.hud-ic.shield .tm { font-size: 10.5px; font-weight: 800; color: #cfe0ff; }
.hud-gems { position: relative; flex: none; width: 54px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  background: linear-gradient(#3a6a1a, #15400a 55%, #0e2e06); border: 1px solid #e0b252; border-radius: 10px; color: #ffe08a; font-weight: 900; font-size: 12px; text-shadow: 0 1px 1px #000;
  box-shadow: inset 0 1px 0 #fff4, inset 0 0 0 2px #0006, 0 3px 8px #000a; }
.hud-gems svg { width: 30px; height: 30px; margin: -4px 0 -2px; }

/* queue bar */
.queue-bar { background: linear-gradient(#1a120bee, #0e0a06ee); border-bottom: 1px solid #3a2a16; }
.qchip { background: linear-gradient(#2e2114, #1a120b); border-color: #6b4f28; }

/* bottom navigation */
.nav { height: 72px; background: linear-gradient(#000a, #000d), var(--carved) center / auto 100%, #120c07; border-top: 0; position: relative; overflow: visible; }
.nav::before { content: ''; position: absolute; left: 0; right: 0; top: -3px; height: 3px; background: var(--trim); box-shadow: 0 -1px 3px #000; }
.navbtn { color: #d8c39b; text-shadow: 0 1px 2px #000; gap: 0; font-size: 11px; }
.navbtn .sock { position: relative; width: 46px; height: 46px; display: grid; place-items: center; transition: transform .18s; }
.navbtn .sock svg { width: 38px; height: 38px; }
.navbtn .sock::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(#3a2814 0%, #0d090600 70%); }
.navbtn.on { color: #ffe08a; }
.navbtn.on .sock { transform: translateY(-9px) scale(1.12); }
.navbtn.on .sock::before { inset: 1px; background: radial-gradient(#6a4a1e, #1a0f06 75%); box-shadow: 0 4px 10px #000c; }
.navbtn.on .sock::after { content: ''; position: absolute; inset: -4px; background: var(--ring) center / contain no-repeat; }
.navbtn.on svg { filter: drop-shadow(0 0 6px #ffcf6b88); }
.navbtn .lb { margin-top: -2px; }
.navbtn.on .lb { margin-top: -10px; font-weight: 900; }
.navbtn .dot { top: 2px; left: calc(50% - 26px); z-index: 2; border: 1px solid #ffd36b; }

/* round side buttons (city) */
.fab { width: 54px; height: 54px; border-radius: 50%; border: 0; background: radial-gradient(#4a3218 0%, #1a1008 70%); box-shadow: 0 4px 10px #000a;
  color: #ffe9b8; font-size: 10px; font-weight: 900; text-shadow: 0 1px 2px #000, 0 0 3px #000; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.fab::after { content: ''; position: absolute; inset: -3px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.fab svg { width: 34px; height: 34px; }
.fab .badge { top: -6px; left: -4px; z-index: 2; border: 1px solid #ffd36b; }
.city-fab { gap: 10px; }
.quest-tip { background: linear-gradient(90deg, #2a1a0cf2, #120c07f2); border: 1px solid #a87a2c; border-radius: 10px; box-shadow: 0 6px 16px #000a, inset 0 1px 0 #ffd36b33; }

/* sheets, cards, lists */
.sheet-wrap { background: #000a; }
.sheet { background: linear-gradient(#1a120bf4, #0e0a06f8), var(--carved) center top / 640px auto, #0e0a06; border-top: 0; border-radius: 14px 14px 0 0; position: relative; }
.sheet::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 14px 14px 0 0; background: var(--trim); }
.sheet-head { border-bottom: 1px solid #5a4426; background: linear-gradient(#3a2614, #1a110a); border-radius: 14px 14px 0 0; padding-top: 14px; box-shadow: 0 2px 6px #0008; }
.sheet-head h2 { text-align: center; color: #ffe08a; text-shadow: 0 2px 0 #000, 0 0 10px #c08f2c55; }
.sheet-head h2::before, .sheet-head h2::after { content: '❖'; font-size: 11px; color: #c08f2c; margin: 0 8px; vertical-align: 3px; }
.sheet-head .x, .sheet-head .back { border-radius: 50%; border: 1px solid #c08f2c; background: radial-gradient(#5a1a12, #2a0a06); color: #ffe08a; font-weight: 900; }
.card { background: linear-gradient(#2a1d10e6, #140d07f0); border: 1px solid #5a4426; border-radius: 10px; box-shadow: inset 0 1px 0 #ffd36b22, 0 4px 14px #0008; }
.item { background: linear-gradient(90deg, #22170d, #150e08); border: 1px solid #4a3720; border-radius: 10px; box-shadow: inset 0 1px 0 #ffd36b14; }
.item.click:hover { border-color: #a87a2c; }
.item .ic { background: radial-gradient(#3a2814, #0d0906); border-color: #6b4f28; }
.stat, .skill, .rep-side, .slot, .pill, .chip { background: #120c07; border-color: #4a3720; }
.tabs { background: #0b0805; border: 1px solid #3a2a16; }
.tabs button.on { background: linear-gradient(#6a4a1e, #3a2614); color: #ffe08a; box-shadow: inset 0 0 0 1px #c08f2c88; }
.progress { background: #0b0805; border-color: #4a3720; }
h2, h3 { text-shadow: 0 1px 0 #000; }
.toast { background: linear-gradient(#2a1d10f4, #120c07f4); border-color: #c08f2c; }

/* city labels: level plaques (names appear only on the selected building) */
.c3-lbl { background: none; border: 0; box-shadow: none; padding: 0; gap: 3px; flex-direction: column; align-items: center; }
.c3-lbl .lv { width: 30px; height: 30px; line-height: 25px; border-radius: 0; padding: 0; background: var(--plaque) center / contain no-repeat; color: #ffe08a; font-size: 12.5px; font-weight: 900;
  text-shadow: 0 1px 1px #000, 0 0 3px #000; filter: drop-shadow(0 2px 2px #000a); order: 2; }
.c3-lbl .lk { width: 24px; height: 24px; line-height: 22px; border-radius: 50%; background: radial-gradient(#3a2814, #0d0906); border: 1px solid #a87a2c; color: #ffe08a; font-size: 11px; order: 2; }
.c3-lbl .nm { display: none; order: 1; font-family: var(--font-head); font-size: 13px; color: #ffe9b8; padding: 2px 12px; border-radius: 4px; background: linear-gradient(#3a2614f0, #1a110af0);
  border: 1px solid #c08f2c; box-shadow: 0 2px 6px #000a; white-space: nowrap; }
.c3-lbl .tm { order: 3; border: 1px solid #c08f2c; border-radius: 9px; padding: 0 6px; background: #0d0906e6; font-size: 10.5px; color: #8ff0aa; }
.c3-lbl.sel .nm, .c3-lbl.sel.small .nm { display: block !important; }
.c3-overlay.far .c3-lbl .lv { width: 24px; height: 24px; line-height: 20px; font-size: 10.5px; }
.c3-lbl.locked { opacity: .75; }
.c3-bubble { background: radial-gradient(#4a3218, #1a1008); border: 0; width: 46px; height: 46px; }
.c3-bubble::after { content: ''; position: absolute; inset: -3px; background: var(--ring) center / contain no-repeat; }
.c3-bubble svg { width: 30px !important; height: 30px !important; }
/* radial action ring around the selected building */
.c2-radial { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 3; }
.c2-radial .rb { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; border: 0; padding: 0; pointer-events: auto; cursor: pointer;
  background: radial-gradient(#4a3218 0%, #1a1008 72%); box-shadow: 0 4px 10px #000b; display: grid; place-items: center; animation: rbIn .22s cubic-bezier(.2, 1.4, .4, 1) both; }
.c2-radial .rb::after { content: ''; position: absolute; inset: -3px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.c2-radial .rb svg { width: 36px; height: 36px; }
.c2-radial .rb span { position: absolute; top: 100%; margin-top: 1px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 900; color: #fff3cf;
  text-shadow: 0 1px 2px #000, 0 0 4px #000, 0 0 2px #000; }
.c2-radial .rb.hot::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; box-shadow: 0 0 14px 4px #ffcf6b88; animation: pulse 1.4s infinite; }
@keyframes rbIn { from { transform: scale(.2); opacity: 0; } }

/* upgrade screen */
.upg-hero { position: relative; height: 210px; margin: -12px -14px 0; background: radial-gradient(ellipse at 50% 85%, #6a5232 0%, #2a1d10 55%, #0e0a06 100%); overflow: hidden; border-bottom: 1px solid #5a4426; }
.upg-hero .art-img { width: 100%; height: 100%; object-fit: contain; padding: 8px 0 0; filter: drop-shadow(0 10px 14px #000c); }
.upg-hero .upg-lv { position: absolute; top: 10px; right: 12px; text-align: center; }
.upg-hero .upg-lv b { display: block; font-family: var(--font-head); color: #ffe08a; font-size: 19px; text-shadow: 0 2px 0 #000; }
.upg-hero .upg-lv i { font-style: normal; font-size: 12px; color: #e8d6b0; }
.upg-next { position: absolute; top: 10px; left: 10px; width: 46%; max-height: 190px; overflow: auto; padding: 8px 10px 10px; border-radius: 0 0 10px 10px; scrollbar-width: none;
  background: linear-gradient(#10224aee, #0a1430ee); border: 1px solid #c08f2c; border-top: 3px solid #c08f2c; box-shadow: 0 6px 14px #000a; font-size: 12px; }
.upg-next .h { display: flex; justify-content: space-between; color: #ffe08a; font-weight: 900; margin-bottom: 4px; }
.upg-next .kv { padding: 2px 0; font-size: 11.5px; border-bottom-color: #ffffff1a; }
.upg-sec { text-align: center; color: #ffe08a; font-family: var(--font-head); margin: 10px 0 6px; font-size: 15px; }
.upg-sec::before, .upg-sec::after { content: ''; display: inline-block; width: 60px; height: 1px; background: linear-gradient(90deg, transparent, #c08f2c); vertical-align: middle; margin: 0 8px; }
.upg-sec::after { transform: scaleX(-1); }
.reqrow { display: grid; grid-template-columns: 30px 1fr 18px auto; align-items: center; gap: 8px; padding: 5px 8px; margin-bottom: 4px; border-radius: 6px; background: linear-gradient(90deg, #22170d, #120c07); border: 1px solid #3a2a16; font-size: 13px; font-weight: 700; }
.reqrow svg { width: 28px; height: 28px; }
.reqrow .ok { color: #5fd17f; font-weight: 900; } .reqrow .no { color: #f05050; font-weight: 900; }
.reqrow .t.no { color: #ff7a6a; } .reqrow .t.ok { color: #e8e0c8; }
.reqrow .btn { min-height: 28px; padding: 3px 10px; font-size: 12px; min-width: 104px; }
.upg-time { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 900; font-size: 15px; margin: 10px 0 6px; color: #fff; }
.upg-time svg { width: 26px; height: 26px; }
.upg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upg-btns .btn { min-height: 50px; font-size: 15px; flex-direction: column; gap: 0; line-height: 1.15; }
.upg-btns .btn small { font-size: 12px; display: flex; align-items: center; gap: 3px; }
.upg-btns .btn small svg { width: 18px; height: 18px; }

/* world: marches panel */
.march-dock { position: absolute; top: 46px; right: 6px; z-index: 3; width: min(260px, 72%); display: flex; flex-direction: column; gap: 4px; }
.march-dock .md-row { display: flex; align-items: stretch; gap: 4px; }
.march-dock .md-card { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; cursor: pointer; overflow: hidden;
  background: linear-gradient(90deg, #0d0906ee, #2a1d10ee); border: 1px solid #8a6420; box-shadow: 0 3px 8px #0009; color: #fff; }
.march-dock .md-card .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f8a2a99, #2f8a2a33); pointer-events: none; }
.march-dock .md-card.ret .bar { background: linear-gradient(90deg, #4f8df799, #4f8df733); }
.march-dock .md-card.hostile .bar { background: linear-gradient(90deg, #d8423c99, #d8423c33); }
.march-dock .md-card > * { position: relative; }
.march-dock .md-card svg { width: 22px; height: 22px; flex: none; }
.march-dock .md-t { flex: 1; min-width: 0; line-height: 1.1; }
.march-dock .md-t b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.march-dock .md-t i { font-style: normal; font-size: 12px; font-weight: 900; color: #ffe08a; }
.march-dock .md-n { font-size: 10px; color: #d8c39b; }
.march-dock .md-b { flex: none; width: 40px; border-radius: 6px; border: 1px solid #c08f2c; cursor: pointer; display: grid; place-items: center; padding: 0;
  background: linear-gradient(#8a5a1c, #4a2c0a); box-shadow: inset 0 1px 0 #ffd36b55, 0 2px 6px #0008; }
.march-dock .md-b svg { width: 24px; height: 24px; }
.march-dock .md-b.recall { background: linear-gradient(#7a1a14, #3a0806); }
.march-dock .md-toggle { align-self: flex-end; border: 1px solid #8a6420; background: #0d0906dd; color: #ffe08a; border-radius: 6px; font-size: 12px; font-weight: 800; padding: 2px 10px; cursor: pointer; }
.haste-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #3a2a16; }
.haste-row .ic { width: 50px; height: 50px; flex: none; border-radius: 8px; background: radial-gradient(#3a2814, #0d0906); border: 1px solid #8a6420; display: grid; place-items: center; }
.haste-row .ic svg { width: 40px; height: 40px; }
.haste-bar { height: 22px; border-radius: 4px; border: 1px solid #c08f2c; background: #000; position: relative; overflow: hidden; margin: 4px 0 10px; }
.haste-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#5a9af0, #1a4ab0); }
.haste-bar b { position: relative; display: block; text-align: center; line-height: 20px; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.world .track-chip { top: auto; bottom: 16px; }
.c2-canvas { filter: saturate(1.25) contrast(1.08); }
.hud-main { align-items: center; }
.hud .res-row { gap: 0; }
.hud .res { gap: 0; font-size: 12.5px; }
.hud .res svg { width: 24px; height: 24px; margin-inline-end: -1px; }
.hud .hud-gems { width: auto; height: 24px; flex-direction: row; gap: 1px; padding: 0 5px 0 3px; border-radius: 12px; font-size: 12px; }
.hud .hud-gems svg { width: 22px; height: 22px; margin: 0; }
.hud .hud-gems b { width: 14px; height: 14px; line-height: 13px; border-radius: 50%; background: #ffe08a; color: #1a4a0a; font-size: 12px; text-shadow: none; margin-inline-start: 2px; }
.fab .fl { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 10.5px; padding: 0 6px; border-radius: 6px; background: #1a110ae6; border: 1px solid #a87a2c; white-space: nowrap; }
.wbtns .fab { font-size: 9.5px; }
.wbtns .fab { font-size: 22px; } .wbtns .fab .fl { font-size: 10px; }
.hud .res { gap: 2px; font-size: 12px; letter-spacing: -0.2px; } .hud .res svg { width: 22px; height: 22px; margin: 0; }
.upg-next { width: 56%; }
.upg-next .kv { gap: 4px; }
.upg-next .kv .k { flex: 1; min-width: 0; }
.upg-next .kv > span:last-child { white-space: nowrap; }
.reqrow .req-art { display: block; width: 34px; height: 30px; }
.reqrow .req-art img { width: 100%; height: 100%; object-fit: contain; }
.reqrow { grid-template-columns: 34px 1fr 16px auto; }
.world .place-bar { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 4; padding: 10px; border-radius: 12px; background: linear-gradient(#2a1d10f2, #120c07f2); border: 1px solid #c08f2c; box-shadow: 0 6px 18px #000c; }
.world .place-bar .pb-t { text-align: center; font-weight: 900; color: #8ff0aa; margin-bottom: 8px; }
.world .place-bar.bad .pb-t { color: #ff7a6a; }
.unit-show { object-fit: cover !important; object-position: 50% 26%; transform: scale(1.5); transform-origin: 50% 22%; filter: none; }
.ic .unit-show, .stat .unit-show { transform: scale(1.7); }
.unit-tier .unit-show { transform: scale(1.35); }
.unit-showcase { width: 100%; height: 100%; object-fit: contain; display: block; }
/* training screen */
.tr-stage { position: relative; height: 330px; margin: 0 -14px; overflow: hidden;
  background: radial-gradient(ellipse at 45% 88%, #5a4630 0%, #2a1d10 40%, #0e0a06 75%); border-top: 1px solid #3a2a16; border-bottom: 1px solid #5a4426; }
.tr-art { position: absolute; left: 12%; right: 28%; top: 6px; bottom: 0; }
.tr-art img { filter: drop-shadow(0 10px 18px #000c); }
.tr-stats { position: absolute; top: 10px; left: 10px; width: 46%; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.tr-stat { display: grid; grid-template-columns: 42px 1fr 30px; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: #e8d6b0; text-shadow: 0 1px 2px #000; }
.tr-bar { height: 7px; border-radius: 4px; background: #0008; border: 1px solid #5a4426; overflow: hidden; }
.tr-bar i { display: block; height: 100%; }
.tr-mini { display: flex; gap: 8px; font-size: 10.5px; color: #c8b48a; text-shadow: 0 1px 2px #000; }
.tr-tiers { position: absolute; top: 8px; right: 6px; bottom: 34px; width: 76px; display: flex; flex-direction: column; gap: 4px; justify-content: center; z-index: 1; }
.tr-tier { position: relative; height: 52px; border: 0; padding: 0; cursor: pointer; background: none; display: flex; flex-direction: column; align-items: center; }
.tr-tier .tr-ic { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: radial-gradient(#3a2814, #0d0906); box-shadow: 0 0 0 2px #6b4f28, 0 3px 6px #000a; display: block; }
.tr-tier.on .tr-ic { box-shadow: 0 0 0 2px #ffe08a, 0 0 12px #ffcf6b88; }
.tr-tier .tr-ic img { width: 100%; height: 100%; }
.tr-tier.lock .tr-ic { filter: grayscale(1) brightness(.55); }
.tr-tier .tr-lk { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; }
.tr-tier .tr-lk svg { width: 20px; height: 20px; }
.tr-tier .tr-nm { font-size: 9.5px; font-weight: 800; color: #e8d6b0; white-space: nowrap; text-shadow: 0 1px 2px #000; margin-top: -4px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.tr-tier.on .tr-nm { color: #ffe08a; }
.tr-have { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); padding: 2px 14px; border-radius: 10px; background: #0d0906cc; border: 1px solid #8a6420; font-size: 12px; color: #e8d6b0; z-index: 1; }
.tr-count { display: grid; grid-template-columns: 34px 1fr 34px 76px; gap: 6px; align-items: center; margin: 8px 0; }
.tr-pm { height: 34px; border-radius: 50%; border: 1px solid #c08f2c; background: radial-gradient(#3a6a1a, #15400a); color: #fff; font-size: 20px; font-weight: 900; cursor: pointer; padding: 0; }
.tr-n { text-align: center; padding: 6px; }
.tr-n { direction: ltr; }
/* battle report */
.rp-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; margin: -4px -14px 0; }
.rp-side { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center; }
.rp-side.att { background: linear-gradient(135deg, #8a1e1a, #3a0a08); }
.rp-side.def { background: linear-gradient(225deg, #1a3a7a, #08122e); }
.rp-face { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid #e0b252; background: #0d0906; display: grid; place-items: center; box-shadow: 0 3px 8px #000a; }
.rp-face .hero-art { aspect-ratio: auto; }
.rp-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.rp-face svg { width: 44px; height: 44px; }
.rp-nm { font-weight: 900; font-size: 13px; color: #fff; text-shadow: 0 1px 2px #000; }
.rp-sub { font-size: 11px; color: #e8d6b0; }
.rp-res { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 8px; font-family: var(--font-head); font-size: 26px; text-shadow: 0 2px 0 #000, 0 0 14px currentColor;
  background: linear-gradient(90deg, #3a0a08, #0d0906, #08122e); }
.rp-res.win { color: #ffe08a; } .rp-res.lose { color: #ff8a7a; }
.rp-res small { font-family: var(--font); font-size: 10px; color: #c8b48a; text-shadow: none; }
.rp-sec { margin: 10px 0 4px; text-align: center; font-family: var(--font-head); color: #3a2410; font-size: 15px; padding: 4px; border-radius: 6px;
  background: linear-gradient(#e8d2a2, #c8a868); border: 1px solid #8a6420; box-shadow: inset 0 1px 0 #fff8; }
.rp-tbl { border-radius: 8px; overflow: hidden; border: 1px solid #5a4426; background: linear-gradient(#f0e2bf, #e0cc9c); color: #3a2410; }
.rp-row { display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: center; padding: 5px 8px; font-size: 13px; font-weight: 800; border-bottom: 1px solid #c8a86888; text-align: center; }
.rp-row:last-child { border-bottom: 0; }
.rp-row .k { color: #5a3a18; font-weight: 700; }
.rp-row.h { background: #c8a868; font-size: 12px; }
.rp-row .red { color: #b0201a; } .rp-row .green { color: #1a7a2a; }
.rp-more { margin-top: 10px; }
.rp-more summary { cursor: pointer; text-align: center; color: #ffe08a; font-weight: 800; text-decoration: underline; }
.world .wring { z-index: 3; }
.world .wring .wr-name { position: absolute; left: 0; top: -96px; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-head); font-size: 14px; color: #ffe9b8;
  padding: 3px 14px; border-radius: 4px; background: linear-gradient(#3a2614f0, #1a110af0); border: 1px solid #c08f2c; box-shadow: 0 2px 8px #000a; }
.c2-radial .rb.off { filter: grayscale(1) brightness(.6); }

/* ===== compact HUD (more room for the city and the map) ===== */
:root { --nav-h: 56px; }
.hud { padding: 3px 6px 4px; }
.hud-av { width: 48px; height: 48px; }
.hud-av .av-img { inset: 6px; }
.hud-av .av-lv { min-width: 20px; height: 15px; line-height: 14px; font-size: 9.5px; bottom: -3px; }
.hud .res { font-size: 11px; }
.hud .res svg { width: 19px; height: 19px; }
.hud-line { margin-top: 1px; gap: 3px; }
.hud .vip { font-size: 10.5px; padding: 0 5px; }
.hud .power { height: 19px; font-size: 11.5px; }
.hud .power svg { width: 14px; height: 14px; }
.hud .hud-gems { height: 19px; font-size: 10.5px; }
.hud .hud-gems svg { width: 17px; height: 17px; }
.hud .hud-gems b { width: 12px; height: 12px; line-height: 11px; font-size: 10px; }
.hud-ic { width: 22px; height: 22px; padding: 1px; }
.hud-ic svg { width: 17px; height: 17px; }
.hud-ic .dot { min-width: 13px; height: 13px; line-height: 13px; font-size: 8.5px; top: -4px; left: -4px; }
.queue-bar { padding: 3px 8px; gap: 4px; }
.qchip { padding: 2px 6px; font-size: 11px; }
.nav { height: 56px; }
.navbtn { font-size: 10px; }
.navbtn .sock { width: 36px; height: 36px; }
.navbtn .sock svg { width: 29px; height: 29px; }
.navbtn.on .sock { transform: translateY(-6px) scale(1.08); }
.navbtn.on .lb { margin-top: -6px; }
.navbtn .dot { left: calc(50% - 21px); }
.fab { width: 42px; height: 42px; }
.fab svg { width: 26px; height: 26px; }
.fab .fl { font-size: 9px; bottom: -6px; padding: 0 4px; }
.city-fab { gap: 9px; top: 6px !important; left: 6px !important; }
.wbtns { gap: 9px !important; left: 6px !important; bottom: 8px !important; }
.wbtns .fab { font-size: 18px; }
.quest-tip { bottom: 6px; left: 54px; right: 6px; padding: 4px 8px; border-radius: 8px; }
.quest-tip .t { font-size: 12px; }
.quest-tip svg { width: 20px !important; height: 20px !important; }
.world .coords { top: 4px; right: 4px; }
.world .coords .chip, .world .legend .chip { font-size: 10.5px; padding: 1px 6px; }
.world .legend { top: 4px; left: 4px; }
.march-dock { top: 30px; width: min(232px, 64%); gap: 3px; }
.march-dock .md-card { padding: 2px 6px; }
.march-dock .md-b { width: 34px; }
.march-dock .md-b svg { width: 20px; height: 20px; }
.c2-radial .rb { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.c2-radial .rb svg { width: 30px; height: 30px; }
.c2-radial .rb span { font-size: 10px; }

/* bottom chat bar */
.chatbar { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px; position: relative; z-index: 5;
  background: linear-gradient(#120c07f0, #0b0805f5); border-top: 1px solid #5a4426; font-size: 12px; }
.chatbar .cb-tab { flex: none; height: 20px; padding: 0 7px; border-radius: 10px; border: 1px solid #5a4426; background: #1a120b; color: #c8b48a; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.chatbar .cb-tab.on { background: linear-gradient(#6a4a1e, #3a2614); color: #ffe08a; border-color: #c08f2c; }
.chatbar .cb-line { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #e8dcc0; }
.chatbar .cb-line b { color: #ffcf6b; font-weight: 800; }
.chatbar .cb-open { flex: none; width: 24px; height: 24px; border: 0; background: none; padding: 0; cursor: pointer; }
.chatbar .cb-open svg { width: 22px; height: 22px; }
/* upgrade summary */
.lu-hero { position: relative; height: 200px; margin: -12px -14px 0; overflow: hidden; background: radial-gradient(ellipse at 50% 80%, #8a6a32 0%, #3a2814 45%, #0e0a06 100%); }
.lu-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, #ffd36b22 0 6deg, transparent 6deg 18deg); animation: spin 30s linear infinite; pointer-events: none; }
.lu-art { position: absolute; inset: 10px 0 30px; z-index: 1; }
.lu-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px #000c); }
.lu-title { position: absolute; bottom: 6px; left: 0; right: 0; z-index: 2; text-align: center; text-shadow: 0 2px 0 #000; }
.lu-title b { display: block; font-family: var(--font-head); font-size: 20px; color: #ffe08a; }
.lu-title span { display: inline-block; margin-top: 2px; padding: 1px 14px; border-radius: 10px; background: linear-gradient(#3a6a1a, #15400a); border: 1px solid #e0b252; color: #fff; font-weight: 900; font-size: 13px; }
.lu-tbl { border-radius: 8px; overflow: hidden; border: 1px solid #5a4426; }
.lu-row { display: grid; grid-template-columns: 1.6fr 1fr 18px 1fr; align-items: center; gap: 4px; padding: 6px 8px; font-size: 12.5px; border-bottom: 1px solid #3a2a16; background: #140d07; }
.lu-row:last-child { border-bottom: 0; }
.lu-row.h { background: #2a1d10; color: #c8b48a; font-size: 11px; font-weight: 800; }
.lu-row .k { color: #e8dcc0; font-weight: 700; }
.lu-row .old { color: #a8a294; text-align: center; }
.lu-row .new { color: #e8dcc0; text-align: center; font-weight: 900; }
.lu-row.up .new { color: #5fd17f; }
.lu-row .arr { color: #c08f2c; text-align: center; }
.rp-why { background: linear-gradient(#2a1d10, #140d07); }
.rp-heroes { background: #120c07; border: 1px solid #3a2a16; border-radius: 8px; padding: 6px; }
.rp-hero { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
.rp-hero .ic { width: 38px; height: 46px; flex: none; border-radius: 6px; overflow: hidden; border: 1px solid #6b4f28; }
.rp-hero .t { font-size: 12px; font-weight: 800; }
.rp-troops { margin-top: 6px; border: 1px solid #3a2a16; border-radius: 8px; padding: 6px; background: #120c07; }
.rp-trow { display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr 1fr; gap: 3px; align-items: center; font-size: 11.5px; padding: 3px 2px; border-bottom: 1px dashed #2a1d10; }
.rp-trow.h { color: #c8b48a; font-weight: 800; font-size: 10.5px; }
.rp-unit { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rp-unit > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-uic { width: 22px; height: 22px; flex: none; border-radius: 4px; overflow: hidden; background: #2a1d10; }
.rp-uic img { width: 100%; height: 100%; }
.rp-eff summary { cursor: pointer; font-size: 11px; color: #ffcf6b; margin-top: 4px; }
.rp-phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.rp-phase { background: #140d07; border: 1px solid #3a2a16; border-radius: 8px; padding: 5px; }
.world canvas { filter: saturate(1.12) contrast(1.05); }
/* hero stage (full-length art) */
.hero-stage { position: relative; height: 330px; margin: -12px -14px 10px; overflow: hidden; border-bottom: 2px solid #5a4426;
  background: radial-gradient(ellipse at 50% 92%, #6a5232 0%, #2a1d10 45%, #0e0a06 80%); }
.hero-stage.r-legendary { background: radial-gradient(ellipse at 50% 85%, #8a5a10 0%, #3a2408 45%, #0e0a06 82%); }
.hero-stage.r-epic { background: radial-gradient(ellipse at 50% 85%, #4a2a6a 0%, #22103a 45%, #0e0a06 82%); }
.hero-stage.r-rare { background: radial-gradient(ellipse at 50% 85%, #1a3a6a 0%, #0e1a3a 45%, #0e0a06 82%); }
.hs-glow { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 70%, #ffd36b14 0 5deg, transparent 5deg 15deg); }
.hs-art { position: absolute; left: 50%; bottom: 34px; height: 300px; transform: translateX(-50%); filter: drop-shadow(0 10px 16px #000d); }
.hero-stage.painted { height: min(520px, 134vw); }
.hero-stage.painted .hs-glow { display: none; }
.hero-stage.painted .hs-art { inset: 0; left: 0; bottom: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: none; filter: none; }
.hero-stage.painted::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 1px #c9a24b66, inset 0 0 40px #000a; }
.hero-stage.painted .hs-name { z-index: 2; padding-top: 40px; }
.hs-name { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; padding: 4px 0 6px; background: linear-gradient(transparent, #0e0a06ee 40%); }
.hs-name b { display: block; font-family: var(--font-head); font-size: 19px; color: #ffe08a; text-shadow: 0 2px 0 #000; }
.hs-name span { font-size: 11.5px; color: #e8dcc0; margin: 0 4px; }
.sheet-wrap { isolation: isolate; } .sheet { isolation: isolate; }

/* ===================== top bar v2 ===================== */
.hud { padding: 6px 8px 5px; background: linear-gradient(180deg, #2a1b0e 0%, #140d07 60%, #0b0704 100%); }
.hud::before { content: ''; position: absolute; inset: 0; background: var(--carved) center / auto 100%; opacity: .25; pointer-events: none; }
.h2 { position: relative; }
.h2-top { display: flex; align-items: center; gap: 7px; }
.h2-av { position: relative; width: 56px; height: 56px; flex: none; padding: 0; border: 0; background: none; cursor: pointer; }
.h2-av .av-img { position: absolute; inset: 5px; border-radius: 50%; overflow: hidden; background: #000; box-shadow: inset 0 0 0 2px #000; }
.h2-av .av-img svg { width: 100%; height: 100%; display: block; }
.h2-av::after { content: ''; position: absolute; inset: -2px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.h2-av .av-lv { position: absolute; z-index: 1; bottom: -4px; inset-inline-start: -4px; min-width: 22px; height: 22px; line-height: 20px; border-radius: 50%; font-size: 11px; font-weight: 900;
  color: #2a1600; background: radial-gradient(#fff3b8, #e0b04a 60%, #a8701c); border: 1px solid #4a3008; box-shadow: 0 2px 4px #000; text-align: center; }
.h2-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.h2-name { font-weight: 900; font-size: 13px; color: #fff3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.h2-name b { color: #8fc8ff; }
/* combat power: a crimson plaque with a gold sword medallion */
.h2-power { position: relative; display: flex; align-items: center; height: 28px; padding: 0 10px 0 4px; padding-inline-start: 30px; border-radius: 15px; cursor: pointer; overflow: hidden;
  background: linear-gradient(180deg, #8a1c14 0%, #5a0e08 48%, #3e0804 52%, #6a140c 100%); border: 1px solid #e8b64c;
  box-shadow: inset 0 1px 0 #ffb08a66, inset 0 -2px 4px #0006, 0 2px 6px #000a; color: #fff; text-align: start; }
.h2-power::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, #ffffff30, transparent); animation: pw-shine 4.5s ease-in-out infinite; }
@keyframes pw-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.pw-emblem { position: absolute; inset-inline-start: -3px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(#5a3a14, #1a0e04 70%); border: 2px solid #e8b64c; box-shadow: 0 0 0 1px #000, 0 2px 6px #000; }
.pw-emblem svg { width: 24px; height: 24px; }
.pw-txt { display: flex; flex-direction: column; line-height: 1; }
.pw-txt i { font-style: normal; font-size: 8.5px; font-weight: 800; color: #ffcf9a; letter-spacing: .2px; }
.pw-txt b { font-size: 14px; font-weight: 900; background: linear-gradient(#fff8d8, #ffd36b 55%, #e09a2a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 #000); direction: ltr; }
.h2-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.h2-row { display: flex; gap: 5px; align-items: center; }
.h2-vip { display: flex; align-items: baseline; gap: 1px; height: 26px; padding: 0 7px; border-radius: 7px; cursor: pointer; direction: ltr;
  background: linear-gradient(#3a2a6a, #1a0e3a); border: 1px solid #c8a0ff; box-shadow: inset 0 1px 0 #ffffff33, 0 2px 4px #000a; color: #fff; line-height: 26px; }
.h2-vip i { font-style: normal; font-size: 10px; font-weight: 900; color: #e8d0ff; }
.h2-vip b { font-size: 14px; font-weight: 900; color: #ffe08a; }
.h2-gems { display: flex; align-items: center; gap: 3px; height: 26px; padding: 0 3px 0 4px; border-radius: 13px; cursor: pointer; direction: ltr;
  background: linear-gradient(#123a4a, #061a22); border: 1px solid #6ad8ff; color: #e8fbff; font-weight: 900; font-size: 12.5px; box-shadow: inset 0 1px 0 #ffffff33, 0 2px 4px #000a; }
.h2-gems svg { width: 22px; height: 22px; }
.h2-gems b { width: 18px; height: 18px; line-height: 17px; border-radius: 50%; background: linear-gradient(#7ad35a, #2f8a2a); color: #fff; font-size: 14px; text-align: center; border: 1px solid #e0ffd0; }
.h2-chips { display: flex; gap: 4px; }
.h2-chips:empty { display: none; }
.h2-chips .hud-ic { width: 26px; height: 26px; }
.h2-chips .hud-ic svg { width: 20px; height: 20px; }
/* resources: five capsules with a fill line (share of the storage) */
.h2-res { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; }
.h2-r { position: relative; display: flex; align-items: center; gap: 2px; height: 24px; padding: 0 5px 0 2px; border-radius: 12px; cursor: pointer; overflow: hidden; direction: ltr;
  background: linear-gradient(#0c0805, #1e150c); border: 1px solid #6b4f28; box-shadow: inset 0 2px 4px #000c; color: #fff6e0; font-weight: 900; font-size: 11.5px; min-width: 0; }
.h2-r svg { width: 24px; height: 24px; flex: none; margin: -3px 0 -3px -3px; position: relative; z-index: 1; }
.h2-r .num { position: relative; z-index: 1; flex: 1; text-align: center; text-shadow: 0 1px 2px #000; }
.h2-r .fill { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #6ab83a, #c8f07a); border-radius: 2px; }
.h2-r.full { border-color: #f0a020; }
.h2-r.full .num { color: #ffbe5a; }
.h2-r.full .fill { background: linear-gradient(90deg, #e05a20, #ffb04a); }

/* ===================== bottom bar v2: seven framed tiles, the active one raised ===================== */
.nav { grid-template-columns: repeat(7, 1fr); height: 70px; padding: 0 4px; background: linear-gradient(180deg, #1e140b, #0b0704); }
.navbtn { justify-content: flex-end; padding-bottom: 6px; font-size: 10.5px; color: #cdb48a; }
.navbtn .plate { position: absolute; inset: 7px 3px 4px; border-radius: 10px; background: linear-gradient(#2a1d10, #120c07); border: 1px solid #4a3620; box-shadow: inset 0 1px 0 #ffd36b22; transition: all .18s; }
.navbtn .sock { width: 40px; height: 40px; margin-bottom: 1px; z-index: 1; }
.navbtn .sock::before { display: none; }
.navbtn .sock svg { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px #000c); }
.navbtn .lb { position: relative; z-index: 1; margin: 0; font-weight: 800; }
.navbtn.on .plate { top: -6px; background: linear-gradient(#6a4416, #2a1808 70%); border-color: #f0c560; box-shadow: 0 0 12px #ffcf6b66, inset 0 1px 0 #fff3; }
.navbtn.on .sock { transform: translateY(-6px) scale(1.15); }
.navbtn.on .sock::after { display: none; }
.navbtn.on .lb { margin: 0; color: #ffe9a8; }
.navbtn .dot { top: 4px; left: auto; inset-inline-end: 4px; z-index: 2; }
@media (max-width: 420px) {
  .nav { height: 62px; }
  .navbtn { font-size: 9.5px; padding-bottom: 4px; }
  .navbtn .sock { width: 34px; height: 34px; }
  .navbtn .sock svg { width: 31px; height: 31px; }
  .h2-r { font-size: 10.5px; }
}

/* ===================== quest tracker (city side) ===================== */
.quest-side { position: absolute; z-index: 3; top: 10px; right: 8px; width: 168px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.quest-side > * { pointer-events: auto; }
.qs-head { display: flex; align-items: center; gap: 5px; align-self: flex-start; height: 30px; padding: 0 10px 0 6px; border-radius: 15px; cursor: pointer; position: relative;
  background: linear-gradient(#3a2610, #1a0f06); border: 1px solid #c08f2c; color: #ffe9b0; font-weight: 900; font-size: 12.5px; box-shadow: 0 3px 8px #000a; }
.qs-head svg { width: 22px !important; height: 22px !important; }
.qs-head b { color: #e0b252; font-size: 16px; }
.qs-head .badge { position: static; }
.qs-list { display: flex; flex-direction: column; gap: 4px; }
.qs-row { background: linear-gradient(90deg, #1a1008ee, #2a1a0cee); border: 1px solid #6b4f28; border-radius: 9px; padding: 5px 7px; cursor: pointer; box-shadow: 0 3px 8px #0009; }
.qs-row.done { border-color: #6ad04a; box-shadow: 0 0 10px #6ad04a55; }
.qs-k { font-size: 9px; font-weight: 900; color: #e0b252; }
.qs-t { font-size: 11.5px; font-weight: 800; color: #fff3d6; line-height: 1.3; }
.qs-bar { height: 4px; border-radius: 2px; background: #000a; margin: 4px 0 3px; overflow: hidden; }
.qs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #c08f2c, #ffe08a); }
.qs-row.done .qs-bar i { background: linear-gradient(90deg, #3c9a32, #9af07a); }
.qs-f { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #cdb48a; }
.qs-btn { border: 1px solid #a87a2c; background: linear-gradient(#5a4026, #2a1a0c); color: #ffe7b0; font-size: 10.5px; font-weight: 900; border-radius: 6px; padding: 1px 8px; cursor: pointer; }
.qs-btn.claim { background: linear-gradient(#7ad35a, #2f8a2a); color: #fff; border-color: #e0ffd0; animation: pulse 1.4s infinite; }
.qs-all { align-self: flex-start; border: 0; background: none; color: #e0b252; font-size: 11px; font-weight: 800; text-decoration: underline; cursor: pointer; text-shadow: 0 1px 2px #000; }
.city3d.moving::after { content: 'وضع النقل — اختر المكان الجديد'; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 6px 14px; border-radius: 16px;
  background: #1a6a2acc; border: 1px solid #9af07a; color: #fff; font-weight: 900; font-size: 13px; pointer-events: none; }
.fab.explore::after { filter: hue-rotate(160deg); }
.quest-side { width: 146px; }
.qs-row { padding: 4px 6px; background: linear-gradient(90deg, #1a1008d9, #2a1a0cd9); }
.qs-t { font-size: 10.5px; }
.qs-k { font-size: 8.5px; }

/* ===================== full-screen game screens ===================== */
.sheet.screen { height: 100%; max-height: 100%; border-radius: 0; animation: fade .15s;
  background: radial-gradient(ellipse at 50% 0%, #3a2612 0%, transparent 60%), linear-gradient(#1c130b, #0e0905), var(--carved) center top / 520px auto, #0e0a06; }
.sheet.screen::before { display: none; }
.sheet-wrap:has(.sheet.screen) { background: #000; }
.scr-head { position: relative; height: 60px; padding: 0 14px; border-radius: 0; border-bottom: 0; justify-content: center;
  background: linear-gradient(#000a, #0006), var(--carved) center / auto 100%, #24170c; box-shadow: 0 4px 10px #000c; }
.scr-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--trim); }
.scr-head h2 { flex: none; font-size: 22px; letter-spacing: .5px; }
.scr-back { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(#4a3014 0%, #1a0f06 70%); box-shadow: 0 3px 8px #000c; color: #ffe08a; font-size: 22px; font-weight: 900; display: grid; place-items: center; }
.scr-back::after { content: ''; position: absolute; inset: -3px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.scr-back span { transform: scaleX(-1); display: block; text-shadow: 0 2px 2px #000; }
[dir=ltr] .scr-back { left: auto; right: 6px; } [dir=ltr] .scr-back span { transform: none; }
.sheet.screen .sheet-body { padding: 8px 8px 20px; }
.sec-title { position: relative; text-align: center; margin: 14px 0 10px; }
.sec-title span { display: inline-block; padding: 6px 34px; font-family: var(--font-head); font-size: 18px; color: #ffe8b0; text-shadow: 0 2px 0 #000;
  background: linear-gradient(90deg, transparent, #3a2410 20%, #4a2e12 50%, #3a2410 80%, transparent); border-top: 1px solid #8a6420; border-bottom: 1px solid #8a6420; }
.empty-art { text-align: center; padding: 40px 10px; color: #b8a27a; } .empty-art svg { opacity: .35; }
.rdot { position: absolute; top: -5px; inset-inline-end: -4px; min-width: 18px; height: 18px; line-height: 17px; border-radius: 9px; background: radial-gradient(#ff5a4a, #b0100a); color: #fff; font-size: 10px; font-weight: 900; padding: 0 3px; border: 1px solid #ffd0a0; z-index: 2; }
.rdot:empty { width: 18px; padding: 0; }
.new, .ev-new { position: absolute; top: -6px; inset-inline-start: -2px; z-index: 2; padding: 1px 8px 3px; font-size: 10.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 1px #000;
  background: linear-gradient(#e8402a, #9a1408); clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%); }
/* gold screen tabs */
.stabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 4px 0 8px; }
.stabs button { position: relative; min-height: 44px; padding: 6px 4px; border-radius: 4px; cursor: pointer; font-family: var(--font-head); font-size: 15px; color: #c9b48c;
  background: linear-gradient(#3a2a18, #1e140a); border: 1px solid #5a4426; box-shadow: inset 0 1px 0 #ffd36b22, 0 2px 4px #000a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.stabs button.on { color: #3a1e00; text-shadow: 0 1px 0 #fff6; background: linear-gradient(#fff0b8 0%, #f0c560 30%, #c8902c 60%, #e0b04a 100%); border-color: #4a3008; }
.stabs .ts { font-family: var(--font); font-size: 11px; font-weight: 800; opacity: .9; direction: ltr; }
.stabs.big button { min-height: 50px; font-size: 18px; }
.stabs.small { overflow-x: auto; grid-auto-columns: minmax(64px, 1fr); scrollbar-width: none; }
.stabs.small button { min-height: 34px; font-size: 13px; font-family: var(--font); font-weight: 800; }
.stabs.mail { overflow-x: auto; grid-auto-columns: minmax(96px, 1fr); scrollbar-width: none; padding-top: 4px; }
.stabs.mail button { min-height: 52px; font-size: 14px; }

/* ---------- items ---------- */
.igrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.itile { position: relative; aspect-ratio: 1; border-radius: 4px; padding: 0; cursor: pointer; overflow: visible; border: 2px solid #2a2a2a; box-shadow: inset 0 0 0 1px #0008, 0 2px 4px #000a;
  background: radial-gradient(circle at 50% 40%, #6a6a6a, #2a2a2a 75%); }
.itile.uncommon { background: radial-gradient(circle at 50% 40%, #2a9a6a, #0a3a2a 75%); }
.itile.rare { background: radial-gradient(circle at 50% 40%, #2a6ad0, #0a1e4a 75%); }
.itile.epic { background: radial-gradient(circle at 50% 40%, #8a3ad8, #2a0a4a 75%); }
.itile.legendary { background: radial-gradient(circle at 50% 40%, #f0b020, #6a3a04 75%); }
.itile::after { content: ''; position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px #ffffff22, inset 0 -10px 14px #0006; pointer-events: none; }
.itile .iart { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 3px 3px #000a); }
.itile div.iart svg { width: 100%; height: 100%; }
.itile .ishard { position: absolute; inset: 10%; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); overflow: hidden; }
.itile .ishard .hero-art, .itile .ishard img { width: 100%; height: 100%; object-fit: cover; }
.ilabel { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 15px; font-weight: 900; color: #ffe24a; direction: ltr;
  text-shadow: 0 0 2px #000, 0 2px 0 #000, 1px 0 0 #000, -1px 0 0 #000; z-index: 1; }
.iqty { position: absolute; bottom: 1px; left: 4px; font-size: 15px; font-weight: 900; color: #fff; direction: ltr; text-shadow: 0 0 2px #000, 0 2px 0 #000, 1px 0 0 #000, -1px 0 0 #000; z-index: 1; }
.iprice { position: absolute; left: 0; right: 0; bottom: -14px; text-align: center; font-size: 11px; font-weight: 900; color: #ffe08a; z-index: 1; }
.iprice svg { width: 13px; height: 13px; vertical-align: -2px; }
.scr-bag .igrid:has(.iprice) { row-gap: 20px; }
.ifoot { position: sticky; bottom: -20px; margin: 12px -8px -20px; padding: 10px 8px 14px; display: flex; gap: 8px; background: linear-gradient(#0000, #0e0905 30%); }
.isearch { flex: 1; border-radius: 22px; background: linear-gradient(#efe4c4, #d8c89c); color: #3a2a10; border: 2px solid #8a6a3a; padding: 8px 14px; font-weight: 700; }
.isearch::placeholder { color: #6a5530; }
.ifoot .btn { border-radius: 22px; min-width: 90px; }
.idetail { display: flex; gap: 12px; align-items: flex-start; } .idetail > .itile { width: 96px; flex: none; }

/* ---------- events ---------- */
.ev-clock { text-align: center; color: #6ad04a; font-weight: 900; font-size: 15px; direction: ltr; text-shadow: 0 1px 2px #000; margin: 2px 0 6px; }
.ev-banner { position: relative; height: 190px; margin: 0 -8px; overflow: hidden; cursor: pointer; border-top: 2px solid #8a6420; border-bottom: 2px solid #8a6420;
  background: linear-gradient(90deg, #1a1008, #3a2410); }
.ev-banner .ev-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.ev-banner .ev-hero { position: absolute; z-index: 1; bottom: -40%; left: 50%; transform: translateX(-50%); height: 175%; object-fit: contain; filter: drop-shadow(0 0 12px #000); }
.ev-btitle { position: absolute; z-index: 2; top: 0; left: 0; right: 0; text-align: center; padding: 6px; font-family: var(--font-head); font-size: 18px; color: #ffe8b0; background: linear-gradient(#000c, #0000); text-shadow: 0 2px 0 #000; }
.ev-bstage { position: absolute; z-index: 2; top: 38px; inset-inline-end: 0; padding: 3px 12px; background: #000b; color: #8ae05a; font-weight: 900; font-size: 14px; border-radius: 0 0 0 8px; }
.ev-dots { position: absolute; z-index: 2; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.ev-dots i { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid #c08f2c; background: #0008; cursor: pointer; }
.ev-dots i.on { background: #3ad0b0; box-shadow: 0 0 6px #3ad0b0; }
.ev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; padding: 6px 2px; }
.ev-card { position: relative; cursor: pointer; text-align: center; padding: 26px 6px 10px; min-height: 170px; display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(#2e3a30, #1a221c); border: 2px solid #6a5a32; border-radius: 48% 48% 6px 6px / 22% 22% 6px 6px; box-shadow: inset 0 0 0 2px #0006, 0 4px 10px #000c; }
.ev-card::before { content: ''; position: absolute; top: -9px; left: 50%; width: 2px; height: 14px; background: #8a6420; }
.ev-card::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; background: var(--trim); opacity: .7; border-radius: 2px; }
.ev-med { width: 84%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid #c08f2c; box-shadow: 0 0 0 2px #2a1a08, 0 4px 10px #000c; background: #120c07; display: grid; place-items: center; }
.ev-med img { width: 100%; height: 100%; object-fit: cover; }
.ev-name { margin-top: 8px; font-family: var(--font-head); font-size: 14.5px; color: #fff3d6; text-shadow: 0 1px 2px #000; line-height: 1.3; }
.ev-sub { margin-top: 3px; font-size: 11px; font-weight: 800; color: #8ae05a; line-height: 1.3; }
.ev-sub b { direction: ltr; display: inline-block; }
.ev-card .ev-new { top: 2px; inset-inline-start: 6px; background: none; clip-path: none; color: #ffb060; font-family: var(--font-head); font-size: 14px; text-shadow: 0 0 6px #ff6a2a, 0 1px 0 #000; }
.scr-evd .evd-top { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.evd-img { width: 110px; height: 110px; border-radius: 50%; border: 3px solid #c08f2c; object-fit: cover; box-shadow: 0 4px 12px #000c; }
.evd-meta { display: flex; flex-direction: column; gap: 3px; } .evd-meta b { font-family: var(--font-head); font-size: 19px; color: #ffe08a; } .evd-meta span { font-size: 13px; font-weight: 700; }
.evd-score { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.evd-score > div { text-align: center; padding: 8px; border-radius: 8px; background: linear-gradient(#3a2410, #1a1008); border: 1px solid #8a6420; }
.evd-score i { display: block; font-style: normal; font-size: 11px; color: #cdb48a; } .evd-score b { font-size: 20px; color: #ffe08a; }
.evd-rules > div { display: flex; justify-content: space-between; padding: 6px 10px; border-bottom: 1px dashed #4a3620; font-size: 13px; } .evd-rules b { color: #8ae05a; }
.evd-step { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: radial-gradient(#fff0b8, #c8902c); color: #3a1e00; }

/* ---------- mail ---------- */
.parch { min-height: 56vh; margin: 0 -8px; padding: 10px 12px; border-top: 3px solid #6a5032; border-bottom: 3px solid #6a5032;
  background: radial-gradient(ellipse at 50% 45%, #e6dcc2 0%, #cdbf9c 70%, #b4a47e 100%); box-shadow: inset 0 0 40px #6a5a3a88; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid #a89870; cursor: pointer; color: #3a2a14; }
.mrow.unread { background: #fff6; }
.mrow.unread .mt { font-weight: 900; }
.mrow.unread .mic::after { content: ''; position: absolute; top: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: #d22; border: 1px solid #fff; }
.mic { position: relative; width: 42px; height: 42px; flex: none; border-radius: 50%; background: radial-gradient(#5a4026, #2a1a0c); border: 2px solid #8a6420; display: grid; place-items: center; }
.mic svg { width: 30px; height: 30px; }
.mt { font-size: 14px; font-weight: 700; color: #2a1a08; } .md { font-size: 11.5px; color: #6a5530; }
.mstar { color: #c08f2c; font-size: 18px; } .matt svg { filter: drop-shadow(0 0 4px #ffcf6b); }
.mempty { text-align: center; padding: 26vh 10px 0; color: #7a5a30; font-weight: 800; }
.memb { width: 130px; height: 130px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #a8906066; box-shadow: 0 0 0 10px #a8906022; opacity: .55; filter: sepia(1) saturate(.6); }
.mfoot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 12px 6px 0; }
.mfoot .btn { min-height: 48px; font-size: 15px; clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%); border-radius: 0; }
.mcompose { display: flex; align-items: center; gap: 6px; margin: 12px auto 0; border: 1px solid #8a6420; background: #1a1008; color: #ffe08a; border-radius: 16px; padding: 4px 14px; font-weight: 800; cursor: pointer; }

/* ---------- rankings ---------- */
.rk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 8px; padding: 14px 4px; border-radius: 8px;
  background: linear-gradient(#0000, #0000), repeating-linear-gradient(180deg, #1a120a 0, #1a120a 210px, #0e0905 210px, #0e0905 218px); }
.rk-card { position: relative; border: 0; background: none; cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; }
.rk-med { width: 88%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 4px solid #c8a04a; box-shadow: 0 0 0 3px #2a1a08, 0 6px 12px #000c; background: #1a2a18; display: grid; place-items: center; position: relative; z-index: 1; }
.rk-med img { width: 100%; height: 100%; object-fit: cover; }
.rk-gem { width: 16px; height: 20px; margin-top: -10px; z-index: 2; background: linear-gradient(#9af07a, #2a8a2a); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); filter: drop-shadow(0 0 4px #6ad04a); }
.rk-name { width: 92%; margin-top: -8px; padding: 14px 4px 18px; min-height: 64px; font-family: var(--font-head); font-size: 14px; color: #fff3d6; text-shadow: 0 1px 2px #000; line-height: 1.3;
  background: linear-gradient(#3a6a2a, #1a3a12); border: 2px solid #c8a04a; clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%); display: grid; place-items: center; }
.rkl-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; } .rkl-img { width: 84px; height: 84px; border-radius: 50%; border: 3px solid #c8a04a; object-fit: cover; }
.rkl-head b { display: block; font-family: var(--font-head); font-size: 19px; color: #ffe08a; }
.rkl-list { display: flex; flex-direction: column; gap: 5px; }
.rk-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: linear-gradient(90deg, #2a1d10, #1a1008); border: 1px solid #4a3620; }
.rk-row.me { border-color: #6ad04a; box-shadow: 0 0 8px #6ad04a55; }
.rk-n { width: 34px; height: 34px; flex: none; display: grid; place-items: center; font-weight: 900; color: #e8d8b0; font-size: 15px; }
.rk-row.r1 .rk-n, .rk-row.r2 .rk-n, .rk-row.r3 .rk-n { border-radius: 50%; color: #2a1600; }
.rk-row.r1 .rk-n { background: radial-gradient(#fff3b8, #e0a020); box-shadow: 0 0 8px #ffcf4a; } .rk-row.r1 .rk-n::before { content: '1'; }
.rk-row.r2 .rk-n { background: radial-gradient(#ffffff, #9aa8b8); } .rk-row.r2 .rk-n::before { content: '2'; }
.rk-row.r3 .rk-n { background: radial-gradient(#ffd8b0, #b06a2a); } .rk-row.r3 .rk-n::before { content: '3'; }
.rk-row.r1 { background: linear-gradient(90deg, #4a3410, #1a1008); border-color: #c8a04a; }
.rk-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 1px solid #8a6420; flex: none; } .rk-av svg { width: 100%; height: 100%; }
.rk-v { font-weight: 900; color: #ffe08a; } .blue { color: #8fc8ff; }

/* ---------- commander page ---------- */
.scr-pf { margin: -8px -8px -20px; padding-bottom: 6px; background: linear-gradient(#0000 0%, #0000 60%, #0b0704 100%); }
.pf-name { position: relative; margin: 10px auto 0; width: 70%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 17px; color: #fff;
  background: linear-gradient(90deg, transparent, #0009 15%, #000b 50%, #0009 85%, transparent); border-top: 1px solid #8a642088; border-bottom: 1px solid #8a642088; }
.pf-edit { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #8a6420; background: linear-gradient(#5a4026, #2a1a0c); cursor: pointer; display: grid; place-items: center; padding: 0; }
.pf-edit svg { width: 22px; height: 22px; }
.pf-stage { position: relative; height: 58vh; min-height: 380px; max-height: 560px; overflow: hidden; }
.pf-arch { position: absolute; left: 16%; right: 16%; top: 2%; bottom: 0; border-radius: 50% 50% 0 0 / 22% 22% 0 0; border: 3px solid #8a6420aa;
  background: radial-gradient(ellipse at 50% 30%, #6a4a24 0%, #3a2612 45%, #1a1008 80%), repeating-linear-gradient(60deg, #ffffff06 0 2px, #0000 2px 14px); box-shadow: inset 0 0 40px #000c; }
.pf-hero { position: absolute; left: 50%; bottom: -12%; transform: translateX(-50%); height: 120%; object-fit: contain; filter: drop-shadow(0 0 14px #000); }
.pf-avatar { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: 50%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; } .pf-avatar svg { width: 100%; height: 100%; }
.pf-col { position: absolute; top: 14%; display: flex; flex-direction: column; gap: 10px; z-index: 2; } .pf-col.l { left: 8px; } .pf-col.r { right: 8px; }
.pf-slot { position: relative; width: 66px; height: 66px; border-radius: 6px; cursor: pointer; padding: 6px; background: linear-gradient(#2a2016, #120c07); border: 2px solid #4a3a26; box-shadow: inset 0 0 12px #000, 0 2px 6px #000c; }
.pf-slot svg { width: 100%; height: 100%; }
.pf-ghost { display: block; width: 100%; height: 100%; opacity: .28; filter: grayscale(1); }
.pf-slot.r-uncommon { border-color: #3ab070; } .pf-slot.r-rare { border-color: #3a7ae0; } .pf-slot.r-epic { border-color: #a055e8; } .pf-slot.r-legendary { border-color: #f0b020; box-shadow: 0 0 10px #f0b02088; }
.pf-lv { position: absolute; bottom: 1px; right: 4px; font-size: 11px; color: #9af07a; text-shadow: 0 1px 1px #000; }
.pf-chip { position: absolute; z-index: 2; bottom: 8px; left: 50%; transform: translateX(-50%); padding: 5px 26px; border-radius: 16px; cursor: pointer; color: #fff3d6; font-size: 15px;
  background: linear-gradient(#2a1d10, #0e0905); border: 1px solid #c08f2c; box-shadow: 0 2px 8px #000; }
.pf-stats { display: grid; grid-template-columns: 1fr 1.3fr 1fr; text-align: center; padding: 10px 6px; background: linear-gradient(#0000, #0009); }
.pf-stats > div { border-inline-start: 1px solid #8a642066; } .pf-stats > div:first-child { border: 0; }
.pf-stats i { display: block; font-style: normal; font-size: 13px; color: #d8c39b; } .pf-stats b { font-size: 18px; color: #fff; }
.pf-stats .main b { font-size: 24px; background: linear-gradient(#fff8d8, #ffd36b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-bar { display: flex; align-items: center; gap: 6px; padding: 4px 10px; direction: ltr; }
.pf-plus { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #c08f2c; background: radial-gradient(#6a4a1e, #2a1808); color: #ffe08a; font-weight: 900; font-size: 18px; cursor: pointer; padding: 0; flex: none; }
.pf-track { position: relative; flex: 1; height: 20px; border-radius: 10px; background: #0a0604; border: 1px solid #5a4426; overflow: hidden; box-shadow: inset 0 2px 4px #000; }
.pf-track i { position: absolute; inset: 0 auto 0 0; border-radius: 10px; }
.pf-bar.xp .pf-track i { background: linear-gradient(#7ac8ff, #2a7ad0 60%, #1a4a90); }
.pf-bar.st .pf-track i { background: linear-gradient(#b8f07a, #4aa82a 60%, #2a6a14); }
.pf-track span { position: absolute; inset: 0; text-align: center; line-height: 19px; font-size: 12.5px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.pf-bic { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#5a1a12, #1a0604); border: 2px solid #c08f2c; } .pf-bic svg { width: 24px; height: 24px; }
.pf-acts { display: flex; justify-content: space-around; padding: 12px 8px 4px; }
.pf-act { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #e8d8b0; font-weight: 800; font-size: 13px; text-shadow: 0 1px 2px #000; }
.pf-ring { width: 54px; height: 54px; display: grid; place-items: center; transform: rotate(45deg); border: 2px solid #c08f2c; border-radius: 10px; background: radial-gradient(#4a3014, #1a0f06); box-shadow: 0 3px 8px #000c; }
.pf-ring svg { width: 36px; height: 36px; transform: rotate(-45deg); }
.pf-navs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; padding: 12px 6px 6px; border-top: 3px solid transparent; border-image: var(--trim) 1; background: linear-gradient(#1a120a, #0b0704); }
.pf-nav { position: relative; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff3d6; font-weight: 800; font-size: 13px; font-family: var(--font-head); }
.pf-crest { width: 64px; height: 56px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, #3a5a3a, #142014 70%); border: 2px solid #c8a04a;
  clip-path: polygon(50% 0, 100% 22%, 92% 80%, 50% 100%, 8% 80%, 0 22%); } .pf-crest svg { width: 38px; height: 38px; }
.stabs { margin-top: 12px; }
.ev-sub b { direction: rtl; unicode-bidi: isolate; }
.rk-grid, .ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.igrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rk-card, .ev-card, .itile { min-width: 0; }
.rk-grid { background: linear-gradient(#1a120a, #120c07); }
.pf-navs { position: sticky; bottom: -20px; z-index: 3; }
.scr-mail { display: flex; flex-direction: column; min-height: calc(100dvh - 92px); } .scr-mail .parch { flex: 1; }
.scr-bag { display: flex; flex-direction: column; min-height: calc(100dvh - 92px); } .scr-bag .ifoot { margin-top: auto; }
.sheet.screen .sheet-body { overflow-x: hidden; } .stabs.small, .stabs.mail { max-width: 100%; }

/* ---------- lord data ---------- */
.ld-top { display: flex; gap: 10px; align-items: center; padding: 8px 4px 12px; border-bottom: 1px solid #5a4426; }
.ld-av { position: relative; width: 86px; height: 86px; flex: none; border: 2px solid #8a6420; border-radius: 4px; overflow: hidden; background: #000; } .ld-av svg { width: 100%; height: 100%; }
.ld-swap { position: absolute; bottom: 2px; inset-inline-start: 2px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #c08f2c; background: #1a1008cc; padding: 2px; cursor: pointer; } .ld-swap svg { width: 100%; height: 100%; }
.ld-id { flex: 1; min-width: 0; }
.ld-name { display: flex; align-items: center; gap: 6px; padding: 4px 10px; background: linear-gradient(90deg, #0008, #0004); border: 1px solid #5a4426; border-radius: 4px; font-size: 16px; }
.ld-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 14px; color: #e8d8b0; } .ld-meta b { color: #fff; }
.ld-uid { align-self: center; display: flex; align-items: center; gap: 4px; border: 0; background: none; color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; direction: ltr; } .ld-uid svg { width: 22px; height: 22px; }
.ld-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 4px; }
.ld-stat { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: #e8d8b0; margin-bottom: 6px; } .ld-stat svg { width: 26px; height: 26px; flex: none; } .ld-stat b { color: #fff; }
.ld-band { margin: 10px -4px 4px; padding: 9px; text-align: center; font-family: var(--font-head); font-size: 17px; color: #ffe8b0; text-shadow: 0 2px 0 #000;
  background: linear-gradient(#3a2814, #24170c); border: 2px solid #6b4f28; border-radius: 4px; box-shadow: inset 0 0 0 1px #c08f2c55; }
.ld-list .ld-row { display: flex; justify-content: center; gap: 10px; padding: 9px 6px; font-size: 15px; color: #f1e6c8; }
.ld-list .ld-row:nth-child(even) { background: #ffffff0a; } .ld-row b { color: #fff; min-width: 40px; }

/* ---------- skills tree ---------- */
.scr-sk { margin: -8px -8px -20px; min-height: calc(100dvh - 60px); padding: 8px 8px 0; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 30% 20%, #2a3a5a55, transparent 60%), radial-gradient(ellipse at 70% 70%, #3a2a5a44, transparent 60%), radial-gradient(1px 1px at 20% 30%, #fff8, transparent), radial-gradient(1px 1px at 80% 60%, #fff6, transparent), radial-gradient(1px 1px at 50% 85%, #fff6, transparent), #0b1220; }
.sk-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 13px; color: #d8e8ff; background: #0006; border-radius: 16px; border: 1px solid #3a5a7a; }
.sk-pts b, .sk-bar b { color: #ffe08a; }
.sk-trees { display: flex; gap: 6px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; }
.sk-tree { flex: none; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 14px 0 4px; border-radius: 28px; cursor: pointer; color: #fff;
  background: linear-gradient(90deg, #1a2a20, #0e1810); border: 2px solid #5a6a4a; clip-path: none; }
.sk-tree.t-mil { background: linear-gradient(90deg, #4a1410, #1a0806); border-color: #8a3a2a; } .sk-tree.t-eco { background: linear-gradient(90deg, #1a3a4a, #081a22); border-color: #3a7a8a; }
.sk-tree.t-def { background: linear-gradient(90deg, #1a2a5a, #080e22); border-color: #4a6aaa; } .sk-tree.t-exp { background: linear-gradient(90deg, #1a4a24, #081a0c); border-color: #4a9a4a; }
.sk-tree.on { border-color: #ffd36b; box-shadow: 0 0 10px #ffcf6b88; }
.sk-tic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#5a4a3a, #1a120a); border: 2px solid #c8a04a; } .sk-tic svg { width: 32px; height: 32px; }
.sk-tn { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--font-head); font-size: 14px; } .sk-tn b { font-size: 16px; color: #8ae05a; }
.sk-map { position: relative; margin: 8px 0 12px; }
.sk-lines { position: absolute; inset: 0; pointer-events: none; } .sk-lines svg { display: block; }
.sk-node { position: absolute; transform: translateX(-50%); width: 104px; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; padding: 0; }
.sk-circle { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: radial-gradient(#8a2a1a, #3a0a06 75%);
  border: 3px solid #c8a04a; box-shadow: 0 0 0 2px #1a0e04, 0 4px 10px #000c; }
.sk-circle img { width: 92%; height: 92%; object-fit: contain; } .sk-circle svg { width: 50px; height: 50px; }
.sk-lv { margin-top: -14px; z-index: 1; padding: 1px 10px; border-radius: 10px; background: linear-gradient(#5a4026, #2a1a0c); border: 1px solid #c8a04a; color: #fff; font-size: 13px; font-weight: 900; direction: ltr; }
.sk-name { margin-top: 3px; padding: 1px 8px; font-size: 12.5px; font-weight: 800; color: #fff3d6; text-shadow: 0 1px 2px #000; background: linear-gradient(90deg, transparent, #000a, transparent); white-space: nowrap; max-width: 116px; overflow: hidden; text-overflow: ellipsis; }
.sk-node.locked .sk-circle { filter: grayscale(1) brightness(.6); border-color: #6a6a6a; } .sk-node.locked .sk-lv { filter: grayscale(1); }
.sk-node.done .sk-lv { background: linear-gradient(#3c9a32, #1a4a14); }
.sk-node.run .sk-circle { box-shadow: 0 0 0 2px #1a0e04, 0 0 18px #ffcf4a; animation: pulse 1.4s infinite; }
.sk-foot { position: sticky; bottom: 0; margin: auto -8px 0; padding: 12px; background: linear-gradient(#0000, #0b1220 30%); display: flex; justify-content: center; }
.sk-btn { display: flex; flex-direction: column; align-items: center; min-width: 200px; padding: 6px 24px; border-radius: 10px; cursor: pointer; color: #fff3d6; font-weight: 800;
  background: linear-gradient(#8a5a1a, #5a3408); border: 2px solid #ffd36b; clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%); }
.sk-btn b { color: #ffe08a; } .sk-btn i { font-style: normal; font-size: 12px; color: #8ae05a; }
.sk-idle { color: #a8c0e0; font-size: 13px; }

/* ---------- armory ---------- */
.arm-heroes { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.arm-hero { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; padding: 0; border: 2px solid #5a4426; background: #000; cursor: pointer; }
.arm-hero.on { border-color: #ffd36b; box-shadow: 0 0 8px #ffcf6b; } .arm-hero .hero-art, .arm-hero img { width: 100%; height: 100%; object-fit: cover; }
.arm-stage { height: 360px; min-height: 0; margin: 0 -8px; }
.pf-slot img { width: 100%; height: 100%; object-fit: contain; }
.pf-sn { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10px; font-style: normal; color: #a89870; text-align: center; }
.pf-ghost svg { width: 100%; height: 100%; }
.ienh { position: absolute; top: 2px; right: 4px; font-size: 12px; font-weight: 900; color: #9af07a; text-shadow: 0 1px 1px #000; z-index: 1; }
.iworn { position: absolute; bottom: 1px; right: 3px; font-size: 10px; font-weight: 900; color: #fff; background: #1a6a2acc; border-radius: 6px; padding: 0 4px; z-index: 1; }
.arm-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ---------- world map controls v2 ---------- */
.world .coords { display: none; }
.world .wbtns { top: 46px; bottom: auto !important; left: 6px !important; gap: 12px !important; }
.wside { position: relative; width: 62px; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: #fff3d6; font-size: 10.5px; font-weight: 900; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.wside svg { width: 50px; height: 50px; filter: drop-shadow(0 3px 4px #000c); }
.wside .new { top: -4px; inset-inline-start: 0; }
.wzoom { position: absolute; z-index: 2; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.wzoom button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #c08f2c; background: radial-gradient(#4a3014, #1a0f06); color: #ffe08a; font-size: 20px; font-weight: 900; cursor: pointer; }
.wbar { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 8px; display: flex; align-items: center; gap: 6px; direction: ltr; }
.wb-pin, .wb-search { width: 50px; height: 50px; flex: none; border-radius: 50%; cursor: pointer; padding: 0; position: relative; display: grid; place-items: center;
  background: radial-gradient(#5a3a1a, #1a0f06 70%); border: 0; box-shadow: 0 3px 8px #000c; font-size: 22px; }
.wb-pin::after, .wb-search::after, .wb-big::after { content: ''; position: absolute; inset: -3px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.wb-pin svg { width: 32px; height: 32px; }
.wb-coords { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; border-radius: 4px;
  background: linear-gradient(90deg, #1a1008dd, #2a1d10ee, #1a1008dd); border: 1px solid #6b4f28; color: #fff; font-weight: 900; font-size: 15px; white-space: pre; }
.wb-pen { color: #e0b252; font-size: 16px; }
.wb-big { position: relative; width: 66px; height: 66px; flex: none; border-radius: 50%; border: 0; cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(#6a4a1e, #1a0f06 72%); color: #ffe9b8; font-size: 9.5px; font-weight: 900; box-shadow: 0 4px 10px #000c; }
.wb-big svg { width: 38px; height: 38px; }
.world .legend { top: 6px; left: 6px; }
.scr-sk > *, .scr-bag > *, .scr-mail > *, .scr-pf > *, .scr-arm > * { min-width: 0; max-width: 100%; }
.sk-trees { max-width: calc(100% + 0px); }

/* skills: smaller nodes, art sits inside the circle */
.sk-node { width: 88px; }
.sk-circle { width: 62px; height: 62px; border-width: 2px; }
.sk-circle img { width: 74%; height: 74%; object-fit: contain; }
.sk-circle svg { width: 36px; height: 36px; }
.sk-lv { margin-top: -10px; font-size: 11.5px; padding: 0 8px; }
.sk-name { font-size: 11.5px; max-width: 96px; }

/* every tab strip uses the gold game tabs */
.tabs { display: flex; gap: 4px; padding: 0; margin: 12px 0 10px; background: none; border: 0; border-radius: 0; overflow-x: auto; }
.tabs button { flex: 1 0 auto; min-height: 40px; padding: 6px 12px; border-radius: 4px; font-family: var(--font-head); font-size: 14.5px; font-weight: 400; color: #c9b48c;
  background: linear-gradient(#3a2a18, #1e140a); border: 1px solid #5a4426; box-shadow: inset 0 1px 0 #ffd36b22, 0 2px 4px #000a; }
.tabs button.on { color: #3a1e00; text-shadow: 0 1px 0 #fff6; background: linear-gradient(#fff0b8 0%, #f0c560 30%, #c8902c 60%, #e0b04a 100%); border-color: #4a3008; box-shadow: none; }
.tabs .dot { top: -5px; left: -3px; border: 1px solid #ffd0a0; }
/* grids never grow wider than the screen because of a picture's natural size */
.hero-grid, .grid2, .grid3, .grid4, .slots { min-width: 0; }
.hero-grid > *, .grid2 > *, .grid3 > *, .grid4 > *, .igrid > *, .ev-grid > *, .rk-grid > * { min-width: 0; }
.hero-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sheet.screen .hero-card img, .sheet.screen .hero-art img { max-width: 100%; }
.more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; padding: 6px 0 10px; }
.more-it { position: relative; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #f1e6c8; }
.more-ring { position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#4a3218, #1a1008 72%); box-shadow: 0 4px 10px #000a; }
.more-ring::after { content: ''; position: absolute; inset: -4px; background: var(--ring) center / contain no-repeat; pointer-events: none; }
.more-ring svg { width: 42px; height: 42px; }
.more-lb { font-size: 12px; font-weight: 800; text-shadow: 0 1px 2px #000; text-align: center; line-height: 1.2; }
.more-it .rdot { top: -2px; inset-inline-end: 6px; }
.al-head { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 0 -8px; background: linear-gradient(90deg, #3a2410, #1a1008), var(--carved) center / auto 100%; border-bottom: 2px solid #8a6420; }
.al-emb { width: 84px; height: 84px; flex: none; filter: drop-shadow(0 4px 8px #000); }
.al-id { display: flex; flex-direction: column; gap: 3px; } .al-id b { font-family: var(--font-head); font-size: 19px; color: #ffe08a; } .al-id > span { font-size: 12.5px; color: #cdb48a; }
.al-nums { display: flex; gap: 10px; font-size: 13px; font-weight: 800; } .al-nums span { display: flex; align-items: center; gap: 3px; } .al-nums svg { width: 16px; height: 16px; }
.al-grid { margin: 8px 0 12px; }
.ar-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.ar-stat { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 8px; background: linear-gradient(#2e2114, #1a1008); border: 1px solid #5a4426; }
.ar-stat b { font-size: 15px; color: #fff; } .ar-stat i { font-style: normal; font-size: 10.5px; color: #cdb48a; text-align: center; }
.ar-train > div { display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin-top: 4px; border-radius: 8px; background: #1a3a12aa; border: 1px solid #4a8a2a; font-size: 13px; }
.ar-train b { margin-inline-start: auto; color: #9af07a; }
.itile .iart.unit { object-fit: cover; object-position: 50% 15%; inset: 4%; width: 92%; height: 92%; border-radius: 2px; }
.itile:has(.unit) { overflow: hidden; } .itile .iart.unit { transform: scale(1.5); transform-origin: 50% 28%; object-fit: contain; }
.sh-wallet { display: flex; justify-content: center; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.sh-wallet span { display: flex; align-items: center; gap: 3px; padding: 2px 10px; border-radius: 12px; background: #0008; border: 1px solid #5a4426; font-weight: 800; font-size: 13px; }
.sh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
.sh-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 8px; background: linear-gradient(#2a1d10, #140d07); border: 1px solid #5a4426; min-width: 0; }
.sh-cell .itile { width: 76%; }
.sh-cell.sold { opacity: .5; }
.sh-name { font-size: 12px; font-weight: 800; text-align: center; line-height: 1.25; min-height: 30px; }
.sh-left { font-size: 10.5px; color: #cdb48a; }
.sh-buy { width: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; border-radius: 6px; cursor: pointer; font-weight: 900; font-size: 13px; color: #2a1600;
  background: linear-gradient(#fff0b8, #e0b04a 50%, #c8902c); border: 1px solid #4a3008; }
.sh-buy svg { width: 16px; height: 16px; } .sh-buy[disabled] { filter: grayscale(1); }
.rw-item { display: inline-block; width: 46px; vertical-align: middle; }
.rw-item .itile { width: 46px; border-width: 1px; }
.rw-item .ilabel { font-size: 10px; } .rw-item .iqty { font-size: 11px; }
.cost:has(.rw-item) { align-items: center; gap: 4px; }

/* tablets (iPad): use most of the screen instead of a phone-width column */
@media (min-width: 700px) {
  #app, .sheet-wrap { max-width: 900px; }
  .igrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ev-grid, .rk-grid, .sh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .more-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
