/* ============================================================
   Class Wargame — Base Styles
   ============================================================ */

/* ------------------------------------------------------------
   iOS zoom prevention — stops double-tap & pinch zoom
   ------------------------------------------------------------ */
html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

* {
  -webkit-touch-callout: none;
}

/* ------------------------------------------------------------
   Custom Properties
   ------------------------------------------------------------ */
:root {
  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Worker palette (Act 1) */
  --worker-bg: #1a1a1a;
  --worker-surface: #2a2a2a;
  --worker-border: #3a3a3a;
  --worker-text: #e0e0e0;
  --worker-text-muted: #888888;
  --worker-accent: #e87b35;
  --worker-accent-hover: #f09050;
  --worker-danger: #d94444;

  /* Billionaire palette (Act 2) */
  --billionaire-bg: #0d0d1a;
  --billionaire-surface: #1a1a2e;
  --billionaire-gold: #d4af37;
  --billionaire-gold-glow: #f5d76e;
  --billionaire-chrome: #c0c0c0;
  --billionaire-purple: #7b2d8e;
  --billionaire-purple-glow: #a855f7;

  /* Receipt palette (Finale) */
  --receipt-bg: #f5f0e1;
  --receipt-text: #1a1a1a;
  --receipt-border: #c8c0a8;
  --receipt-accent: #333333;
}

/* ------------------------------------------------------------
   Reset
   ------------------------------------------------------------ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--worker-bg);
  color: var(--worker-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   Game Container
   ------------------------------------------------------------ */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ------------------------------------------------------------
   Screens — absolute stacked, opacity transition
   ------------------------------------------------------------ */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------------------------------------------
   Typography
   ------------------------------------------------------------ */
h1 {
  font-family: var(--font-display);
  font-size: 4rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}

.subtitle {
  color: var(--worker-text-muted);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--worker-accent);
  color: #fff;
  margin-top: 1.5rem;
}

.btn-primary:hover {
  background: var(--worker-accent-hover);
}

/* ------------------------------------------------------------
   Title Screen
   ------------------------------------------------------------ */
.title-content {
  text-align: center;
  padding: 2rem;
  max-width: 700px;
}

.title-main {
  font-family: var(--font-display);
  font-size: 7rem;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.title-line1 {
  color: #ff3333;
  display: block;
}

.title-line2 {
  display: block;
}

.title-war {
  color: #ff3333;
}

.title-game {
  color: #ffffff;
  animation: title-glitch 4s ease-in-out infinite;
}

.title-tagline {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--worker-text);
  margin-top: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-start {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.15em;
  padding: 1rem 3rem;
  background: #ff3333;
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 2.5rem;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-start:hover {
  background: #ff5555;
  transform: scale(1.03);
}

.btn-start:active {
  transform: scale(0.97);
}

.title-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #666;
  margin-top: 2rem;
  letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .title-main {
    font-size: 3.5rem;
  }
  .title-tagline {
    font-size: 1rem;
  }
  .btn-start {
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
  }
}

/* ------------------------------------------------------------
   Job Selection Screen
   ------------------------------------------------------------ */
.job-select-content {
  text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 960px;
}

.job-select-header {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.1em;
  color: var(--worker-text);
  margin-bottom: 2.5rem;
}

.job-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.job-card {
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-left: 4px solid var(--worker-accent);
  border-radius: 4px;
  padding: 1.5rem;
  width: 280px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-left-color: var(--worker-accent-hover);
}

.job-card-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.job-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.5rem;
}

