/* ============================================================
   RENT IS DUE — happystoner5420 Games
   Offline photo-real landlord simulator — stylesheet
   No external fonts, no remote assets. Pure local.
   ============================================================ */

:root {
  --gold: #d9b36a;
  --gold-hi: #f0d9a0;
  --gold-dim: rgba(217, 179, 106, .35);
  --ink: #e8e2d4;
  --ink-dim: rgba(232, 226, 212, .62);
  --ink-faint: rgba(232, 226, 212, .4);
  --panel: rgba(14, 16, 19, .78);
  --panel-2: rgba(20, 23, 28, .66);
  --line: rgba(217, 179, 106, .18);
  --line-soft: rgba(255, 255, 255, .07);
  --red: #c96a5a;
  --red-hi: #e08a76;
  --green: #7fae7f;
  --green-hi: #9cc89c;
  --amber: #cf9d52;
  --blue: #7fa3c9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .55), 0 4px 16px rgba(0, 0, 0, .4);
  --glow-gold: 0 0 24px rgba(217, 179, 106, .35);
  --font: "Segoe UI Variable", "Segoe UI", "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;
}

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

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: #0a0c0f;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

#app { position: fixed; inset: 0; }

/* ---------- shared structure ---------- */
.screen { position: absolute; inset: 0; }

canvas.world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.grain-overlay {
  position: absolute; inset: 0; pointer-events: none; opacity: .07; z-index: 5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: overlay;
}

.vignette-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(0, 0, 0, .42) 100%),
    linear-gradient(rgba(10, 12, 16, .5), transparent 12%, transparent 88%, rgba(10, 12, 16, .6));
}

.hidden { display: none !important; }

/* ---------- cinematic grade filter ---------- */
.grade-night   { filter: saturate(.72) brightness(.92) contrast(1.08) hue-rotate(-6deg); }
.grade-storm   { filter: saturate(.5) brightness(.9) contrast(1.12); }
.grade-day     { filter: saturate(1.06) brightness(1.03) contrast(1.02); }
.grade-dawn    { filter: saturate(1.1) brightness(1.06) contrast(1.02) sepia(.14); }
.grade-dusk    { filter: saturate(.95) brightness(.97) contrast(1.05) sepia(.22); }

/* ---------- main menu ---------- */
.menu-wrap { position: absolute; inset: 0; }
.menu-bg { position: absolute; inset: 0; background: #0a0c0f; }
.menu-bg canvas { width: 100%; height: 100%; display: block; filter: saturate(.8) brightness(.75); }
.menu-fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,7,9,.25) 0%, rgba(6,7,9,.82) 78%); }
.menu-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  z-index: 3;
}
.menu-logo {
  font-size: clamp(44px, 8vw, 96px); font-weight: 900; letter-spacing: clamp(6px, 1.4vw, 20px);
  color: #efe2bd; text-align: center; line-height: .95;
  text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 90px rgba(217,179,106,.3);
  animation: logoIn 1.4s cubic-bezier(.2,.8,.2,1) both;
}
.menu-logo .rd-due { color: var(--red-hi); text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 90px rgba(201,106,90,.35); }
.menu-tag {
  letter-spacing: 5px; font-size: 12px; color: var(--ink-dim); margin-top: 16px;
  text-transform: uppercase; animation: fadeUp 1.2s .25s both;
}
.menu-studio { letter-spacing: 3px; font-size: 11px; color: var(--gold); opacity: .8; margin-top: 4px; animation: fadeUp 1.2s .35s both; }
.menu-sub {
  max-width: 560px; margin: 26px 0 34px; text-align: center; font-size: 13.5px; line-height: 1.75;
  color: var(--ink-dim); font-style: italic; animation: fadeUp 1.2s .45s both;
}
.menu-buttons { display: flex; flex-direction: column; gap: 12px; width: min(340px, 82vw); animation: fadeUp 1.2s .55s both; }
.menu-foot {
  position: absolute; bottom: 18px; width: 100%; text-align: center; color: var(--ink-faint);
  font-size: 11px; letter-spacing: 2px;
}

