/* ApexScape: the same building blocks as Apex Idle (idle.css), in warm stone and gold */
#screen-scape {
  --i-bg: #17140f; --i-panel: #241f17; --i-panel2: #2f281d; --i-line: rgba(255, 228, 170, 0.1); --i-text: #f3ead8;
  --i-muted: #b5a78d; --i-gold: #f2c14e; --i-gold2: #c8922a; --i-green: #5fd16a; --i-red: #d23c43; --i-blue: #7cc7ff;
  padding: 0; background: var(--i-bg); color: var(--i-text);
}
#screen-scape .i-top { background: linear-gradient(180deg, #17140f 0%, #2a2218 100%); }
#screen-scape .i-shell h2, #screen-scape .i-shell h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.6px; }
#screen-scape .i-card { background: linear-gradient(180deg, #2a2319, #221d15); }
#screen-scape .i-nav button.on { background: linear-gradient(180deg, #3a2d16, #241f17); }

/* skills: 15 tiles in 4 columns */
.s-grid .i-skill .ic { font-size: 26px; }
.s-grid .i-skill b { font-size: 10.5px; }
.needs { color: #d8c9a8 !important; }
.needs .bad, .bad { color: #ff8a80 !important; }

/* ---- layout in the style of the big idle RPGs (own colours and icons) ---- */
/* top bar: wealth on the left, two square buttons on the right */
.s-wealth { justify-content: flex-start; gap: 10px; font-size: 14px; }
.s-wealth .lbl { color: var(--i-gold); font-weight: 800; text-decoration: underline dotted; font-size: 12.5px; }
.i-ic.sq { width: 42px; height: 42px; border-radius: 9px; background: linear-gradient(#3a2f20, #241d14); border: 1px solid rgba(242, 193, 78, 0.35); }

/* activity card */
.s-card { position: relative; border: 1px solid rgba(242, 193, 78, 0.3); background: linear-gradient(180deg, #2b3245, #1c2232) !important; }
.s-card .i-act-ic { width: 54px; height: 54px; font-size: 30px; }
.s-card .i-act-ic em { top: -7px; left: -7px; right: auto; }
.s-act-head { display: flex; align-items: center; gap: 6px; }
.s-act-head .live { width: 9px; height: 9px; border-radius: 50%; background: var(--i-green); box-shadow: 0 0 6px var(--i-green); flex: none; }
.s-actbar { height: 16px; overflow: visible; }
.s-actbar > i { background: linear-gradient(90deg, #3aa6c8, #6fd6ef); }
.i-act-side small#s-act-p { font-size: 15px; font-weight: 800; color: #d9dfe9; }
.i-stop.sq { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; border-radius: 10px; font-size: 11px; }
.i-stop.sq span { font-size: 15px; line-height: 1; }
/* fight card: two life bars, portrait, food, stop */
.s-fightcard { align-items: stretch; gap: 8px; }
.s-fightcard .i-act-body { gap: 4px; }
.s-lives { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.s-life-l { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; }
.s-life.you .s-life-l span { color: #b8e6a8; }
.s-life.mon .s-life-l span { color: #ff6b6b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-life-bar { height: 12px; border-radius: 7px; background: #120f0b; border: 1px solid rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 2px; }
.s-life-bar > i { display: block; height: 100%; border-radius: 6px; }
.s-life.you .s-life-bar > i { background: linear-gradient(#8fc98a, #5f9f5b); }
.s-life.mon .s-life-bar > i { background: linear-gradient(#ff2a2a, #c80d0d); transition: width 0.15s linear; }
.s-thin { position: relative; height: 4px; border-radius: 2px; background: #120f0b; overflow: hidden; margin-top: 4px; }
.s-thin > i { position: absolute; inset: 0 auto 0 0; background: #c8922a; }
.s-fightmsg { position: static !important; display: block; min-height: 0; text-align: center; font-size: 11.5px; font-weight: 800; }
.s-portrait { width: 54px; border-radius: 10px; display: grid; place-items: center; font-size: 32px; background: #1a1611; border: 1px solid var(--i-line); flex: none; }
.s-food { position: relative; appearance: none; width: 58px; flex: none; border-radius: 10px; border: 1px solid var(--i-line); background: #1a1611; color: var(--i-text); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 2px; font: inherit; }
.s-food span { font-size: 24px; line-height: 1; }
.s-food em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 10px; font-weight: 900; color: #ffe08a; }
.s-food small { font-size: 10px; font-weight: 800; color: #b8e6a8; }
.s-food.none small { color: var(--i-muted); }

/* panels with a double frame */
.s-panel { border: 2px solid rgba(200, 146, 42, 0.55); box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.4); }
.s-styles { display: grid; grid-template-columns: 1fr 1fr 1fr auto auto; gap: 6px; }
.s-style { appearance: none; cursor: pointer; border: 1px solid var(--i-line); background: #1d1912; color: var(--i-text); border-radius: 10px; padding: 7px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: 800 12px system-ui, sans-serif; }
.s-style span { font-size: 18px; }
.s-style.on { background: linear-gradient(#4a3a1c, #2e2414); border-color: var(--i-gold); color: #ffe08a; }
.s-style.icon { font-size: 20px; padding: 7px 10px; background: #26301c; }
.s-style.gear { background: #1f2636; padding: 7px 10px; justify-content: center; font-size: 13px; }
.s-nums { display: flex; justify-content: space-between; margin: 10px 2px; font-size: 13px; color: var(--i-muted); flex-wrap: wrap; gap: 4px; }
.s-nums b { color: var(--i-text); font-size: 15px; }
.s-nums b.r { color: #ff7b72; } .s-nums b.b { color: var(--i-blue); } .s-nums b.g { color: var(--i-green); }
.s-equip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: #15120d; border: 1px solid var(--i-line); }
.s-eq-l, .s-eq-r { display: flex; flex-direction: column; gap: 4px; }
.s-eq-r { align-items: flex-end; text-align: right; }
.s-eq-l b { color: var(--i-gold); font-size: 13.5px; }
.s-eq-l small, .s-eq-r small { font-size: 11.5px; color: var(--i-muted); }
.s-eq-pill { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; background: #26301c; border: 1px solid rgba(95, 209, 106, 0.4); font-weight: 800; font-size: 13px; }
.s-eq-pill.bad { background: #3a1414; border-color: rgba(255, 107, 107, 0.4); }
.s-goldtext { color: #f2c14e !important; font-weight: 800; }   /* not ".gold": that is the yellow button */
.s-lv { margin-top: 10px; }
.s-lv b { font-size: 12.5px; color: var(--i-gold); }
.s-goldbar { height: 16px !important; margin-top: 3px; }
.s-goldbar > i { background: linear-gradient(#e6b24a, #b8841f) !important; }

/* monster card */
.s-mon-top { display: flex; gap: 10px; }
.s-mon-pic { width: 70px; height: 70px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 44px; background: #1a1611; border: 1px solid rgba(242, 193, 78, 0.35); }
.s-mon-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s-mon-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-mon-row select { flex: 1; min-width: 0; max-width: 100%; min-height: 36px; border-radius: 9px; border: 1px solid var(--i-line); background: #1d1912; color: var(--i-text); font: 800 15px system-ui, sans-serif; padding: 4px 8px; }
.s-risk { padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; border: 1px solid; }
.s-risk.easy { color: #8fe08a; border-color: rgba(143, 224, 138, 0.5); background: rgba(143, 224, 138, 0.1); }
.s-risk.even { color: #ffe08a; border-color: rgba(255, 224, 138, 0.5); background: rgba(255, 224, 138, 0.08); }
.s-risk.hard { color: #ffa36b; border-color: rgba(255, 163, 107, 0.5); background: rgba(255, 163, 107, 0.1); }
.s-risk.deadly { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.6); background: rgba(255, 107, 107, 0.12); }
.s-mon-stats { display: grid; grid-template-columns: 1fr 1fr 1fr auto; margin: 10px 0 6px; border-radius: 10px; background: #15120d; border: 1px solid var(--i-line); overflow: hidden; }
.s-mon-stats > span { padding: 8px 10px; border-right: 1px solid var(--i-line); display: flex; flex-direction: column; }
.s-mon-stats b { font-size: 17px; } .s-mon-stats b.xp { color: var(--i-blue); }
.s-mon-stats small { font-size: 11px; color: var(--i-muted); }
.s-more { appearance: none; border: 0; background: transparent; color: var(--i-text); font-size: 24px; padding: 0 14px; cursor: pointer; }
.s-mon-note { font-size: 12.5px; color: #e0b057 !important; margin: 2px 0 8px; }
.s-mon-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-loots { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.s-loot { padding: 4px 8px; border-radius: 8px; background: #1d1912; border: 1px solid var(--i-line); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.s-moncard.boss { border-color: rgba(210, 60, 67, 0.7); }

/* skills: how many you have, the tool card */
.i-train .ic { position: relative; }
.s-cnt { position: absolute; bottom: -5px; left: -4px; font-style: normal; font-size: 10px; font-weight: 900; padding: 1px 4px; border-radius: 6px; background: #0e0c09; border: 1px solid var(--i-line); color: #fff; }
.s-tool { margin-top: 10px; }
.s-on { padding: 6px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 900; background: #2a2a2a; color: var(--i-muted); }
.s-on.yes { background: var(--i-green); color: #0c2a10; }

/* bottom menu: five buttons, the open one wider and raised */
#screen-scape .i-nav button { flex: 1; font-size: 10.5px; }
#screen-scape .i-nav button.on { flex: 1.7; transform: translateY(-4px); border-width: 2px; }
#screen-scape .i-nav button.on span { font-size: 26px; }

/* what a finished bar gave, shown in the middle of the bar for a moment */
.s-actbar #s-act-pct.gain, .s-actbar #s-act-pct.fail { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px 12px; border-radius: 999px;
  background: #15120d; border: 1px solid rgba(242, 193, 78, 0.6); white-space: nowrap; animation: pillpop 1.3s ease-out; }
@keyframes pillpop {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  15% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  30% { transform: translate(-50%, -50%) scale(1); }
  85% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
}
#s-act-pct.gain { color: #fff6c9; font-size: 12px; animation: gainpop 1.3s ease-out; text-shadow: 0 0 6px rgba(242, 193, 78, 0.9), 0 1px 2px #000; }
#s-act-pct.fail { color: #ffb3ad; font-size: 12px; animation: gainpop 1.3s ease-out; }
@keyframes gainpop { 0% { transform: scale(0.6); opacity: 0; } 15% { transform: scale(1.15); opacity: 1; } 30% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0.2; } }

/* More: menu, high scores, settings */
.s-menu { cursor: pointer; }
.s-menu .lock { font-size: 22px; color: var(--i-gold); }
.s-back { margin: 8px 0 0; padding: 6px 10px; }
.s-chips.wrap { flex-wrap: wrap; overflow: visible; }
.s-chips.wrap .s-chip { padding: 6px 10px; font-size: 12px; }
.s-scores li.me { background: rgba(242, 193, 78, 0.12); border-radius: 8px; }
.s-scores li.me b { color: #ffe08a; }
.s-set { border-bottom-color: var(--i-line) !important; }
.s-set small { color: var(--i-muted); }
#screen-scape .i-nav button { font-size: 9.5px; letter-spacing: 0.2px; }
#screen-scape .i-nav button span { font-size: 19px; }

/* life points */
.s-hp { position: relative; height: 14px; border-radius: 7px; background: #3a0f12; border: 1px solid rgba(255, 90, 107, 0.35); overflow: hidden; margin: 3px 0; }
.s-hp > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2f9b45, #5fd16a); }
.s-hp span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }

/* combat */
.s-stats .s-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.s-stats .s-row small { color: var(--i-muted); }
.i-stats.four { grid-template-columns: repeat(4, 1fr); }
.i-stats.four b { font-size: 15px; }
.i-stats.four small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.s-chips::-webkit-scrollbar { display: none; }
.s-chip { flex: none; appearance: none; border: 1px solid var(--i-line); background: var(--i-panel); color: var(--i-text); border-radius: 999px; padding: 7px 12px; font: 800 12.5px system-ui, sans-serif; cursor: pointer; }
.s-chip.on { background: linear-gradient(#ffd977, #e0a526); color: #2a1d00; border-color: #ffe9a8; }
.s-chip.locked { opacity: 0.5; }
.s-mon.boss { border-color: rgba(210, 60, 67, 0.6); background: linear-gradient(90deg, rgba(210, 60, 67, 0.16), var(--i-panel2) 60%); }
.s-mon.active, .i-row.active { border-color: var(--i-gold); }
.s-waves { font-size: 22px; text-align: center; margin: 6px 0; letter-spacing: 2px; }
.s-dungeon { border-color: rgba(185, 140, 255, 0.4); }
.s-raid { border-color: rgba(210, 60, 67, 0.5); }

/* bank: a grid of item slots */
.i-seg.four { grid-template-columns: repeat(4, 1fr); }
.i-seg.four button { font-size: 12px; padding: 9px 2px; }
.s-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.s-slot { position: relative; appearance: none; cursor: pointer; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--i-line); background: #1b1711; color: var(--i-text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 2px; font: inherit; }
.s-slot span { font-size: 24px; line-height: 1.1; }
.s-slot em { position: absolute; top: 2px; left: 4px; font-style: normal; font-size: 10.5px; font-weight: 900; color: #ffe08a; text-shadow: 0 1px 2px #000; }
.s-slot small { font-size: 8.5px; color: var(--i-muted); line-height: 1.1; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.s-slot.t-equip, .s-slot.t-tool { border-color: rgba(124, 199, 255, 0.35); }
.s-slot.t-food { border-color: rgba(95, 209, 106, 0.35); }
.s-slot.t-potion { border-color: rgba(79, 224, 192, 0.4); }
.s-buy { display: flex; gap: 4px; }
.s-buy .i-btn { padding: 8px 10px; }
.s-itemcard { text-align: center; }
.s-itemcard .s-big { font-size: 48px; }
.s-itemcard .i-chips { justify-content: center; }

/* trading */
.s-tform label { display: flex; flex-direction: column; gap: 4px; color: var(--i-muted); font-size: 12px; margin: 0 0 8px; }
.s-tform select, .s-tform input { min-height: 40px; border-radius: 10px; border: 1px solid var(--i-line); background: #120f0b; color: var(--i-text); padding: 6px 10px; font-size: 16px; width: 100%; }
.s-tform .i-form { margin: 4px 0; }
.s-tform .i-form input[type="number"] { max-width: 90px; flex: none; }
.s-side { padding: 8px; border-radius: 10px; background: var(--i-panel2); border: 1px solid var(--i-line); margin: 6px 0; }
.s-pills { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.s-pills .x { appearance: none; border: 0; background: transparent; color: #ff8a80; font-weight: 900; cursor: pointer; padding: 0 0 0 4px; }

/* the realm map */
.realm { display: block; width: 100%; height: auto; border-radius: 14px; }
.realm .parch { fill: #d9c08f; }
.realm .sea { fill: #6aa6c9; opacity: 0.85; }
.realm .mtn { fill: #8c8172; }
.realm .sand { fill: #e8b763; opacity: 0.8; }
.realm .snow { fill: #eef4fb; stroke: #b9c7d6; }
.realm .trees text, .realm .deco { font-size: 14px; }
.realm .road { fill: none; stroke: #7a4f22; stroke-width: 3; stroke-dasharray: 6 5; stroke-linecap: round; }
.realm .title { font: 900 14px Georgia, serif; fill: #5a3b14; letter-spacing: 3px; }
.realm .spot { cursor: pointer; }
.realm .spot .dot { fill: #6b5a43; stroke: #3b2a14; stroke-width: 2; }
.realm .spot.now .dot { fill: #f2c14e; }
.realm .spot.done .dot { fill: #5fd16a; }
.realm .spot.sel .dot { stroke: #fff; stroke-width: 3; }
.realm .spot .ic { font-size: 11px; pointer-events: none; }
.realm .spot .lbl { font: 900 9.5px system-ui, sans-serif; fill: #fff; paint-order: stroke; stroke: #3b2410; stroke-width: 3px; pointer-events: none; }
.realm .pulse { fill: none; stroke: #f2c14e; stroke-width: 2.5; transform-origin: center; transform-box: fill-box; animation: pulse 1.6s ease-out infinite; }

/* ================= round 1: welcome back, level banner, fight numbers, More grid, leaderboard, settings ================= */
.s-wide { width: 100%; margin-top: 8px; padding: 12px; font-size: 14px; }
.x { appearance: none; border: 0; background: transparent; color: var(--i-muted); font-size: 18px; cursor: pointer; padding: 4px 8px; }

/* level up banner with confetti */
.s-level { position: absolute; left: 10px; right: 10px; top: calc(var(--sat) + 70px + 2vh); z-index: 46; pointer-events: none; display: none; }
.s-level.on { display: block; }
.s-lvlb { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 10px; margin: 0 auto; width: min(100%, 360px);
  padding: 10px 12px; border-radius: 14px; background: linear-gradient(180deg, #3a2f1c, #221b11); border: 2px solid var(--i-gold);
  box-shadow: 0 0 22px rgba(242, 193, 78, 0.45), 0 8px 18px rgba(0, 0, 0, 0.5); animation: lvlin 0.45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes lvlin { from { transform: translateY(-20px) scale(0.8); opacity: 0; } }
.s-lvlb .ic { font-size: 30px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c, #f2c14e) 30%, #1a1611); flex: none; }
.s-lvlb .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-lvlb .t small { color: #ffe08a; font-size: 11.5px; font-weight: 800; }
.s-lvlb .t b { font-size: 19px; font-family: Georgia, serif; }
.s-lvlb .t b em { font-style: normal; color: #ffe08a; font-size: 22px; }
.s-lvlb .t .u { color: #d8c9a8; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-lvlb .cf { position: absolute; top: -10px; width: 6px; height: 10px; border-radius: 2px; animation: confetti 1.6s ease-in forwards; opacity: 0.9; }
.cf.c0 { background: #f2c14e; } .cf.c1 { background: #ff6b6b; } .cf.c2 { background: #5fd16a; } .cf.c3 { background: #7cc7ff; } .cf.c4 { background: #e07bd6; } .cf.c5 { background: #fff; }
@keyframes confetti { to { transform: translateY(120px) rotate(540deg); opacity: 0; } }

/* fight card extras */
.s-foodchip { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: #26301c; border: 1px solid rgba(95, 209, 106, 0.4); font-size: 11px; font-weight: 800; white-space: nowrap; }
.s-foodchip.bad { background: #3a1414; border-color: rgba(255, 107, 107, 0.4); }
.s-life { position: relative; }
.s-float { position: absolute; top: 2px; font: 900 16px system-ui, sans-serif; pointer-events: none; animation: floatup 1.1s ease-out forwards; text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.s-float.hit { color: #fff; } .s-float.miss { color: #8fb0ff; } .s-float.ouch { color: #ff8a80; }
@keyframes floatup { 0% { transform: translateY(6px) scale(0.7); opacity: 0; } 20% { transform: translateY(-4px) scale(1.15); opacity: 1; } 100% { transform: translateY(-26px) scale(1); opacity: 0; } }
.s-fightmsg.gain, .s-fightmsg.fail { display: inline-block; margin: 2px auto 0; padding: 2px 10px; border-radius: 8px; background: #0e0c09; border: 1px solid rgba(255, 107, 107, 0.5); color: #ffd0cc; font-size: 11px; }

/* the More pop-up grid */
.s-sheet-bg { position: absolute; inset: 0; z-index: 38; background: rgba(5, 4, 3, 0.55); }
.s-sheet { position: absolute; left: 8px; right: 8px; bottom: calc(var(--sab) + 70px); z-index: 39; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px;
  border-radius: 14px; background: linear-gradient(180deg, #2a2319, #1d1912); border: 2px solid rgba(200, 146, 42, 0.6); box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.5); animation: sheetin 0.18s ease-out; }
.s-sheet.inline { position: static; animation: none; box-shadow: none; border: 0; padding: 0; background: transparent; }
@keyframes sheetin { from { transform: translateY(16px); opacity: 0; } }
.s-sheet button { position: relative; appearance: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px;
  background: #2f3326; border: 1px solid rgba(255, 228, 170, 0.18); color: var(--i-text); font: 800 14px system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.5px; }
.s-sheet button span { font-size: 22px; }
.s-sheet .dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--i-red); }

/* leaderboard */
.s-lb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.s-lb-head h3 { margin: 0; flex: 1; }
.s-lb-head select { min-height: 36px; border-radius: 9px; border: 1px solid var(--i-line); background: #1f2636; color: var(--i-text); font: 800 14px system-ui, sans-serif; padding: 4px 8px; }
.s-lb-me { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: linear-gradient(90deg, #4a2a16, #2b1d12); border: 1px solid rgba(242, 193, 78, 0.5); margin-bottom: 8px; }
.s-lb-me .rk { font: 900 18px system-ui, sans-serif; color: #ffe08a; min-width: 36px; }
.s-lb-list { list-style: none; margin: 0; padding: 0; }
.s-lb-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--i-line); }
.s-lb-list li.me { background: rgba(242, 193, 78, 0.1); border-radius: 8px; }
.s-lb-list .pl { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: #1d1912; color: var(--i-muted); flex: none; }
.s-lb-list .pl.m1 { background: linear-gradient(#fff2a8, #c8922a); color: #2a1d00; }
.s-lb-list .pl.m2 { background: linear-gradient(#fff, #8a959c); color: #222; }
.s-lb-list .pl.m3 { background: linear-gradient(#ffd2a6, #8a4f1d); color: #2a1200; }
.s-lb-me .txt, .s-lb-list .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-lb-me small, .s-lb-list small { color: var(--i-muted); font-size: 11.5px; }
.s-lb-me .v, .s-lb-list .v { display: flex; flex-direction: column; align-items: flex-end; }
.s-lb-me .v b, .s-lb-list .v b { color: #ffe08a; font-size: 16px; font-variant-numeric: tabular-nums; }

/* welcome back */
.s-wb { max-height: 86vh; overflow-y: auto; }
.s-wb h2 { text-align: center; color: #ffe08a !important; }
.s-wb-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 10px; }
.s-wb-chips span { padding: 4px 10px; border-radius: 999px; background: #1d1912; border: 1px solid var(--i-line); font-size: 11.5px; color: var(--i-muted); }
.s-wb-chips b { color: #ffe08a; }
.s-wb-xp { padding: 10px; border-radius: 12px; background: #1d1912; border: 1px solid var(--i-line); margin: 6px 0; }
.s-wb-xp .r { display: flex; justify-content: space-between; font-size: 13px; }
.s-wb-xp .i-bar > i { background: linear-gradient(#e6b24a, #b8841f); }
.s-wb-h { text-align: center; color: var(--i-muted); font-size: 12px; margin: 10px 0 4px; display: flex; align-items: center; gap: 8px; }
.s-wb-h::before, .s-wb-h::after { content: ""; flex: 1; height: 1px; background: var(--i-line); }
.s-wb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.s-wb-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #1d1912; border: 1px solid var(--i-line); }
.s-wb-row .ic { font-size: 22px; width: 32px; text-align: center; }
.s-wb-row .good { color: var(--i-green); } .s-wb-row .bad { color: #ff8a80; }

/* settings pop-up */
.s-settings { max-height: 86vh; overflow-y: auto; }
.s-set-head { display: flex; align-items: center; justify-content: space-between; }
.s-set-h { color: var(--i-gold); font-weight: 800; font-size: 12.5px; margin: 14px 0 4px; }
.s-vol { width: 100%; accent-color: #e6b24a; margin: 2px 0 6px; }
.i-seg.three { grid-template-columns: repeat(3, 1fr); margin: 4px 0; }
.i-seg.three button { font-size: 12px; padding: 9px 4px; }
.s-help p { font-size: 13.5px; color: #d8c9a8 !important; }

/* the fight card has to fit portrait, food and stop next to two life bars on a phone */
.s-fightcard { gap: 6px; padding: 8px; }
.s-fightcard .s-act-head { flex-wrap: nowrap; min-width: 0; }
.s-fightcard .i-act-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-fightcard .s-foodchip { flex: none; }
.s-fightcard .s-portrait { width: 44px; font-size: 26px; }
.s-fightcard .s-food { width: 50px; }
.s-fightcard .s-food span { font-size: 20px; }
.s-fightcard .i-stop.sq { padding: 8px 7px; }
.s-fightcard .s-lives { gap: 6px; }
.s-fightcard .s-life-l { font-size: 11.5px; gap: 4px; }

/* ================= round 2: quest card, weekly track, skill rows, shop, bank ================= */
/* main quest story card */
.s-qcard { padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #2c2418, #1d1912); border: 2px solid rgba(200, 146, 42, 0.5); }
.s-qcard.ready { border-color: var(--i-gold); box-shadow: 0 0 12px rgba(242, 193, 78, 0.3); }
.s-qhead { display: flex; gap: 10px; align-items: center; }
.s-qhead .ic { font-size: 28px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #15120d; border: 1px solid var(--i-line); flex: none; }
.s-qhead small { display: block; color: var(--i-muted); font-size: 11.5px; }
.s-qtitle { font: 900 18px Georgia, serif; color: #ffe08a; font-variant: small-caps; }
.s-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(242, 193, 78, 0.5); color: #ffe08a; font-size: 10.5px; }
.s-qtext { font-style: italic; color: #c9b893 !important; font-size: 13px; margin: 8px 0; }
.s-goal { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #15120d; border: 1px solid var(--i-line); }
.s-goal .ic { font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #221d15; flex: none; }
.s-goal .txt small { color: var(--i-muted); text-align: right; }
.s-goal.done { opacity: 0.85; }
.strike { text-decoration: line-through; color: var(--i-muted); }
.s-goal .i-bar > i { background: linear-gradient(90deg, #6aa84f, #8fd16a); }
.s-rewards { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; flex-wrap: wrap; font-size: 13px; }
.s-past { margin-top: 8px; font-size: 13px; }
.s-past summary { cursor: pointer; color: var(--i-gold); font-weight: 800; padding: 6px 0; }
.s-past ul { list-style: none; margin: 0; padding: 0; }
.s-past li { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--i-line); }

/* weekly track */
.s-wtrack { position: relative; margin: 6px 0 4px; padding-top: 4px; }
.s-wbar { position: absolute; left: 6%; right: 6%; top: 24px; height: 6px; border-radius: 3px; background: #15120d; }
.s-wbar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c8922a, #ffd977); }
.s-wchests { position: relative; display: flex; justify-content: space-between; }
.s-wchest { appearance: none; border: 0; background: transparent; color: var(--i-text); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font: inherit; }
.s-wchest span { font-size: 22px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #221d15; border: 2px solid var(--i-line); }
.s-wchest small { font-size: 10.5px; color: var(--i-muted); }
.s-wchest.ready span { border-color: var(--i-gold); box-shadow: 0 0 12px rgba(242, 193, 78, 0.6); animation: glow 1.2s ease-in-out infinite alternate; }
.s-wchest.open span { opacity: 0.5; }
.s-wchest:disabled { cursor: default; }
.s-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0 6px; }
.s-day { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: 9px; background: #1d1912; border: 1px solid var(--i-line); font-size: 11px; }
.s-day small { color: var(--i-muted); font-size: 10px; }
.s-day.today { border-color: var(--i-gold); background: linear-gradient(#3a2f1c, #221b11); color: #ffe08a; }
.s-day.future { opacity: 0.5; }

/* skill rows */
.s-req { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; background: #1d1912; border: 1px solid var(--i-line); color: var(--i-muted) !important; margin: 2px 0; width: fit-content; }
.s-req.ok { color: #b8e6a8 !important; border-color: rgba(95, 209, 106, 0.35); }
.s-thief { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.s-pill { padding: 2px 7px; border-radius: 7px; background: #1d1912; border: 1px solid var(--i-line); font-size: 11px; font-weight: 700; color: #e8dcc3; }
.s-pill.bad { background: #3a1414; border-color: rgba(255, 107, 107, 0.4); color: #ffb3ad !important; }
.s-lvlock { padding: 6px 10px; border-radius: 9px; border: 1px solid rgba(255, 107, 107, 0.5); background: #2a1212; color: #ff8a80; font-weight: 900; font-size: 12px; white-space: nowrap; }
.s-health { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #1d1912; border: 1px solid var(--i-line); font-size: 12px; margin: 8px 0 4px; }
.s-health b { color: var(--i-text); }

/* shop */
.s-coins { margin-left: auto; align-self: center; font-weight: 900; color: #ffe08a; white-space: nowrap; }
.s-rec { border-color: rgba(242, 193, 78, 0.5); }
.s-up .txt small { white-space: normal; }
.s-owned { color: var(--i-green); font-weight: 900; font-size: 12px; white-space: nowrap; }
.s-mini { border: 0 !important; padding: 0 !important; }
.s-mini-sel { margin-top: 6px; min-height: 34px; border-radius: 8px; border: 1px solid var(--i-line); background: #15120d; color: var(--i-text); font: 700 14px system-ui, sans-serif; padding: 2px 8px; }

/* bank */
.s-bankval { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: #15120d; border: 1px solid rgba(242, 193, 78, 0.4); margin-bottom: 8px; }
.s-bankval div { display: flex; flex-direction: column; }
.s-bankval .r { align-items: flex-end; }
.s-bankval small { color: var(--i-muted); font-size: 11.5px; }
.s-bankval b { font-size: 18px; color: #ffe08a; }
.s-search { width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid var(--i-line); background: #15120d; color: var(--i-text); padding: 6px 12px; font-size: 16px; margin-bottom: 6px; }
.s-sortrow { display: flex; gap: 6px; margin-bottom: 4px; }
.s-chip small { opacity: 0.7; margin-left: 2px; }
.s-grp { margin: 6px 0; }
.s-grp summary { cursor: pointer; color: var(--i-gold); font-weight: 800; font-size: 13px; padding: 6px 0; }
.s-grp summary small { color: var(--i-muted); }