.job-card-desc {
  font-size: 0.9rem;
  color: var(--worker-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.job-card-wage {
  font-size: 0.85rem;
  color: var(--worker-accent);
  margin-bottom: 0.5rem;
}

.job-card-warning {
  font-size: 0.8rem;
  color: var(--worker-danger);
  font-weight: 600;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--worker-border);
}

@media (max-width: 800px) {
  .job-cards {
    flex-direction: column;
    align-items: center;
  }
  .job-card {
    width: 100%;
    max-width: 360px;
  }
  .job-select-header {
    font-size: 2.2rem;
  }
}

/* ------------------------------------------------------------
   Work Phase Screen
   ------------------------------------------------------------ */
.work-content {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
}

.work-header {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  color: var(--worker-accent);
  margin-bottom: 2rem;
}

.work-stats {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.work-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-radius: 4px;
  padding: 0.75rem 0.5rem;
}

.work-stat-label {
  font-size: 0.7rem;
  color: var(--worker-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.work-timer-value,
.work-earnings-value,
.work-perclick-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.work-timer-danger {
  color: var(--worker-danger);
  animation: timer-pulse 0.5s ease infinite alternate;
}

@keyframes timer-pulse {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

.work-fatigue {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.work-fatigue-text {
  font-size: 0.7rem;
  color: var(--worker-text-muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.work-fatigue-bar {
  flex: 1;
  height: 12px;
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-radius: 6px;
  overflow: hidden;
}

.work-fatigue-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--worker-accent), var(--worker-danger));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.work-fatigue-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--worker-text-muted);
  min-width: 3ch;
  text-align: right;
}

.work-click-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.12em;
  min-width: 220px;
  min-height: 220px;
  border-radius: 50%;
  background: var(--worker-accent);
  color: #fff;
  border: 4px solid var(--worker-border);
  cursor: pointer;
  transition: background 0.1s ease, transform 0.08s ease, box-shadow 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 4px 15px rgba(232, 123, 53, 0.3);
}

.work-click-btn:hover {
  background: var(--worker-accent-hover);
  box-shadow: 0 6px 25px rgba(232, 123, 53, 0.5);
}

.work-click-btn:active,
.work-click-btn.clicked {
  transform: scale(0.93);
  background: #d06a2a;
}

.work-click-btn[disabled] {
  background: var(--worker-border);
  cursor: default;
  box-shadow: none;
}

/* Work Phase: collapse state */
.work-btn-collapsed {
  background: var(--worker-danger) !important;
  box-shadow: 0 0 20px rgba(217, 68, 68, 0.5) !important;
  animation: none !important;
  cursor: default !important;
}

.work-collapse-msg {
  font-size: 0.95rem;
  color: var(--worker-danger);
  font-weight: 600;
  margin-top: 1rem;
  line-height: 1.5;
  min-height: 1.5em;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.work-collapse-msg.work-collapse-visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .work-stats {
    flex-direction: column;
  }
  .work-click-btn {
    min-width: 200px;
    min-height: 200px;
    font-size: 1.5rem;
  }
}

/* ------------------------------------------------------------
   Payday Screen
   ------------------------------------------------------------ */
.payday-content {
  text-align: center;
  padding: 2rem;
  max-width: 460px;
  width: 100%;
}

.payday-header {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.1em;
  color: var(--worker-text);
  margin-bottom: 2rem;
}

.payday-stub {
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-left: 4px solid var(--worker-accent);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.payday-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  font-size: 1rem;
  color: var(--worker-text);
}

.payday-separator {
  height: 1px;
  background: var(--worker-border);
  margin: 0.2rem 0;
}

.payday-tax {
  color: var(--worker-danger);
}

.payday-total {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.payday-click-flavor {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--worker-text-muted);
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.payday-comment {
  font-style: italic;
  color: var(--worker-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.payday-btn {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 2.5rem;
}

/* ------------------------------------------------------------
   Bills / Spending Phase
   ------------------------------------------------------------ */
.bills-content {
  padding: 1.5rem;
  max-width: 720px;
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
}

.bills-top {
  text-align: center;
  margin-bottom: 1.5rem;
}

.bills-header {
  font-family: var(--font-display);
  font-size: 2.6rem;
  letter-spacing: 0.1em;
  color: var(--worker-text);
  margin-bottom: 0.75rem;
}

.bills-money {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-radius: 4px;
  display: inline-block;
  padding: 0.6rem 1.5rem;
  margin-bottom: 0.5rem;
}

.bills-money-label {
  color: var(--worker-text-muted);
}

.bills-money-value {
  color: var(--worker-accent);
  font-size: 1.5rem;
}

.bills-cc-balance {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--worker-danger);
  background: rgba(217, 68, 68, 0.12);
  border: 1px solid var(--worker-danger);
  border-radius: 4px;
  display: inline-block;
  padding: 0.5rem 1.2rem;
  margin-bottom: 0.75rem;
}

.bills-cc-label {
  color: var(--worker-danger);
}

.bills-cc-value {
  color: #ff6666;
  font-size: 1.3rem;
}

.bills-debt-note {
  font-size: 0.85rem;
  color: var(--worker-danger);
  font-weight: 600;
  margin-top: 0.5rem;
}

.bills-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bill-card {
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-left: 4px solid var(--worker-accent);
  border-radius: 4px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bill-card-crisis {
  border-color: var(--worker-danger);
  border-left-color: var(--worker-danger);
  animation: crisis-pulse 1.5s ease-in-out infinite;
}

.bill-card-crisis.bill-card-paid,
.bill-card-crisis.bill-card-skipped {
  animation: none;
}

@keyframes crisis-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(217, 68, 68, 0.3); }
  50% { box-shadow: 0 0 18px rgba(217, 68, 68, 0.7); }
}

.bill-card-paid {
  background: rgba(34, 139, 34, 0.12);
  border-left-color: #2e8b2e;
  border-color: #2e8b2e;
}

.bill-card-skipped {
  background: rgba(217, 68, 68, 0.12);
  border-left-color: var(--worker-danger);
  border-color: var(--worker-danger);
}

.bill-card-icon {
  font-size: 1.8rem;
}

.bill-card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bill-card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.bill-card-amount {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--worker-accent);
}

.bill-card-crisis-desc {
  font-size: 0.8rem;
  color: var(--worker-text-muted);
  font-style: italic;
  line-height: 1.4;
}

.bill-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.bill-btn {
  flex: 1;
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.bill-btn-pay {
  background: #2e8b2e;
  color: #fff;
}

.bill-btn-pay:hover {
  background: #3aa63a;
}

.bill-btn-disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
}

.bill-btn-disabled:hover {
  background: #555;
}

.bill-btn-disabled:active {
  transform: none;
}

.bill-btn-skip {
  background: transparent;
  color: var(--worker-danger);
  border: 1px solid var(--worker-danger);
}

.bill-btn-skip:hover {
  background: rgba(217, 68, 68, 0.15);
}

.bill-card-status {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0.3rem 0;
}

.bill-status-paid {
  color: #3aa63a;
}

.bill-status-skipped {
  color: var(--worker-danger);
}

/* Summary */
.bills-summary-box {
  background: var(--worker-surface);
  border: 1px solid var(--worker-border);
  border-left: 4px solid var(--worker-accent);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: left;
}

.bills-summary-header {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
}

.bills-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: var(--worker-text);
  border-bottom: 1px solid var(--worker-border);
}

.bills-summary-debt {
  color: var(--worker-danger);
  font-weight: 700;
}

.bills-summary-note {
  font-size: 0.85rem;
  color: var(--worker-text-muted);
  font-style: italic;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.bills-continue-btn {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 2.5rem;
  display: block;
  margin: 1.5rem auto 0;
}

@media (max-width: 600px) {
  .bills-cards {
    grid-template-columns: 1fr;
  }
  .bills-header {
    font-size: 2rem;
  }
}

/* ------------------------------------------------------------
   Transition Screen (Act 1 → Act 2)
   ------------------------------------------------------------ */
#screen-transition {
  background: #000;
}

#screen-transition::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.015) 2px,
    rgba(255, 255, 255, 0.015) 4px
  );
  animation: transition-static 0.15s steps(3) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes transition-static {
  0% { opacity: 0.4; transform: translateY(0); }
  33% { opacity: 0.2; transform: translateY(-1px); }
  66% { opacity: 0.5; transform: translateY(1px); }
  100% { opacity: 0.3; transform: translateY(0); }
}

.transition-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

/* Worker dot */
.transition-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 1.5s ease;
}

.transition-dot-symbol {
  font-size: 3rem;
  color: var(--worker-accent);
  text-shadow: 0 0 12px rgba(232, 123, 53, 0.6);
}

.transition-dot-shrink {
  animation: dot-zoom-out 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dot-zoom-out {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(0.05);
    opacity: 0.5;
  }
  100% {
    transform: scale(0.01);
    opacity: 0;
  }
}

/* "You" label */
.transition-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--worker-text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.75rem;
  transition: opacity 0.8s ease;
}

.transition-label-fade {
  opacity: 0;
}

/* Text lines */
.transition-line {
  font-family: var(--font-body);
  font-size: 1.6rem;
  color: var(--worker-text);
  line-height: 1.6;
  margin-top: 0.5rem;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.transition-line-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.transition-line-visible {
  opacity: 1;
  transform: translateY(0);
}

.transition-line em {
  font-style: italic;
  color: var(--billionaire-gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

@media (max-width: 600px) {
  .transition-line {
    font-size: 1.2rem;
  }
  .transition-dot-symbol {
    font-size: 2.2rem;
  }
}

/* ------------------------------------------------------------
   Billionaire Dashboard (Act 2)
   ------------------------------------------------------------ */
#screen-billionaire {
  background: var(--billionaire-bg);
  overflow: hidden;
}

.b-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 960px;
  padding: 2rem 1.5rem 5rem;
  position: relative;
  z-index: 2;
  max-height: 100vh;
  overflow-y: auto;
}

/* --- Wealth Ticker --- */
.b-wealth-ticker {
  text-align: center;
  margin-bottom: 2rem;
}

.b-wealth-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--billionaire-chrome);
  display: block;
  margin-bottom: 0.5rem;
}

.b-wealth-value {
  font-family: var(--font-display);
  font-size: 5rem;
  letter-spacing: 0.04em;
  color: var(--billionaire-gold);
  text-shadow:
    0 0 20px rgba(212, 175, 55, 0.5),
    0 0 60px rgba(212, 175, 55, 0.2);
  display: block;
  line-height: 1.1;
}

.b-wealth-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--billionaire-chrome);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* --- Choice Container --- */
.b-choice-container {
  width: 100%;
  max-width: 880px;
}

.b-cards-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  animation: b-cards-fade-in 0.5s ease forwards;
}

@keyframes b-cards-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Choice Cards --- */
.b-card {
  flex: 1;
  padding: 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.b-card:hover {
  transform: translateY(-4px);
}

/* Good card */
.b-card-good {
  background: rgba(42, 106, 90, 0.25);
  border: 1px solid rgba(42, 106, 90, 0.5);
}

.b-card-good:hover {
  box-shadow: 0 4px 24px rgba(42, 106, 90, 0.3);
}

.b-card-header {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.15em;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  text-align: center;
}

.b-card-header-good {
  background: rgba(42, 106, 90, 0.4);
  color: #7ec8b5;
}

/* Selfish card */
.b-card-selfish {
  background: rgba(40, 30, 15, 0.6);
  border: 1px solid var(--billionaire-gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
  animation: b-selfish-shimmer 3s ease-in-out infinite;
}

@keyframes b-selfish-shimmer {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.15); }
  50% { box-shadow: 0 0 24px rgba(212, 175, 55, 0.35); }
}

.b-card-selfish:hover {
  box-shadow: 0 4px 30px rgba(212, 175, 55, 0.4);
}

.b-card-header-selfish {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(245, 215, 110, 0.15));
  color: var(--billionaire-gold-glow);
}

