body.host { height: 100vh; overflow: hidden; }

#lobby { padding: 32px; max-width: 1100px; margin: 0 auto; height: 100vh; overflow: auto; }
#lobby h1 { margin-bottom: 6px; }
.lobby-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-top: 20px; }
.lobby-grid .panel { display: flex; flex-direction: column; gap: 10px; }
#settings-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

#game { display: grid; grid-template-columns: auto minmax(300px, 1fr); gap: 12px; height: 100vh; padding: 10px; }

.board {
  display: grid; aspect-ratio: 1; height: calc(100vh - 20px); max-width: 100%;
  gap: 2px; background: #333; border: 2px solid #333; border-radius: 6px;
}
.space {
  position: relative; background: #f4f1e8; color: #222; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; text-align: center; overflow: hidden;
  font-size: clamp(6px, .75vh, 11px); line-height: 1.1;
}
.space.corner { background: #e8e2cc; justify-content: center; font-weight: 700; font-size: clamp(8px, 1vh, 13px); }
.space.mortgaged { background: #bbb; }
.space.here { box-shadow: inset 0 0 0 3px var(--accent); }
.space .band { width: 100%; height: 22%; flex: none; display: flex; align-items: center; justify-content: center; }
.space .sname { padding: 2px; font-weight: 600; }
.space .sprice { margin-top: auto; padding-bottom: 6px; }
.space .owner { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; }
.space .tokens { position: absolute; inset: 30% 2px auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; }
.token { width: clamp(8px, 1.4vh, 18px); aspect-ratio: 1; border-radius: 50%; border: 2px solid #111; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.token.jailed { outline: 2px dashed #111; }
.bld { display: flex; gap: 1px; }
.bld .house { width: 6px; height: 6px; background: #2ecc71; border: 1px solid #145a32; }
.bld .hotel { width: 14px; height: 7px; background: #c0392b; border: 1px solid #641e16; }

.center { background: #12221a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; overflow: auto; }
.center .title { font-size: clamp(18px, 4vh, 48px); font-weight: 800; color: var(--accent); letter-spacing: 2px; }
.center .panel { width: min(420px, 100%); }
.dice { display: flex; gap: 10px; }
.dice span { width: 54px; height: 54px; background: #fff; color: #111; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.winner { font-size: 2rem; font-weight: 800; text-align: center; color: var(--ok); }
.countdown { float: right; font-weight: 700; }
.bank { font-size: .85rem; }

.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.banner { background: var(--surface); border-radius: var(--radius); padding: 12px; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.banner small { width: 100%; color: var(--muted); font-weight: 400; font-size: .85rem; }
.players { background: var(--surface); border-radius: var(--radius); padding: 6px; overflow: auto; max-height: 40vh; }
.log { flex: 1; min-height: 80px; background: var(--surface); border-radius: var(--radius); padding: 10px; overflow: auto; font-size: .85rem; }
.log div { padding: 2px 0; border-bottom: 1px solid #2a2a40; }
.log small { color: var(--muted); display: inline-block; min-width: 24px; }
#admin summary { cursor: pointer; color: var(--muted); }
#admin .row select, #admin .row input { max-width: 130px; }
#backups summary { cursor: pointer; color: var(--muted); }
#backups-body { max-height: 30vh; overflow: auto; }
.bk { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2a2a40; }

.space .owner { height: auto; min-height: 18%; color: #fff; font-weight: 700; font-size: clamp(6px, .8vh, 11px);
  display: flex; align-items: center; justify-content: center; text-shadow: 0 0 3px #000; overflow: hidden; white-space: nowrap; }
.space.owned.mortgaged .owner { opacity: .6; }
.holdings { background: var(--surface); border-radius: var(--radius); padding: 10px; overflow: auto; max-height: 34vh; flex: none; }
.holdings h3 { font-size: .95rem; margin-bottom: 6px; }
.hold { padding: 6px 0; border-bottom: 1px solid #2a2a40; }
.hname { display: flex; align-items: center; gap: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pill { font-size: .78rem; padding: 2px 6px; border-left: 6px solid; background: var(--surface2); border-radius: 4px; }
.pill.mort { opacity: .5; text-decoration: line-through; }
