/* ============================================================
   LIFE ON THE GRIND — street-art UI
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #1a1025;
  --panel: #241633;
  --panel2: #2f1d42;
  --ink: #f5edff;
  --dim: #b9a8d4;
  --accent: #ff3d7f;
  --gold: #ffc93c;
  --lime: #7dff5e;
  --cyan: #4dd8ff;
  --bad: #ff5e5e;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0,0,0,.45);
}

html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
}

button { font: inherit; cursor: pointer; border: none; border-radius: var(--radius); color: var(--ink); }
button:active { transform: scale(.96); }

.big {
  display: block; width: 100%; padding: 14px 22px; margin: 8px 0;
  font-size: 1.15rem; font-weight: bold; letter-spacing: .5px;
  background: var(--panel2); border: 3px solid #000; box-shadow: var(--shadow), inset 0 2px 0 rgba(255,255,255,.12);
}
.big.accent { background: linear-gradient(135deg, var(--accent), #b0246b); }
.mini {
  padding: 6px 12px; font-size: .85rem; font-weight: bold;
  background: var(--panel2); border: 2px solid #000; border-radius: 10px;
}
.mini.accent { background: linear-gradient(135deg, var(--accent), #b0246b); }

.screen { display: none; position: fixed; inset: 0; }
.screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.panel {
  background: var(--panel); border: 3px solid #000; border-radius: 18px;
  box-shadow: var(--shadow); padding: 20px; max-width: 720px; width: min(94vw, 720px);
  max-height: 92vh; overflow-y: auto;
}

h1 { font-size: 1.5rem; margin-bottom: 12px; text-shadow: 2px 2px 0 #000; }
h2 { font-size: 1.25rem; margin-bottom: 10px; text-shadow: 2px 2px 0 #000; }

/* ---------- title ---------- */
#screen-title {
  background: url('../assets/img/title_screen.webp') center/cover no-repeat, var(--bg);
  justify-content: flex-end !important; padding-bottom: 5vh;
}
.title-menu { width: min(88vw, 360px); }
.title-menu .big { backdrop-filter: blur(4px); background: rgba(36, 22, 51, .88); }
.title-menu .big:first-child { background: linear-gradient(135deg, var(--accent), #b0246b); }
.title-credit { margin-top: 10px; font-size: .72rem; color: #fff; text-shadow: 1px 1px 2px #000; opacity: .85; }

/* ---------- setup: graffiti wall ---------- */
#screen-setup {
  background:
    linear-gradient(rgba(13, 7, 21, .55), rgba(13, 7, 21, .8)),
    url('../assets/img/board_center.webp') center/cover no-repeat, var(--bg);
}
.setup-panel {
  max-width: 860px; width: min(96vw, 860px);
  background: rgba(26, 16, 37, .82);
  backdrop-filter: blur(3px);
  padding: 26px 28px;
}
.setup-wordmark {
  display: block; width: min(78%, 460px); margin: -6px auto 14px;
  filter: drop-shadow(3px 5px 0 rgba(0,0,0,.55));
}
.setup-section {
  margin: 20px 0; padding: 16px 16px 14px;
  background: rgba(47, 29, 66, .55);
  border: 2px solid #000; border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow);
}
.tag-header {
  display: inline-block; margin: -30px 0 10px -6px; padding: 4px 18px 6px;
  font-size: 1.15rem; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase;
  transform: rotate(-2.5deg);
  border: 3px solid #000; border-radius: 6px 18px 8px 16px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.75);
  box-shadow: 3px 4px 0 rgba(0,0,0,.5);
}
.tag-pink { background: linear-gradient(135deg, var(--accent), #b0246b); }
.tag-gold { background: linear-gradient(135deg, var(--gold), #c98a12); color: #241633; text-shadow: 1px 1px 0 rgba(255,255,255,.4); }
.tag-cyan { background: linear-gradient(135deg, var(--cyan), #1f7ea8); }
.setup-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.setup-row label { font-weight: bold; color: var(--gold); min-width: 130px; }
.goal-chips { gap: 10px; }
.chip {
  padding: 9px 16px; background: var(--panel2); border: 2px solid #000; border-radius: 999px;
  font-weight: bold; font-size: .9rem; transform: rotate(-.5deg);
  box-shadow: 2px 3px 0 rgba(0,0,0,.45);
}
.chip:nth-child(even) { transform: rotate(.7deg); }
.chip.sel { background: linear-gradient(135deg, var(--accent), #b0246b); box-shadow: 0 0 0 2px var(--gold), 2px 3px 0 rgba(0,0,0,.45); }
.setup-player { background: rgba(18, 10, 30, .6); border: 2px solid #000; border-radius: var(--radius); padding: 12px; margin: 12px 0; }
.setup-player-top { display: flex; gap: 8px; }
.setup-player input {
  flex: 1; padding: 8px 10px; font: inherit; font-weight: bold;
  background: var(--bg); color: var(--ink); border: 2px solid #000; border-radius: 10px;
}
.avatar-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.avatar-pick {
  background: var(--bg); border: 2px solid #000; border-radius: 12px; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; width: 86px;
  transition: transform .12s;
}
.avatar-pick:hover { transform: translateY(-3px) rotate(-1deg); }
.avatar-pick img { width: 64px; height: 64px; object-fit: contain; }
.avatar-pick span { font-size: .66rem; margin-top: 4px; color: var(--dim); font-weight: bold; }
.avatar-pick.sel { box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(255,201,60,.25); background: var(--panel2); transform: translateY(-3px); }
.avatar-pick.sel span { color: var(--gold); }
.goal-preview { margin-top: 10px; padding: 10px; background: var(--bg); border-radius: 10px; font-size: .9rem; color: var(--dim); }
.goal-preview b { color: var(--gold); }
.setup-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 10px; }
.setup-foot .big { width: auto; flex: 1; }

/* ---------- board: city map with building cutouts ---------- */
#screen-board.active { display: flex; align-items: center; justify-content: center; background: #0d0715; }
#board {
  position: relative;
  aspect-ratio: 3 / 2;
  width: min(100vw, calc(100dvh * 1.5));
  height: auto; max-height: 100dvh;
  background: url('../assets/img/board_full.webp') center/cover no-repeat, var(--bg);
  border-radius: 8px;
}
/* invisible hotspots over the painted buildings */
.loc-spot {
  position: absolute; cursor: pointer; z-index: 3;
  border-radius: 12px;
  transition: box-shadow .15s, background .15s;
}
.loc-spot:hover, .loc-spot:focus-visible {
  z-index: 5;
  box-shadow: 0 0 0 3px var(--gold), 0 0 22px 4px rgba(255, 201, 60, .45), inset 0 0 30px rgba(255, 201, 60, .12);
  background: rgba(255, 201, 60, .07);
}
.tile-name {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  padding: 2px 10px; white-space: nowrap; border-radius: 999px;
  background: rgba(0,0,0,.78); border: 2px solid #000;
  font-size: clamp(.55rem, 1.1vw, .8rem); font-weight: bold; text-align: center;
  letter-spacing: .5px; color: var(--gold);
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.loc-spot:hover .tile-name, .loc-spot.here .tile-name { opacity: 1; }
.pawns { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; z-index: 6; }
.pawns img.pawn {
  width: clamp(22px, 2.6vw, 34px); height: clamp(22px, 2.6vw, 34px);
  object-fit: contain; border-radius: 50%;
  background: rgba(0,0,0,.6); border: 2px solid #000;
}
.pawn.active { border-color: var(--gold); box-shadow: 0 0 8px var(--gold); animation: pawnBounce 1.4s ease-in-out infinite; }
@keyframes pawnBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
/* spinning 3D game piece for the current player */



.center-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52%; max-height: 56%; z-index: 4;
  background: rgba(20, 12, 32, .93); border: 3px solid #000; border-radius: 14px;
  padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  box-shadow: var(--shadow);
}
.waiting {
  padding: 8px 10px; border-radius: 10px; background: var(--panel2);
  border: 2px dashed var(--cyan); color: var(--cyan); font-size: .82rem; font-weight: bold;
  text-align: center; animation: waitPulse 2s ease-in-out infinite;
}
@keyframes waitPulse { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
.net-badge { font-size: .68rem; color: var(--dim); text-align: center; }
.status-head { display: flex; align-items: center; gap: 10px; }
.portrait { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; background: var(--panel2); border: 2px solid #000; }
.pname { font-weight: bold; font-size: 1.05rem; }
.pweek { font-size: .8rem; color: var(--dim); }
.hours { color: var(--cyan); font-weight: bold; }
.cashbox { margin-left: auto; text-align: right; font-weight: bold; color: var(--lime); font-size: 1.05rem; }
.bankline { font-size: .72rem; color: var(--dim); font-weight: normal; }

.stats { display: flex; flex-direction: column; gap: 4px; }
.stat { display: flex; align-items: center; gap: 6px; font-size: .8rem; }
.stat-label { width: 96px; }
.stat-val { width: 84px; text-align: right; color: var(--dim); font-size: .72rem; }
.bar { flex: 1; height: 12px; background: #120a1e; border-radius: 999px; border: 1px solid #000; overflow: hidden; }
.fill { height: 100%; border-radius: 999px; transition: width .4s; }
.f-cash { background: linear-gradient(90deg, #3fa34d, var(--lime)); }
.f-hap { background: linear-gradient(90deg, #c437a3, var(--accent)); }
.f-edu { background: linear-gradient(90deg, #2a7fd4, var(--cyan)); }
.f-clout { background: linear-gradient(90deg, #d49b2a, var(--gold)); }

.status-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .74rem; color: var(--dim); }
.owe { color: var(--bad); }
.status-btns { display: flex; gap: 8px; margin-top: auto; }
.status-btns .mini { flex: 1; }

/* ---------- location overlay ---------- */
#location {
  position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; padding: 10px;
}
.loc-inner {
  position: relative;
  width: min(96vw, 900px); height: min(92vh, 640px);
  background-size: cover; background-position: center;
  border: 4px solid #000; border-radius: 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.loc-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.45));
}
.loc-header h2 { margin: 0; text-shadow: 2px 2px 0 #000; }
.loc-dialog {
  margin: auto 14px 8px; padding: 10px 14px; min-height: 52px;
  background: rgba(10, 5, 18, .88); border: 2px solid #000; border-radius: 12px;
  font-size: .92rem; line-height: 1.35;
}
.loc-actions {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px; padding: 10px 14px 14px; max-height: 46%; overflow-y: auto;
  background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.5));
}
.act {
  text-align: left; padding: 8px 10px; background: var(--panel2);
  border: 2px solid #000; border-radius: 10px; display: flex; flex-direction: column; gap: 2px;
}
.act:hover { box-shadow: 0 0 0 2px var(--gold); }
.act span { font-weight: bold; font-size: .86rem; display: flex; align-items: center; gap: 4px; }
.act small { color: var(--dim); font-size: .7rem; line-height: 1.25; }
.act.disabled { opacity: .45; }
.act-note { color: var(--dim); font-style: italic; padding: 8px; }
.ic { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center; padding: 12px;
}
.modal-panel { max-width: 560px; }
.weekend-list { list-style: none; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.weekend-list li { padding: 8px 10px; background: var(--panel2); border-radius: 10px; border-left: 4px solid var(--dim); font-size: .9rem; }
.weekend-list li.good { border-left-color: var(--lime); }
.weekend-list li.bad { border-left-color: var(--bad); }
.next-up, .jonesy-stats { color: var(--dim); font-size: .88rem; margin: 8px 0; }
.next-up b { color: var(--gold); }

.news-headline {
  font-weight: 900; font-size: 1.02rem; color: var(--gold);
  border: 2px dashed var(--gold); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.news-week { color: var(--dim); font-size: .8rem; margin-bottom: 8px; }
.news-table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.news-table td { padding: 6px 8px; border-bottom: 1px solid #000; font-size: .9rem; }
.news-flavor { font-style: italic; color: var(--dim); font-size: .82rem; margin-top: 8px; }

.howto-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; font-size: .88rem; line-height: 1.35; }
.howto-list b { color: var(--gold); }

/* ---------- winner ---------- */
.winner-panel { text-align: center; }
#winner-body img { width: 140px; height: 140px; object-fit: contain; }
#winner-body h1 { color: var(--gold); margin: 10px 0; }
#winner-body p { color: var(--dim); margin-bottom: 10px; }
.win-stats { font-weight: bold; font-size: 1.1rem; margin: 10px 0; }

/* ---------- online lobby ---------- */
.online-box { margin-top: 14px; padding: 12px; background: var(--panel2); border: 2px solid #000; border-radius: var(--radius); }
.room-code {
  font-size: 2.2rem; font-weight: 900; letter-spacing: .5em; text-align: center;
  color: var(--gold); text-shadow: 2px 2px 0 #000; margin: 8px 0; user-select: text;
}
.roster { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.roster-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg); border-radius: 10px; font-weight: bold; }
.roster-row img { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; background: var(--panel2); }
.roster-row .ok { margin-left: auto; color: var(--lime); font-size: .78rem; }
.code-input {
  width: 170px; padding: 10px; font: inherit; font-weight: 900; font-size: 1.1rem;
  letter-spacing: .35em; text-transform: uppercase; text-align: center;
  background: var(--bg); color: var(--gold); border: 2px solid #000; border-radius: 10px;
}
.join-status { margin-top: 10px; font-size: .9rem; color: var(--lime); }

/* ---------- talking animation ---------- */
.loc-dialog.talking { border-color: var(--gold); animation: talkGlow 1s ease-in-out infinite; }
@keyframes talkGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(255,201,60,.0); } 50% { box-shadow: 0 0 14px 2px rgba(255,201,60,.35); } }
.speech-bars { display: none; margin-left: 8px; vertical-align: middle; }
.loc-dialog.talking .speech-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.speech-bars i { width: 3px; background: var(--gold); border-radius: 2px; animation: bar .6s ease-in-out infinite; }
.speech-bars i:nth-child(1) { animation-delay: 0s; }
.speech-bars i:nth-child(2) { animation-delay: .15s; }
.speech-bars i:nth-child(3) { animation-delay: .3s; }
.speech-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes bar { 0%,100% { height: 4px; } 50% { height: 14px; } }
.loc-inner { transition: transform .3s; }
.loc-inner.talking { animation: sceneBreath 3.2s ease-in-out infinite; }
@keyframes sceneBreath { 0%,100% { background-size: 100.5% auto; } 50% { background-size: 103% auto; } }

/* ---------- toasts / audio ---------- */
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 460px); pointer-events: none; }
.toast {
  padding: 10px 14px; border-radius: 12px; border: 2px solid #000;
  background: var(--panel2); font-size: .88rem; font-weight: bold; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-10px); transition: all .3s;
}
.toast.showing { opacity: 1; transform: none; }
.toast.good { border-color: var(--lime); }
.toast.bad { border-color: var(--bad); }

#audio-bar { position: fixed; bottom: 10px; right: 10px; z-index: 70; display: flex; gap: 6px; }

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  .stat-label { width: 80px; }
  .loc-actions { grid-template-columns: 1fr; max-height: 52%; }
  .loc-inner { height: 96dvh; width: 98vw; }
}
@media (orientation: portrait) {
  /* the map letterboxes; give the status panel more room */
  .center-panel { width: 62%; max-height: 62%; }
  .tile-name { font-size: .52rem; padding: 1px 6px; }
}

/* ---------- board camera zoom ---------- */
#board {
  transition: transform .62s cubic-bezier(.45, 0, .2, 1);
  will-change: transform;
}
#board.zoomed { transform: scale(2.35); }
#screen-board.zooming .center-panel,
#screen-board.zooming #toasts { opacity: 0; pointer-events: none; }
.center-panel { transition: opacity .3s; }
#board.zoomed .loc-spot { pointer-events: none; }
#board.zoomed .tile-name { opacity: 0; }
/* let the zoomed board peek around the interior view */
#location { background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px); }

/* ---------- responsive: all screens ---------- */
/* portrait phones: landscape-only overlay */
#rotate-overlay { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
  #rotate-overlay {
    display: flex; position: fixed; inset: 0; z-index: 999;
    align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(rgba(13,7,21,.92), rgba(13,7,21,.96)),
      url('../assets/img/board_center.webp') center/cover no-repeat, var(--bg);
    padding: 24px;
  }
  .rotate-icon { font-size: 4rem; animation: rotateHint 2s ease-in-out infinite; display: inline-block; }
  @keyframes rotateHint { 0%,100% { transform: rotate(0); } 50% { transform: rotate(90deg); } }
  .rotate-inner h2 { color: var(--gold); margin: 12px 0 8px; }
  .rotate-inner p { color: var(--dim); }
}

/* short landscape screens (phones): compact HUD & views */
@media (max-height: 480px) {
  .center-panel { width: 46%; max-height: 68%; padding: 8px; gap: 4px; }
  .status-head { gap: 6px; }
  .portrait { width: 38px; height: 38px; }
  .pname { font-size: .9rem; }
  .cashbox { font-size: .9rem; }
  .stat { font-size: .68rem; }
  .stat-label { width: 74px; }
  .stat-val { width: 64px; }
  .bar { height: 9px; }
  .status-foot { font-size: .62rem; gap: 2px 8px; }
  .status-btns .mini { padding: 5px 8px; font-size: .74rem; }
  .loc-inner { width: 100vw; height: 100dvh; border-radius: 0; border-width: 0; }
  .loc-header { padding: 6px 10px; }
  .loc-header h2 { font-size: 1rem; }
  .loc-dialog { font-size: .78rem; min-height: 38px; padding: 6px 10px; margin: auto 8px 6px; }
  .loc-actions { max-height: 55%; padding: 6px 8px 10px; gap: 4px; }
  .act span { font-size: .78rem; }
  .act small { font-size: .62rem; }
  #modal .panel { max-height: 96dvh; padding: 12px; }
  .weekend-list li { padding: 5px 8px; font-size: .78rem; }
  
  #audio-bar .mini { padding: 4px 8px; }
}

/* tablets portrait: board letterboxes, give panel more width */
@media (orientation: portrait) and (min-width: 821px) {
  .center-panel { width: 64%; max-height: 60%; }
}

/* pawn ground shadow at the building's sidewalk */
.pawn-ground-shadow {
  position: absolute; left: 50%; bottom: 4%;
  width: 62%; height: 14%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 55%, transparent 75%);
  border-radius: 50%;
}

/* ---------- paper-cutout standees ---------- */
.standee {
  position: absolute; left: 50%; bottom: -2%;
  transform: translateX(-50%);
  width: clamp(42px, 4.6vw, 74px); height: clamp(50px, 5.6vw, 92px);
  pointer-events: none; z-index: 6;
  animation: standeeFlipIn .45s cubic-bezier(.3, 1.4, .5, 1) both;
  transform-origin: bottom center;
}
.standee-big {
  width: clamp(58px, 6.4vw, 104px); height: clamp(70px, 7.8vw, 128px);
  z-index: 7;
  animation: standeeFlipIn .45s cubic-bezier(.3, 1.4, .5, 1) both,
             standeeSway 2.6s ease-in-out .45s infinite;
}
.standee img {
  position: absolute; left: 50%; bottom: 8%;
  width: 92%; height: 84%; object-fit: contain;
  transform: translateX(-50%);
  /* white sticker outline */
  filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff)
          drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff)
          drop-shadow(0 3px 3px rgba(0,0,0,.4));
}
.standee-base {
  position: absolute; left: 50%; bottom: 0;
  width: 58%; height: 9%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #e8d9b8, #b59a6a);
  border: 1.5px solid #000; border-radius: 3px;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
.standee-big .standee-base { box-shadow: 0 0 10px 2px rgba(255, 201, 60, .55); }
.standee .pawn-ground-shadow { bottom: -2%; height: 10%; }
@keyframes standeeFlipIn {
  from { transform: translateX(-50%) rotateY(88deg); }
  to   { transform: translateX(-50%) rotateY(0); }
}
@keyframes standeeSway {
  0%, 100% { transform: translateX(-50%) rotateZ(0); }
  25% { transform: translateX(-50%) rotateZ(2.2deg); }
  75% { transform: translateX(-50%) rotateZ(-2.2deg); }
}
#board .loc-spot { perspective: 500px; }
@media (max-height: 480px) {
  .standee { width: 34px; height: 42px; }
  .standee-big { width: 46px; height: 58px; }
}
/* role label on avatar cards */
.avatar-pick em { font-size: .56rem; color: var(--cyan); font-style: normal; margin-top: 1px; }
.perk-line { margin-top: 8px; padding: 7px 10px; background: rgba(77, 216, 255, .08); border: 1.5px dashed var(--cyan); border-radius: 10px; font-size: .78rem; color: var(--dim); }
.perk-line b { color: var(--cyan); }

/* ---------- the park (center hotspot, behind the status panel) ---------- */
.park-spot { z-index: 2; border-radius: 20px; }
.park-spot:hover { box-shadow: 0 0 0 3px var(--lime), 0 0 22px 4px rgba(125, 255, 94, .4), inset 0 0 30px rgba(125, 255, 94, .1); background: rgba(125, 255, 94, .06); }
.park-spot .tile-name { bottom: auto; top: 2px; }
/* park pawns stand on the grass beside the panel, not under it */
#tile-park .standee, #tile-park 
#tile-park .pawns { top: auto; bottom: 58%; right: auto; left: 2%; }

/* ---------- winner career recap ---------- */
.career-recap { margin-top: 14px; text-align: left; }
.career-recap h3 { color: var(--gold); font-size: .95rem; margin-bottom: 8px; text-align: center; }
.recap-row { padding: 7px 10px; margin: 5px 0; background: var(--panel2); border-radius: 10px; font-size: .82rem; color: var(--dim); }
.recap-row b { color: var(--ink); }
.recap-row.champ { border: 2px solid var(--gold); color: var(--ink); }

/* walking pawn */
.standee.walker {
  transition: left .75s cubic-bezier(.4, 0, .6, 1), top .75s cubic-bezier(.4, 0, .6, 1);
  animation: walkerBob .25s ease-in-out infinite alternate;
  z-index: 9; width: clamp(46px, 5vw, 80px); height: clamp(56px, 6vw, 98px);
}
@keyframes walkerBob { from { margin-top: 0; } to { margin-top: -5px; } }
.disabled-chip { opacity: .4; cursor: not-allowed; }

/* ---------- achievements gallery ---------- */
.achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.achv {
  padding: 10px; background: var(--panel2); border: 2px solid #000; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  opacity: .45; filter: grayscale(.8);
}
.achv.got { opacity: 1; filter: none; border-color: var(--gold); box-shadow: 0 0 10px rgba(255,201,60,.25); }
.achv-icon { font-size: 1.6rem; }
.achv b { font-size: .8rem; }
.achv small { font-size: .66rem; color: var(--dim); line-height: 1.25; }

/* home shelf: your durables on display at the crib/villa */
.home-shelf {
  display: flex; gap: 6px; padding: 6px 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(0,0,0,.5), transparent);
}
.home-shelf img {
  width: 34px; height: 34px; object-fit: contain;
  background: rgba(0,0,0,.5); border: 2px solid #000; border-radius: 8px; padding: 2px;
}

/* ---------- visual-novel keeper sprites ---------- */
.keeper-sprite {
  position: absolute; left: 50%; bottom: 26%;
  height: 62%; transform: translateX(-50%);
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.5));
  pointer-events: none; z-index: 1;
  animation: keeperIdle 4s ease-in-out infinite;
}
@keyframes keeperIdle { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
.keeper-sprite.pop { animation: keeperPop .3s ease-out, keeperIdle 4s ease-in-out .3s infinite; }
@keyframes keeperPop { 0% { transform: translateX(-50%) scale(.94); } 60% { transform: translateX(-50%) scale(1.04); } 100% { transform: translateX(-50%) scale(1); } }
.loc-header, .loc-dialog, .loc-actions { position: relative; z-index: 2; }

/* ---------- the Gazette as a real newspaper ---------- */
.paper {
  background: #f2ecd9; color: #241d14; border-radius: 6px;
  padding: 14px 16px; margin: -6px -6px 10px;
  font-family: Georgia, 'Times New Roman', serif;
  box-shadow: inset 0 0 40px rgba(120, 100, 60, .25);
}
.paper-masthead { display: block; width: 100%; border-bottom: 3px double #241d14; margin-bottom: 8px; }
.paper .news-week { color: #6b5d45; border-bottom: 1px solid #b8ab8d; padding-bottom: 4px; font-style: italic; }
.paper .news-headline { color: #7a1616; border-color: #7a1616; background: rgba(122, 22, 22, .06); font-family: inherit; }
.paper .news-table td { border-bottom: 1px dotted #b8ab8d; color: #241d14; }
.paper-story { display: flex; gap: 12px; align-items: center; margin-top: 10px; border-top: 3px double #241d14; padding-top: 10px; }
.paper-photo { width: 130px; border: 1px solid #241d14; filter: sepia(.25) contrast(1.05); }
.paper .news-flavor { color: #45392a; font-size: .9rem; }
@media (max-height: 480px) { .paper-photo { width: 90px; } }

/* ---------- powered-by badge (fits the splash, doesn't shout) ---------- */
#powered-badge {
  position: fixed; left: 14px; bottom: 12px; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 14px 6px; text-decoration: none;
  background: rgba(26, 16, 37, .82); backdrop-filter: blur(4px);
  border: 2px solid #000; border-radius: 14px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .15s, box-shadow .15s;
}
#powered-badge:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
#powered-badge .pb-label { font-size: .6rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); }
#powered-badge img { width: 108px; height: auto; filter: drop-shadow(0 2px 6px rgba(255, 61, 127, .35)); }
#powered-badge .pb-url { font-size: .62rem; color: var(--accent); font-weight: bold; }
@media (max-height: 480px) { #powered-badge img { width: 78px; } #powered-badge { padding: 5px 10px 4px; } }

/* ---------- the manual ---------- */
.manual-panel { max-width: 680px; }
.manual-intro { color: var(--dim); font-style: italic; margin-bottom: 14px; }
.manual-sec { margin: 22px 0 14px; padding: 14px 14px 10px; background: rgba(47, 29, 66, .5); border: 2px solid #000; border-radius: 14px; }
.manual-sec p { font-size: .88rem; line-height: 1.45; margin: 8px 0; }
.manual-sec b { color: var(--gold); }
.manual-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.manual-goals span { background: var(--bg); border: 2px solid #000; border-radius: 10px; padding: 8px 10px; font-size: .8rem; line-height: 1.35; }
.mi { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

/* items living in the crib */
.crib-prop {
  position: absolute; z-index: 1;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.45));
  animation: propIn .4s cubic-bezier(.3, 1.4, .5, 1) both;
  pointer-events: none;
}
@keyframes propIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* powered-by badge v2: paint splash, bold, tilted */
#powered-badge {
  background: none; border: none; box-shadow: none; backdrop-filter: none;
  padding: 26px 34px; transform: rotate(-4deg);
  background-image: url('../assets/img/paint_splash.webp');
  background-size: 100% 100%; background-repeat: no-repeat;
  filter: drop-shadow(3px 5px 0 rgba(0,0,0,.55));
}
#powered-badge:hover { transform: rotate(-4deg) scale(1.06); box-shadow: none; }
#powered-badge .pb-label {
  color: #fff; font-weight: 900; font-size: .64rem; letter-spacing: 2px;
  text-shadow: 1.5px 1.5px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
#powered-badge img { width: 118px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
#powered-badge .pb-url {
  color: #fff; font-weight: 900; font-size: .66rem;
  text-shadow: 1.5px 1.5px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
@media (max-height: 480px) { #powered-badge { padding: 18px 24px; } #powered-badge img { width: 84px; } }

/* front-page layout */
.paper-head {
  font-size: 1.35rem; line-height: 1.15; margin: 8px 0 10px;
  color: #241d14; text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 3px double #241d14; padding-bottom: 8px; text-shadow: none;
}
.paper-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.paper-col { font-size: .78rem; line-height: 1.45; color: #45392a; }
.paper-col h4 { font-size: .82rem; color: #241d14; text-transform: uppercase; margin: 6px 0 4px; border-bottom: 1px solid #b8ab8d; }
.paper-col .paper-photo { width: 100%; margin-bottom: 6px; }
.paper-classified {
  margin-top: 10px; padding: 8px; border: 2px dashed #7a1616; color: #7a1616;
  font-size: .74rem; font-weight: bold; background: rgba(122, 22, 22, .05);
}
@media (max-width: 700px) { .paper-cols { grid-template-columns: 1fr; } }
#modal .tag-header { margin: 16px 0 8px 0; font-size: .9rem; padding: 3px 14px 4px; }
.phone-jobs { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; margin-top: 8px; }
.custom-goals { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cg-row { display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.cg-row label { width: 92px; color: var(--gold); font-weight: bold; }
.cg-row input[type=range] { flex: 1; accent-color: var(--accent); }
.cg-row b { width: 74px; text-align: right; }

/* ---------- sticky week clock (top border of the board) ---------- */
#week-clock {
  position: fixed; top: 8px; right: 12px;
  z-index: 40; /* above the board AND the location overlay */
  background: rgba(12, 10, 22, .92);
  border: 3px solid #000; border-radius: 999px;
  padding: 6px 18px;
  font-weight: 800; font-size: 1.05rem; letter-spacing: .5px;
  color: #ffe14d;
  box-shadow: 0 3px 0 #000, 0 0 14px rgba(255, 225, 77, .25);
  pointer-events: none; user-select: none;
  font-variant-numeric: tabular-nums;
}
#week-clock b { color: #fff; font-size: 1.15em; }
#week-clock.low { color: #ff5d5d; box-shadow: 0 3px 0 #000, 0 0 16px rgba(255, 93, 93, .45); }
#week-clock.low b { color: #ff8a8a; }
#week-clock.tick { animation: clockTick .45s ease; }
@keyframes clockTick {
  0% { transform: scale(1); }
  35% { transform: scale(1.18) rotate(-3deg); background: rgba(60, 20, 20, .95); }
  100% { transform: scale(1); }
}
@media (max-height: 480px) {
  #week-clock { top: 4px; padding: 3px 12px; font-size: .85rem; border-width: 2px; }
}

/* 2D winner crown */
.crown2d { font-size: 5rem; line-height: 1; filter: drop-shadow(0 4px 0 #000); animation: crownBob 2.2s ease-in-out infinite; }
@keyframes crownBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
