:root {
  --bg: #0a0e1d;
  --panel: rgba(16, 20, 40, 0.86);
  --panel-solid: #141a33;
  --line: rgba(224, 178, 74, 0.22);
  --gold: #e0b24a;
  --gold-2: #f3d27a;
  --text: #f4f1ea;
  --muted: #9aa3c2;
  --red: #d9342b;
  --green: #2e9e5b;
  --blue: #1f6fd1;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { overflow: hidden; }
h1, h2, h3 { margin: 0 0 .5rem; font-weight: 700; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; margin-top: 1rem; }
p { margin: .4rem 0; line-height: 1.45; }
b { font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
input, select { font: inherit; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: .65rem .8rem; outline: none; min-width: 0; }
input:focus, select:focus { border-color: var(--gold); }
select option { background: var(--panel-solid); }

.screen { position: fixed; inset: 0; overflow: auto; }

/* buttons */
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: .75rem 1.2rem; cursor: pointer; color: var(--text); background: rgba(255,255,255,.08); transition: transform .12s, filter .12s, box-shadow .2s; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #b98a2b); color: #1a1407; box-shadow: 0 8px 24px rgba(224,178,74,.25); }
.btn.blue { background: linear-gradient(135deg, #4f8ff0, var(--blue)); }
.btn.ghost { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.btn.big { padding: 1rem 1.6rem; font-size: 1.05rem; border-radius: 14px; }
.btn.small { padding: .5rem .8rem; font-size: .85rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: var(--panel); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.mini { font: inherit; font-size: .8rem; font-weight: 600; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: var(--text); border-radius: 9px; padding: .4rem .6rem; cursor: pointer; }
.mini.gold { background: var(--gold); color: #1a1407; border-color: transparent; }
.mini:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- home ---------- */
.home { display: grid; place-items: center; padding: 1.5rem; }
.home-bg { position: fixed; inset: 0; background: url('/assets/keyart.jpg') center/cover no-repeat; z-index: 0; }
.home-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,29,.35), rgba(10,14,29,.92) 70%); }
.home-inner { position: relative; z-index: 1; max-width: 560px; text-align: center; margin-top: auto; padding-bottom: 2rem; }
.logo { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: clamp(3rem, 12vw, 5.5rem); letter-spacing: .08em; color: var(--gold); text-shadow: 0 10px 40px rgba(224,178,74,.35); margin: 0; }
.tagline { letter-spacing: .3em; text-transform: uppercase; color: var(--gold-2); font-size: .8rem; margin: 0 0 1rem; }
.lead { color: #d8dcea; font-size: 1.02rem; }
.home-actions { display: grid; gap: .8rem; margin: 1.4rem auto; max-width: 380px; }
.join-form { display: flex; gap: .5rem; }
.join-form input { flex: 1; text-transform: uppercase; letter-spacing: .2em; font-weight: 700; text-align: center; }
.features { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .35rem; color: var(--muted); font-size: .9rem; text-align: left; }
.features li::before { content: '◆ '; color: var(--gold); }

/* ---------- lobby ---------- */
.lobby { padding: 1.2rem; max-width: 1100px; margin: 0 auto; }
.lobby-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.code { font-family: 'Playfair Display', serif; font-size: 2.2rem; letter-spacing: .2em; color: var(--gold); line-height: 1; }
.invite { display: flex; gap: .5rem; flex: 1; min-width: 260px; max-width: 560px; }
.invite input { flex: 1; font-size: .85rem; }
.lobby-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; }
@media (max-width: 760px) { .lobby-grid { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; backdrop-filter: blur(10px); }
.player-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.player-row { display: flex; align-items: center; gap: .7rem; background: rgba(255,255,255,.04); border-radius: 12px; padding: .5rem; }
.player-row img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.host-tools { margin-top: 1rem; display: grid; gap: .6rem; }
.host-tools label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.char { font: inherit; color: var(--text); text-align: left; background: rgba(255,255,255,.04); border: 2px solid transparent; border-radius: 14px; padding: 0 0 .6rem; cursor: pointer; overflow: hidden; transition: transform .15s, border-color .15s; display: grid; gap: .25rem; }
.char img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.char b { padding: .3rem .6rem 0; font-size: .92rem; }
.char span { padding: 0 .6rem; font-size: .76rem; color: var(--muted); line-height: 1.3; }
.char:hover { transform: translateY(-2px); }
.char.sel { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(224,178,74,.2); }
.char.taken { opacity: .35; cursor: not-allowed; filter: grayscale(1); }
.name-form { display: flex; gap: .5rem; margin-top: .8rem; }
.name-form input { flex: 1; }

/* ---------- game ---------- */
.game { background: var(--bg); }
#board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud { position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; align-items: center; gap: .6rem; padding: calc(.6rem + var(--safe-t)) .7rem .4rem; }
.hud-brand { font-family: 'Playfair Display', serif; font-weight: 900; letter-spacing: .12em; color: var(--gold); font-size: 1rem; white-space: nowrap; display: flex; gap: .5rem; align-items: center; }
.pill { font-family: Inter, sans-serif; font-size: .7rem; letter-spacing: 0; background: rgba(224,178,74,.15); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .55rem; color: var(--gold-2); font-weight: 600; }
.ticker { flex: 1; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; font-size: .74rem; }
.ticker::-webkit-scrollbar { display: none; }
.tick { white-space: nowrap; background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: .25rem .6rem; color: var(--muted); }
.tick b { color: var(--text); }
.tick.up i { color: #4fd58a; font-style: normal; }
.tick.down i { color: #ff6b61; font-style: normal; }
.tick i { font-style: normal; }
.tick.flash { animation: flash .9s ease; }
@keyframes flash { 0% { background: rgba(224,178,74,.35); } 100% { background: var(--panel); } }
.hud-top-right { display: flex; gap: .4rem; }

.players { display: flex; gap: .5rem; padding: .2rem .7rem; overflow-x: auto; scrollbar-width: none; }
.players::-webkit-scrollbar { display: none; }
.pcard { display: flex; gap: .5rem; align-items: center; background: var(--panel); border: 1px solid rgba(255,255,255,.08); border-left: 4px solid var(--c); border-radius: 12px; padding: .35rem .6rem .35rem .45rem; min-width: 150px; backdrop-filter: blur(8px); transition: box-shadow .3s, transform .3s; flex: 0 0 auto; }
.pcard.active { box-shadow: 0 0 0 2px var(--c), 0 8px 30px rgba(0,0,0,.4); transform: translateY(-2px); }
.pcard.bankrupt { opacity: .4; filter: grayscale(1); }
.pcard img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.pname { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.pname .off { color: var(--red); font-size: .6rem; vertical-align: middle; }
.pcash { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; transition: color .3s; }
.pcash.up { color: #4fd58a; }
.pcash.down { color: #ff6b61; }
.pworth { font-size: .68rem; white-space: nowrap; }
@media (min-width: 900px) {
  .players { position: absolute; left: .7rem; top: 4.2rem; flex-direction: column; max-width: 260px; }
  .pcard { min-width: 220px; }
}

.turn-banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.9); background: var(--panel); border: 1px solid var(--c, var(--gold)); color: var(--text); padding: .8rem 1.4rem; border-radius: 999px; font-weight: 800; font-size: 1.05rem; box-shadow: 0 0 0 6px rgba(0,0,0,.25), 0 12px 40px rgba(0,0,0,.5); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none !important; white-space: nowrap; max-width: 92vw; text-overflow: ellipsis; overflow: hidden; }
.turn-banner.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.float-layer { position: absolute; inset: 0; pointer-events: none !important; }
.float { position: absolute; transform: translate(-50%, 0); font-weight: 800; font-size: 1rem; opacity: 0; transition: transform 1.3s ease-out, opacity 1.3s; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.float.pos { color: #4fd58a; }
.float.neg { color: #ff6b61; }
.float.go { opacity: 1; transform: translate(-50%, -60px); }

.hud-bottom { margin-top: auto; display: grid; gap: .5rem; padding: .5rem .7rem calc(.6rem + var(--safe-b)); }
.action-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; }
.turn-hint { width: 100%; text-align: center; font-size: .85rem; color: var(--muted); background: var(--panel); border-radius: 10px; padding: .4rem .7rem; backdrop-filter: blur(8px); }
.tabs { display: flex; gap: .4rem; justify-content: center; }
.tab { font: inherit; font-weight: 600; font-size: .85rem; color: var(--text); background: var(--panel); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: .5rem .9rem; cursor: pointer; backdrop-filter: blur(8px); }
.tab.on { background: var(--gold); color: #1a1407; border-color: transparent; }

.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 62vh; background: var(--panel-solid); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,.5); animation: up .25s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem .4rem; font-weight: 800; }
.sheet-body { overflow: auto; padding: 0 1rem calc(1rem + var(--safe-b)); }
@media (min-width: 900px) {
  .sheet { left: auto; right: .7rem; bottom: 5.5rem; width: 400px; max-height: 70vh; border-radius: 20px; border: 1px solid var(--line); }
}
.stat-row { display: flex; justify-content: space-between; gap: .6rem; font-size: .85rem; padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.own { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.own.mort { opacity: .6; }
.own .dot { width: 12px; height: 28px; border-radius: 4px; flex: 0 0 auto; }
.own-main { flex: 1; min-width: 0; }
.own-actions { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.comp { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.06); display: grid; grid-template-columns: 1fr 90px; gap: .3rem .8rem; align-items: center; }
.comp-main { min-width: 0; }
.comp-price { font-weight: 800; font-size: 1.05rem; }
.comp-price i { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--muted); }
.comp-price i.up { color: #4fd58a; }
.comp-price i.down { color: #ff6b61; }
.spark { width: 90px; height: 30px; }
.comp-trade { grid-column: 1 / -1; display: flex; gap: .4rem; align-items: center; }
.comp-trade input { width: 64px; padding: .4rem .5rem; text-align: center; }
.comp-trade .muted { flex: 1; }
.loglist { max-height: 40vh; overflow: auto; display: grid; gap: .25rem; font-size: .84rem; }
.log { padding: .3rem .5rem; border-radius: 8px; background: rgba(255,255,255,.04); color: #d8dcea; }
.log.hl { border-left: 3px solid var(--gold); }
.log.warn { border-left: 3px solid var(--red); }
.log.card { border-left: 3px solid var(--blue); }
.log.muted { color: var(--muted); }
.log.chat { background: rgba(31,111,209,.12); }
.chat-form { display: flex; gap: .4rem; margin-top: .6rem; }
.chat-form input { flex: 1; }
.rules { padding-left: 1.1rem; color: #d8dcea; font-size: .88rem; display: grid; gap: .3rem; }

/* modal + cards */
.modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,8,18,.55); backdrop-filter: blur(4px); padding: 1rem; z-index: 5; }
.modal-card { width: min(420px, 100%); background: var(--panel-solid); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: pop .3s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.modal-card.flip { animation: flip .6s cubic-bezier(.2,.8,.3,1); }
@keyframes flip { from { transform: rotateY(90deg); opacity: 0; } }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.prop .band { border-radius: 10px; padding: .55rem .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .78rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.prop .band.dark { background: #2a3152; }
.prop h3 { margin: .7rem 0 .4rem; font-size: 1.25rem; }
.rent { width: 100%; border-collapse: collapse; font-size: .86rem; }
.rent td { padding: .22rem 0; border-bottom: 1px dashed rgba(255,255,255,.08); }
.rent td:last-child { text-align: right; font-weight: 700; }
.price { margin-top: .6rem; color: var(--gold-2); font-weight: 600; font-size: .9rem; }
.range { display: grid; gap: .4rem; margin-top: .6rem; font-size: .9rem; }
.range input { width: 100%; accent-color: var(--gold); }
.news { text-align: center; }
.news-head { color: var(--gold); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.news p { font-size: 1.1rem; margin: .8rem 0 1rem; }
.gameover { text-align: center; }
.gameover h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--gold); }
.ranking { text-align: left; padding-left: 1.4rem; margin: .8rem 0 1.2rem; display: grid; gap: .3rem; }
.ranking li { display: flex; justify-content: space-between; }

.tile-info { position: absolute; right: .7rem; top: 4.2rem; width: min(320px, calc(100vw - 1.4rem)); background: var(--panel-solid); border: 1px solid var(--line); border-radius: 16px; padding: .9rem; z-index: 4; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: pop .25s ease; }
@media (max-width: 899px) { .tile-info { top: auto; bottom: 7.5rem; left: .7rem; right: .7rem; width: auto; } }

.toasts { position: absolute; top: calc(4rem + var(--safe-t)); left: 50%; transform: translateX(-50%); display: grid; gap: .4rem; z-index: 6; pointer-events: none !important; width: min(380px, 92vw); }
.toast { background: var(--panel-solid); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: .6rem .9rem; font-size: .88rem; opacity: 0; transform: translateY(-8px); transition: .25s; text-align: center; }
.toast.in { opacity: 1; transform: none; }
.toast.error { border-color: var(--red); }
.toast.chat { border-color: var(--blue); text-align: left; }

.player-row .btn-removebot { margin-left: auto; padding: .3rem .6rem; }

/* v0.2: classes with gender, business tab, items, cinematic intro */
.gender-pick { display: flex; gap: .4rem; margin-bottom: .6rem; }
.gender-pick button { font: inherit; font-weight: 700; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; }
.gender-pick button.on { background: var(--gold); color: #1a1407; border-color: transparent; }
.item { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.item.own { background: linear-gradient(90deg, rgba(224,178,74,.08), transparent); border-radius: 10px; padding-left: .4rem; }
.item-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.06); display: grid; place-items: center; font-size: 1.4rem; flex: 0 0 auto; overflow: hidden; }
.item-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-main { flex: 1; min-width: 0; }
.row-actions { display: flex; gap: .35rem; flex-wrap: wrap; margin: .4rem 0; }
.pname .debt { font-size: .75rem; }
.pworth .icons { letter-spacing: .05em; }
.prop .band .where { float: right; font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .85; }
.select { font: inherit; width: 100%; padding: .6rem .7rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: #141a33; color: var(--text); margin: .4rem 0 .2rem; }
.hud.cinematic .hud-top, .hud.cinematic .players, .hud.cinematic .hud-bottom { opacity: 0; pointer-events: none; transition: opacity .4s; }
.hud .hud-top, .hud .players, .hud .hud-bottom { transition: opacity .4s; }
.stat-row b.down { color: #ff7b72; }

/* ---------- v0.3: home redesign, card art, pay card, deals ---------- */
.home { display: block; padding: 0; }
.home-bg::after { background: linear-gradient(180deg, rgba(10,14,29,.15), rgba(10,14,29,.75) 55%, var(--bg) 100%); }
.home-inner { max-width: 1040px; margin: 0 auto; padding: min(10vh, 90px) 1.2rem 3rem; text-align: center; }
.hero { max-width: 620px; margin: 0 auto; }
.crest { width: 64px; height: 64px; margin: 0 auto .6rem; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 2rem; color: var(--gold); background: rgba(10,14,29,.6); box-shadow: 0 0 40px rgba(224,178,74,.35), inset 0 0 20px rgba(224,178,74,.15); }
.logo { background: linear-gradient(180deg, #fff2c4, var(--gold) 55%, #a97d1f); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 12px 30px rgba(224,178,74,.35)); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #eef0f8; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.countries { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.countries span { display: inline-flex; align-items: center; gap: .45rem; background: rgba(10,14,29,.7); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem .3rem .3rem; font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); }
.countries img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin: 2.4rem 0 1.6rem; text-align: left; }
.feature { display: grid; gap: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; backdrop-filter: blur(10px); transition: transform .2s, border-color .2s; }
.feature:hover { transform: translateY(-3px); border-color: var(--gold); }
.feature img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.feature div { padding: 0 1rem 1rem; display: grid; gap: .3rem; }
.feature b { font-size: 1rem; color: var(--gold-2); }
.feature span { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.howto { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; display: grid; gap: .5rem; text-align: left; color: #d8dcea; font-size: .92rem; }
.howto li { display: flex; gap: .7rem; align-items: center; }
.howto b { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--gold); color: #1a1407; display: grid; place-items: center; font-size: .85rem; }

/* property cards with art */
.prop { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #10152b; }
.prop .art { position: relative; aspect-ratio: 16/8; background: #1a2040 center/cover no-repeat; }
.prop .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,21,43,0) 40%, #10152b 100%); }
.prop .art .where { position: absolute; left: .6rem; top: .5rem; background: rgba(10,14,29,.75); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(6px); z-index: 1; }
.prop .art .ptitle { position: absolute; left: .8rem; right: .8rem; bottom: .5rem; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 1.35rem; text-shadow: 0 2px 10px rgba(0,0,0,.8); line-height: 1.1; z-index: 1; }
.prop .band { border-radius: 0; padding: .4rem .8rem; }
.prop .band .where { float: none; }
.prop .inner { padding: .6rem .8rem .8rem; }
.prop .inner h3 { margin: 0 0 .4rem; }
.prop .inner .price { margin: .5rem 0 0; }

/* bank card tap + coins */
.paycard { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 1rem; z-index: 4; pointer-events: none !important; }
.pc-card { width: 190px; height: 118px; border-radius: 14px; background: linear-gradient(135deg, var(--c, #2a3152), #0f1430 70%); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 20px 50px rgba(0,0,0,.6); padding: .8rem; position: relative; opacity: 0; animation: cardtap 1.4s cubic-bezier(.3,.9,.3,1) forwards; }
.pc-chip { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #f6d98a, #b98a2b); }
.pc-name { position: absolute; left: .8rem; bottom: 1.9rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: #fff; opacity: .9; }
.pc-num { position: absolute; left: .8rem; bottom: .7rem; font-size: .78rem; letter-spacing: .1em; color: #fff; opacity: .7; font-variant-numeric: tabular-nums; }
.pc-card::after { content: 'M'; position: absolute; right: .8rem; top: .5rem; font-family: 'Playfair Display', serif; font-weight: 900; color: var(--gold); font-size: 1.3rem; }
@keyframes cardtap { 0% { transform: translate(-140px, -90px) rotate(-18deg); opacity: 0; } 30% { transform: translate(0, 0) rotate(-4deg); opacity: 1; } 45% { transform: translate(6px, 4px) rotate(-2deg); } 80% { transform: translate(6px, 4px) rotate(-2deg); opacity: 1; } 100% { transform: translate(60px, -40px) rotate(8deg); opacity: 0; } }
.pc-terminal { width: 120px; height: 150px; border-radius: 14px; background: #0f1430; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 50px rgba(0,0,0,.6); display: grid; align-content: center; justify-items: center; gap: .4rem; animation: termin 1.4s ease forwards; }
@keyframes termin { 0% { opacity: 0; transform: scale(.9); } 20% { opacity: 1; transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
.pc-amount { font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pc-status { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pc-status.ok { color: #4fd58a; }
.coin { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c4, var(--gold) 55%, #a97d1f); box-shadow: 0 2px 6px rgba(0,0,0,.5); pointer-events: none; z-index: 5; transform: translate(-50%, -50%); }

/* deals */
.deal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .6rem; }
.deal-side { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .6rem; display: grid; gap: .3rem; align-content: start; }
.deal-side h4 { margin: 0 0 .2rem; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); }
.deal-side label { display: flex; align-items: center; gap: .4rem; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.deal-side label .muted { margin-left: auto; font-size: .75rem; }
.deal-side label .dot { width: 10px; height: 18px; border-radius: 3px; flex: 0 0 auto; }
.deal-side input[type=number] { width: 100%; padding: .4rem .5rem; margin-top: .3rem; }
.deal-side .none { font-size: .8rem; color: var(--muted); }
.deal-sum { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; margin: .6rem 0; font-size: .9rem; }
.deal-sum .arrow { font-size: 1.4rem; color: var(--gold); text-align: center; }
.deal-sum ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.deal-sum li { background: rgba(255,255,255,.05); border-radius: 8px; padding: .3rem .5rem; }
.deal-sum li.cash { color: var(--gold-2); font-weight: 700; }
.deal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.deal-head img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.pcard.dealable { cursor: pointer; }
.pcard.dealable:hover { box-shadow: 0 0 0 2px var(--gold); }
@media (max-width: 480px) { .deal-grid { grid-template-columns: 1fr; } .pc-card { width: 160px; height: 100px; } }

/* icons */
.ic { width: 1.1em; height: 1.1em; fill: currentColor; vertical-align: -0.2em; flex: 0 0 auto; }
.btn .ic, .tab .ic, .mini .ic { margin-right: .15em; }
.icon-btn .ic { width: 1.25em; height: 1.25em; vertical-align: middle; }
.ic.tag { width: .95em; height: .95em; margin-left: .25em; color: var(--gold-2); }
.pname .off .ic { color: var(--red); width: .7em; height: .7em; }
.pworth .icons .ic { width: 1em; height: 1em; color: var(--gold-2); margin-left: .1em; }
.item-icon .ic { width: 26px; height: 26px; color: var(--gold-2); }
.cflag { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; vertical-align: -3px; margin-right: .3em; border: 1px solid rgba(255,255,255,.25); }
.prop .art .where .cflag { width: 16px; height: 16px; }
.char b .ic { color: var(--gold); }
.turn-banner { display: flex; align-items: center; gap: .5rem; }
.turn-banner .ic { width: 1.3em; height: 1.3em; color: var(--c, var(--gold)); }
.tick i .ic { width: .9em; height: .9em; }
.comp-price i .ic { width: .9em; height: .9em; }
.art-head { margin: -1.1rem -1.1rem .8rem; aspect-ratio: 16/6; background: #1a2040 center/cover no-repeat; border-radius: 20px 20px 0 0; display: flex; align-items: flex-end; padding: .8rem 1rem; position: relative; }
.art-head::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,51,0) 30%, var(--panel-solid) 100%); border-radius: inherit; }
.art-head h3, .art-head .news-head { position: relative; z-index: 1; margin: 0; }
.trophy-art .ic { width: 64px; height: 64px; color: var(--gold); filter: drop-shadow(0 8px 24px rgba(224,178,74,.5)); }
.gender-pick .ic { width: 1.1em; height: 1.1em; }
.deal-sum .arrow .ic { width: 1.6em; height: 1.6em; }

/* ---------- v0.4: home screen with 3D showcase, coins, parallax, tilt cards ---------- */
.home { --mx: 0; --my: 0; overflow-x: hidden; display: block; }
.home-inner { width: 100%; box-sizing: border-box; }
.home-bg { overflow: hidden; }
.home-bg-img { position: absolute; inset: -4%; background: url('/assets/keyart.jpg') center/cover no-repeat; transform: translate(calc(var(--mx) * -12px), calc(var(--my) * -8px)) scale(1.04); animation: kenburns 38s ease-in-out infinite alternate; will-change: transform; }
@keyframes kenburns { from { scale: 1; } to { scale: 1.08; } }
.home-bg::after { background: radial-gradient(ellipse at 50% 20%, rgba(10,14,29,0) 0%, rgba(10,14,29,.55) 55%, rgba(10,14,29,.95) 100%), linear-gradient(180deg, rgba(10,14,29,.1), rgba(10,14,29,.6) 50%, var(--bg) 100%); }
.coins { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.coins i { position: absolute; left: var(--x); bottom: -30px; width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c4, var(--gold) 45%, #8a6418 100%); box-shadow: 0 0 12px rgba(224,178,74,.5); opacity: 0; animation: coinrise var(--t) linear var(--d) infinite; }
@keyframes coinrise { 0% { transform: translateY(0) rotateY(0deg); opacity: 0; } 8% { opacity: var(--o); } 90% { opacity: var(--o); } 100% { transform: translateY(-110vh) rotateY(900deg); opacity: 0; } }
.home-inner { max-width: 1120px; padding-top: min(7vh, 64px); margin: 0 auto; }
.hero2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.5rem; align-items: center; text-align: left; margin-bottom: 1.6rem; }
.hero-copy { transform: translate(calc(var(--mx) * 6px), calc(var(--my) * 4px)); }
.crest { position: relative; margin: 0 0 .6rem; }
.crest::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px dashed rgba(224,178,74,.5); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo { background: linear-gradient(100deg, #fff2c4 0%, var(--gold) 30%, #a97d1f 50%, var(--gold) 70%, #fff2c4 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s ease-in-out infinite; line-height: 1; }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.tagline { display: flex; align-items: center; gap: .7rem; margin: .4rem 0 1rem; }
.tagline span { opacity: 0; transform: translateY(8px); animation: rise .7s ease forwards; }
.tagline span:nth-child(3) { animation-delay: .25s; }
.tagline span:nth-child(5) { animation-delay: .5s; }
.tagline i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); opacity: 0; animation: rise .5s ease .6s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.lead { max-width: 520px; }
.home-actions { margin: 1.4rem 0; max-width: 420px; }
.btn.cta { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; overflow: hidden; animation: ctaglow 2.8s ease-in-out infinite; }
@keyframes ctaglow { 0%, 100% { box-shadow: 0 8px 24px rgba(224,178,74,.25); } 50% { box-shadow: 0 10px 36px rgba(224,178,74,.55), 0 0 0 6px rgba(224,178,74,.12); } }
.btn.cta::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: sweep 3.6s ease-in-out infinite; }
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 140%; } }
.dice-pair { display: inline-flex; gap: 4px; perspective: 200px; }
.dice-pair i { width: 18px; height: 18px; border-radius: 4px; background: #fffbf0 radial-gradient(circle, #1a1407 1.6px, transparent 2px) center/6px 6px; background-position: 0 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); transition: transform .5s cubic-bezier(.3,1.6,.4,1); }
.dice-pair i:first-child { background-size: 9px 9px; }
.btn.cta:hover .dice-pair i { transform: rotate(540deg) translateY(-3px); }
.btn.cta:hover .dice-pair i:last-child { transform: rotate(-450deg) translateY(-4px); transition-delay: .06s; }
.stamps { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; margin-top: .4rem; }
.stamp { display: grid; justify-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-2); opacity: 0; animation: rise .6s ease calc(.4s + var(--i) * .12s) forwards; }
.stamp img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(10,14,29,.7), 0 0 0 5px rgba(224,178,74,.35), 0 10px 24px rgba(0,0,0,.5); transition: transform .35s cubic-bezier(.3,1.5,.5,1), box-shadow .3s; }
.stamp:hover img { transform: translateY(-4px) rotate(-6deg) scale(1.06); box-shadow: 0 0 0 4px rgba(10,14,29,.7), 0 0 0 5px var(--gold), 0 14px 30px rgba(224,178,74,.35); }
.showcase { display: grid; gap: .6rem; justify-items: center; }
.showcase-frame { position: relative; width: min(100%, 360px); aspect-ratio: 9/10; }
#showcase { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.showcase-glow { position: absolute; left: 50%; bottom: 8%; width: 70%; height: 24%; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(224,178,74,.45), rgba(224,178,74,0) 70%); filter: blur(6px); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.showcase-info { text-align: center; display: grid; gap: .25rem; min-height: 86px; }
.showcase-info b { font-family: 'Playfair Display', serif; font-size: 1.45rem; color: var(--gold-2); transition: opacity .25s, transform .25s; }
.showcase-info span { color: var(--muted); font-size: .9rem; transition: opacity .25s; }
.showcase-info .swap { opacity: 0; transform: translateY(6px); }
.showcase-dots { display: flex; gap: .4rem; justify-content: center; margin-top: .4rem; }
.showcase-dots button { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--gold); background: transparent; padding: 0; cursor: pointer; transition: transform .2s, background .2s; }
.showcase-dots button.on { background: var(--gold); transform: scale(1.3); box-shadow: 0 0 10px var(--gold); }
.ticker-board { margin: 0 0 1.8rem; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(10,14,29,.9), rgba(16,20,40,.9)); overflow: hidden; position: relative; padding: .55rem 0; box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
.ticker-board::before, .ticker-board::after { content: ''; position: absolute; top: 0; bottom: 0; width: 70px; z-index: 2; pointer-events: none; }
.ticker-board::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker-board::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.tk-track { display: flex; gap: 2.6rem; width: max-content; animation: marquee 32s linear infinite; }
.ticker-board:hover .tk-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: .5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk b { color: var(--gold-2); letter-spacing: .06em; }
.tk em { font-style: normal; color: var(--muted); font-size: .8rem; }
.tk strong { color: #fff; }
.tk i { font-style: normal; font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; gap: .15rem; }
.tk.up i { color: var(--green); }
.tk.down i { color: var(--red); }
.deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 0 0 2.2rem; text-align: left; perspective: 1200px; }
.pc { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; backdrop-filter: blur(10px); transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .15s ease-out, border-color .2s, box-shadow .3s; transform-style: preserve-3d; }
.pc:hover { border-color: var(--gold); box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px rgba(224,178,74,.25); }
.pc::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.14), transparent 45%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.pc:hover::after { opacity: 1; }
.pc .band { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #0e1020; background: var(--band); padding: .4rem .9rem; }
.pc .art { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.pc .art img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform .6s ease; }
.pc:hover .art img { transform: scale(1.08); }
.pc .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(16,20,40,.9)); }
.pc h3 { margin: -1.6rem .9rem .3rem; position: relative; font-family: 'Playfair Display', serif; font-size: 1.15rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.pc p { margin: 0 .9rem 1rem; font-size: .86rem; color: var(--muted); line-height: 1.5; }
.steps { list-style: none; padding: 0; margin: 0 auto 2rem; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; text-align: left; position: relative; }
.steps::before { content: ''; position: absolute; top: 22px; left: 12%; right: 12%; border-top: 1px dashed rgba(224,178,74,.4); }
.steps li { position: relative; display: grid; gap: .3rem; padding: 0 .4rem; }
.steps .num { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2c4, var(--gold) 50%, #8a6418); color: #1a1407; font-weight: 900; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-size: 1.2rem; box-shadow: 0 0 0 6px var(--bg), 0 8px 20px rgba(224,178,74,.35); margin-bottom: .4rem; }
.steps b { color: var(--gold-2); }
.steps p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * .1s); }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 820px) {
  .hero2 { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { transform: none; }
  .crest { margin-left: auto; margin-right: auto; }
  .tagline { justify-content: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .home-actions { margin-left: auto; margin-right: auto; }
  .stamps { justify-content: center; gap: .5rem .55rem; }
  .stamp { font-size: .62rem; }
  .stamp img { width: 48px; height: 48px; }
  .showcase-frame { width: min(100%, 300px); }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .home-bg-img, .logo, .btn.cta, .btn.cta::after, .tk-track, .crest::before { animation: none; }
  .reveal, .tagline span, .tagline i, .stamp { opacity: 1; transform: none; animation: none; }
}


/* ---------- v0.5: command deck, holdings, turn card, rivalry, expedition ---------- */
.pill.vault { margin-left: .4rem; display: inline-flex; align-items: center; gap: .3rem; background: linear-gradient(135deg, rgba(224,178,74,.18), rgba(224,178,74,.05)); border: 1px solid rgba(224,178,74,.45); color: var(--gold-2); }
.pill.vault b { color: #fff; font-variant-numeric: tabular-nums; }
.pcard { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); border-left: 4px solid var(--c); background: linear-gradient(135deg, rgba(20,24,48,.9), rgba(10,14,29,.82)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.pcard::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120px 60px at 0% 0%, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); pointer-events: none; }
.pcard.active { box-shadow: 0 0 0 2px var(--c), 0 0 24px color-mix(in srgb, var(--c) 45%, transparent), 0 8px 30px rgba(0,0,0,.4); }
.pcard.active::after { content: ''; position: absolute; right: .5rem; top: .5rem; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); animation: pulse 1.4s ease-in-out infinite; }
.pcard img { border-radius: 10px; border: 1px solid rgba(255,255,255,.12); }
.pinfo { min-width: 0; position: relative; }
.pname .cups { color: var(--gold); margin-left: .3rem; font-size: .75rem; vertical-align: middle; }
.deeds { display: flex; gap: 2px; margin-top: .25rem; flex-wrap: wrap; max-width: 170px; }
.deeds i { width: 9px; height: 13px; border-radius: 2px; display: block; opacity: .95; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.deeds i.built { box-shadow: inset 0 -4px 0 rgba(255,255,255,.55); }
.deeds i.mort { opacity: .3; }
.holdings { margin: .3rem .7rem 0; background: linear-gradient(135deg, rgba(20,24,48,.9), rgba(10,14,29,.82)); border: 1px solid rgba(224,178,74,.25); border-radius: 14px; padding: .45rem .6rem; cursor: pointer; backdrop-filter: blur(8px); max-width: 100%; }
.holdings:hover { border-color: var(--gold); }
.hd-head { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); display: flex; align-items: center; gap: .35rem; }
.hd-head .muted { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: auto; }
.hd-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 700; padding: .15rem .5rem .15rem .3rem; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.chip i { width: 8px; height: 14px; border-radius: 2px; background: var(--c); }
.chip small { font-size: .62rem; color: var(--gold-2); background: rgba(224,178,74,.15); border-radius: 999px; padding: 0 .35rem; }
.chip.mort { opacity: .45; text-decoration: line-through; }
.chip.item { padding: .2rem .45rem; color: var(--gold-2); }
.chip .ic { width: .95em; height: .95em; }
.holdings p { margin: .2rem 0 0; }
@media (min-width: 900px) {
  .holdings { position: absolute; left: .7rem; top: calc(4.2rem + var(--players-h, 0px)); width: 236px; margin: 0; }
}
@media (max-width: 899px) { .holdings { display: none; } }

/* command deck */
.hud-bottom { gap: .45rem; }
.action-bar { gap: .55rem; }
.btn.big { padding: .8rem 1.6rem; border-radius: 999px; }
.btn.gold.big { box-shadow: 0 10px 30px rgba(224,178,74,.3), inset 0 1px 0 rgba(255,255,255,.4); }
.btn.turbo { background: linear-gradient(135deg, #ff9a3d, #d9342b); color: #fff; border: none; box-shadow: 0 10px 30px rgba(217,52,43,.35); animation: turbo-glow 1.6s ease-in-out infinite; }
@keyframes turbo-glow { 0%, 100% { box-shadow: 0 10px 30px rgba(217,52,43,.35); } 50% { box-shadow: 0 10px 40px rgba(255,154,61,.65), 0 0 0 5px rgba(255,154,61,.15); } }
.turn-hint { border: 1px solid rgba(224,178,74,.18); border-radius: 999px; font-weight: 600; color: var(--text); padding: .45rem 1rem; max-width: 640px; margin: 0 auto; }
.tabs .tab { border-radius: 12px; }

/* big turn card */
.turn-card { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) translateX(-60px); display: flex; align-items: center; gap: .9rem; padding: .7rem 1.4rem .7rem .7rem; border-radius: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--c, #e0b24a) 35%, #0f1430), rgba(10,14,29,.92) 70%); border: 1px solid color-mix(in srgb, var(--c, #e0b24a) 70%, transparent); box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 30px 70px rgba(0,0,0,.6), 0 0 60px color-mix(in srgb, var(--c, #e0b24a) 30%, transparent); opacity: 0; pointer-events: none !important; z-index: 6; transition: opacity .3s, transform .45s cubic-bezier(.2,1,.3,1); overflow: hidden; }
.turn-card::after { content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-20deg); }
.turn-card.in { opacity: 1; transform: translate(-50%, -50%); }
.turn-card.in::after { animation: sweep 1.1s ease-out .15s forwards; }
.turn-card img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; border: 2px solid var(--c, #e0b24a); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.tc-eyebrow { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); font-weight: 800; }
.tc-name { font-family: 'Playfair Display', serif; font-size: 1.7rem; font-weight: 900; line-height: 1.05; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.tc-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.tc-dice { display: flex; gap: 6px; margin-left: .5rem; }
.tc-dice i { width: 22px; height: 22px; border-radius: 5px; background: #fffbf0 radial-gradient(circle, #1a1407 2px, transparent 2.6px) center/7px 7px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.4); animation: dice-tumble 1.2s cubic-bezier(.3,1.4,.4,1) both; }
.tc-dice i:last-child { animation-delay: .08s; background-size: 10px 10px; }
@keyframes dice-tumble { from { transform: translateY(-30px) rotate(-200deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* rivalry strip */
.rival-strip { position: absolute; left: 50%; top: 3.6rem; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; background: linear-gradient(180deg, rgba(20,24,48,.92), rgba(10,14,29,.85)); border: 1px solid rgba(224,178,74,.35); border-radius: 999px; padding: .3rem .5rem; backdrop-filter: blur(8px); z-index: 2; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.rv-side { display: flex; align-items: center; gap: .4rem; font-size: .75rem; padding: .1rem .3rem; border-radius: 999px; }
.rv-side img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; border: 2px solid var(--c); }
.rv-side b { display: block; white-space: nowrap; }
.rv-side span { font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-side .up { color: #4fd58a; }
.rv-side .down { color: #ff6b61; }
.rv-side.lead { background: rgba(224,178,74,.12); }
.rv-mid { display: grid; justify-items: center; color: var(--gold); font-size: 1.1rem; line-height: 1; }
.rv-mid small { font-size: .6rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 899px) { .rival-strip { top: 8.4rem; padding: .25rem .4rem; gap: .4rem; } .rival-strip .rv-side b { font-size: .7rem; } }

/* player menu + expedition modal */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .6rem 0; }
.menu-btn { display: grid; justify-items: center; gap: .25rem; text-align: center; padding: .9rem .6rem; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: var(--text); font: inherit; cursor: pointer; transition: border-color .2s, transform .2s; }
.menu-btn:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); }
.menu-btn:disabled { opacity: .45; cursor: default; }
.menu-btn .ic { width: 1.8em; height: 1.8em; color: var(--gold); }
.menu-btn b { font-size: .95rem; }
.menu-btn span { font-size: .75rem; color: var(--muted); }
@media (max-width: 480px) { .menu-grid { grid-template-columns: 1fr; } }
.exp-ring { display: flex; justify-content: center; gap: .35rem; margin: .4rem 0; flex-wrap: wrap; }
.camp { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #dfe7f1; position: relative; }
.camp .ic { width: 1.4em; height: 1.4em; }
.camp.gain, .camp.vault { color: #9fe0b0; }
.camp.vault { color: #ffd27a; border-color: rgba(255,210,122,.6); }
.camp.loss, .camp.pct { color: #ff8a73; }
.camp.here { box-shadow: 0 0 0 2px var(--gold), 0 0 14px var(--gold); background: rgba(224,178,74,.2); }
.select.small { font-size: .8rem; padding: .3rem .5rem; margin-top: .3rem; width: 100%; }

/* phones: compact player cards so three or four magnates fit side by side */
@media (max-width: 899px) {
  .players { gap: .4rem; padding: .2rem .5rem; }
  .pcard { min-width: 0; gap: .4rem; padding: .3rem .5rem .3rem .4rem; border-radius: 11px; }
  .pcard img { width: 32px; height: 32px; border-radius: 8px; }
  .pcard .pname { font-size: .78rem; max-width: 7.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pcard .pcash { font-size: .95rem; }
  .pcard .pworth { display: none; } /* class + net worth live in the Assets sheet on phones */
}
