/* Lemonsville chrome: a kid's MS Paint drawing living inside a Win95 app.
   All type is monospace ALL-CAPS; every surface is a beveled gray slab or a
   white "paper" panel with a hard offset shadow. No smooth anything. */

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

:root {
  --gray: #C0C0C0;
  --dkgray: #808080;
  --paper: #FFFFFF;
  --ink: #000000;
  --azure: #0080FF;
  --yellow: #FFFF00;
  --paleyellow: #FFFF80;
  --red: #FF0000;
  --green: #008000;
}

html, body {
  height: 100%;
  background: var(--dkgray);
}

body {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  color: var(--ink);
  display: grid;
  place-items: center;
  text-transform: uppercase;
  image-rendering: pixelated;
  cursor: default;
  -webkit-font-smoothing: none;
}

#frame {
  width: min(96vw, 900px);
  background: var(--gray);
  border: 3px outset #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
  padding: 10px;
}

.scene { display: none; }
.scene.active { display: block; }

img, canvas { image-rendering: pixelated; }

/* --- Widgets --------------------------------------------------------------- */

.btn {
  font: inherit;
  text-transform: uppercase;
  background: var(--gray);
  border: 3px outset #ffffff;
  padding: 8px 18px;
  cursor: pointer;
  min-width: 140px;
}
.btn:active { border-style: inset; transform: translate(1px, 1px); }
.btn:focus-visible { outline: 2px dotted var(--ink); outline-offset: -6px; }
.btn.primary { background: var(--paleyellow); }
.btn.danger { background: #FF8040; }
.btn:disabled { color: var(--dkgray); text-shadow: 1px 1px 0 #fff; cursor: not-allowed; }

.panel {
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--dkgray);
  padding: 14px;
  margin: 10px 0;
}

.titlebar {
  background: #000080;
  color: #fff;
  padding: 4px 10px;
  margin: -14px -14px 12px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  justify-content: space-between;
  letter-spacing: 1px;
}

input[type="text"], input[type="password"], input[type="number"], select {
  font: inherit;
  text-transform: none;
  border: 2px inset #ffffff;
  background: var(--paper);
  padding: 6px 8px;
  width: 100%;
}
input:focus { outline: 2px dotted var(--ink); }

label { display: block; margin: 10px 0 2px; font-size: 13px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.center { text-align: center; }
.mt { margin-top: 12px; }

.small { font-size: 12px; }
.tiny { font-size: 11px; color: var(--dkgray); }
.money { color: var(--green); }
.bad { color: var(--red); }

/* Spinner: number input with chunky +/- buttons */
.spin { display: flex; align-items: stretch; }
.spin input { text-align: right; border-right: none; width: 70px; flex: 1; }
.spin button {
  font: inherit; width: 34px; background: var(--gray);
  border: 3px outset #fff; cursor: pointer;
}
.spin button:active { border-style: inset; }

/* --- Tables (the daily financial report) ----------------------------------- */

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 3px 8px; font-size: 14px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.rule td { border-top: 2px solid var(--ink); }

/* --- Day sim canvas -------------------------------------------------------- */

#scene-daysim { text-align: center; background: var(--gray); }
#game-canvas {
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--ink);
  background: #0080FF;
  cursor: none;
}

/* --- Weather headline ------------------------------------------------------ */

.weather-banner {
  display: flex; gap: 12px; align-items: center;
  background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--dkgray);
  padding: 8px 12px; margin: 10px 0;
}
.weather-banner img { width: 72px; height: 72px; }

.marquee {
  overflow: hidden; white-space: nowrap; background: var(--ink); color: var(--yellow);
  padding: 4px 0; font-size: 13px; letter-spacing: 2px;
}
.marquee span { display: inline-block; padding-left: 100%; animation: crawl 18s linear infinite; }
@keyframes crawl { to { transform: translateX(-100%); } }

.sparkle-title { color: var(--ink); text-shadow: 3px 3px 0 var(--yellow); letter-spacing: 2px; }

ul.plain { list-style: none; }
ul.plain li { padding: 2px 0; }

.err { background: var(--paleyellow); border: 2px dashed var(--red); padding: 8px; margin-top: 10px; }
.hidden { display: none !important; }

.famerow { padding: 3px 0; border-bottom: 1px dashed var(--gray); }
.famerow:last-child { border-bottom: none; }
.merow { background: var(--paleyellow); outline: 2px dashed var(--red); padding: 2px 4px; }

.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } }
