/* ============================================================================
   maxed-out.css — a beautiful, morally useless banking app.
   Shared shell (game-shell.css) owns header/banner/rails/overlays/game-over/push.
   This styles the in-#game-wrap dashboard, card stack, decision/purchase modals,
   slide-up panels and the fake-victory toast.
   ============================================================================ */

#game-wrap { background: radial-gradient(circle at 50% -8%, #0c1426, #060810 64%); }

.mo-app {
  width: min(450px, 100%); height: 100%;
  display: flex; flex-direction: column; gap: 9px;
  padding: 10px 12px 12px; font-family: var(--fn);
  user-select: none; -webkit-user-select: none;
}

/* ── TOP BAR ───────────────────────────────────────────────────────────────── */
.mo-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mo-stat {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 2px; border-radius: var(--r);
  background: var(--s1); border: 1px solid var(--bd);
}
.mo-stat span { font-size: 9px; color: var(--mu); text-transform: uppercase; letter-spacing: .5px; }
.mo-stat b { font-family: var(--fm); font-size: 16px; color: var(--tx); }
.mo-stat b.good { color: var(--gn); }
.mo-stat b.bad  { color: var(--ac); }
.mo-stat b.warn { color: var(--am); }

/* interest engine + available credit */
.mo-interest {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; border-radius: var(--r);
  background: rgba(192,0,26,.06); border: 1px solid rgba(192,0,26,.22);
}
.mo-int-lbl { font-size: 11px; color: var(--mu); }
.mo-int-lbl b { font-family: var(--fm); font-size: 15px; color: var(--ac); }
.mo-int-lbl b.heavy { animation: mo-blink .8s steps(2) infinite; }
@keyframes mo-blink { 50% { opacity: .5; } }
.mo-avail-lbl { font-size: 10px; color: var(--su); text-align: right; }
.mo-avail-lbl b { display: block; font-family: var(--fm); font-size: 14px; color: var(--bl); }