.b-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.b-card-desc {
  font-size: 0.9rem;
  color: var(--billionaire-chrome);
  line-height: 1.5;
}

.b-card-cost {
  font-size: 1rem;
  color: #e87b7b;
  font-weight: 700;
}

.b-card-gain {
  font-size: 1rem;
  color: var(--billionaire-gold-glow);
  font-weight: 700;
}

.b-card-source {
  font-size: 0.75rem;
  color: rgba(192, 192, 192, 0.5);
  font-style: italic;
}

/* --- OR Divider --- */
.b-or-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  flex-shrink: 0;
}

.b-or-divider span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--billionaire-chrome);
  opacity: 0.5;
}

/* --- Darkness Overlay --- */
.b-darkness-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.8s ease;
}

/* --- Flash Effect (good choice) --- */
.b-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0);
  pointer-events: none;
  z-index: 11;
  transition: background 0.15s ease;
}

.b-flash-active {
  animation: b-flash-anim 0.5s ease forwards;
}

@keyframes b-flash-anim {
  0% { background: rgba(126, 200, 181, 0.35); }
  100% { background: rgba(126, 200, 181, 0); }
}

/* --- Worker Reminder (bottom-left) --- */
.b-worker-reminder {
  position: absolute;
  bottom: 3.5rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(192, 192, 192, 0.35);
  z-index: 5;
  pointer-events: none;
}

/* --- Power-Up Toast --- */
.b-toast {
  position: fixed;
  top: 50%;
  right: -360px;
  transform: translateY(-50%);
  width: 320px;
  padding: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4af37, #f5d76e, #d4af37);
  border: 2px solid #fff3b0;
  box-shadow:
    0 0 30px rgba(212, 175, 55, 0.5),
    0 0 60px rgba(212, 175, 55, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 100;
  text-align: center;
  transition: right 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.b-toast-in {
  right: 2rem;
}

.b-toast-out {
  right: -360px;
  transition: right 0.4s cubic-bezier(0.55, 0, 1, 0.45);
}

.b-toast-header {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: #5a3d00;
  margin-bottom: 0.5rem;
}

.b-toast-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: #2a1a00;
  margin-bottom: 0.4rem;
}

.b-toast-desc {
  font-size: 0.85rem;
  color: #4a3000;
  line-height: 1.4;
}

/* --- News Ticker --- */
.b-news-ticker-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.2rem;
  background: rgba(0, 0, 0, 0.85);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  overflow: hidden;
  z-index: 8;
  display: flex;
  align-items: center;
}

.b-news-track {
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  animation: b-ticker-scroll 60s linear infinite;
  padding-left: 100%;
}

@keyframes b-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Mobile Responsive --- */
@media (max-width: 700px) {
  .b-wealth-value {
    font-size: 3rem;
  }

  .b-cards-row {
    flex-direction: column;
    gap: 1rem;
  }

  .b-or-divider {
    padding: 0.5rem 0;
  }

  .b-card-title {
    font-size: 1.2rem;
  }

  .b-toast {
    width: 260px;
  }

  .b-content {
    padding: 1rem 1rem 4rem;
  }
}

/* ------------------------------------------------------------
   Receipt / End Screen
   ------------------------------------------------------------ */
#screen-receipt {
  background: #000;
  overflow: hidden;
}

