:root {
  --ink: #151c33;
  --ink2: #222b4a;
  --ink3: #2e3a62;
  --gold: #d4ad57;
  --gold2: #a9843a;
  --paper: #f5eedb;
  --paper2: #ebe1c6;
  --line: #2a2a2a;
  --text: #f3ead2;
  --muted: #a9a58f;
  --red: #c73a2e;
  --green: #2f8a57;
  --radius: 10px;
  --deco: 'Limelight', 'Poiret One', serif;
  --ui: 'Josefin Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ink);
  background-image:
    radial-gradient(ellipse at 50% -10%, rgba(212, 173, 87, .14), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 2px, transparent 2px 14px);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--gold); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ───────── boutons ───────── */
.btn {
  appearance: none; border: 1px solid var(--gold2); background: var(--ink2); color: var(--text);
  font: 600 14px var(--ui); padding: 9px 14px 7px; border-radius: 8px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .08s, background .15s, border-color .15s; letter-spacing: .02em;
}
.btn:hover:not(:disabled) { background: var(--ink3); border-color: var(--gold); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.gold { background: linear-gradient(180deg, #e7c46f, var(--gold2)); color: #1c1608; border-color: #f0d48a; }
.btn.gold:hover:not(:disabled) { background: linear-gradient(180deg, #f0d27f, #b8913f); }
.btn.danger { border-color: #8e2b22; color: #ffb3aa; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.big { font-size: 17px; padding: 13px 22px 11px; }
.btn.sm { font-size: 13px; padding: 6px 10px 4px; }
.x { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.x:hover { color: var(--text); }

input, select {
  font: 16px var(--ui); color: var(--ink); background: var(--paper); border: 1px solid var(--gold2);
  border-radius: 7px; padding: 9px 10px 7px; width: 100%;
}
select { width: auto; }
.tag { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px 1px; border-radius: 4px; background: rgba(212,173,87,.18); color: var(--gold); margin-left: 4px; }
.tag.me { background: var(--gold); color: var(--ink); }
.tag.off { background: #44403a; color: #bbb; }
.tag.jail { background: #6b1f19; color: #ffd0c9; }

.mini-pawn, .pawn-md, .pawn-lg {
  display: inline-grid; place-items: center; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--c, #888); box-shadow: 0 0 0 1px rgba(0,0,0,.4); vertical-align: middle; line-height: 1;
}
.mini-pawn { width: 22px; height: 22px; font-size: 13px; margin-right: 5px; }
.pawn-md { width: 34px; height: 34px; font-size: 19px; flex: none; border-width: 3px; }
.pawn-lg { width: 44px; height: 44px; font-size: 25px; flex: none; border-width: 3px; }

/* ───────── accueil ───────── */
.home { max-width: 980px; margin: 0 auto; padding: 32px 18px 40px; }
.hero { position: relative; text-align: center; padding: 40px 10px 30px; overflow: hidden; }
.hero-sun, .sunburst, .end-sun {
  position: absolute; inset: -40%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(212,173,87,.13) 0 3deg, transparent 3deg 12deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 0 22%, transparent 60%); mask: radial-gradient(circle at 50% 50%, #000 0 22%, transparent 60%);
}
.hero h1 {
  position: relative; font-family: var(--deco); font-weight: 400; font-size: clamp(58px, 12vw, 118px);
  margin: 4px 0 6px; letter-spacing: .06em; color: var(--gold);
  text-shadow: 0 2px 0 #6e5422, 0 6px 24px rgba(212,173,87,.25);
}
.hero-sub { position: relative; font-family: 'Poiret One', serif; font-size: 20px; letter-spacing: .3em; text-transform: uppercase; color: var(--paper2); }
.hero p { position: relative; max-width: 600px; margin: 10px auto 0; color: var(--muted); line-height: 1.5; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 18px; }
.card-form {
  background: linear-gradient(180deg, var(--ink2), #1a2240); border: 1px solid var(--gold2); border-radius: 14px;
  padding: 22px; display: flex; flex-direction: column; gap: 12px; position: relative;
  box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(212,173,87,.35);
}
.card-form.flat { box-shadow: none; border: none; padding: 0; background: none; }
.card-form h2 { font-family: 'Poiret One', serif; font-size: 26px; margin: 0; color: var(--gold); font-weight: 400; }
.card-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper2); }
.lbl { font-weight: 600; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper2); }
.code-in { text-transform: uppercase; letter-spacing: .4em; font-size: 22px; text-align: center; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 4px 0 0; }
.link { color: var(--muted); font-size: 13px; text-align: center; }
.already { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); }
.picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pk input { position: absolute; opacity: 0; pointer-events: none; }
.pk span { display: grid; place-items: center; height: 46px; font-size: 26px; border-radius: 10px; background: var(--ink); border: 2px solid transparent; cursor: pointer; transition: .15s; }
.pk input:checked + span { border-color: var(--gold); background: var(--ink3); transform: scale(1.05); }
.pk.used span { opacity: .25; cursor: not-allowed; }
.foot { text-align: center; color: #6c6a5d; font-size: 12px; margin-top: 30px; }

/* ───────── salon ───────── */
.lobby { max-width: 1100px; margin: 0 auto; padding: 18px; }
.lobby-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.mini-logo { font-family: var(--deco); font-size: 26px; color: var(--gold); text-decoration: none; letter-spacing: .05em; }
.room-code { margin-left: auto; text-align: right; }
.room-code small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.room-code b { font-family: var(--deco); font-size: 34px; letter-spacing: .25em; color: var(--paper); }
.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel { background: rgba(34,43,74,.75); border: 1px solid rgba(212,173,87,.35); border-radius: 12px; padding: 16px; }
.panel h2 { font-family: 'Poiret One', serif; color: var(--gold); margin: 0 0 12px; font-size: 24px; font-weight: 400; }
.panel h2 small { font-family: var(--ui); font-size: 13px; color: var(--muted); }
.lobby-players { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.lobby-players li { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.18); border-radius: 10px; padding: 8px 10px; flex-wrap: wrap; }
.pl-name { font-weight: 600; flex: 1; min-width: 120px; }
.pl-edit { display: flex; align-items: center; gap: 8px; }
.pl-edit select { padding: 4px 6px; font-size: 18px; }
.colors { display: flex; gap: 4px; }
.sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sw.on { border-color: var(--paper); box-shadow: 0 0 0 2px var(--ink); }
.sw:disabled { opacity: .15; cursor: not-allowed; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.opt { display: flex; gap: 10px; align-items: flex-start; background: rgba(0,0,0,.18); padding: 10px; border-radius: 9px; cursor: pointer; }
.opt input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.opt span { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.opt small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.opt.sel { align-items: center; }
.wait { text-align: center; font-size: 15px; }

/* ───────── partie : mise en page ───────── */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 390px; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-bottom: 1px solid rgba(212,173,87,.3); background: rgba(10,14,28,.55); }
.topbar .mini-logo { font-size: 22px; }
.tb-code b { letter-spacing: .15em; color: var(--paper); }
.tb-round, .tb-timer { color: var(--muted); font-size: 14px; }
.topbar .btn:first-of-type { margin-left: auto; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: #3fbf6a; margin-left: auto; }
.conn.off { background: #d9534f; animation: blink 1s infinite; }
.conn + .btn { margin-left: 0 !important; }
@keyframes blink { 50% { opacity: .3; } }
.board-wrap { display: grid; place-items: center; padding: 12px; min-height: 0; min-width: 0; overflow: hidden; }
.board-scale { position: relative; }
.side { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid rgba(212,173,87,.25); background: rgba(10,14,28,.35); }

/* ───────── plateau ───────── */
.board {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  background: var(--paper); border-radius: 6px;
  box-shadow: 0 0 0 6px var(--ink), 0 0 0 9px var(--gold2), 0 20px 60px rgba(0,0,0,.55);
  font-family: var(--ui); color: #1d1d1d;
}
.sq { position: absolute; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; overflow: hidden; }
.sq:hover { background: #fffaf0; z-index: 2; box-shadow: 0 0 0 3px var(--gold); }
.sq .in { position: absolute; display: flex; flex-direction: column; align-items: center; text-align: center; }
.band { width: 100%; height: 28px; border-bottom: 1.5px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.bld { display: flex; gap: 2px; align-items: center; }
.bld svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.4)); }
.bld.hotel svg { width: 38px; height: 19px; }
.nm { font-weight: 700; font-size: 12.5px; line-height: 1.12; text-transform: uppercase; padding: 7px 5px 0; letter-spacing: .01em; }
.nm.top { padding-top: 9px; font-size: 12px; }
.pr { margin-top: auto; padding-bottom: 8px; font-size: 13px; font-weight: 600; }
.ic { width: 52px; height: 52px; margin: 6px auto 0; color: #222; }
.ic.big { width: 72px; height: 72px; margin-top: 14px; }
.ic svg, .deck-ic svg { width: 100%; height: 100%; display: block; }
.own { position: absolute; bottom: 0; left: 0; right: 0; height: 0; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; }
.sq.owned .own { height: 30px; background: var(--owner); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.sq.owned .pr { visibility: hidden; }
.o-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--paper) !important; display: grid; place-items: center; font-size: 12px; text-shadow: none; }
.o-nm { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq.mortgaged .in::after {
  content: 'HYPOTHÉQUÉE'; position: absolute; inset: 28px 0 30px; display: grid; place-items: center;
  background: repeating-linear-gradient(-45deg, rgba(20,20,20,.18) 0 6px, rgba(255,255,255,.4) 6px 12px);
  font-weight: 700; font-size: 10px; letter-spacing: .05em; color: #6b1f19;
}
.sq.mine { box-shadow: inset 0 0 0 3px var(--gold); }
.sq.offer { animation: offer 1s ease-in-out infinite; z-index: 3; }
@keyframes offer { 50% { box-shadow: 0 0 0 5px var(--gold), 0 0 24px 6px rgba(212,173,87,.8); } }

.corner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; }
.corner.go { background: radial-gradient(circle at 50% 60%, #fbe8b3, var(--paper) 70%); }
.go-t { font-family: var(--deco); font-size: 36px; color: var(--red); line-height: 1; }
.go-s { font-size: 11px; font-weight: 700; text-transform: uppercase; line-height: 1.25; }
.go-arrow { font-size: 38px; color: var(--red); line-height: .8; }
.corner.jail .cell { position: absolute; right: 0; top: 0; width: 100px; height: 100px; background: #e9864a; border-left: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); display: flex; align-items: flex-end; justify-content: center; }
.corner.jail .cell span { position: relative; font-weight: 700; font-size: 12px; text-transform: uppercase; background: var(--paper); padding: 2px 6px 0; margin-bottom: 5px; border-radius: 3px; }
.bars { position: absolute; inset: 12px 14px 28px; background: repeating-linear-gradient(90deg, #2a2a2a 0 4px, transparent 4px 15px); border-top: 4px solid #2a2a2a; border-bottom: 4px solid #2a2a2a; }
.visit { position: absolute; bottom: 8px; left: 0; right: 0; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.corner.park .ic, .corner.gojail .ic { width: 64px; height: 64px; margin: 0; }
.park-t { font-weight: 700; text-transform: uppercase; font-size: 14px; line-height: 1.15; }
.pot { font-family: var(--deco); font-size: 20px; color: var(--green); min-height: 22px; }
.sq.top .nm, .sq.top .pr, .sq.top .ic, .sq.top .own > * { transform: rotate(180deg); }
.sq.top .in { flex-direction: column; }
.sq.long .nm { font-size: 10.5px; }
.nm { overflow-wrap: anywhere; hyphens: auto; }

/* centre */
.center {
  position: absolute; background: var(--ink); overflow: hidden; color: var(--text);
  box-shadow: inset 0 0 0 10px var(--ink), inset 0 0 0 12px var(--gold2), inset 0 0 0 20px var(--ink), inset 0 0 0 21px rgba(212,173,87,.5);
}
.center .sunburst { inset: -20%; -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 58%); mask: radial-gradient(circle, #000 0 18%, transparent 58%); }
.logo { position: absolute; left: 0; right: 0; top: 150px; text-align: center; }
.logo-main { font-family: var(--deco); font-size: 124px; color: var(--gold); letter-spacing: .06em; line-height: 1; text-shadow: 0 3px 0 #5e471c, 0 10px 40px rgba(212,173,87,.35); }
.logo-sub { font-family: 'Poiret One', serif; font-size: 20px; letter-spacing: .4em; text-transform: uppercase; color: var(--paper2); margin-bottom: 6px; }
.logo-rule { width: 420px; height: 2px; margin: 14px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.deck { position: absolute; bottom: 46px; width: 200px; height: 120px; border-radius: 12px; display: flex; align-items: center; gap: 12px; padding: 0 16px; font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .05em; border: 2px dashed rgba(212,173,87,.55); background: rgba(255,255,255,.03); }
.deck-ic { width: 58px; height: 58px; flex: none; }
.deck-chance { left: 46px; color: #f0a77f; transform: rotate(-6deg); }
.deck-caisse { right: 46px; color: #9cc6ef; transform: rotate(6deg); }
.c-event {
  position: absolute; top: 36px; z-index: 2; left: 50%; transform: translateX(-50%); width: 520px; padding: 12px 18px 10px; text-align: center;
  background: rgba(10,14,28,.85); border: 2px solid var(--ev, var(--gold)); border-radius: 12px; display: flex; flex-direction: column; gap: 4px;
}
.c-event small { text-transform: uppercase; letter-spacing: .15em; color: var(--muted); font-size: 13px; }
.c-event b { font-family: var(--deco); font-weight: 400; font-size: 28px; color: var(--ev, var(--gold)); }
.c-event span { font-size: 17px; }
.c-dice { position: absolute; left: 50%; top: 380px; transform: translateX(-50%); display: flex; gap: 22px; }
.die { width: 78px; height: 78px; border-radius: 14px; background: #fbf7ec; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 11px; box-shadow: inset 0 -5px 0 #d8cfb6, 0 6px 16px rgba(0,0,0,.5); }
.die i { width: 15px; height: 15px; border-radius: 50%; margin: auto; }
.die i.on { background: #1d1d1d; }
.die.rolling { animation: shake .14s infinite; }
@keyframes shake { 0% { transform: rotate(-12deg) translateY(-4px); } 50% { transform: rotate(10deg) translateY(3px); } 100% { transform: rotate(-12deg) translateY(-4px); } }
.c-status { position: absolute; left: 230px; right: 230px; top: 490px; text-align: center; font-size: 26px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.c-status .mini-pawn { width: 34px; height: 34px; font-size: 20px; }
.c-status small { font-size: 18px; color: var(--gold); font-weight: 400; }
.c-card {
  position: absolute; left: 50%; top: 50%; width: 420px; transform: translate(-50%, -50%); z-index: 5;
  background: var(--paper); color: #1d1d1d; border-radius: 14px; padding: 20px 26px; text-align: center;
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 7px var(--gold), 0 30px 80px rgba(0,0,0,.7); animation: cardIn .45s cubic-bezier(.2,1.4,.4,1);
}
.c-card.chance { background: #fbe3cf; }
.c-card.caisse { background: #dbe8f6; }
.cc-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.cc-head svg { width: 46px; height: 46px; }
.cc-head b { font-family: var(--deco); font-weight: 400; font-size: 32px; }
.c-card p { font-size: 22px; line-height: 1.35; margin: 12px 0; }
.c-card small { font-size: 16px; color: #555; }
@keyframes cardIn { from { transform: translate(-50%, -50%) scale(.4) rotate(-12deg); opacity: 0; } }

/* pions */
.pawns { position: absolute; inset: 0; pointer-events: none; }
.pawn {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--c); display: grid; place-items: center; font-size: 19px;
  box-shadow: 0 4px 8px rgba(0,0,0,.45), 0 0 0 1.5px #111; transition: left .14s ease-out, top .14s ease-out; z-index: 4;
}
.pawn.current { animation: bob 1.2s ease-in-out infinite; z-index: 6; box-shadow: 0 0 0 3px var(--gold), 0 6px 14px rgba(0,0,0,.5); }
.pawn.jailed { filter: saturate(.6); }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ───────── panneau latéral ───────── */
.actions { border-color: var(--gold); background: linear-gradient(180deg, #27315a, #1d2645); }
.act-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.act-title small { font-weight: 400; color: var(--muted); font-size: 14px; }
.act-title.alert { color: #ffb3aa; }
.act-text { margin: 0 0 10px; color: var(--paper2); font-size: 14px; line-height: 1.45; }
.act-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.act-btns.col { flex-direction: column; align-items: stretch; margin-top: 14px; }
.auction-info { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; }
.countdown { font-weight: 700; }
.countdown.hurry { color: #ff8b7e; animation: blink .5s infinite; }
.bid-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.lead { color: var(--gold); font-weight: 700; }
.players { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.pl { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; border: 1px solid transparent; }
.pl.cur { background: rgba(212,173,87,.13); border-color: rgba(212,173,87,.5); }
.pl.out { opacity: .4; }
.pl-main { flex: 1; min-width: 0; }
.pl-top { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.pl-top b { margin-right: 2px; }
.pl-chips { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; }
.chip { min-width: 18px; height: 14px; border-radius: 3px; background: var(--g); font-size: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; opacity: .75; padding: 0 3px; }
.chip.full { opacity: 1; box-shadow: 0 0 0 1.5px var(--gold); }
.pl-cash { text-align: right; display: flex; flex-direction: column; }
.pl-cash b { font-size: 16px; color: var(--paper); }
.pl-cash small { font-size: 11px; color: var(--muted); }
.trades h3 { margin: 0 0 8px; font-family: 'Poiret One', serif; color: var(--gold); font-size: 19px; }
.trade { background: rgba(0,0,0,.2); border-radius: 9px; padding: 10px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; line-height: 1.6; }
.tp { display: inline-block; border-left: 6px solid var(--g); background: rgba(255,255,255,.07); padding: 0 6px; border-radius: 3px; margin-right: 3px; line-height: 1.5; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid rgba(212,173,87,.35); margin-bottom: -12px; }
.tabs button { flex: 1; background: none; border: none; color: var(--muted); font: 600 13px var(--ui); padding: 9px 4px 7px; cursor: pointer; border-bottom: 2px solid transparent; position: relative; }
.tabs button.on { color: var(--gold); border-color: var(--gold); }
.tabs .dot { position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ff6b5b; }
.tabbody { border-top-left-radius: 0; border-top-right-radius: 0; min-height: 200px; max-height: 46vh; overflow-y: auto; }
.log, .chat { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 5px; }
.log li { line-height: 1.35; padding-left: 8px; border-left: 2px solid transparent; color: #d9d2bb; }
.log .k-turn { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.log .k-good { border-color: var(--green); }
.log .k-bad, .log .k-pay { border-color: var(--red); }
.log .k-card { border-color: #e9864a; }
.log .k-event { border-color: var(--gold); color: var(--gold); }
.log .k-big { color: var(--paper); font-weight: 700; border-color: var(--gold); }
.log .k-auction, .log .k-trade { border-color: #7fbcd9; }
.log .k-build { border-color: #2f8a57; }
.chat li { line-height: 1.4; }
.chatbar { display: flex; gap: 6px; margin-top: -6px; }
.my-props h3 { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; }
.mp-group { border-left: 6px solid var(--g); margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.mp { display: flex; justify-content: space-between; background: rgba(255,255,255,.05); border: none; color: var(--text); font: 14px var(--ui); padding: 7px 9px 5px; cursor: pointer; text-align: left; }
.mp:hover { background: rgba(255,255,255,.12); }
.mp-st { color: var(--muted); font-size: 13px; }
.rules ul { padding-left: 18px; line-height: 1.5; font-size: 14px; }

/* ───────── modales ───────── */
.modal { position: fixed; inset: 0; background: rgba(5,8,18,.7); display: grid; place-items: center; z-index: 50; padding: 14px; backdrop-filter: blur(3px); }
.modal-box { position: relative; background: var(--ink2); border: 1px solid var(--gold2); border-radius: 14px; padding: 22px; width: min(420px, 100%); max-height: 92vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal.wide .modal-box { width: min(760px, 100%); }
.modal-x { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; z-index: 2; }
.modal h2 { font-family: 'Poiret One', serif; color: var(--gold); font-weight: 400; margin: 0 0 14px; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.deed { background: var(--paper); color: #1d1d1d; border-radius: 8px; padding: 10px; margin: 8px 0 0; }
.deed.plain { padding: 18px; }
.deed.plain h2 { color: #1d1d1d; }
.deed-head { background: var(--g); color: #fff; text-align: center; padding: 10px; border: 2px solid #1d1d1d; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.deed-head small { text-transform: uppercase; letter-spacing: .15em; font-size: 11px; }
.deed-head h2 { color: #fff; font-family: var(--ui); font-weight: 700; text-transform: uppercase; justify-content: center; font-size: 20px; margin: 4px 0 0; }
.deed table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.deed td { padding: 5px 6px; }
.deed td:last-child { text-align: right; font-weight: 600; }
.deed tr.on { background: #f3d98c; }
.deed tr.sub td { font-size: 12px; color: #555; font-style: italic; text-align: center; }
.deed-foot { text-align: center; border-top: 1px solid #c9bfa3; padding-top: 10px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.deed .hint { color: #555; text-align: center; }
.deed .btn:not(.gold) { background: #e6dcc0; color: #1d1d1d; border-color: #b8a777; }
.trade-top { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.trade-top label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.tcol h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; }
.tprops { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; margin-bottom: 10px; }
.tprop { display: flex; gap: 8px; align-items: center; border-left: 6px solid var(--g); background: rgba(0,0,0,.2); padding: 6px 8px; border-radius: 3px; cursor: pointer; font-size: 14px; }
.tprop input { width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.tprop.dis { opacity: .4; }
.tcash { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 6px; flex-wrap: wrap; }
.tcash input { width: 110px; }
.end { text-align: center; position: relative; overflow: hidden; }
.end h2 { justify-content: center; position: relative; }
.end ol { list-style: none; padding: 0; position: relative; display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.end li { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.2); padding: 8px 12px; border-radius: 9px; }
.end li span:last-child { margin-left: auto; font-weight: 700; }
.end li:first-child { border: 1px solid var(--gold); }

/* ───────── notifications ───────── */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: var(--paper); color: var(--ink); padding: 10px 16px 8px; border-radius: 9px; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-weight: 600; max-width: 90vw; transition: opacity .5s, transform .5s; }
.toast.err { background: #ffd8d2; color: #6b1f19; }
.toast.out { opacity: 0; transform: translateY(10px); }

/* ───────── mobile ───────── */
@media (max-width: 900px) {
  .game { display: block; height: auto; }
  .topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(6px); flex-wrap: wrap; gap: 8px 10px; }
  .tb-round { display: none; }
  .board-wrap { padding: 8px 8px 12px; height: calc(100vw); }
  .side { border-left: none; padding: 8px; overflow: visible; }
  .actions { position: sticky; bottom: 6px; z-index: 15; box-shadow: 0 -6px 24px rgba(0,0,0,.5); order: -1; }
  .tabbody { max-height: none; }
  .lobby-grid { grid-template-columns: 1fr; }
  .tgrid { grid-template-columns: 1fr; }
  .room-code b { font-size: 26px; }
}