/* ---------- buttons ---------- */
.btn {
  --bcol: rgba(232, 226, 212, .06);
  appearance: none; border: 1px solid var(--line-soft); border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)), var(--bcol);
  color: var(--ink); font-family: var(--font); font-size: 14px; font-weight: 600;
  letter-spacing: .4px; padding: 12px 18px; cursor: pointer; text-align: left;
  transition: transform .12s ease, background .18s ease, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.09); border-color: var(--gold-dim); box-shadow: 0 6px 22px rgba(0,0,0,.35); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn .btn-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-faint); margin-top: 2px; letter-spacing: .2px; }

.btn-gold {
  background: linear-gradient(180deg, #e7cd97, #c9a45e 55%, #b08a45);
  color: #211a0d; border-color: rgba(0,0,0,.2); text-shadow: 0 1px 0 rgba(255,255,255,.25);
  box-shadow: 0 10px 28px rgba(217,179,106,.18), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-gold:hover { background: linear-gradient(180deg, #f4ddb0, #d8b26c 55%, #bd974e); border-color: rgba(0,0,0,.15); }
.btn-danger { color: #f0b7a8; border-color: rgba(201,106,90,.4); background: rgba(201,106,90,.12); }
.btn-danger:hover { background: rgba(201,106,90,.24); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-dim); }
.btn-ghost:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 7px; }
.btn-block { display: block; width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; border-radius: 10px; }

.menu-buttons .btn { text-align: center; padding: 14px; }
.menu-buttons .btn span.kbd { float: right; opacity: .45; font-size: 11px; font-weight: 400; margin-top: 2px; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top {
  position: absolute; top: 14px; left: 14px; right: 14px;
  display: flex; align-items: stretch; gap: 10px; justify-content: space-between;
}
.hud-group { display: flex; gap: 8px; align-items: stretch; }
.hud-chip {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 6px 14px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); min-width: 86px;
}
.hud-chip .lbl { font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-faint); }
.hud-chip .val { font-size: 15px; font-weight: 700; letter-spacing: .3px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.hud-chip .val.good { color: var(--green-hi); }
.hud-chip .val.bad { color: var(--red-hi); }
.hud-chip .val.gold { color: var(--gold-hi); }
.hud-chip.time-chip { min-width: 118px; }
.hud-chip.time-chip .val { display: flex; align-items: baseline; gap: 7px; }
.hud-chip.time-chip .val .daypart { font-size: 11px; font-weight: 500; color: var(--ink-dim); }
.clock-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.clock-dot.day { background: #e8c97c; box-shadow: 0 0 10px #e8c97c; }
.clock-dot.night { background: #8fa8d8; box-shadow: 0 0 10px #5f7fc0; }
.clock-dot.rainy { background: #7d93b8; box-shadow: 0 0 10px #5f7fc0; }

.hud-title { font-size: 13px; letter-spacing: 1px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.hud-title .small { display: block; font-size: 10px; color: var(--ink-faint); font-weight: 400; letter-spacing: .6px; }

.hud-phone-btn { position: relative; }
.hud-phone-btn .ring-badge {
  position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; animation: pulseRed 1s infinite;
}

.objective-chip {
  position: absolute; bottom: 18px; left: 18px; max-width: 340px; pointer-events: auto;
  background: linear-gradient(135deg, rgba(30,26,18,.9), rgba(14,16,19,.86));
  border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px; line-height: 1.55; backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: slideLeft .3s ease;
}
.objective-chip .obj-lbl { font-size: 9px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; font-weight: 700; }
.objective-chip .obj-x { float: right; cursor: pointer; opacity: .5; margin-left: 10px; }
.objective-chip .obj-x:hover { opacity: 1; }
.hud-credits-note { position: absolute; right: 18px; bottom: 14px; font-size: 10px; color: rgba(232,226,212,.28); letter-spacing: 1.4px; }

/* ---------- toasts ---------- */
.toasts { position: absolute; top: 78px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: 320px; pointer-events: none; }
#inbox-chip { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1001; }
.inbox-btn {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(135deg, rgba(28,24,18,.95), rgba(14,16,19,.96));
  border: 1px solid var(--gold-dim); border-left: 3px solid var(--gold); border-radius: 12px;
  padding: 8px 12px; color: var(--ink-hi); box-shadow: 0 10px 28px rgba(0,0,0,.45);
  animation: popIn .2s ease; text-align: left;
}
.inbox-btn:hover { filter: brightness(1.15); }
.inbox-btn .ib-txt { display: flex; flex-direction: column; line-height: 1.25; }
.inbox-btn .ib-txt b { font-size: 12.5px; color: var(--gold-hi); }
.inbox-btn .ib-snip { font-size: 11px; color: var(--ink-dim); max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-btn .ib-act { font-size: 10.5px; color: var(--gold); font-weight: 800; letter-spacing: .4px; margin-left: 6px; }
.toast {
  pointer-events: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  padding: 10px 14px; font-size: 12.5px; line-height: 1.5; backdrop-filter: blur(12px);
  box-shadow: var(--shadow); animation: toastIn .28s cubic-bezier(.2,.9,.3,1.2) both; cursor: pointer;
}
.toast .t-title { font-weight: 700; font-size: 12.5px; }
.toast .t-body { color: var(--ink-dim); }
.toast.kind-info .t-title { color: var(--gold-hi); }
.toast.kind-money .t-title { color: var(--green-hi); }
.toast.kind-alert .t-title { color: var(--red-hi); }
.toast.kind-tenant .t-title { color: var(--blue); }
.toast.kind-phone .t-title { color: var(--gold-hi); }
.toast.kind-phone { border-color: rgba(217,179,106,.5); }
.toast.out { animation: toastOut .3s ease both; }

/* ---------- modal / dialog ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 100% at 50% 0%, rgba(8,10,13,.6), rgba(5,6,8,.88));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .18s ease;
}
.overlay.pop-screen { z-index: 110; }
.dialog {
  width: min(640px, 92vw); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, rgba(26,28,33,.94), rgba(12,14,17,.96));
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  animation: popIn .22s cubic-bezier(.2,.9,.3,1.1) both;
}
.dialog.wide { width: min(980px, 95vw); }
.dialog .d-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.dialog .d-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; flex: 1; }
.dialog .d-title .d-sub { display: block; font-size: 11.5px; color: var(--ink-faint); font-weight: 500; margin-top: 2px; }
.dialog .d-body { padding: 18px 20px; }
.dialog .d-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.dialog .d-foot .spacer { flex: 1; }
.close-x {
  width: 30px; height: 30px; border-radius: 8px; border: none; background: rgba(255,255,255,.06);
  color: var(--ink-dim); font-size: 15px; cursor: pointer;
}
.close-x:hover { background: rgba(255,255,255,.14); color: var(--ink); }

/* ---------- neighborhood map overlay ---------- */
.map-dialog .d-body { padding: 16px 20px 20px; }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--ink-dim); margin-bottom: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.map-dot.mh { background: #6fae5a; box-shadow: 0 0 6px rgba(111,174,90,.6); }
.map-dot.mo { background: var(--gold-hi); box-shadow: 0 0 6px rgba(217,179,106,.5); }
.map-dot.ms { background: #5d93c9; box-shadow: 0 0 6px rgba(93,147,201,.5); }
.map-dot.mx { background: #8a8f96; }
.map-strip {
  position: relative; height: 128px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, rgba(70,92,60,.9), rgba(52,74,46,.95) 70%, rgba(38,46,52,.98));
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 2px 18px rgba(0,0,0,.45);
}
.map-strip::after { /* road along the bottom */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: linear-gradient(180deg, #4a4e54, #31343a);
  border-top: 1px solid rgba(255,255,255,.08);
}
.map-block {
  position: absolute; bottom: 22px; top: 16px; border-radius: 6px 6px 0 0;
  border: 1px solid rgba(255,255,255,.14); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 6px 4px 8px; text-align: center; overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
  min-width: 3.5%;
}
.map-block:hover { transform: translateY(-5px); filter: brightness(1.25); box-shadow: 0 6px 18px rgba(0,0,0,.5); z-index: 3; }
.map-block .map-name { font-size: 10.5px; font-weight: 800; letter-spacing: .2px; line-height: 1.15; color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.map-block .map-sub { font-size: 9px; color: rgba(255,255,255,.72); text-shadow: 0 1px 2px rgba(0,0,0,.6); margin-top: 3px; line-height: 1.1; }
.map-block.map-sale { background: linear-gradient(180deg, rgba(93,147,201,.85), rgba(52,84,118,.95)); box-shadow: inset 0 6px 14px rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.35); }
.map-block.map-owned { background: linear-gradient(180deg, rgba(217,179,106,.9), rgba(150,112,54,.95)); box-shadow: inset 0 6px 14px rgba(255,255,255,.14), 0 3px 8px rgba(0,0,0,.35); }
.map-block.map-home { background: linear-gradient(180deg, rgba(111,174,90,.92), rgba(58,102,44,.96)); box-shadow: inset 0 6px 14px rgba(255,255,255,.16), 0 3px 8px rgba(0,0,0,.35); }
.map-block.map-special { background: linear-gradient(180deg, rgba(122,128,138,.9), rgba(66,70,78,.96)); box-shadow: inset 0 6px 14px rgba(255,255,255,.06), 0 3px 8px rgba(0,0,0,.35); }

/* ---------- property flip / before-after ---------- */
.flip-card { padding: 12px 13px; }
.flip-title { font-weight: 800; font-size: 14px; }
.flip-price { font-weight: 800; color: var(--gold-hi); font-size: 13.5px; }
.flip-price.muted { color: var(--ink-faint); }
.flip-shots { display: flex; align-items: stretch; gap: 8px; }
.flip-shot { flex: 1; min-width: 0; }
.flip-shot img { width: 100%; border-radius: 8px; display: block; border: 1px solid var(--line-soft); }
.flip-caption { font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.flip-arrow { display: flex; align-items: center; font-size: 18px; color: var(--gold); align-self: center; }

/* ---------- forms ---------- */
input[type=text], input[type=number], select, textarea {
  background: rgba(0,0,0,.35); border: 1px solid var(--line-soft); color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font-family: var(--font); font-size: 13.5px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(217,179,106,.12); }
input[type=range] { -webkit-appearance: none; height: 5px; border-radius: 3px; background: rgba(255,255,255,.14); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--gold-hi); cursor: pointer; box-shadow: 0 0 10px rgba(217,179,106,.5); }
label.field { display: block; margin-bottom: 10px; }
label.field .f-label { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; display: block; }

.switch { position: relative; width: 42px; height: 23px; display: inline-block; cursor: pointer; }
.switch input { display: none; }
.switch .sl { position: absolute; inset: 0; background: rgba(255,255,255,.14); border-radius: 20px; transition: .2s; }
.switch .sl:before { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: #ddd; border-radius: 50%; transition: .2s; }
.switch input:checked + .sl { background: var(--gold); }
.switch input:checked + .sl:before { transform: translateX(19px); background: #1a1408; }

/* ---------- panels & cards ---------- */
.panel {
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 14px 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.panel-title {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
  font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.panel-title .spacer { flex: 1; }
.row { display: flex; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; }
.center { align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stat { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.05); border-radius: 9px; padding: 9px 12px; }
.stat .s-label { font-size: 9.5px; letter-spacing: 1.2px; color: var(--ink-faint); text-transform: uppercase; }
.stat .s-value { font-size: 16px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s-value.sm { font-size: 13px; }
.stat .s-sub { font-size: 10.5px; color: var(--ink-faint); margin-top: 1px; }

.meter { height: 6px; border-radius: 4px; background: rgba(255,255,255,.09); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; transition: width .4s ease; }
.meter.good > i { background: linear-gradient(90deg, #6f9a6f, #a3c9a3); }
.meter.warn > i { background: linear-gradient(90deg, #c98f4a, #e3b06a); }
.meter.bad > i { background: linear-gradient(90deg, #a04a3a, #d9755f); }
.meter.gold > i { background: linear-gradient(90deg, #a8843f, #e6c47c); }
.meter.blue > i { background: linear-gradient(90deg, #4a6fa0, #7fa3c9); }
.tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line-soft); color: var(--ink-dim);
}
.tag.good { color: var(--green-hi); border-color: rgba(127,174,127,.5); background: rgba(127,174,127,.1); }
.tag.bad { color: var(--red-hi); border-color: rgba(201,106,90,.55); background: rgba(201,106,90,.12); }
.tag.warn { color: var(--amber); border-color: rgba(207,157,82,.55); background: rgba(207,157,82,.1); }
.tag.gold { color: var(--gold-hi); border-color: var(--gold-dim); background: rgba(217,179,106,.1); }
.tag.blue { color: var(--blue); border-color: rgba(127,163,201,.5); background: rgba(127,163,201,.1); }
.tag.dim { opacity: .6; }

/* ---------- tenant photos ---------- */
.avatar {
  border-radius: 50%; object-fit: cover; background: #222; border: 2px solid var(--gold-dim);
  box-shadow: 0 6px 18px rgba(0,0,0,.4); display: inline-block;
}
.avatar-frame { position: relative; display: inline-block; }
.avatar-frame .frame-ring { position: absolute; inset: -3px; border-radius: 50%; border: 1px solid rgba(240,217,160,.35); pointer-events: none; }
.polaroid {
  background: linear-gradient(180deg, #efece2, #e2ded2);
  padding: 8px 8px 30px; border-radius: 4px; box-shadow: 0 14px 34px rgba(0,0,0,.45);
  transform: rotate(-1.2deg); position: relative;
}
.polaroid:nth-child(even) { transform: rotate(1.1deg); }
.polaroid img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 2px; filter: saturate(.95); }
.polaroid .cap { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 10px; color: #4a463c; letter-spacing: .5px; }

/* tenant profile card */
.tenant-card { display: flex; gap: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; }
.tenant-card .t-info { flex: 1; min-width: 0; }
.tenant-card .t-name { font-size: 16px; font-weight: 800; }
.tenant-card .t-sub { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }
.kv { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed rgba(255,255,255,.05); }
.kv .k { color: var(--ink-faint); }
.kv .v { font-weight: 600; text-align: right; }
.kv .v.good { color: var(--green-hi); }
.kv .v.bad { color: var(--red-hi); }
.kv .v.gold { color: var(--gold-hi); }

/* ---------- property cards ---------- */
.prop-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), rgba(14,16,19,.7);
  border: 1px solid var(--line-soft); border-radius: 13px; overflow: hidden; cursor: pointer;
  transition: transform .15s ease, border-color .2s, box-shadow .2s; position: relative;
}
.prop-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.prop-card .pc-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #14161a; }
.prop-card .pc-body { padding: 10px 12px 12px; }
.prop-card .pc-name { font-size: 14px; font-weight: 800; }
.prop-card .pc-loc { font-size: 11px; color: var(--ink-faint); margin: 1px 0 7px; }
.prop-card .pc-price { font-size: 15px; color: var(--gold-hi); font-weight: 800; font-variant-numeric: tabular-nums; }
.prop-card .pc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.prop-card .pc-strip { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); margin-top: 7px; }
.prop-card.owned { border-color: rgba(127,174,127,.5); }
.prop-card.owned:after {
  content: "OWNED"; position: absolute; top: 8px; right: 8px; background: rgba(38,60,38,.85);
  color: var(--green-hi); font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(127,174,127,.6);
}
.prop-card.sold-out { opacity: .85; }
.prop-card.sold-out:after {
  content: "SOLD"; position: absolute; top: 8px; right: 8px; background: rgba(20,22,26,.85);
  color: var(--ink-dim); font-size: 9px; font-weight: 800; letter-spacing: 1.5px;
  padding: 3px 8px; border-radius: 20px; border: 1px solid var(--line-soft);
}

/* ---------- laptop ---------- */
.laptop-wrap { position: absolute; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; }
.laptop {
  width: min(1180px, 96vw); height: min(760px, 93vh);
  background: linear-gradient(160deg, #20242b, #12151a 60%);
  border: 1px solid rgba(255,255,255,.09); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.7), 0 0 0 1px rgba(0,0,0,.6);
  display: flex; flex-direction: column; animation: laptopIn .25s cubic-bezier(.2,.9,.3,1.05) both;
}
.laptop-screen { flex: 1; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% 0%, #232833, #14171c 70%); position: relative; overflow: hidden; }
.laptop-topbar {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.06);
}
.laptop-topbar .dots { display: flex; gap: 6px; }
.laptop-topbar .dot { width: 11px; height: 11px; border-radius: 50%; }
.laptop-topbar .dot.r { background: #d1664f; } .laptop-topbar .dot.y { background: #d9a94f; } .laptop-topbar .dot.g { background: #6fae6f; }
.laptop-topbar .ttl { font-size: 12px; color: var(--ink-dim); letter-spacing: 1px; margin-left: 6px; flex: 1; font-weight: 600; }
.laptop-topbar .ttl b { color: var(--ink); }
.laptop-tabs { display: flex; gap: 3px; padding: 8px 14px 0; flex-wrap: wrap; }
.lt-tab {
  border: none; cursor: pointer; font-family: var(--font); font-size: 12.5px; color: var(--ink-dim);
  padding: 9px 15px; border-radius: 9px 9px 0 0; background: transparent; font-weight: 600; letter-spacing: .3px;
  display: flex; gap: 7px; align-items: center;
}
.lt-tab:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.lt-tab.active { color: var(--gold-hi); background: rgba(217,179,106,.12); box-shadow: inset 0 -2px 0 var(--gold); }
.lt-tab .tab-badge {
  background: var(--red); color: #fff; font-size: 9px; font-weight: 800; min-width: 15px; height: 15px;
  border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.laptop-body { flex: 1; overflow: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: rgba(217,179,106,.3) transparent; }
.laptop-body::-webkit-scrollbar { width: 9px; }
.laptop-body::-webkit-scrollbar-thumb { background: rgba(217,179,106,.25); border-radius: 5px; }
.laptop-footer { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.25); font-size: 11px; color: var(--ink-faint); }

/* ledger table */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-faint); padding: 6px 10px; border-bottom: 1px solid var(--line-soft); font-weight: 700; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.04); font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: rgba(255,255,255,.025); }
.tbl td.num { text-align: right; font-family: var(--mono); }
.tbl .pos { color: var(--green-hi); }
.tbl .neg { color: var(--red-hi); }
.tbl td.cat { font-size: 11px; color: var(--ink-dim); }
.tbl .rowsel { background: rgba(217,179,106,.09); }

/* ---------- phone ---------- */
.phone-wrap { position: absolute; inset: 0; z-index: 75; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.phone-frame {
  pointer-events: auto; width: min(400px, 94vw); height: min(760px, 94vh);
  background: #0c0e11; border-radius: 44px; border: 2px solid #2b2f36; padding: 12px;
  box-shadow: 0 50px 140px rgba(0,0,0,.8), inset 0 0 0 2px rgba(255,255,255,.04);
  display: flex; flex-direction: column;
}
.phone-notch { height: 24px; display: flex; justify-content: center; }
.phone-notch i { width: 110px; height: 22px; background: #000; border-radius: 0 0 14px 14px; }
.phone-screen {
  flex: 1; border-radius: 30px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, #171a1f, #101317);
  display: flex; flex-direction: column;
}
.phone-status { display: flex; justify-content: space-between; font-size: 10px; padding: 8px 20px 4px; color: var(--ink-dim); font-weight: 600; }
.phone-app { flex: 1; overflow: auto; padding: 4px 14px 16px; }
.phone-app::-webkit-scrollbar { width: 4px; } .phone-app::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.phone-home-dock { padding: 8px 0 10px; display: flex; justify-content: center; }
.phone-home-dock i { width: 130px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }

/* call screen */
.call-sheet { text-align: center; padding: 20px 6px; }
.call-portrait { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold-dim); box-shadow: var(--glow-gold); }
.call-name { font-size: 21px; font-weight: 800; margin-top: 12px; }
.call-role { color: var(--ink-dim); font-size: 12.5px; margin-top: 2px; }
.call-line { margin: 16px 10px 4px; font-size: 13.5px; line-height: 1.65; color: var(--ink); background: rgba(255,255,255,.04); border-radius: 14px; padding: 14px; min-height: 64px; text-align: left; position: relative; }
.call-line .ringtail { position: absolute; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); bottom: -5px; left: 26px; }
.call-actions { display: flex; gap: 12px; margin-top: 14px; }
.call-action {
  flex: 1; background: rgba(255,255,255,.07); border: 1px solid var(--line-soft); border-radius: 34px;
  padding: 13px 4px; color: var(--ink); font-size: 12px; font-family: var(--font); cursor: pointer; font-weight: 600;
}
.call-action.accept { background: linear-gradient(180deg, #4f9a63, #3c7f50); border-color: rgba(127,200,150,.6); }
.call-action.decline { background: linear-gradient(180deg, #a04a3a, #82382b); border-color: rgba(224,138,118,.6); }
.call-action:active { transform: scale(.96); }

/* ---------- dialogue (in-person) ---------- */
.dlg {
  /* sits above modals/overlays (120) and the phone/laptop so an in-person rent
     dialogue ("knock knock — pay rent") is never hidden behind another window */
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 160;
  width: min(760px, 94vw);
  background: linear-gradient(180deg, rgba(22,24,29,.96), rgba(10,12,15,.97));
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 0; overflow: hidden; animation: dlgIn .22s ease both;
  border-left: 3px solid var(--gold);
}
.dlg-top { display: flex; gap: 12px; padding: 14px 16px; align-items: center; border-bottom: 1px solid var(--line-soft); }
.dlg-top .avatar { width: 54px; height: 54px; border-width: 2px; }
.dlg-name { font-weight: 800; font-size: 15px; }
.dlg-role { font-size: 11px; color: var(--ink-faint); }
.dlg-mood { margin-left: auto; font-size: 11px; text-align: right; color: var(--ink-dim); }
.dlg-mood .mood-tag { display: block; margin-top: 3px; }
.dlg-lines { padding: 16px 18px 8px; font-size: 14.5px; line-height: 1.7; max-height: 200px; overflow: auto; }
.dlg-lines .speaker { font-weight: 800; color: var(--gold-hi); }
.dlg-lines .you { color: var(--blue); }
.dlg-options { padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.dlg-option {
  background: rgba(255,255,255,.045); border: 1px solid var(--line-soft); color: var(--ink);
  padding: 10px 14px; border-radius: 10px; font-family: var(--font); font-size: 13.5px; text-align: left;
  cursor: pointer; transition: .14s;
}
.dlg-option:hover { border-color: var(--gold-dim); background: rgba(217,179,106,.1); transform: translateX(3px); }
.dlg-option .opt-tag { float: right; font-size: 10px; margin-top: 2px; opacity: .7; }
.dlg-option.danger:hover { border-color: rgba(201,106,90,.7); background: rgba(201,106,90,.14); }
.dlg-option.good:hover { border-color: rgba(127,174,127,.7); background: rgba(127,174,127,.12); }
.type-cursor { display: inline-block; width: 8px; height: 16px; background: var(--gold); margin-left: 2px; vertical-align: -2px; animation: blink 1s infinite; }

/* ---------- context/porch panel ---------- */
.context-panel {
  position: absolute; right: 16px; bottom: 96px; z-index: 40; width: min(400px, 92vw);
  background: linear-gradient(180deg, rgba(18,20,24,.92), rgba(9,11,14,.95));
  border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow); backdrop-filter: blur(14px);
  animation: popIn .2s ease;
}
.context-panel .cp-img { width: 100%; aspect-ratio: 16/8.5; object-fit: cover; border-radius: 9px; margin-bottom: 10px; display: block; }
.context-panel h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.context-panel .cp-sub { font-size: 11.5px; color: var(--ink-faint); margin: 2px 0 10px; }
.context-panel .cp-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }

/* ---------- pause menu ---------- */
.pause-menu { width: min(440px, 92vw); }
.pause-menu .pm-item {
  width: 100%; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 13px 16px; color: var(--ink); font-family: var(--font); font-size: 14px; cursor: pointer;
  transition: .15s; font-weight: 600; text-align: left;
}
.pause-menu .pm-item:hover { background: rgba(255,255,255,.09); border-color: var(--gold-dim); }
.pause-menu .pm-item.danger:hover { border-color: rgba(201,106,90,.6); background: rgba(201,106,90,.16); }
.pause-menu .pm-item .pm-desc { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 400; margin-top: 2px; }

/* ---------- save slots ---------- */
.slot-card {
  display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.035);
  border: 1px solid var(--line-soft); border-radius: 11px; padding: 12px 14px; cursor: pointer; transition: .15s;
}
.slot-card:hover { background: rgba(255,255,255,.08); border-color: var(--gold-dim); }
.slot-card.empty { opacity: .55; }
.slot-card .slot-icon { width: 44px; height: 44px; border-radius: 11px; background: rgba(217,179,106,.12); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.slot-card .slot-title { font-weight: 800; font-size: 14px; }
.slot-card .slot-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- misc UI ---------- */
.section-title { font-size: 14px; font-weight: 800; letter-spacing: .4px; margin: 4px 0 10px; display: flex; align-items: center; gap: 9px; }
.section-title .sub { font-weight: 400; font-size: 11px; color: var(--ink-faint); }
.divider { height: 1px; background: var(--line-soft); margin: 12px 0; }
.muted { color: var(--ink-faint); }
.small { font-size: 11px; }
.money { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.money.pos { color: var(--green-hi); } .money.neg { color: var(--red-hi); }

.glow-text { color: var(--gold-hi); text-shadow: var(--glow-gold); }

.slide-carousel { position: relative; overflow: hidden; }
.sc-track { display: flex; transition: transform .25s ease; }
.sc-item { min-width: 100%; }
.sc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(10,12,15,.75); color: var(--ink);
  font-size: 18px; cursor: pointer; backdrop-filter: blur(6px);
}
.sc-arrow:hover { background: rgba(217,179,106,.2); color: var(--gold-hi); }
.sc-arrow.l { left: 8px; } .sc-arrow.r { right: 8px; }
.sc-dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.sc-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); cursor: pointer; }
.sc-dots i.on { background: var(--gold); }

/* how to play / credits text */
.doc-page { font-size: 13.5px; line-height: 1.75; color: var(--ink-dim); }
.doc-page h3 { color: var(--gold-hi); font-size: 15px; margin: 14px 0 6px; letter-spacing: .5px; }
.doc-page h3:first-child { margin-top: 0; }
.doc-page p { margin-bottom: 8px; }
.doc-page ul { margin: 0 0 10px 18px; }
.doc-page li { margin-bottom: 4px; }
.doc-page .keycap { font-family: var(--mono); border: 1px solid var(--line-soft); background: rgba(255,255,255,.05); border-radius: 5px; padding: 0 7px; font-size: 12px; }

/* ------------------ animations ------------------ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes logoIn { from { opacity: 0; letter-spacing: 26px; transform: translateY(8px); } to { opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(80px); } }
@keyframes laptopIn { from { opacity: 0; transform: scale(.92) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes dlgIn { from { opacity: 0; transform: translate(-50%, 26px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulseRed { 0%,100% { box-shadow: 0 0 0 0 rgba(224,138,118,.6);} 50% { box-shadow: 0 0 0 6px rgba(224,138,118,0);} }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ringShake { 0%,100%{transform:rotate(0)} 20%{transform:rotate(14deg)} 40%{transform:rotate(-12deg)} 60%{transform:rotate(8deg)} 80%{transform:rotate(-6deg)} }
@keyframes moneyTick { 0%{color:#fff} 100%{color:var(--gold-hi)} }
@keyframes stormFlash { 0%,92%,100% { opacity: 0; } 93% { opacity: .5; } 94% { opacity: .12; } 96% { opacity: .42; } }

.ring-anim { animation: ringShake .5s ease-in-out infinite; display: inline-block; }

/* weather flash overlay */
.storm-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; animation: stormFlash 7s infinite; }

/* scrollbars for overlays */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(217,179,106,.3); }

/* cinematic intro frames */
.intro-frame {
  position: absolute; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center;
  background: #05070a; animation: fadeIn 1s ease;
}
.intro-card { text-align: center; animation: fadeUp .8s ease; }
.intro-card h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; letter-spacing: 8px; color: #e9dcba; }
.intro-card p { color: var(--ink-dim); margin-top: 14px; max-width: 520px; line-height: 1.8; font-size: 14px; }
.intro-card .btn { margin-top: 28px; }

@media (max-width: 900px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
