/* The Billionaire — dark navy + gold 2.5D style */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --navy: #0d1b2e; --navy2: #14273f; --navy3: #1d3a5f;
  --gold: #f5c451; --gold2: #d4a017; --teal: #2ec4b6;
  --green: #3ddc84; --red: #ff5a5a;
  --txt: #eaf1f8; --dim: #8fa5bd;
}
html, body { height: 100%; }
body {
  background: #070f1c;
  color: var(--txt);
  font-family: "Nunito", -apple-system, "Segoe UI", Tahoma, sans-serif;
  overflow: hidden;
  user-select: none;
}
#app { max-width: 480px; margin: 0 auto; height: 100dvh; position: relative; background: var(--navy); box-shadow: 0 0 60px rgba(0,0,0,0.6); }

.hidden { display: none !important; }
.green { color: var(--green); } .red { color: var(--red); } .gold { color: var(--gold); }
.dim { color: var(--dim); font-size: 12px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }

/* ---------- screens ---------- */
.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  padding: 14px 14px 84px; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: flex; }
#screen-login, #screen-onboard { padding-bottom: 14px; justify-content: center; }

.scr-title { font-size: 22px; font-weight: 900; letter-spacing: 0.5px; margin: 4px 0 12px; color: var(--gold); }
.sec-title { font-size: 14px; font-weight: 800; margin: 14px 0 8px; color: var(--txt); }
.sec-title .hint { font-weight: 400; color: var(--dim); font-size: 11px; }

/* ---------- login ---------- */
.login-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }
.logo-block { text-align: center; }
.logo-coin {
  width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, var(--gold) 55%, var(--gold2));
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 900; color: #5a3d00;
  box-shadow: 0 8px 0 #8a6508, 0 14px 30px rgba(245,196,81,0.35);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.logo-title { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: 2px;
  background: linear-gradient(180deg, #ffe9a8, var(--gold) 60%, var(--gold2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-sub { color: var(--dim); font-size: 13px; margin-top: 6px; letter-spacing: 1px; }
.login-card { width: 100%; }
.login-foot { color: var(--dim); font-size: 12px; text-align: center; max-width: 300px; line-height: 1.5; }

/* ---------- onboarding ---------- */
.onb-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.onb-slide { text-align: center; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 10px; }
.onb-ico { font-size: 72px; animation: bob 3s ease-in-out infinite; }
.onb-title { font-size: 24px; font-weight: 900; color: var(--gold); }
.onb-text { color: var(--txt); font-size: 15px; line-height: 1.6; max-width: 310px; }
.onb-dots { display: flex; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--navy3); }
.dot.on { background: var(--gold); }

/* ---------- top bar / HUD ---------- */
.topbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--navy3);
  background: var(--navy2); font-size: 20px; cursor: pointer; padding: 0; overflow: hidden;
}
.avatar svg { display: block; width: 100%; height: 100%; }
.p-avatar { display: flex; justify-content: center; margin-bottom: 8px; }
.chip {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px;
  background: var(--navy2); border: 1px solid var(--navy3); font-weight: 800; font-size: 15px;
}
.chip-cash { flex: 1; justify-content: center; color: var(--gold); }
.chip-gem { color: #9fd8ff; }

.glass {
  background: linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  border-radius: 18px;
}
.nw-card { padding: 14px 16px; margin-bottom: 10px; }
.nw-row { display: flex; justify-content: space-between; align-items: center; }
.nw-label { font-size: 10px; letter-spacing: 2px; color: var(--dim); font-weight: 800; }
.nw-value { font-size: 30px; font-weight: 900; color: var(--gold); }
.nw-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 12px; }
.pill-green { background: rgba(61,220,132,0.15); color: var(--green); }
.pill-red { background: rgba(255,90,90,0.15); color: var(--red); }
.pill-teal { background: rgba(46,196,182,0.15); color: var(--teal); }
.pill-gold { background: rgba(245,196,81,0.15); color: var(--gold); }
.flow-row { display: flex; justify-content: space-between; margin-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; }
.flow { display: flex; flex-direction: column; gap: 2px; }
.flow-l { font-size: 10px; color: var(--dim); }
.flow-v { font-size: 14px; font-weight: 800; }

/* ---------- city ---------- */
.city-wrap { position: relative; flex: 1; min-height: 130px; border-radius: 18px; overflow: hidden; border: 1px solid var(--navy3); margin-bottom: 10px; }
#city { width: 100%; height: 100%; display: block; }
.month-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(13,27,46,0.8); border: 1px solid var(--navy3);
  padding: 5px 12px; border-radius: 14px; font-size: 12px; font-weight: 800; color: var(--gold);
}

/* ---------- home actions ---------- */
.home-actions { display: flex; gap: 10px; }
.action-btn { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 14px 10px; }
.ab-title { font-size: 16px; font-weight: 900; letter-spacing: 0.5px; }
.ab-sub { font-size: 11px; opacity: 0.85; font-weight: 600; }
#btn-work.cooling { filter: grayscale(0.5) brightness(0.8); }

/* ---------- buttons ---------- */
.btn {
  border: none; border-radius: 14px; padding: 12px 18px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 14px; color: var(--txt);
  transition: transform 0.08s, filter 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn-gold { background: linear-gradient(180deg, #ffd97a, var(--gold) 50%, var(--gold2)); color: #4a3503; box-shadow: 0 4px 0 #8a6508; }
.btn-gold:active { box-shadow: 0 1px 0 #8a6508; }
.btn-teal { background: linear-gradient(180deg, #4fe0d1, var(--teal) 60%, #1d9a8e); color: #05322d; box-shadow: 0 4px 0 #14635b; }
.btn-teal:active { box-shadow: 0 1px 0 #14635b; }
.btn-ghost { background: var(--navy2); border: 1px solid var(--navy3); }
.btn-danger { background: rgba(255,90,90,0.12); color: var(--red); border: 1px solid rgba(255,90,90,0.3); }
.btn-disabled { background: var(--navy2); color: var(--dim); cursor: not-allowed; }
.btn-big { width: 100%; padding: 15px; font-size: 16px; margin-top: 10px; }
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-col { display: flex; flex-direction: column; gap: 5px; }

/* ---------- fields ---------- */
.fld {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--navy3);
  background: var(--navy2); color: var(--txt); font-family: inherit; font-size: 15px; font-weight: 700;
  outline: none;
}
.fld:focus { border-color: var(--gold); }
.fld-label { font-size: 12px; color: var(--dim); font-weight: 700; display: block; margin-bottom: 6px; }

/* ---------- cards & rows ---------- */
.card { background: var(--navy2); border: 1px solid var(--navy3); border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.card-sm { background: var(--navy2); border: 1px solid var(--navy3); border-radius: 14px; padding: 11px 12px; }
.vlist { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.rowline { display: flex; align-items: center; gap: 12px; }
.big-ico { font-size: 26px; flex-shrink: 0; }
.job-now { border-color: var(--teal); }
.me-row { border-color: var(--gold); background: rgba(245,196,81,0.08); }
.rank { width: 26px; text-align: center; font-weight: 900; color: var(--dim); }

.pips { display: flex; gap: 3px; margin: 4px 0; }
.pip { width: 12px; height: 5px; border-radius: 3px; background: var(--navy3); }
.pip.on { background: var(--gold); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab {
  flex: 1; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--navy3);
  background: var(--navy2); color: var(--dim); font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer;
}
.tab.active { background: var(--navy3); color: var(--gold); border-color: var(--gold2); }

/* ---------- deposit ---------- */
.deposit-box { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }

/* ---------- league ---------- */
.league-note { font-size: 12px; color: var(--dim); margin-bottom: 12px; line-height: 1.5; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin-bottom: 14px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 14px 14px 0 0; background: var(--navy2); border: 1px solid var(--navy3); border-bottom: none; width: 30%; }
.pod1 { padding-top: 20px; background: linear-gradient(180deg, rgba(245,196,81,0.18), var(--navy2)); border-color: var(--gold2); }
.pod.me { outline: 2px solid var(--gold); }
.pod-ava { font-size: 26px; }
.pod-name { font-size: 12px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-val { font-size: 11px; color: var(--green); font-weight: 800; }
.pod-medal { font-size: 20px; }

/* ---------- profile ---------- */
.p-name { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.p-goal-label { font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.goal-bar { height: 14px; border-radius: 8px; background: var(--navy3); overflow: hidden; }
.goal-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width 0.6s; }
.goal-pct { font-size: 12px; color: var(--gold); font-weight: 800; margin-top: 6px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-grid > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; background: var(--navy); border-radius: 12px; }
.stat-grid b { font-size: 17px; color: var(--gold); }
.stat-grid span { font-size: 11px; color: var(--dim); }
.ach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ach { font-size: 11px; background: rgba(245,196,81,0.12); color: var(--gold); padding: 4px 9px; border-radius: 10px; font-weight: 700; }
.ach { display: inline-flex; align-items: center; gap: 4px; }
.ach .icn { width: 12px; height: 12px; }

/* ---------- bottom nav ---------- */
#bottomnav {
  position: absolute; left: 0; right: 0; bottom: 0; height: 68px;
  display: flex; background: rgba(10,21,38,0.97); border-top: 1px solid var(--navy3);
  padding-bottom: env(safe-area-inset-bottom);
}
.navbtn {
  flex: 1; border: none; background: none; color: var(--dim); cursor: pointer;
  font-size: 21px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-family: inherit;
}
.navbtn span { font-size: 10px; font-weight: 800; }
.navbtn.active { color: var(--gold); }
.navbtn.active span { color: var(--gold); }

/* ---------- modal ---------- */
#modal-root:empty { display: none; }
.modal-back {
  position: absolute; inset: 0; background: rgba(4,9,18,0.75); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
  opacity: 0; transition: opacity 0.2s;
}
.modal-back.show { opacity: 1; }
.modal {
  width: 100%; max-width: 480px; background: var(--navy2);
  border: 1px solid var(--navy3); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(40px); transition: transform 0.25s;
  max-height: 82%; overflow-y: auto;
}
.modal-back.show .modal { transform: translateY(0); }
.m-title { font-size: 20px; font-weight: 900; color: var(--gold); text-align: center; margin-bottom: 10px; }
.m-text { font-size: 14px; color: var(--txt); text-align: center; line-height: 1.55; margin-bottom: 12px; }
.m-row { display: flex; gap: 10px; margin-top: 12px; }
.m-row .btn { flex: 1; }
.m-row .fld { flex: 1; }
.ev-ico { font-size: 52px; text-align: center; margin-bottom: 6px; }
.ev-btn { width: 100%; margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.ev-sub { font-size: 11px; opacity: 0.8; font-weight: 600; }
.sumbox { background: var(--navy); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.sumrow { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--dim); }
.sumrow.total { border-top: 1px solid var(--navy3); margin-top: 4px; padding-top: 8px; font-size: 14px; color: var(--txt); }
.qty-row { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; }
.qbtn { width: 52px; font-size: 22px; }
.qval { width: 90px; text-align: center; font-size: 18px; }

/* ---------- toast ---------- */
#toast-root { position: absolute; bottom: 80px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; z-index: 60; }
.toast {
  background: var(--navy3); border: 1px solid var(--gold2); color: var(--txt);
  padding: 9px 18px; border-radius: 20px; font-size: 13px; font-weight: 700;
  opacity: 0; transform: translateY(10px); transition: all 0.25s; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.good { border-color: var(--green); }
.toast.bad { border-color: var(--red); }

input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- SVG icons ---------- */
.icn { display: inline-flex; width: 22px; height: 22px; }
.icn svg { width: 100%; height: 100%; }
.icn-inline { width: 16px; height: 16px; vertical-align: -3px; }
.navbtn .icn { width: 23px; height: 23px; }
.avatar .icn { width: 20px; height: 20px; color: var(--gold); }
.chip-ico { display: inline-flex; width: 17px; height: 17px; }
.chip-ico svg { width: 100%; height: 100%; }
.chip-cash .chip-ico { color: var(--gold); }
.chip-gem .chip-ico { color: #9fd8ff; }
.pod-ava .icn { width: 26px; height: 26px; color: var(--gold); }

/* ---------- login tabs ---------- */
.login-tabs { width: 100%; }

/* ---------- tutorial bubble ---------- */
#tut-root { position: absolute; inset: 0; pointer-events: none; z-index: 45; }
.tut-bubble {
  position: absolute; transform: translateX(-50%);
  background: var(--gold); color: #4a3503; font-weight: 800; font-size: 13px;
  padding: 9px 14px; border-radius: 14px; max-width: 230px; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4); animation: tutbob 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tutbob { 0%,100% { margin-top: 0; } 50% { margin-top: -5px; } }
.tut-arrow { position: absolute; left: 50%; transform: translateX(-50%); width: 0; height: 0; border: 8px solid transparent; }
.tut-arrow.down { bottom: -15px; border-top-color: var(--gold); }
.tut-arrow.up { top: -15px; border-bottom-color: var(--gold); }
.tut-glow { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 14px; animation: glowpulse 1.4s ease-in-out infinite; }
@keyframes glowpulse { 0%,100% { outline-color: var(--gold); } 50% { outline-color: rgba(245,196,81,0.25); } }

/* ---------- RTL ---------- */
body.rtl { font-family: "Cairo", "Nunito", Tahoma, sans-serif; }
body.rtl .fld, body.rtl .btn, body.rtl .tab, body.rtl .navbtn { font-family: "Cairo", Tahoma, sans-serif; }
[dir="rtl"] .sumrow, [dir="rtl"] .row, [dir="rtl"] .rowline { direction: rtl; }

/* drawn SVG icons in data rows */
.svg-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--gold); }
.big-ico.svg-ico { width: 34px; height: 34px; padding: 4px; border-radius: 10px; background: rgba(245,196,81,0.08); border: 1px solid rgba(245,196,81,0.18); box-sizing: border-box; }
.big-ico.svg-ico svg { width: 100%; height: 100%; }
.ev-ico.svg-ico { width: 64px; height: 64px; margin: 0 auto 8px; color: var(--gold); }
.ev-ico.svg-ico svg { width: 100%; height: 100%; }

/* floating +$ feedback */
.float-cash {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%);
  color: var(--gold); font-weight: 800; font-size: 20px; pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  animation: floatCash 1.4s ease-out forwards; z-index: 30;
}
@keyframes floatCash {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.7); }
  15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -64px) scale(1); }
}
#btn-work { position: relative; }

.clock-badge { top: auto; bottom: 10px; left: 10px; right: auto; font-size: 12px; opacity: .9; }
.payday-badge { top: auto; bottom: 10px; left: auto; right: 10px; font-size: 12px; opacity: .95; color: var(--gold); font-variant-numeric: tabular-nums; }
.payday-badge.neg { color: var(--red); }
.chip-cash { cursor: pointer; }
.sub-pill { background: linear-gradient(135deg, #f5c451, #d99a1f); color: #241a05; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; }

.study-box { width: 130px; }
.study-box .goal-bar { margin: 0 0 4px; }
.study-time { font-size: 12px; text-align: center; }
.mini-plays { margin: 10px 0; color: var(--dim); font-size: 13px; }
.mini-round canvas { width: 100%; height: 160px; background: var(--navy2); border: 1px solid var(--navy3); border-radius: 12px; margin-top: 8px; }
.mini-price { font-size: 26px; font-weight: 900; color: var(--gold); margin: 8px 0; }
.mini-round .m-row { display: flex; gap: 8px; }

/* ---------- home empire panel ---------- */
.empire { padding: 9px 11px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 7px; }
.emp-goal { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--dim); font-weight: 700; }
.emp-goal .goal-bar { height: 7px; }
.as-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.as-tile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; background: var(--navy); border-radius: 10px; opacity: .55; }
.as-tile.on { opacity: 1; border: 1px solid rgba(245,196,81,.35); }
.as-ico { width: 20px; height: 20px; color: var(--gold); display: inline-flex; }
.as-ico svg { width: 100%; height: 100%; }
.as-tile b { font-size: 14px; color: var(--txt); line-height: 1.1; }
.as-tile i { font-style: normal; font-size: 9px; color: var(--dim); }
.emp-stats { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); }
.emp-stats b { color: var(--gold); font-size: 12px; margin-inline-start: 2px; }
.emp-ach { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.emp-ach-t { font-size: 10px; color: var(--dim); white-space: nowrap; }
.emp-ach-t b { color: var(--gold); font-size: 12px; }
.adots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: flex-end; }
.adot { width: 13px; height: 13px; color: var(--navy3); display: inline-flex; }
.adot svg { width: 100%; height: 100%; }
.adot.on { color: var(--gold); }

.cash-rate { font-size: 10px; font-weight: 800; margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.chip-cash #hud-cash { font-variant-numeric: tabular-nums; }

/* =====================================================================
   v9 VISUAL PASS: black glass + polished gold (matches the concept art)
   ===================================================================== */
:root { --gold-hi: #fff1b8; --gold-lo: #b8860b; --rim: linear-gradient(145deg, #ffe9a8, #b8860b 45%, #f5c451 70%, #7a5408); }
#app {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(245,196,81,.20), transparent 60%),
    radial-gradient(60% 40% at 90% 30%, rgba(61,120,220,.16), transparent 70%),
    radial-gradient(50% 35% at 5% 60%, rgba(245,196,81,.10), transparent 70%),
    linear-gradient(180deg, #060d1a 0%, #0a1629 55%, #050a14 100%);
}
@keyframes bokeh { from { transform: translateY(0); opacity: .35; } to { transform: translateY(-10px); opacity: .6; } }

/* brand header */
.brand-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -2px 0 8px; }
.brand-name { font-family: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif; font-weight: 800; letter-spacing: 3px; font-size: 15px;
  background: linear-gradient(180deg, #fff1b8, #f5c451 55%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(245,196,81,.25); }
.brand-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.brand-bar .brand-name { flex: 1; font-size: 13px; }
.bb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px 4px 6px; border-radius: 16px; font-size: 13px; font-weight: 900; color: var(--gold);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.35)); border: 1px solid rgba(245,196,81,.55); }

/* top chips: glossy dark pills with gold rim */
.chip { background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(0,0,0,.4)); border: 1px solid rgba(245,196,81,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.4); }
.chip-cash { color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.chip-gem { color: #bfe6ff; }
.avatar { border: 1.5px solid rgba(245,196,81,.7); background: transparent; border-radius: 13px; box-shadow: 0 0 14px rgba(245,196,81,.25); }

/* glass panels with gold rim */
.glass, .card, .card-sm, .nw-card {
  background: linear-gradient(160deg, rgba(34,52,82,.78), rgba(8,16,30,.88));
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.1);
}
.glass::before, .card::before, .card-sm::before, .nw-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(145deg, rgba(255,233,168,.85), rgba(184,134,11,.25) 40%, rgba(245,196,81,.55) 75%, rgba(122,84,8,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card-sm, .card { border-radius: 16px; }
.nw-value { font-family: Georgia, "Times New Roman", serif; text-shadow: 0 0 22px rgba(245,196,81,.45); letter-spacing: .5px; }
.nw-label { color: #c9d6e6; }
.job-now::before { background: linear-gradient(145deg, #7ff0e2, #1a8d82 45%, #2ec4b6 75%, #0e5c55) !important; }
.me-row { background: linear-gradient(160deg, rgba(245,196,81,.2), rgba(8,16,30,.9)); }

/* illustrated row art */
.big-ico.art { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.big-ico.art svg { display: block; }
.art-iso { width: 64px; height: 58px; margin: -6px -4px -6px -6px; }
.art-stock { width: 50px; height: 56px; }
.art-ava { width: 46px; height: 46px; }
.art-med { width: 44px; height: 44px; }
.card-sm.row, .card-sm.rowline { align-items: center; }
.card:hover .art-iso, .card-sm:hover .art-iso { transform: translateY(-2px); }
.art-iso { transition: transform .25s; }

/* screen titles: serif gold with side lines */
.scr-title { font-family: Georgia, "Times New Roman", serif; text-align: center; font-size: 26px; letter-spacing: 1.5px; margin: 2px 0 12px;
  background: linear-gradient(180deg, #fff1b8, #f5c451 55%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; align-items: center; gap: 10px; justify-content: center; text-shadow: none; }
.scr-title::before, .scr-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(245,196,81,.7)); }
.scr-title::after { transform: scaleX(-1); }
.sec-title { font-family: Georgia, serif; color: var(--gold-hi); letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(245,196,81,.5), transparent); }
[dir="rtl"] .sec-title::after { background: linear-gradient(270deg, rgba(245,196,81,.5), transparent); }

/* tabs: gold segmented control */
.tabs { background: rgba(0,0,0,.35); border: 1px solid rgba(245,196,81,.35); border-radius: 16px; padding: 3px; gap: 3px; }
.tab { border: none; background: transparent; border-radius: 13px; color: #b6c6da; padding: 9px 2px; transition: all .2s; }
.tab.active { background: linear-gradient(180deg, #ffe9a8, #d9a21c 60%, #b8860b); color: #3a2600; box-shadow: 0 2px 10px rgba(245,196,81,.4), inset 0 1px 0 #fff8d6; }

/* buttons: glossy */
.btn { position: relative; overflow: hidden; letter-spacing: .4px; box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.35); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.btn-gold { background: linear-gradient(180deg, #ffe9a8 0%, #f5c451 45%, #c78d0c 100%); color: #3a2600; border: 1px solid #fff0b8; box-shadow: 0 4px 0 #8a6508, 0 10px 22px rgba(245,196,81,.3); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn-teal { background: linear-gradient(180deg, #6ff3e3 0%, #2ec4b6 50%, #12877c 100%); color: #05332e; border: 1px solid #b7fff6; box-shadow: 0 4px 0 #0c5a52, 0 10px 22px rgba(46,196,182,.28); }
.btn-gold::after, .btn-teal::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn-sm { box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.action-btn { border-radius: 18px; }

/* nav */
#bottomnav { background: linear-gradient(180deg, rgba(14,26,46,.9), rgba(4,9,18,.98)); border-top: 1px solid rgba(245,196,81,.45); box-shadow: 0 -8px 24px rgba(0,0,0,.5); backdrop-filter: blur(10px); }
.navbtn { position: relative; transition: color .2s, transform .2s; }
.navbtn.active { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(245,196,81,.55)); }
.navbtn.active::after { content: ""; position: absolute; bottom: 4px; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #f5c451, transparent); }

/* home city frame */
.city-wrap { border: 1px solid rgba(245,196,81,.55); box-shadow: 0 0 26px rgba(245,196,81,.18), inset 0 0 40px rgba(0,0,0,.45); }
.city-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(255,220,130,.18) 0 2px, transparent 3px), radial-gradient(circle at 75% 35%, rgba(255,220,130,.2) 0 2px, transparent 3px), radial-gradient(circle at 55% 12%, rgba(255,220,130,.25) 0 3px, transparent 4px);
  animation: bokeh 6s ease-in-out infinite alternate; }
.month-badge { background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(0,0,0,.55)); border: 1px solid rgba(245,196,81,.55); }
.empire { padding: 9px 11px; }
.as-tile.on { background: linear-gradient(180deg, rgba(245,196,81,.14), rgba(0,0,0,.35)); }
.goal-fill { background: linear-gradient(90deg, #2ec4b6, #f5c451 80%, #fff1b8); box-shadow: 0 0 10px rgba(245,196,81,.5); position: relative; }
.goal-bar { background: rgba(0,0,0,.45); border: 1px solid rgba(245,196,81,.25); }

/* league */
.trophy-stage { position: relative; display: flex; justify-content: center; height: 86px; margin-top: -4px; }
.trophy-glow { position: absolute; top: -30px; width: 220px; height: 170px; background: radial-gradient(closest-side, rgba(245,196,81,.5), transparent); animation: bokeh 4s ease-in-out infinite alternate; }
.trophy { position: relative; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); animation: bob 3.5s ease-in-out infinite; }
.podium { align-items: flex-end; gap: 6px; margin-bottom: 12px; }
.pod { background: none; border: none; padding: 0; width: 32%; gap: 2px; }
.pod-ava svg { border-radius: 14px; box-shadow: 0 0 16px rgba(245,196,81,.4); }
.pod.me .pod-ava svg { box-shadow: 0 0 0 2px #fff1b8, 0 0 20px rgba(245,196,81,.8); }
.pod-block { width: 100%; display: flex; justify-content: center; padding: 8px 0 10px; border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #ffe9a8, #d9a21c 40%, #8a6508); box-shadow: inset 0 1px 0 #fff8d6, 0 6px 14px rgba(0,0,0,.45); }
.pod1 .pod-block { padding: 16px 0 20px; }
.pod3 .pod-block { padding: 5px 0 7px; background: linear-gradient(180deg, #f3c99c, #c0813f 40%, #7a4b1a); }
.pod2 .pod-block { background: linear-gradient(180deg, #f4f7fb, #aab6c6 40%, #6b778a); }
.pod-name { color: var(--txt); } .pod1 { background: none; }
.lrow { padding: 8px 12px 8px 8px; gap: 8px; border-radius: 16px; background: linear-gradient(160deg, rgba(34,52,82,.78), rgba(8,16,30,.88)); border: 1px solid rgba(245,196,81,.3); }
.lrank svg, .lface svg { display: block; }
.lface svg { border-radius: 12px; }
.lgr { font-size: 12px; font-weight: 800; }
.lval { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; color: var(--gold-hi); font-size: 14px; }
.league-note { text-align: center; }

/* modals */
.modal { background: linear-gradient(160deg, #182c4a, #0a1424); border: 1px solid rgba(245,196,81,.6); box-shadow: 0 -10px 40px rgba(0,0,0,.6), 0 0 30px rgba(245,196,81,.12); }
.m-title { font-family: Georgia, serif; }

/* entrance animation for lists */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.vlist > * { animation: rise .35s ease both; }
.vlist > *:nth-child(2) { animation-delay: .04s; } .vlist > *:nth-child(3) { animation-delay: .08s; } .vlist > *:nth-child(4) { animation-delay: .12s; }
.vlist > *:nth-child(5) { animation-delay: .16s; } .vlist > *:nth-child(n+6) { animation-delay: .2s; }
.pill-gold, .pill-green, .pill-teal { border: 1px solid currentColor; }
/* BUY / SELL */
[data-buy], .btn-buy { background: linear-gradient(180deg, #5dff9f, #1fa85a 55%, #0f6d36) !important; color: #022a12 !important; border: 1px solid #b6ffd2; box-shadow: 0 4px 0 #0a4a24, 0 10px 20px rgba(61,220,132,.28) !important; }
[data-sell], .btn-sell { background: linear-gradient(180deg, #ff8a8a, #e03a3a 55%, #8f1d1d) !important; color: #2a0505 !important; border: 1px solid #ffc2c2; box-shadow: 0 4px 0 #6b1414, 0 10px 20px rgba(255,90,90,.25) !important; }

.sec-title .hint { font-family: "Nunito", sans-serif; flex: 1; line-height: 1.3; }
.sec-title:has(.hint)::after { display: none; }
.pod.me { outline: none; }
.city-assets { position: absolute; left: 0; right: 0; bottom: 44px; display: flex; justify-content: center; align-items: flex-end; gap: 0; pointer-events: none; }
.ca { position: relative; margin: 0 -6px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) drop-shadow(0 0 10px rgba(245,196,81,.25)); animation: bob 5s ease-in-out infinite; }
.ca:nth-child(even) { animation-delay: -2s; }
.ca b { position: absolute; top: 2px; right: 6px; font-size: 10px; background: #f5c451; color: #3a2600; border-radius: 8px; padding: 0 5px; }

/* SHOP */
.shop-top { display: flex; align-items: center; gap: 10px; padding: 8px 0; } .shop-top .scr-title { flex: 1; margin: 0; }
.shop-demo { text-align: center; font-size: 12px; color: #f5c451; background: rgba(245,196,81,.08); border: 1px dashed rgba(245,196,81,.4); border-radius: 12px; padding: 6px 10px; margin: 6px 0 10px; }
.shop-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 8px 0; border-radius: 18px; }
.shop-ico { flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
.shop-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .shop-txt small { color: #9fb0c8; line-height: 1.25; }
.shop-buy { flex: none; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
.shop-active { margin: 10px 0; } .shop-h { font-family: Georgia, serif; color: #f5c451; margin-bottom: 6px; }
.shop-act { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: 14px; } .shop-act b { color: #4be3a0; }
.shop-entry { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px; border-color: rgba(245,196,81,.5); color: #f5c451; position: relative; }
.se-ico { display: inline-flex; } .se-on { background: #4be3a0; color: #04201a; border-radius: 8px; padding: 0 6px; font-weight: 800; }
.se-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5a6a; box-shadow: 0 0 8px #ff5a6a; }
.chip-gem { cursor: pointer; }
.shop-passbuy { width: 100%; margin: 10px 0 6px; }
.pass-track { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 4px; direction: ltr; }
.pass-col { display: flex; flex-direction: column; gap: 6px; align-items: center; flex: none; width: 64px; }
.pass-n { font-family: Georgia, serif; color: #6c7a90; } .pass-n.on { color: #f5c451; }
.pass-cell { width: 100%; padding: 8px 2px; border-radius: 12px; border: 1px solid rgba(245,196,81,.25); background: rgba(10,20,36,.8); color: #9fb0c8; font-size: 12px; line-height: 1.3; }
.pass-cell.prem { border-color: rgba(245,196,81,.6); color: #f5c451; }
.pass-cell.ready { background: linear-gradient(180deg,#ffe08a,#c8891a); color: #3a2600; font-weight: 800; box-shadow: 0 0 12px rgba(245,196,81,.5); }
.pass-cell.done { opacity: .35; text-decoration: line-through; }
.pass-legend { display: flex; justify-content: space-between; font-size: 11px; color: #6c7a90; }
.cos-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cos { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px; width: 74px; border-radius: 14px; background: rgba(10,20,36,.8); border: 1px solid rgba(245,196,81,.25); color: #e8eef9; font-size: 12px; }
.cos.sel { border-color: #f5c451; box-shadow: 0 0 12px rgba(245,196,81,.5); } .cos small { color: #f5c451; }
.cos-th { width: 40px; height: 26px; border-radius: 8px; background: linear-gradient(135deg,#1a2740,#f5c451); }
.th-neon { filter: hue-rotate(150deg) saturate(1.8); } .th-ice { filter: hue-rotate(165deg); } .th-rose { filter: hue-rotate(90deg) saturate(1.4); }
.cos-fr { width: 28px; height: 28px; border-radius: 9px; background: #1a2740; }
.fr-gold { box-shadow: 0 0 0 2px #f5c451; } .fr-diamond { box-shadow: 0 0 0 2px #7fe8ff; }
.ad-bar { height: 8px; background: #12203a; border-radius: 8px; overflow: hidden; margin: 14px 0; } .ad-bar i { display: block; height: 100%; background: linear-gradient(90deg,#4be3a0,#f5c451); animation: adfill 3s linear forwards; }
@keyframes adfill { from { width: 0 } to { width: 100% } }

.emp-stuff { margin-top: 10px; border-top: 1px solid rgba(245,196,81,.2); padding-top: 8px; }
.stuff-h { font-family: Georgia, serif; color: #f5c451; font-size: 13px; margin: 6px 0 4px; }
.stuff-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stuff { position: relative; display: flex; flex-direction: column; align-items: center; width: 60px; } .stuff small { font-size: 10px; color: #9fb0c8; text-align: center; line-height: 1.1; }
.stuff .big-ico { margin: 0; } .stuff .lvl { position: absolute; top: -2px; right: 2px; background: #f5c451; color: #3a2600; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.home-short { display: flex; gap: 8px; margin: 10px 0; }
.hs { flex: 1; padding: 12px 4px; border-radius: 16px; font-weight: 800; font-size: 14px; color: #fff; border: 1.5px solid rgba(255,255,255,.35); box-shadow: 0 6px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.4); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.hs-green { background: linear-gradient(180deg,#3ddc84,#0f7a43); } .hs-blue { background: linear-gradient(180deg,#4aa3ff,#1c4fa8); } .hs-purple { background: linear-gradient(180deg,#b27cff,#5a2fb0); }
.spark-chips { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.tfchip { padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(245,196,81,.4); background: rgba(10,20,36,.7); color: #c9d6ea; font-size: 12px; } .tfchip.on { background: linear-gradient(180deg,#ffe08a,#c8891a); color: #3a2600; font-weight: 800; }
.mini-spark { display: block; width: 64px; height: 22px; }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 6px 4px 12px; }
.path-card { position: relative; padding: 12px 8px 10px; border-radius: 20px; background: linear-gradient(160deg,#1b2c4a,#0a1424); border: 2px solid #c8a24a; box-shadow: 0 10px 22px rgba(0,0,0,.55), 0 0 16px rgba(245,196,81,.2); text-align: center; transform: rotate(-2deg); }
.path-card:nth-child(even) { transform: rotate(2deg); }
.path-card h4 { margin: 4px 0 2px; font-family: Georgia, serif; color: #f5c451; }
.path-card small { display: block; color: #9fb0c8; min-height: 28px; font-size: 11px; line-height: 1.2; }
.path-card .btn { margin-top: 6px; width: 100%; padding: 7px; font-size: 13px; }
.path-art { height: 78px; display: flex; align-items: flex-end; justify-content: center; }

/* v12: 7-tab nav, skills unlocks, locked business */
#bottomnav { padding-left: 2px; padding-right: 2px; }
.navbtn { min-width: 0; flex: 1 1 0; padding-left: 0; padding-right: 0; }
.navbtn span { font-size: 9.5px; letter-spacing: -.2px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.navbtn .icn { width: 21px; height: 21px; }
.unlocks { margin-top: 6px; } .unl-t { font-family: Georgia, serif; color: #f5c451; font-size: 12px; }
.unl-h { font-size: 11px; color: #9fb0c8; margin: 4px 0 2px; }
.unl { padding: 4px 0; border-top: 1px dashed rgba(245,196,81,.15); font-size: 13px; } .unl small { color: #9fb0c8; } .unl.ok b { color: #4be3a0; }
.rq { display: inline-block; font-size: 11px; padding: 1px 7px; margin: 2px 4px 0 0; border-radius: 9px; background: rgba(255,90,106,.14); color: #ff8c98; border: 1px solid rgba(255,90,106,.35); }
.rq.ok { background: rgba(75,227,160,.14); color: #4be3a0; border-color: rgba(75,227,160,.4); }
.row.locked { opacity: .85; } .row.locked .big-ico { filter: grayscale(.7); }
#skill-list .row { align-items: flex-start; } #loan-amt { min-width: 0; flex: 1.2; }