.receipt-content {
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.receipt-paper {
  background: #f5f0e8;
  color: var(--receipt-text);
  max-width: 500px;
  width: 100%;
  padding: 2rem 1.5rem;
  border-radius: 2px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(245, 240, 232, 0.08);
  /* Animation: start clipped at top, reveal downward */
  clip-path: inset(0 0 100% 0);
  transition: clip-path 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.receipt-paper-print {
  clip-path: inset(0 0 0% 0);
}

.receipt-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--receipt-text);
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.receipt-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.receipt-share-btn {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 2rem;
  background: #e63b19;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.receipt-share-btn:hover {
  background: #ff5533;
  transform: scale(1.03);
}

.receipt-share-btn:active {
  transform: scale(0.97);
}

.receipt-play-again-btn {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  padding: 0.9rem 2rem;
  background: transparent;
  color: #aaa;
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.receipt-play-again-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

@media (max-width: 600px) {
  .receipt-paper {
    padding: 1.5rem 1rem;
  }
  .receipt-text {
    font-size: 0.68rem;
  }
  .receipt-buttons {
    flex-direction: column;
    align-items: center;
  }
  .receipt-share-btn,
  .receipt-play-again-btn {
    width: 100%;
    max-width: 300px;
  }
}

/* ------------------------------------------------------------
   Animations — Title Glitch
   ------------------------------------------------------------ */
@keyframes title-glitch {
  0%, 100% { opacity: 1; clip-path: inset(0 0 0 0); }
  5% { opacity: 0.8; clip-path: inset(20% 0 30% 0); }
  6% { opacity: 1; clip-path: inset(0 0 0 0); }
  40% { opacity: 1; clip-path: inset(0 0 0 0); }
  41% { opacity: 0.6; clip-path: inset(60% 0 5% 0); text-shadow: -3px 0 #ff0000, 3px 0 #00ffff; }
  42% { opacity: 1; clip-path: inset(0 0 0 0); text-shadow: 4px 4px 0 rgba(0,0,0,0.5); }
  80% { opacity: 1; }
  81% { opacity: 0.7; transform: skewX(-2deg); }
  82% { opacity: 1; transform: skewX(0); }
}

/* --- Work Phase: button pulse when idle --- */
@keyframes work-btn-pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(232, 123, 53, 0.3); }
  50% { box-shadow: 0 4px 30px rgba(232, 123, 53, 0.6), 0 0 50px rgba(232, 123, 53, 0.2); }
}

.work-click-btn:not([disabled]):not(.clicked) {
  animation: work-btn-pulse 2s ease-in-out infinite;
}

/* --- Work Phase: screen micro-shake on click --- */
@keyframes micro-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

.work-content.work-shake {
  animation: micro-shake 0.15s ease;
}

/* --- Work Phase: color flash on click --- */
.work-click-btn.click-flash {
  background: #ff9944 !important;
}

/* --- Bills: cards slide in --- */
@keyframes bill-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.bill-card {
  animation: bill-slide-in 0.4s ease backwards;
}

.bill-card:nth-child(1) { animation-delay: 0.05s; }
.bill-card:nth-child(2) { animation-delay: 0.12s; }
.bill-card:nth-child(3) { animation-delay: 0.19s; }
.bill-card:nth-child(4) { animation-delay: 0.26s; }
.bill-card:nth-child(5) { animation-delay: 0.33s; }
.bill-card:nth-child(6) { animation-delay: 0.40s; }

/* --- Billionaire: gold shimmer on empire cards --- */
@keyframes gold-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.b-card-selfish .b-card-header-selfish {
  background: linear-gradient(
    90deg,
    rgba(212, 175, 55, 0.3) 0%,
    rgba(245, 215, 110, 0.5) 25%,
    rgba(212, 175, 55, 0.3) 50%,
    rgba(245, 215, 110, 0.15) 75%,
    rgba(212, 175, 55, 0.3) 100%
  );
  background-size: 200% 100%;
  animation: gold-shimmer 3s linear infinite;
}

/* --- Wealth ticker glow pulse on milestone --- */
@keyframes wealth-milestone-pulse {
  0% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.2); }
  30% { text-shadow: 0 0 40px rgba(245, 215, 110, 1), 0 0 80px rgba(245, 215, 110, 0.6), 0 0 120px rgba(212, 175, 55, 0.3); color: #fff3b0; }
  100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.2); }
}

.b-wealth-value.wealth-milestone {
  animation: wealth-milestone-pulse 1s ease forwards;
}

