.in-game { padding-top: 14px; }
.compact-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.compact-game h1 {
  margin: 0 0 4px;
  font-size: clamp(18px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.compact-game h1 span { color: var(--green); white-space: nowrap; }
.game-info small { color: var(--muted); }
.compact-game .balance {
  min-width: 0;
  padding: 7px 18px;
  text-align: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #edc671, #cca146);
}
.compact-game .balance strong { font-size: clamp(38px, 4vw, 48px); line-height: 1.05; }
.in-game .tabs { margin: 12px 0; gap: 3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
}
.swatch span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  background: var(--chip);
  border: 1px solid #ffffff70;
  border-radius: 6px;
}
.swatch[aria-expanded="true"] { border-color: var(--text); }
.swatch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lots[hidden] { display: none; }
.in-game .tabs { flex-wrap:wrap; }
.count:not(:empty) { padding:2px 6px; border-radius:10px; background:#edc671; color:#121710; }
.owner-row { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); }
.owner-row strong { text-align:right; color:#f1cb78; font-size:1.05rem; }
.acquired,.request,#notifications .card + .card { margin-top:14px; }
.request { padding:10px 0; border-top:1px solid var(--line); }
.request small { display:block; color:var(--muted); margin-top:4px; }
.request form { display:flex; gap:8px; margin-top:8px; }
.request form button { width:auto; }
#live-notice:not(:empty) { position:fixed; bottom:14px; left:50%; transform:translateX(-50%); width:min(92vw,500px); background:#153528; color:#fff; padding:14px 18px; border:1px solid #74b38b; border-radius:12px; white-space:pre-line; z-index:10; box-shadow:0 6px 30px #0008; max-height:35vh; overflow:auto; }
.lots h2 { margin: 14px 0 8px; font-size: 18px; }
@media (max-width: 540px) {
  .compact-game { gap: 8px; }
  .compact-game .balance { padding: 6px 9px; }
  .compact-game .balance small { font-size: 12px; }
  .in-game .tabs button { padding: 11px 7px; }
}
.screen-actions { display:flex; align-items:center; gap:6px; }
.screen-actions button { min-height:40px; padding:7px 10px; font-size:.83rem; }
#screen-mode { width:40px; padding:0; font:1.45rem/1 system-ui; }
#screen-mode[aria-pressed="true"] { color:var(--gold); border-color:var(--gold); }
#screen-help { background:#101c17; color:var(--text); border:1px solid var(--line); border-radius:16px; width:min(90vw,360px); }
#screen-help::backdrop { background:#000a; }
.acquired { padding:clamp(10px,3vw,22px); }
.portfolio-group { margin-top:14px; padding:10px; border:1px solid var(--line); border-radius:14px; }
.portfolio-group.collection-complete { border:2px solid var(--chip); padding:9px; }
.portfolio-group.collection-complete { box-shadow: inset 0 0 0 1px #ffffff12; }
.portfolio-group h3 { margin:0; display:flex; justify-content:space-between; align-items:center; gap:6px; }
.portfolio-group h3 small { font-size:.8rem; font-weight:normal; color:var(--muted); }
.complete-group { margin:3px 0 0; color:#e0ebdc; font-size:.85rem; }
.complete-group span { color:var(--gold); }
.holdings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-top:8px; }
.holding { min-width:0; padding:9px; border:1px solid var(--line); border-radius:9px; background:#0d1813; display:flex; flex-direction:column; align-items:flex-start; gap:4px; overflow-wrap:anywhere; }
.holding-chip { display:inline-grid; place-items:center; width:22px; height:16px; background:var(--chip); border:1px solid #ffffff70; border-radius:4px; font-size:12px; }
.holding>small { color:var(--muted); font-size:.75rem; }
.holding .mortgage-value { margin-top:auto; }
.holding-actions { display:flex; align-items:center; flex-wrap:wrap; gap:2px 5px; }
.holding-actions form { margin:0; }
.holding-actions button { padding:3px 4px; min-height:27px; width:auto; border:0; background:transparent; font-weight:600; font-size:.76rem; color:#c7d6cd; }
.holding-actions button:hover,.holding-actions button:focus-visible { color:white; background:#1b3027; }
.holding:has(.trade-form:not([hidden])) { grid-column:1/-1; }
.holding .trade-form { width:100%; min-width:0; }
@media (max-width:480px) {
  header { padding:0 8px; gap:4px; }
  .brand { gap:5px; }
  .brand strong { font-size:.83rem; letter-spacing:.06em; }
  .brand small { font-size:9px; }
  .brand .logo { width:31px; height:34px; }
  .screen-actions { gap:3px; }
  .screen-actions button { padding:5px 7px; }
  .holding { padding:6px; }
}
.trade-form { margin-top:10px; }
.trade-form[hidden] { display:none; }
.deck-nav {display:flex;gap:4px;margin-bottom:16px}
.deck-nav a {padding:8px 5px;flex:1 1 auto;text-align:center;color:var(--text);border:1px solid var(--line);border-radius:10px;text-decoration:none}
.deck-nav [aria-current] {background:var(--gold);color:#111}
.card-detail {margin-top:18px;border-top:1px solid var(--line);padding-top:12px}
.card-choice .card-option {display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px}
.card-option input[type=radio] {width:auto;flex:none;margin:0;accent-color:var(--green)}
.deck-card fieldset {border:1px solid var(--line);border-radius:10px;margin:12px 0}
.deck-card select {max-width:100%;min-width:0}
.piece-reserve { padding:12px; border:1px solid #766536; border-radius:12px; }
.piece-reserve h3 { margin:0 0 6px; }
.reserve-row { padding:8px 0; }
.reserve-row+.reserve-row { border-top:1px solid var(--line); }
.place-piece { display:grid; gap:6px; margin-top:6px; }
.place-piece small { color:var(--muted); }
.place-piece button { width:fit-content; }

#finish.active {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px;align-items:start}
#finish .confirm-line {display:flex;align-items:center;gap:8px;margin:12px 0}
#finish input[type=checkbox] {width:18px;height:18px;flex:none}
#finish button {background:#783d30;color:white}

#history h2 {margin:0 0 6px;font-size:1.12rem}
.history.movement {grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:5px 12px}
.movement-title {font-size:1rem;line-height:1.35;font-weight:650;color:#e2e8e4;overflow-wrap:anywhere}
.movement-amount {max-width:11ch;text-align:right;font-size:.88rem;line-height:1.35;font-weight:600;color:#c9d4cf}
.movement-people {grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 15px;margin:0;font-size:.81rem;line-height:1.45}
.movement-people div {display:flex;align-items:baseline;flex-wrap:wrap;gap:0 4px;max-width:100%}
.movement-people dt {color:#a5b1ad}
.movement-people dd {margin:0;font-weight:500;color:#c6ceca;overflow-wrap:anywhere}
.movement-people [data-role="Cobró"] dd,
.movement-people [data-role^="Recibió"] dd {color:#b3cbbf}
.movement-people [data-role="Registró"] dd {color:#aebecd}
.movement-time {grid-column:1/-1;font-size:.75rem;color:#a2aea8;font-variant-numeric:tabular-nums}
.more-movements {display:flex;flex-wrap:wrap;gap:16px;margin-top:12px}
.more-movements a {color:#b7cbbf;padding:6px 0;text-underline-offset:3px}
