/* ============================================================
   I GOT PILLS - styles.css
   Photo-real clinic noir aesthetic.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg0: #0d0f13;
  --bg1: #14181f;
  --bg2: #1b212b;
  --panel: rgba(28, 34, 44, 0.88);
  --panel2: rgba(36, 44, 56, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --txt: #e8e4da;
  --dim: #9aa3af;
  --gold: #c9a227;
  --green: #7fae9f;
  --red: #c0392b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, Helvetica, sans-serif;
  --cursive: "Segoe Script", "Comic Sans MS", cursive;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(1200px 800px at 70% -10%, rgba(201, 162, 39, 0.08), transparent 60%),
    radial-gradient(900px 700px at 10% 110%, rgba(127, 174, 159, 0.07), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg0) 70%);
  color: var(--txt);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}

/* ============ SCREENS ============ */
.screen { display: none; position: fixed; inset: 0; }
.screen.open { display: flex; }

/* ============ MAIN MENU ============ */
#menu-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  text-align: center;
}

#menu-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.float-pill { position: absolute; opacity: 0.16; animation: drift 9s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translateY(-12px) rotate(-6deg); }
  to { transform: translateY(14px) rotate(8deg); }
}

#menu-logo { margin-bottom: 6px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); }

.menu-title {
  font-family: var(--serif);
  font-size: 74px;
  font-weight: 900;
  letter-spacing: 6px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5), 0 14px 40px rgba(0, 0, 0, 0.7);
  background: linear-gradient(180deg, #f7f1e2 20%, #c9a227 55%, #8a6a12 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}

.menu-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--dim);
  font-size: 17px;
  margin-bottom: 34px;
  letter-spacing: 1px;
}

.menu-btns { display: flex; flex-direction: column; gap: 12px; width: 300px; position: relative; z-index: 2; }

.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #f3eee2;
  background: linear-gradient(180deg, #3d4757, #232b37);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 12px 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #e0b04a, #a8791f 70%, #8a6114);
  border-color: rgba(255, 230, 160, 0.4);
  color: #1c1505;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.danger { background: linear-gradient(180deg, #d95c46, #8e2b1c); border-color: rgba(255, 150, 120, 0.35); }
.btn.small { padding: 8px 14px; font-size: 12px; border-radius: 14px; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

#continue-info { margin-top: 14px; color: var(--dim); font-size: 13px; font-style: italic; }

.menu-footer { position: absolute; bottom: 18px; width: 100%; text-align: center; color: rgba(255, 255, 255, 0.28); font-size: 12px; letter-spacing: 2px; }

/* ============ GAME SCREEN ============ */
#game-screen { flex-direction: column; z-index: 5; }

/* header */
.hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(24, 30, 40, 0.95), rgba(16, 20, 27, 0.92));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-wrap: wrap;
}

.cash-box { display: flex; align-items: center; gap: 10px; }
#cash-stack { height: 62px; }
#cash-stack svg { height: 44px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5)); }
.cash-stack-real { position: relative; width: 150px; height: 58px; }
.cash-bill { position: absolute; left: 0; top: 0; width: 145px; height: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55)); pointer-events: none; }
#cash-amount { font-size: 22px; font-weight: 800; color: #e9f2d8; text-shadow: 0 0 18px rgba(160, 210, 130, 0.35); font-variant-numeric: tabular-nums; }