/* meters */
.mo-meters { display: flex; flex-direction: column; gap: 5px; }
.mo-meter-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--mu); margin-bottom: 2px; }
.mo-meter-lbl b { font-family: var(--fm); color: var(--tx); font-weight: 500; }
.mo-bar { height: 6px; background: #0e1422; border: 1px solid var(--bd); border-radius: 999px; overflow: hidden; }
.mo-bar i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease, background .3s ease; }
.mo-bar-stress { background: linear-gradient(90deg,#2b6fb8,#C0001A); }
.mo-bar-util   { background: linear-gradient(90deg,#1f7a4a,#ffb454 70%,#C0001A); }

/* ── STAGE / WORK TAP ──────────────────────────────────────────────────────── */
.mo-stage { position: relative; flex: 1; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.mo-work {
  position: relative; cursor: pointer; text-align: center; padding: 14px 28px; border-radius: 16px;
  background: linear-gradient(160deg, #16233b, #0e1626);
  border: 1px solid #24344f; box-shadow: 0 8px 26px rgba(0,0,0,.5);
  transition: transform .06s ease;
}
.mo-work:active { transform: scale(.95); }
.mo-work-ico { font-size: clamp(54px, 16vw, 86px); line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.mo-work-lbl { font-family: var(--ff); font-weight: 600; font-size: 15px; color: var(--tx); letter-spacing: .5px; margin-top: 4px; }
.mo-work-hint { font-size: 10px; color: var(--su); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.mo-floaters { position: absolute; inset: 0; pointer-events: none; }
.mo-float { position: absolute; font-family: var(--fm); font-weight: 600; font-size: 17px; animation: mo-rise .9s ease-out forwards; }
.mo-float.up { color: var(--gn); }
.mo-float.down { color: var(--ac); }
.mo-float.pts { color: var(--bl); }
@keyframes mo-rise { from{transform:translateY(0);opacity:1} to{transform:translateY(-58px);opacity:0} }

/* Finley, the perpetually upbeat banking assistant */
.mo-finley { position: absolute; left: 2px; bottom: 0; display: flex; align-items: flex-end; gap: 6px; max-width: 74%; pointer-events: none; }
.mo-finley-face { font-size: 26px; line-height: 1; }
.mo-finley-bubble {
  background: var(--s2); border: 1px solid #24344f; border-radius: 10px; padding: 6px 10px;
  font-size: 11px; color: #9fb3cf; line-height: 1.3; max-width: 230px;
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s;
}
.mo-finley-bubble.show { opacity: 1; transform: translateY(0); }
.mo-finley-bubble.alarm { color: #ff9a95; border-color: rgba(192,0,26,.4); }

/* ── CARD STACK ────────────────────────────────────────────────────────────── */
.mo-cards { display: flex; flex-direction: column; gap: 6px; }
.mo-card {
  position: relative; text-align: left; width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  padding: 9px 12px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #1c2c49, #122038); border: 1px solid #2a3c5c; color: #dce6f4;
  transition: box-shadow .15s, border-color .15s, transform .08s;
}
.mo-card:active { transform: scale(.99); }
.mo-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: rgba(120,160,220,.06); }
.mo-card.due-soon { border-color: var(--am); box-shadow: 0 0 12px rgba(255,184,0,.18); }
.mo-card.due-now  { border-color: var(--ac); box-shadow: 0 0 14px var(--glow1); }
.mo-card.maxed    { background: linear-gradient(135deg, #3a1622, #241018); border-color: var(--ac); }
.mo-card-nm { font-family: var(--ff); font-weight: 600; font-size: 13px; letter-spacing: .3px; }
.mo-card-bal { font-family: var(--fm); font-size: 12px; color: #aebfd6; }
.mo-card-bal b { color: #fff; }
.mo-card-apr { font-family: var(--fm); font-size: 10px; color: #7e93b3; }
.mo-card-due { justify-self: end; align-self: center; text-align: right; font-family: var(--fm); font-size: 11px; color: #9fb3cf; }
.mo-card-due .mo-due-badge { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10px; }
.mo-due-badge.soon { background: rgba(255,184,0,.15); color: var(--am); }
.mo-due-badge.now  { background: var(--acd); color: var(--ac); border: 1px solid var(--ac); }
.mo-due-badge.ok   { background: rgba(0,230,118,.1); color: var(--gn); }
.mo-card-promo { grid-column: 1 / -1; font-family: var(--fm); font-size: 9px; color: var(--bl); }

/* ── CONTROLS ──────────────────────────────────────────────────────────────── */
.mo-controls { display: flex; gap: 7px; }
.mo-ctl {
  position: relative; flex: 1; font-family: var(--ff); font-weight: 600; font-size: 12px; letter-spacing: .3px;
  padding: 11px 3px; border-radius: var(--r);
  background: var(--s1); border: 1px solid var(--bd); color: var(--tx);
  transition: border-color .15s, box-shadow .15s;
}
.mo-ctl:hover:not(:disabled) { border-color: var(--bdb); }
.mo-ctl.hot { border-color: var(--bl); box-shadow: 0 0 10px rgba(77,158,255,.2); }
.mo-badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  font-family: var(--fm); font-size: 11px; color: #fff; background: var(--ac); border-radius: 999px;
}
.mo-ctl.flash { animation: mo-flash .5s ease; }
@keyframes mo-flash { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 0 2px var(--bl), 0 0 16px rgba(77,158,255,.5)} }

/* ── SLIDE-UP PANELS ───────────────────────────────────────────────────────── */
.mo-panel { display: none; position: fixed; inset: 0; z-index: 900; align-items: flex-end; justify-content: center; background: rgba(6,8,16,.72); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.mo-panel.active { display: flex; }
.mo-panel-inner { width: 100%; max-width: 450px; max-height: 78vh; display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--bd); border-bottom: none; border-radius: var(--rl) var(--rl) 0 0; padding: 16px 16px 22px; animation: mo-slideup .22s ease; }
@keyframes mo-slideup { from{transform:translateY(40px);opacity:.4} to{transform:translateY(0);opacity:1} }
.mo-panel-head { display: flex; align-items: center; justify-content: space-between; }
.mo-panel-head h3 { font-family: var(--fc); font-weight: 700; font-size: 22px; color: var(--tx); }
.mo-x { font-size: 16px; color: var(--mu); width: 30px; height: 30px; border-radius: var(--r); }
.mo-x:hover { color: var(--tx); background: var(--s3); }
.mo-panel-sub { font-size: 12px; color: var(--mu); margin: 2px 0 12px; }
.mo-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }

.mo-row { display: flex; align-items: center; gap: 11px; text-align: left; padding: 11px 12px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--bd); width: 100%; }
.mo-row:disabled { opacity: .5; }
.mo-row.affordable { border-color: var(--bdb); }
.mo-row.owned { border-color: rgba(0,230,118,.3); }
.mo-row-ico { font-size: 24px; flex-shrink: 0; }
.mo-row-main { flex: 1; min-width: 0; }
.mo-row-nm { font-family: var(--ff); font-weight: 600; font-size: 14px; color: var(--tx); }
.mo-row-desc { font-size: 11px; color: var(--mu); font-style: italic; line-height: 1.35; margin-top: 2px; }
.mo-row-meta { font-family: var(--fm); font-size: 11px; color: var(--bl); margin-top: 3px; }
.mo-row-cost { font-family: var(--fm); font-size: 13px; color: var(--am); flex-shrink: 0; text-align: right; }
.mo-row.owned .mo-row-cost { color: var(--gn); font-size: 12px; }

/* bill rows */
.mo-bill { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--s2); border: 1px solid var(--bd); }
.mo-bill.soon { border-color: var(--am); }
.mo-bill.now { border-color: var(--ac); }
.mo-bill-ico { font-size: 18px; }
.mo-bill-main { flex: 1; }
.mo-bill-nm { font-size: 12px; color: var(--tx); }
.mo-bill-sub { font-family: var(--fm); font-size: 10px; color: var(--mu); }
.mo-bill-when { font-family: var(--fm); font-size: 11px; color: var(--mu); }
.mo-bill-cancel { font-family: var(--ff); font-size: 11px; padding: 5px 9px; border-radius: var(--r); background: var(--acd); border: 1px solid var(--ac); color: #ff8a8a; }

/* ── DECISION / PURCHASE MODALS ────────────────────────────────────────────── */
.mo-dec-inner { max-width: 372px; }
.mo-dec-from { font-family: var(--ff); font-size: 12px; color: var(--mu); letter-spacing: .5px; }
.mo-dec-text { font-family: var(--fc); font-weight: 600; font-size: 21px; color: var(--tx); line-height: 1.25; margin: 6px 0 10px; }
.mo-buy-amt { font-family: var(--fm); font-size: 30px; color: var(--am); margin-bottom: 12px; }
.mo-dec-rows { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; text-align: left; }
.mo-dec-row { display: flex; justify-content: space-between; font-family: var(--fm); font-size: 12px; padding: 6px 10px; background: var(--s2); border: 1px solid var(--bd); border-radius: var(--r); color: var(--mu); }
.mo-dec-row b { color: var(--tx); }
.mo-dec-choices { display: flex; gap: 8px; }
.mo-choice { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--ff); font-weight: 600; font-size: 13px; letter-spacing: .3px; padding: 12px 4px; border-radius: var(--r); border: 1px solid var(--bd); color: var(--tx); }
.mo-choice small { font-family: var(--fm); font-size: 10px; font-weight: 400; opacity: .85; }
.mo-choice:disabled { opacity: .4; }
.mo-full  { background: rgba(0,230,118,.1);  border-color: rgba(0,230,118,.35); }
.mo-full:hover:not(:disabled) { box-shadow: 0 0 12px rgba(0,230,118,.22); }
.mo-min   { background: rgba(255,184,0,.1);  border-color: rgba(255,184,0,.35); }
.mo-min:hover:not(:disabled)  { box-shadow: 0 0 12px rgba(255,184,0,.22); }
.mo-skip  { background: var(--acd); border-color: var(--ac); }
.mo-skip:hover { box-shadow: 0 0 12px var(--glow1); }
.mo-dec-fine { font-size: 12px; color: var(--su); font-style: italic; margin-top: 12px; min-height: 16px; }

/* milestone */
.mo-ms-title { font-family: var(--fc); font-weight: 700; font-size: 30px; letter-spacing: 1px; color: var(--gn); text-shadow: 0 0 18px rgba(0,230,118,.3); margin-bottom: 2px; }
.mo-ms-sub { font-family: var(--ff); font-size: 12px; color: var(--mu); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 16px; }

/* ── FAKE-VICTORY TOAST ────────────────────────────────────────────────────── */
.mo-toast {
  position: fixed; left: 50%; bottom: -140px; transform: translateX(-50%); z-index: 1200;
  width: min(330px, 88%); text-align: center; padding: 12px 16px; border-radius: var(--rl);
  background: var(--s1); border: 1px solid var(--bd); box-shadow: 0 8px 30px rgba(0,0,0,.5);
  transition: bottom .35s cubic-bezier(.2,.9,.3,1.2);
}
.mo-toast.show { bottom: 24px; }
.mo-toast-win { font-family: var(--fc); font-weight: 700; font-size: 18px; color: var(--gn); }
.mo-toast-catch { font-size: 11px; color: var(--ac); font-style: italic; margin-top: 4px; min-height: 14px; }
.mo-toast.confetti .mo-toast-win::before { content: '🎉 '; }
.mo-toast.ach { border-color: var(--am); }
.mo-toast.ach .mo-toast-win { color: var(--am); }
.mo-toast.egg { border-color: var(--bl); }
.mo-toast.egg .mo-toast-win { color: var(--bl); }

/* ── INTRO / HOW-TO ────────────────────────────────────────────────────────── */
.mo-intro-inner { max-width: 400px; text-align: left; }
.mo-intro-logo { font-family: var(--fc); font-weight: 700; font-size: 30px; color: var(--tx); text-align: center; margin-bottom: 4px; }
.mo-intro-logo em { font-style: normal; color: var(--bl); }
.mo-intro-tag { font-size: 13px; color: var(--mu); text-align: center; margin-bottom: 16px; }
.mo-intro-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.mo-intro-list li { font-size: 12.5px; color: var(--mu); line-height: 1.45; padding-left: 2px; }
.mo-intro-list b { color: var(--tx); font-weight: 600; }
.mo-c-cash { color: var(--gn); font-weight: 600; }
.mo-c-card { color: var(--am); font-weight: 600; }

/* current job highlight in the career panel */
.mo-row.current { border-color: var(--bl); box-shadow: 0 0 10px rgba(77,158,255,.18); }
.mo-row.current .mo-row-cost { color: var(--bl); font-size: 12px; }
.mo-row.locked { opacity: .5; }
.mo-job-life { font-family: var(--fm); font-size: 10px; color: var(--am); }
