/* Road Nation design tokens. Red is the brand; green and amber are only for gains and warnings. */
:root {
  --bg: #161616;
  --bg-deep: #111111;
  --panel: #1e1e1e;
  --panel-2: #222222;
  --raise: #262626;
  --line: rgba(255, 255, 255, .07);
  --line-2: #333333;
  --text: #ededed;
  --text-2: #a3a3a3;
  --text-3: #6b6b6b;
  --red: #e0263a;
  --red-hi: #f03a4d;
  --red-soft: rgba(224, 38, 58, .12);
  --green: #3ddc84;
  --amber: #f5a524;
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 208px;
  --top-h: 64px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Archivo", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  color: var(--text); font: 400 14px/1.55 var(--sans); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
}
/* Fine film grain over everything: adds richness without visible pattern. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red-hi); }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.amber { color: var(--red-hi); }
.green { color: var(--green); }
.red { color: var(--red-hi); }
.num, td.r, .v, .tile .v { font-variant-numeric: tabular-nums; }
b { font-weight: 600; color: #fff; }
::selection { background: var(--red); color: #fff; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--red); }
.logo:hover { color: var(--red); }
.mark { width: 28px; height: 28px; color: var(--red); flex: none; }
.wordmark { font: 800 15px/1 var(--display); font-stretch: 125%; letter-spacing: .06em; color: #fff; }
.wordmark b { color: var(--red); font-weight: 800; margin-left: .32em; }

.clock { display: inline-flex; align-items: baseline; gap: 6px; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 500; }
.clock-zone { font-size: 10px; letter-spacing: .1em; color: var(--text-3); font-weight: 600; }

.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(224, 38, 58, .6); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(224, 38, 58, .55); } 70% { box-shadow: 0 0 0 7px rgba(224, 38, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 38, 58, 0); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 20px; padding: 0 24px;
  background: rgba(17, 17, 17, .86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { width: calc(var(--sidebar-w) - 24px); flex: none; }
.stats { flex: 1; display: flex; align-items: center; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat { height: 46px; padding: 0 13px; border-left: 1px solid var(--line); white-space: nowrap; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .k { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
.stat .v { font-size: 14px; font-weight: 600; color: var(--text); }
.stat .v.r { color: var(--red-hi); }
.stat .v.g { color: var(--green); }
.stat .bar { width: 84px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin-top: 5px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 3px; transition: width .6s var(--ease); }
.bar i.hp { background: var(--red); }
.bar i.xp { background: #fff; }
.stat .v small { color: var(--text-3); font-weight: 500; margin-left: 4px; }
.topbar-end { display: flex; align-items: center; gap: 18px; flex: none; }
.logout { font-size: 13px; color: var(--text-2); padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.logout:hover { color: #fff; border-color: #555; }
.pulse-up { animation: up 1s var(--ease); }
.pulse-down { animation: down 1s var(--ease); }
@keyframes up { 0% { color: var(--green); } 100% { color: var(--text); } }
@keyframes down { 0% { color: var(--red-hi); } 100% { color: var(--text); } }

/* ---------- layout ---------- */
.layout { display: flex; align-items: flex-start; }
.sidebar {
  position: sticky; top: var(--top-h); flex: 0 0 var(--sidebar-w); width: var(--sidebar-w);
  height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 2px 0 12px;
  border-right: 1px solid var(--line); background: var(--bg-deep);
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.nav-group { padding: 0 8px; }
.nav-group h3 { margin: 10px 0 3px; padding: 4px 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: linear-gradient(90deg, var(--red), #b81d2f); border-radius: 4px; box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset; }
.nav-group a {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 3px 10px; margin: 0; border-radius: var(--radius-sm); color: #c9c9c9; font-size: 13px; line-height: 1.45; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-group a:hover { background: rgba(255, 255, 255, .045); color: #fff; }
.nav-group a.active { background: var(--red-soft); color: #fff; }
.nav-group a.active::before { content: ""; position: absolute; left: -8px; top: 4px; bottom: 4px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-group a.soon { color: #5c5c5c; }
.nav-group a.soon:hover { background: transparent; color: #7a7a7a; }
.tag { font-size: 9.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-3); padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .05); }
.tag.hot { color: #fff; background: var(--red); }
.tag.alert { color: #fff; background: var(--red); font-variant-numeric: tabular-nums; }

.main { flex: 1; min-width: 0; padding: 20px 28px 16px; max-width: 1240px; }
.page-head { margin-bottom: 12px; }
.page-head h1 { margin: 0; font: 800 23px/1.15 var(--display); font-stretch: 112%; letter-spacing: -.005em; color: #fff; }
.page-head p { margin: 3px 0 0; color: var(--text-2); font-size: 14px; max-width: 720px; }
.page-head p:empty { display: none; }
.foot { color: var(--text-3); font-size: 12px; text-align: center; padding: 28px 0 8px; }

/* ---------- surfaces ---------- */
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 140px), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .7);
  animation: rise .35s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sub {
  margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 12px;
}
.sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sub:first-child { margin-top: 0; }
.box { border: 1px solid var(--line); background: var(--bg-deep); border-radius: var(--radius); padding: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-deep); }
.tile .k { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tile .v { margin-top: 2px; font: 700 20px/1.2 var(--sans); letter-spacing: -.01em; color: #fff; }
.tile .v.amber { color: var(--red-hi); }
.tile .v.green { color: var(--green); }
p { margin: 8px 0; }
p.tightp { margin: 4px 0 8px; }

/* ---------- messages ---------- */
#flash:empty { display: none; }
#flash { margin-bottom: 14px; }
.msg {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; font-weight: 500; animation: rise .3s var(--ease);
}
.msg::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.msg:empty { display: none; }
.msg.ok { border-color: rgba(61, 220, 132, .25); background: rgba(61, 220, 132, .07); color: #c9f5dc; }
.msg.ok::before { background: var(--green); }
.msg.bad { border-color: rgba(224, 38, 58, .35); background: rgba(224, 38, 58, .08); color: #ffd3d8; }
.msg.bad::before { background: var(--red); }
.msg.warn { border-color: rgba(245, 165, 36, .3); background: rgba(245, 165, 36, .07); color: #fde7c2; }
.msg.warn::before { background: var(--amber); }
.panel > .msg:first-child { margin-bottom: 10px; }
.panel > .msg + .strip, .msg + .msg { margin-top: 8px; }

/* event feed */
.cards { display: flex; flex-direction: column; }
.card { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.card .kind { justify-self: start; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.card-head { display: contents; }
.card-head .tag { display: none; }
.card-body { grid-column: 2; grid-row: 1; color: var(--text); }
.card time { grid-column: 3; grid-row: 1; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.card.new .card-body::after { content: "New"; margin-left: 8px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red-hi); }
.card.k-attack .kind { background: var(--red-soft); color: var(--red-hi); }
.card.k-money .kind { background: rgba(61, 220, 132, .1); color: var(--green); }
.card.k-promotion .kind { background: rgba(255, 255, 255, .1); color: #fff; }
.card.k-jail .kind { background: rgba(120, 160, 255, .1); color: #9db8ff; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 0 10px 7px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); border-bottom: 1px solid var(--line);
}
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(255, 255, 255, .018); }
table.data th:first-child, table.data td:first-child { padding-left: 4px; }
table.data th:last-child, table.data td:last-child { padding-right: 4px; }
table.data td.r, table.data th.r { text-align: right; }
table.data tr.locked td { color: var(--text-3); }
table.data tr.locked .btn { visibility: hidden; }
table.kv td { padding: 7px 4px; }
table.kv td:first-child { color: var(--text-2); width: 42%; }
table.kv td:last-child { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.chance { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.chance .track { width: 64px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.chance .track i { display: block; height: 100%; border-radius: 4px; }

/* ---------- forms ---------- */
label { display: block; margin-bottom: 10px; color: var(--text-2); font-size: 12.5px; font-weight: 500; }
input, select {
  display: block; width: 100%; height: 36px; margin-top: 5px; padding: 0 12px; background: var(--bg-deep); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 500 14px var(--sans); font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #555; }
input:hover, select:hover { border-color: #444; }
input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(224, 38, 58, .2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }
.row > .btn { flex: 0 0 auto; }
.row label { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px;
  background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font: 600 13.5px var(--sans); cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: rgba(255, 255, 255, .05); border-color: #4a4a4a; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(224, 38, 58, .3); }
.btn.go { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 6px 16px -8px rgba(224, 38, 58, .8); }
.btn.go:hover { background: var(--red-hi); border-color: var(--red-hi); }
.btn.small { height: 28px; padding: 0 11px; font-size: 12.5px; }
.btn.big { width: 100%; height: 46px; font-size: 15px; }
.btn:disabled, .btn:disabled:hover { background: rgba(255, 255, 255, .03); border-color: var(--line); color: #555; box-shadow: none; cursor: not-allowed; transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips .btn { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 99px; }

/* ---------- gambling ---------- */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; }
.reels span {
  display: grid; place-items: center; height: 96px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(ellipse at center, #232323, var(--bg-deep)); font: 800 17px var(--display); font-stretch: 115%; letter-spacing: .06em; color: #fff;
}
.reels.spin span { animation: spin .14s linear infinite; color: var(--text-3); }
@keyframes spin { 50% { transform: translateY(-3px); } }
.dice { font: 700 20px var(--sans); font-variant-numeric: tabular-nums; color: #fff; }
.wheel-result {
  display: inline-grid; place-items: center; width: 76px; height: 76px; margin: 18px 14px 4px 0; vertical-align: middle; border-radius: 50%;
  font: 800 30px var(--display); color: #fff; background: #2a2a2a; border: 3px solid #3a3a3a; animation: rise .4s var(--ease);
}
.wheel-result.red { background: #b0182a; border-color: var(--red-hi); color: #fff; }
.wheel-result.green { background: #127a45; border-color: var(--green); color: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 60; min-width: 280px; padding: 16px 28px 18px; text-align: center;
  background: var(--panel-2); border: 1px solid var(--line-2); border-top: 3px solid var(--red); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); animation: pop 3.2s var(--ease) forwards; pointer-events: none;
}
.toast small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.toast strong { display: block; margin-top: 4px; font: 800 26px var(--display); font-stretch: 115%; color: #fff; }
@keyframes pop {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  10%, 82% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* ---------- landing ---------- */
.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(14, 14, 14, .55) 0%, rgba(14, 14, 14, .15) 45%, rgba(14, 14, 14, .35) 100%),
    url("landing-bg.webp") 40% 100% / cover no-repeat fixed,
    var(--bg-deep);
}
.landing-top { display: flex; align-items: center; justify-content: space-between; padding: 24px 40px; }
.landing-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 420px); gap: 56px; align-items: start; max-width: 1180px; width: 100%; margin: 0 auto; padding: 24px 40px 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.hero h1 { margin: 0; font: 800 46px/1.06 var(--display); font-stretch: 112%; letter-spacing: -.02em; color: #fff; }
.hero h1 span { color: var(--text-3); }
.lede { margin: 20px 0 28px; max-width: 560px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.world-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17, 17, 17, .6); margin-bottom: 18px; }
.world-stats .tile { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; }
.world-stats .tile:first-child { border-left: 0; }
.world-stats .tile .v { font-size: 20px; }
.news-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17, 17, 17, .6); padding: 14px 18px 6px; }
.news-head { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.news-list div { display: flex; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text); }
.news-list div:first-child { border-top: 0; }
.news-list time { flex: none; width: 92px; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.auth-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 40px 80px -30px rgba(0, 0, 0, .9);
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 22px; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 8px; }
.tab { height: 34px; border: 0; border-radius: 5px; background: transparent; color: var(--text-2); font: 600 13.5px var(--sans); cursor: pointer; transition: background .15s, color .15s; }
.tab.active { background: var(--raise); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
#auth-msg { margin-top: 14px; }
.pitch { margin: 22px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); }
.pitch li { display: flex; gap: 12px; padding: 5px 0; color: var(--text-2); font-size: 13.5px; }
.pitch li span { flex: none; font-size: 11px; font-weight: 700; color: var(--red); padding-top: 2px; font-variant-numeric: tabular-nums; }

/* landing: keep the lower half of the artwork (car, skyline) clear */
.landing .news-card, .landing .pitch { display: none; }
@media (min-width: 1000px) { .landing .hero { padding-left: 110px; } .landing .world-stats { max-width: 540px; } }
.landing .auth-card { background: rgba(20, 20, 20, .78); backdrop-filter: blur(6px); }
.landing .world-stats { background: rgba(14, 14, 14, .6); backdrop-filter: blur(4px); }
.foot { text-shadow: 0 1px 3px #000; }

/* mobile menu toggle */
.menu-btn { display: none; height: 36px; padding: 0 12px; background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius-sm); font: 600 13px var(--sans); cursor: pointer; }

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) {
  .topbar { height: auto; flex-wrap: wrap; gap: 10px 20px; padding: 12px 20px; }
  .topbar .logo { width: auto; }
  .stats { order: 3; flex-basis: 100%; padding-top: 10px; border-top: 1px solid var(--line); }
  .topbar-end { margin-left: auto; }
  .sidebar { top: 0; }
}
@media (max-width: 860px) {
  .topbar { position: static; }
  .layout { flex-direction: column; align-items: stretch; }
  .sidebar { display: none; position: static; flex: none; width: auto; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  body.nav-open .sidebar { display: block; }
  .menu-btn { display: inline-flex; align-items: center; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 0; overflow: visible; }
  .stat, .stat:first-child { padding: 0 10px; border-left: 1px solid var(--line); }
  .stat:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .stat .bar { width: 100%; }
  .nav-wrap { display: grid; grid-template-columns: 1fr 1fr; }
  .main { padding: 24px 16px; }
  .panel { padding: 18px 16px; }
  .landing-top { padding: 20px 16px; }
  .landing-grid { grid-template-columns: 1fr; gap: 28px; padding: 8px 16px 32px; }
  .hero h1 { font-size: 36px; }
  .world-stats { grid-template-columns: 1fr 1fr; }
  .world-stats .tile:nth-child(3) { border-left: 0; }
  .world-stats .tile:nth-child(n+3) { border-top: 1px solid var(--line); }
  .card { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .card .kind { grid-column: 1; grid-row: 1; }
  .card time { grid-column: 2; grid-row: 1; }
  .card-body { grid-column: 1 / -1; grid-row: 2; }
  table.data { font-size: 12.5px; }
  table.data td, table.data th { padding-left: 6px; padding-right: 6px; }
  .clock { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

/* blackjack */
.table { padding: 18px; margin-bottom: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(ellipse at top, #1c2a22, var(--bg-deep) 75%); }
.bjgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.hand { display: flex; flex-direction: column; gap: 10px; min-height: 120px; padding: 0 16px; }
.hand.you { padding-left: 0; }
.hand.dealer { padding-right: 0; border-left: 1px dashed rgba(255, 255, 255, .12); padding-left: 24px; }
.cards-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bjmoves { margin-top: 14px; max-width: 360px; }
.hand .lbl {  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.hand .lbl i { font-style: normal; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #fff; }
.pc { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 76px; border-radius: 7px; background: #f6f4ee; color: #15151a; font: 700 20px/1.1 var(--sans); box-shadow: 0 4px 10px rgba(0, 0, 0, .5); animation: rise .3s var(--ease); }
.pc b { font-weight: 800; color: inherit; }
.pc.redsuit { color: #c81e32; }
.pc.back { background: repeating-linear-gradient(45deg, #8f1424 0 6px, #6f0f1c 6px 12px); border: 3px solid #f3f3f3; }
.toast em { display: block; margin-top: 10px; font-style: normal; font-size: 13px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 700px) { .bjgrid { grid-template-columns: 1fr; gap: 14px; } .hand.dealer { order: -1; border-left: 0; padding-left: 0; } }

/* ---------- inbox, forum, admin ---------- */
textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg-deep); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--red); }
tr.unread td { font-weight: 600; }
.post { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); margin: 10px 0; }
.post .who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.post .who small { color: var(--text-3); font-weight: 500; }
.post .who time { color: var(--text-3); font-size: 12px; font-weight: 400; margin-left: auto; }
.post-body { padding: 12px 14px; overflow-wrap: anywhere; }
.box .post-body { padding: 0; }
.pager { align-items: center; }

/* ---------- compact rows, strips and bulk bars ---------- */
input[type=checkbox] { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; vertical-align: middle; accent-color: var(--red); cursor: pointer; }
input[type=file] { height: auto; padding: 6px 8px; }
.chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-weight: 600; cursor: pointer; }
.strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-deep); font-size: 13.5px; }
.strip b { color: #fff; font-variant-numeric: tabular-nums; }
.strip-end { display: inline-flex; align-items: center; gap: 10px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-deep); }
.bulkend { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.bulkend select { height: 28px; margin: 0; width: auto; min-width: 150px; font-size: 12.5px; padding: 0 28px 0 10px; background-position: calc(100% - 15px) 11px, calc(100% - 10px) 11px; }
table.data.tight td { padding: 5px 8px; }
table.data.tight th { padding-bottom: 5px; }
table.data.tight td:first-child, table.data.tight th:first-child { padding-left: 6px; }
td [data-laylow] { text-align: right; }

/* names, colour groups and badges */
.pn { color: #8fc6ff; font-weight: 600; }
.pn.g-admin, .g-admin { color: #ffa21f; }
.pn.g-mod, .g-mod { color: #ffe44d; }
.pn.g-friend, .g-friend { color: #ff4d5e; }
.pn.g-top, .g-top { color: #6fe39a; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .07); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }

/* players online and find player */
.online-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.online-head input { width: 220px; margin: 0; }
.big { font-size: 22px; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 12.5px; color: var(--text-2); }
.legend i { font-style: normal; font-weight: 700; margin-right: 4px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.pcard { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-deep); transition: border-color .15s, background .15s; }
.pcard:hover { border-color: #444; background: rgba(255, 255, 255, .03); color: inherit; }
.pcard .dot { width: 7px; height: 7px; border-radius: 50%; background: #3a3a3a; }
.pcard .dot.on, #pgrid .dot { background: var(--green); }
.pcard .pn { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .pmeta { grid-column: 2; font-size: 11.5px; color: var(--text-3); }
.finder { max-width: 560px; margin: 24px auto 0; text-align: center; }
.finder input { height: 48px; font-size: 16px; text-align: center; margin: 0 auto; }
.finder .pgrid { text-align: left; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 12px; }
.nores { grid-column: 1 / -1; text-align: center; }

/* profiles */
.profile { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.pf-pic { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-deep); }
.pf-pic.empty { display: grid; place-items: center; font: 800 72px var(--display); color: var(--text-3); }
.pf-name { margin-top: 10px; font: 800 20px/1.2 var(--display); }
.pf-actions { margin: 10px 0 6px; }
.pf-actions > * { min-width: 0; }
.pf-bio { margin-bottom: 10px; min-height: 64px; overflow-wrap: anywhere; }
@media (max-width: 720px) { .profile { grid-template-columns: 1fr; } .pf-pic { max-width: 180px; } }

/* forum */
.active-posters { margin-bottom: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-deep); font-size: 13px; color: var(--text-2); }
.forum { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.tabs-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.ftab { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ftab i { font-style: normal; font-size: 11px; color: var(--text-3); }
.ftab:hover { color: #fff; border-color: #444; }
.ftab.on { background: var(--red); border-color: var(--red); color: #fff; }
.ftab.on i { color: rgba(255, 255, 255, .8); }
.fnew { margin-left: auto; }
table.topics td:first-child { width: 52%; }
.lbl-sticky { font-weight: 700; color: #fff; }
.lbl-locked { color: var(--text-3); font-size: 12px; }
tr.sticky td { background: rgba(255, 255, 255, .025); }
.rules { position: sticky; top: 80px; }
.rules ol { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.rules li { margin: 0 0 7px; }
@media (max-width: 980px) { .forum { grid-template-columns: 1fr; } .rules { position: static; } }

/* slot symbols */
.reels span svg.sym { display: block; }
.payline { display: flex; align-items: center; gap: 2px; }
.payline .sym { display: inline-block; }

@media (max-width: 700px) {
  #console { overflow-x: auto; }
  table.data.tight { min-width: 480px; }
  .main { padding: 14px 12px 12px; }
}