/* --- Red border flash on selfish choice --- */
@keyframes selfish-flash {
  0% { border-color: #ff3333; box-shadow: 0 0 30px rgba(255, 51, 51, 0.5); }
  100% { border-color: var(--billionaire-gold); box-shadow: 0 0 12px rgba(212, 175, 55, 0.15); }
}

.b-card-selfish.selfish-chosen {
  animation: selfish-flash 0.6s ease forwards;
}

/* --- Worker reminder progressive desperation --- */
@keyframes worker-fade-flicker {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.15; }
}

.b-worker-reminder.desperate {
  animation: worker-fade-flicker 2s ease-in-out infinite;
  color: rgba(217, 68, 68, 0.5);
}

/* ------------------------------------------------------------
   Responsive — Mobile-First (375px)
   ------------------------------------------------------------ */
@media (max-width: 414px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 1.8rem; }

  .title-main { font-size: 3rem; }
  .title-tagline { font-size: 0.9rem; }
  .btn-start {
    font-size: 1.1rem;
    padding: 0.9rem 1.5rem;
    width: 90%;
  }
  .title-disclaimer { font-size: 0.7rem; }

  .job-select-header { font-size: 1.8rem; }
  .job-cards { flex-direction: column; align-items: center; gap: 1rem; }
  .job-card { width: 100%; max-width: 100%; padding: 1.2rem; }
  .job-card-title { font-size: 1.4rem; }

  .work-content { padding: 1rem; }
  .work-header { font-size: 1.8rem; margin-bottom: 1rem; }
  .work-stats { flex-direction: column; gap: 0.5rem; }
  .work-click-btn {
    min-width: 170px;
    min-height: 170px;
    font-size: 1.3rem;
    width: 80vw;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
  }

  .payday-content { padding: 1rem; }
  .payday-header { font-size: 2rem; margin-bottom: 1rem; }
  .payday-btn { width: 100%; }

  .bills-content { padding: 1rem; }
  .bills-header { font-size: 1.6rem; }
  .bills-cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .bill-btn { padding: 0.6rem 0.5rem; font-size: 0.9rem; min-height: 44px; }
  .bills-continue-btn { width: 100%; }

  .b-wealth-value { font-size: 2.4rem; }
  .b-wealth-label { font-size: 1rem; }
  .b-cards-row { flex-direction: column; gap: 0.75rem; }
  .b-or-divider { padding: 0.3rem 0; }
  .b-card { padding: 1rem; }
  .b-card-title { font-size: 1.1rem; }
  .b-card-desc { font-size: 0.8rem; }
  .b-content { padding: 0.75rem 0.75rem 3.5rem; }
  .b-toast { width: 240px; padding: 1rem; }
  .b-toast-in { right: 0.5rem; }
  .b-news-track { font-size: 0.65rem; }

  .receipt-paper { padding: 1rem 0.75rem; }
  .receipt-text { font-size: 0.6rem; line-height: 1.5; }
  .receipt-buttons { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .receipt-share-btn, .receipt-play-again-btn { width: 100%; font-size: 1rem; }
}

/* --- Tablet breakpoint (768px) --- */
@media (min-width: 415px) and (max-width: 768px) {
  .job-cards { flex-direction: column; align-items: center; }
  .job-card { width: 100%; max-width: 400px; }

  .bills-cards { grid-template-columns: 1fr; }

  .b-cards-row { flex-direction: column; gap: 1rem; }
  .b-or-divider { padding: 0.5rem 0; }

  .work-click-btn {
    min-width: 200px;
    min-height: 200px;
    width: 60vw;
    max-width: 240px;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  #game-container {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .b-content { max-width: 1000px; }
  .bills-content { max-width: 780px; }
  .receipt-paper { max-width: 520px; }

  .job-cards { gap: 2rem; }
  .job-card { width: 300px; }
}

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */
.mono {
  font-family: var(--font-mono);
}