.hud-block { display: flex; flex-direction: column; gap: 3px; min-width: 150px; }
.hud-label { font-size: 9px; letter-spacing: 2px; color: var(--dim); font-weight: 700; }
.bar { height: 9px; border-radius: 5px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
#rep-bar-fill { background: linear-gradient(180deg, #b8d6cc, #5f8f80); }
#heat-bar-fill { background: linear-gradient(180deg, #e8c97a, #a8791f); }

.hud-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* casualty toll counters */
.toll-row { display: flex; gap: 6px; align-items: center; }
.toll {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
  cursor: help;
}
.toll svg { width: 16px; height: 16px; display: block; }
.toll b { font-size: 12.5px; }
.toll-dead { border-color: rgba(192, 57, 43, 0.45); }
.toll-dead b { color: #e88a7a; }
.toll-hospital { border-color: rgba(74, 144, 217, 0.45); }
.toll-hospital b { color: #8fc0e8; }
.toll-rehab { border-color: rgba(127, 174, 159, 0.45); }
.toll-rehab b { color: #9fd4c3; }
.toll-jail { border-color: rgba(176, 176, 192, 0.45); }
.toll-jail b { color: #c9c9d8; }

/* tabs */
.tabbar { display: flex; gap: 4px; padding: 8px 18px 0; background: linear-gradient(180deg, rgba(16, 20, 27, 0.95), rgba(16, 20, 27, 0.6)); flex-wrap: wrap; }
.tab-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--dim);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 10px 20px 9px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  transition: all 0.15s ease;
}
.tab-btn:hover { color: var(--txt); background: rgba(255, 255, 255, 0.05); }
.tab-btn.active {
  color: var(--gold);
  background: var(--panel);
  border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--gold);
}

/* main views */
#main-view { flex: 1; overflow-y: auto; padding: 18px; }

.view { display: none; }
.view h2 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 1px;
  color: #f0ead8;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.view h2 .view-sub { font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.5px; font-weight: 400; color: var(--dim); font-style: italic; margin-left: 8px; }

/* ============ DESK ============ */
#desk-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  box-shadow: inset 0 2px 30px rgba(0, 0, 0, 0.4);
}

.desk-empty { text-align: center; color: var(--txt); font-size: 16px; line-height: 1.7; }
.desk-empty .dim { color: var(--dim); font-size: 13px; font-style: italic; }

.desk-customer { display: flex; gap: 24px; align-items: center; max-width: 720px; }
.desk-photo { flex-shrink: 0; }
.cust-photo {
  width: 120px; height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.cust-photo.big { width: 170px; height: 170px; }
.desk-info { max-width: 460px; }
.desk-name { font-family: var(--serif); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.desk-meta { color: var(--dim); font-size: 13px; margin-bottom: 10px; }
.desk-line { font-style: italic; color: #d8d2c2; font-size: 15px; line-height: 1.5; }
.fb-bubble {
  margin-top: 12px;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #e8d9a8;
  font-style: italic;
}

.desk-actions { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* ============ MARKET ============ */
.market-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.pill-mini svg { width: 56px; height: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }
.market-info { flex: 1; }
.m-name { font-weight: 800; font-size: 16px; }
.m-gen { color: var(--dim); font-size: 12px; font-weight: 400; margin-left: 8px; }
.m-desc { color: var(--dim); font-size: 12.5px; font-style: italic; margin: 3px 0 7px; }
.m-nums { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  color: #cfc9b8;
}
.market-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 320px; }

/* ============ INVENTORY ============ */
.inv-row {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 8px;
}

.empty {
  background: var(--panel);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: var(--dim);
  line-height: 1.7;
}

/* ============ CUSTOMERS GRID ============ */
#customers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cust-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.cust-card .cust-photo { margin: 0 auto 10px; }
.cust-card.dead-card { opacity: 0.55; filter: grayscale(0.9); }
.cust-name { font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.cust-meta { color: var(--dim); font-size: 11.5px; }
.cust-fav { color: var(--dim); font-size: 11px; margin-top: 5px; }
.cust-visits { color: rgba(255, 255, 255, 0.35); font-size: 10.5px; margin-top: 6px; }
.fb { font-size: 11px; font-style: italic; color: #e8d9a8; margin-top: 6px; line-height: 1.4; }

.badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: 2px;
  margin-left: 5px;
}
.badge.ok { background: rgba(127, 174, 159, 0.2); color: #9fd4c3; border: 1px solid rgba(127, 174, 159, 0.4); }
.badge.warn { background: rgba(224, 176, 74, 0.18); color: #e8c97a; border: 1px solid rgba(224, 176, 74, 0.4); }
.badge.jail { background: rgba(143, 143, 158, 0.2); color: #c9c9d8; border: 1px solid rgba(143, 143, 158, 0.45); }
.badge.dead { background: rgba(192, 57, 43, 0.2); color: #e88a7a; border: 1px solid rgba(192, 57, 43, 0.45); }

/* ============ LOG ============ */
.log-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.log-icon svg { width: 26px; height: 26px; }
.log-text { color: #d8d2c2; }

/* ============ MODALS ============ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }

.modal-box {
  background:
    radial-gradient(700px 300px at 50% -20%, rgba(201, 162, 39, 0.08), transparent 60%),
    linear-gradient(180deg, var(--panel2), rgba(20, 25, 33, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  padding: 24px;
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}

.close-x {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.close-x:hover { color: var(--txt); }

.modal h3 { font-family: var(--serif); font-size: 22px; color: #f0ead8; margin-bottom: 14px; letter-spacing: 1px; }

/* script modal */
#script-svg { display: flex; justify-content: center; }
#script-svg svg { width: 330px; height: auto; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.55)); }
.script-meta { text-align: center; color: var(--dim); font-size: 13px; margin-top: 10px; }

/* fill modal */
.fill-layout { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.fill-controls { flex: 1; min-width: 300px; }
.fill-bottle-box { flex-shrink: 0; text-align: center; }
#fill-bottle svg { width: 210px; height: auto; filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.6)); }

.ctl { margin-bottom: 16px; }
.ctl label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--dim); margin-bottom: 6px; }
.ctl select, .ctl input[type="range"] { width: 100%; }
.ctl select {
  background: rgba(0, 0, 0, 0.4);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: var(--sans);
}
.ctl .range-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--txt); font-weight: 700; }
input[type="range"] { accent-color: var(--gold); height: 26px; }

.check-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #e8d9a8; margin-bottom: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--red); }

.fill-total { font-size: 18px; margin-bottom: 6px; }
.big-total { font-size: 26px; color: #e9f2d8; text-shadow: 0 0 16px rgba(160, 210, 130, 0.3); }
.fill-stock { font-size: 12.5px; margin-bottom: 6px; }
.fill-stock.ok { color: var(--green); }
.fill-stock.bad { color: var(--red); font-weight: 700; }
.fill-danger { font-size: 12.5px; color: var(--dim); margin-bottom: 16px; line-height: 1.5; }
.fill-danger .blink { color: var(--red); font-weight: 800; animation: blink 0.8s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }

.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* outcome popup (hospital / rehab / jail / death) */
.outcome-box { max-width: 500px; text-align: center; animation: outcomePop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes outcomePop {
  from { transform: scale(0.8) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.outcome-top { position: relative; display: flex; justify-content: center; margin: 8px 0 6px; }
.outcome-photo-wrap { position: relative; }
.outcome-photo-img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--kind, var(--gold));
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45), 0 0 34px rgba(0, 0, 0, 0.6), 0 12px 30px rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45), 0 0 34px color-mix(in srgb, var(--kind, var(--gold)) 45%, transparent), 0 12px 30px rgba(0, 0, 0, 0.6);
  background: #1b212b;
}
.outcome-icon-wrap {
  position: absolute;
  right: -18px;
  bottom: -16px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.65));
}
.outcome-icon-wrap svg { width: 104px; height: 104px; display: block; }
.outcome-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 4px;
  margin: 12px 0 2px;
  color: var(--kind, var(--gold));
  text-shadow: 0 0 26px rgba(0, 0, 0, 0.6), 0 3px 0 rgba(0, 0, 0, 0.45);
  text-shadow: 0 0 26px color-mix(in srgb, var(--kind, var(--gold)) 55%, transparent), 0 3px 0 rgba(0, 0, 0, 0.45);
}
.outcome-sub {
  color: var(--dim);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.outcome-name { color: var(--dim); font-size: 13.5px; margin-bottom: 10px; }
.outcome-name b { color: #e8e4da; }
.outcome-text {
  color: #d8d2c2;
  font-size: 14.5px;
  line-height: 1.65;
  font-style: italic;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.outcome-heat {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ff9a86;
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid rgba(192, 57, 43, 0.45);
  border-radius: 20px;
  padding: 5px 16px;
  margin-bottom: 10px;
}
.outcome-box[data-kind="back"] .outcome-heat {
  color: #b7e07f;
  background: rgba(127, 174, 159, 0.15);
  border-color: rgba(127, 174, 159, 0.5);
}

/* ============ TOLL BOARD ============ */
#toll-list { max-width: 860px; }
.toll-row-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--dim);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}
.toll-row-card.kind-dead { border-left-color: #c0392b; }
.toll-row-card.kind-hospital { border-left-color: #4a90d9; }
.toll-row-card.kind-rehab { border-left-color: #7fae9f; }
.toll-row-card.kind-jail { border-left-color: #b0b0c0; }
.toll-photo { flex-shrink: 0; }
.toll-photo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: #1b212b;
}
.toll-photo-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  font-weight: 800;
}
.toll-meta { flex: 1; min-width: 0; }
.toll-name { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 800; }
.toll-name svg { width: 18px; height: 18px; flex-shrink: 0; }
.kind-dead .toll-name svg { filter: drop-shadow(0 0 6px rgba(192, 57, 43, 0.6)); }
.toll-badge {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 10px;
  color: var(--txt);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid currentColor;
  flex-shrink: 0;
}
.kind-dead .toll-badge { color: #e88a7a; }
.kind-hospital .toll-badge { color: #8fc0e8; }
.kind-rehab .toll-badge { color: #9fd4c3; }
.kind-jail .toll-badge { color: #c9c9d8; }
.toll-detail { color: var(--dim); font-size: 12px; margin-top: 3px; }
.toll-detail b { color: #cfc9b8; }
.kind-dead .toll-photo-img { filter: grayscale(0.9) brightness(0.85); }

/* game-over toll chips */
.go-toll-head { margin: 14px 0 4px; font-size: 10px; font-weight: 800; letter-spacing: 2.5px; color: var(--dim); }
.go-toll { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.go-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 14px;
}
.go-chip svg { width: 20px; height: 20px; }
.go-chip b { font-size: 16px; font-variant-numeric: tabular-nums; }
.go-chip.kind-dead { border-color: rgba(192, 57, 43, 0.55); }
.go-chip.kind-dead b { color: #e88a7a; }
.go-chip.kind-hospital { border-color: rgba(74, 144, 217, 0.55); }
.go-chip.kind-hospital b { color: #8fc0e8; }
.go-chip.kind-rehab { border-color: rgba(127, 174, 159, 0.55); }
.go-chip.kind-rehab b { color: #9fd4c3; }
.go-chip.kind-jail { border-color: rgba(176, 176, 192, 0.55); }
.go-chip.kind-jail b { color: #c9c9d8; }

/* week report */
.report-head {
  font-size: 15px;
  color: #f0ead8;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 10px;
}

/* howto / credits */
.howto-section { margin-bottom: 18px; }
.howto-section h4 { color: var(--gold); font-size: 14px; letter-spacing: 1.5px; margin-bottom: 6px; }
.howto-section p, .howto-section li { color: #cfc9b8; font-size: 13.5px; line-height: 1.7; }
.howto-section ul { padding-left: 20px; }

.credits-big {
  text-align: center;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 900;
  background: linear-gradient(180deg, #f7f1e2, #c9a227);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 4px;
}
.credits-sub { text-align: center; color: var(--dim); font-style: italic; margin-bottom: 20px; }
.credits-line { text-align: center; color: #cfc9b8; font-size: 14px; line-height: 2; }

/* game over */
.go-box { text-align: center; max-width: 560px; }
#go-mugshot svg { width: 170px; height: auto; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.6)); }
.go-mugshot-img {
  width: 170px;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
#go-title {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--red);
  text-shadow: 0 4px 20px rgba(192, 57, 43, 0.5);
  margin: 10px 0;
}
#go-body { color: #cfc9b8; font-size: 14.5px; line-height: 1.8; margin-bottom: 16px; }
#go-stats { color: var(--dim); font-size: 13px; line-height: 2; margin-bottom: 20px; background: rgba(0, 0, 0, 0.35); border-radius: 10px; padding: 12px; }

/* ============ TOASTS ============ */
#toasts {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: linear-gradient(180deg, rgba(34, 41, 52, 0.97), rgba(22, 27, 35, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13.5px;
  color: #e8e4da;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s ease;
  max-width: 520px;
  text-align: center;
}
.toast.warn { border-left-color: var(--red); }
.toast.deal { border-left-color: var(--green); }
.toast.out { opacity: 0; transition: opacity 0.5s; }
@keyframes toastIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============ FLYING BILLS ============ */
#bill-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.fly-bill {
  position: absolute;
  top: 40%;
  width: 110px;
  animation: fly 2s ease-in forwards;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
}
.fly-bill svg { width: 100%; height: auto; }
.fly-bill img, .fly-bill .real-bill { width: 100%; height: auto; display: block; }
@keyframes fly {
  0% { transform: translateY(0) rotate(0deg) scale(0.7); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(-70vh) translateX(60px) rotate(14deg) scale(1); opacity: 0; }
}

/* scrollbars */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

@media (max-width: 760px) {
  .menu-title { font-size: 42px; }
  .hud { gap: 8px; }
  .hud-block { min-width: 110px; }
  .desk-customer { flex-direction: column; text-align: center; }
  .fill-layout { flex-direction: column; }
}

/* ============ THE EMPIRE ============ */
.emp-sec { margin-bottom: 26px; }
.emp-title {
  font-family: var(--serif); font-size: 17px; color: #e8c97a;
  letter-spacing: 1.5px; margin: 4px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 6px;
}
.emp-sub { font-family: var(--sans); font-size: 11px; font-weight: 400; font-style: italic; color: var(--dim); letter-spacing: 0.4px; margin-left: 8px; }

/* staff */
.staff-card, .rival-card, .upgrade-card, .loan-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.15));
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin-bottom: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.staff-card.hired { border-color: rgba(127, 174, 159, 0.5); box-shadow: 0 0 14px rgba(127, 174, 159, 0.15); }
.staff-photo-wrap, .rival-photo-wrap { flex: 0 0 auto; }
.staff-photo, .rival-photo {
  width: 64px; height: 64px; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--line); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.staff-card.hired .staff-photo { border-color: #7fae9f; }
.staff-name { font-family: var(--serif); font-size: 15px; color: var(--txt); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.staff-role { font-size: 11px; color: var(--dim); font-style: italic; margin: 2px 0 4px; }
.staff-desc { font-size: 12.5px; color: #c9c2b0; line-height: 1.45; }
.staff-perks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.staff-card .btn, .upgrade-card .btn, .loan-card .btn { margin-left: auto; }

/* rivals */
.rival-card { align-items: flex-start; }
.rival-photo { width: 70px; height: 70px; border-radius: 12px; }
.rival-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; margin-top: 4px; }

/* community */
.community-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.comm-box {
  flex: 1 1 260px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px;
}
.comm-desc { font-size: 12px; color: var(--dim); margin: 6px 0 10px; line-height: 1.4; }
#goodwill-fill { background: linear-gradient(180deg, #8fd0b0, #2c5c42); }

/* upgrades & loans */
.upgrade-card.owned { border-color: rgba(127, 174, 159, 0.45); }
.loan-card.active-loan { border-color: rgba(224, 176, 74, 0.4); background: rgba(224, 176, 74, 0.06); }

/* achievements */
.ach-card {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.ach-card .ach-icon svg { width: 26px; height: 26px; }
.ach-card.got { border-color: rgba(201, 162, 39, 0.55); background: rgba(201, 162, 39, 0.08); }
.ach-card.locked { opacity: 0.5; filter: grayscale(0.9); }
.ach-name { font-size: 13px; font-weight: 700; color: var(--txt); letter-spacing: 0.5px; min-width: 140px; }
.ach-desc { font-size: 11.5px; color: var(--dim); }
.toast.ach { border-left-color: #c9a227; background: linear-gradient(180deg, rgba(40, 32, 12, 0.98), rgba(20, 16, 6, 0.98)); }

/* ============ SUPPLIERS & PILL PRESS ============ */
.supplier-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.supplier-card {
  flex: 1 1 240px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
}
.supplier-card.active { border-color: rgba(127, 174, 159, 0.55); box-shadow: 0 0 12px rgba(127, 174, 159, 0.12); }
.supplier-name { font-family: var(--serif); font-size: 14px; color: var(--txt); display: flex; gap: 8px; align-items: center; }
.supplier-desc { font-size: 11.5px; color: var(--dim); font-style: italic; }
.supplier-rel { font-size: 12px; color: #c9c2b0; }
.shortage-banner {
  flex: 1 1 100%; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; color: #ffb3a3;
  background: rgba(192, 57, 43, 0.15); border: 1px solid rgba(192, 57, 43, 0.4);
}
.press-sec {
  margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.press-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.press-powder { font-size: 13px; color: #c9c2b0; }
.press-drugs { display: flex; flex-wrap: wrap; gap: 8px; }
.press-bad { background: rgba(192, 57, 43, 0.15); color: #e88a7a; border: 1px solid rgba(192, 57, 43, 0.4); }
.press-ok { background: rgba(127, 174, 159, 0.15); color: #9fd4c3; border: 1px solid rgba(127, 174, 159, 0.4); }

/* ============ NEWSPAPER ============ */
.news-paper {
  background: linear-gradient(180deg, #f6f1e3, #e8e0cb); color: #1c1c1c;
  border: 1px solid #b9b0a0; border-radius: 6px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.news-mast {
  font-family: Georgia, "Times New Roman", serif; font-size: 26px; font-weight: 900;
  text-align: center; letter-spacing: 3px; color: #111; border-bottom: 3px double #333; padding-bottom: 6px;
}
.news-tag {
  font-family: Georgia, serif; font-style: italic; font-size: 11.5px; text-align: center;
  color: #555; padding: 4px 0 8px; border-bottom: 1px solid #999;
}
.news-head {
  font-family: Georgia, serif; font-size: 14.5px; font-weight: 700; color: #111;
  padding: 7px 2px 0; line-height: 1.3;
}
.news-head::before { content: "\2014\00a0"; color: #8a1f1f; }

/* ============ AUDIT & RAID MODALS ============ */
.audit-icon { text-align: center; margin-bottom: 6px; }
.audit-icon svg { width: 74px; height: 74px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55)); }
.raid-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.raid-opts .btn { justify-content: center; text-align: center; }
.raid-odds {
  margin-top: 12px; font-size: 12px; color: var(--dim); text-align: center;
  background: rgba(0, 0, 0, 0.25); border-radius: 6px; padding: 6px;
}
#raid-modal .modal-box { border-color: rgba(255, 90, 60, 0.55); box-shadow: 0 0 40px rgba(255, 60, 40, 0.25); }
#audit-modal .modal-box { border-color: rgba(224, 176, 74, 0.5); }

/* ============ SECOND LOCATION / TRANSFERS ============ */
.transfer-rows { display: flex; flex-direction: column; gap: 8px; }
.transfer-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px;
}
.transfer-mid {
  flex: 1 1 220px; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #c9c2b0;
}
.pill-mini-tiny svg { width: 32px; height: auto; display: block; }