/* Billionaire II — web port of the SwiftUI Mac app (Style.swift + layout) */
:root {
  --paper: rgb(242, 235, 214);
  --paper-dark: rgb(224, 212, 181);
  --sand: rgb(212, 173, 115);
  --brown: rgb(92, 56, 26);
  --brown-light: rgb(115, 77, 36);
  --gold: rgb(237, 196, 77);
  --ink: rgb(41, 28, 15);
  --green: rgb(26, 128, 38);
  --red: rgb(191, 31, 26);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  --menu-h: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
#app { position: fixed; inset: 0; }
.boot { color: #d9b25a; font: 16px var(--serif); display: grid; place-items: center; height: 100%; }
img { image-rendering: auto; -webkit-user-drag: none; user-select: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; user-select: text; -webkit-user-select: text; }
.selectable { user-select: text; -webkit-user-select: text; }

/* ---------- menu bar ---------- */
.menubar {
  position: absolute; left: 0; right: 0; top: 0; height: var(--menu-h); z-index: 1000;
  display: flex; align-items: stretch; gap: 0; padding: 0 8px;
  background: linear-gradient(#2b1d10, #1a1109); border-bottom: 1px solid #5c381a;
  font-size: 13px; color: #f0dfb4;
}
.menubar .brand { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 2px; font: bold 13px var(--serif); color: var(--gold); }
.menubar .brand img { width: 16px; height: 16px; }
.menu { position: relative; display: flex; align-items: center; padding: 0 10px; cursor: default; }
.menu.open, .menu:hover { background: rgba(237, 196, 77, 0.18); }
.menu .drop {
  position: absolute; top: var(--menu-h); left: 0; min-width: 300px; padding: 4px 0;
  background: rgba(250, 244, 228, 0.98); color: var(--ink); border: 1px solid var(--sand);
  border-radius: 0 0 6px 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.menu .item { display: flex; align-items: center; gap: 6px; padding: 3px 14px 3px 8px; white-space: nowrap; }
.menu .item:hover:not(.disabled) { background: #3b6fd6; color: #fff; }
.menu .item.disabled { opacity: 0.4; }
.menu .item .check { width: 14px; text-align: center; }
.menu .item .sc { margin-left: auto; padding-left: 24px; opacity: 0.6; font-size: 12px; }
.menu .sep { height: 1px; margin: 4px 0; background: var(--sand); opacity: 0.6; }
.menu .sub { padding: 2px 14px 2px 28px; font-size: 11px; color: var(--brown); font-weight: 600; }
.menubar .spacer { flex: 1; }
.menubar .status { display: flex; align-items: center; font-size: 11px; color: #c9b07a; padding-right: 6px; }

/* ---------- stage ---------- */
.stage { position: absolute; left: 0; right: 0; top: var(--menu-h); bottom: 0; background: #000; overflow: hidden; }
.canvas {
  position: absolute; left: 0; top: 0; width: 1280px; height: 860px; overflow: hidden;
  transform-origin: 0 0; background: url(../assets/img/f_texture4.png) repeat;
}
.tex { background: url(../assets/img/f_texture.png) repeat; }
.tex3 { background: url(../assets/img/f_texture3.png) repeat; }

/* layout helpers (SwiftUI stacks) */
.v { display: flex; flex-direction: column; align-items: center; }
.v.lead { align-items: flex-start; }
.v.stretch { align-items: stretch; }
.h { display: flex; flex-direction: row; align-items: center; }
.h.top { align-items: flex-start; }
.spacer { flex: 1 1 0; min-width: 0; min-height: 0; }
.mono-d { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 0; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { align-self: stretch; height: 1px; background: rgba(0, 0, 0, 0.12); flex: none; }

/* ---------- Panel ---------- */
.modal { position: absolute; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; animation: fadein .15s ease-out; }
.modal > .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.panel {
  position: relative; border-radius: 6px; overflow: hidden; color: var(--ink);
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 3px var(--brown), 0 8px 36px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; max-height: 852px;
}
.panel > .ptitle {
  height: 28px; flex: none; position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgb(115, 77, 36), var(--brown));
  font: bold 13px var(--serif); color: var(--gold); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6); white-space: nowrap;
}
.panel > .ptitle .close {
  position: absolute; right: 6px; top: 3px; width: 22px; height: 22px; border: 0; background: none; padding: 0;
  color: var(--gold); cursor: pointer; display: grid; place-items: center;
}
.panel > .ptitle .close:hover { color: #fff3c4; }
.panel > .pbody { padding: 14px; background: url(../assets/img/f_texture.png) repeat; overflow: auto; }

/* ---------- Gold buttons ---------- */
.gbtn {
  font: bold 12px var(--sans); color: var(--ink); padding: 4px 12px; border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(92, 56, 26, 0.7); line-height: 15px; white-space: nowrap;
  background: linear-gradient(rgb(252, 230, 158), rgb(219, 179, 92));
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex: none;
  transition: transform .06s, filter .06s;
}
.gbtn.prom { color: #fff; background: linear-gradient(rgb(64, 140, 51), rgb(31, 97, 26)); }
.gbtn:active:not(:disabled) { transform: scale(0.96); filter: brightness(0.92); }
.gbtn:disabled { cursor: default; color: rgba(41, 28, 15, 0.35); }
.gbtn:disabled { background: linear-gradient(rgba(252, 230, 158, .5), rgba(219, 179, 92, .5)); }
.gbtn.prom:disabled { background: linear-gradient(rgba(64, 140, 51, .5), rgba(31, 97, 26, .5)); color: rgba(41, 28, 15, 0.35); }
.gbtn svg { display: block; }

/* ---------- Box / KV ---------- */
.box {
  align-self: stretch; padding: 8px; border-radius: 4px; background: rgba(242, 235, 214, 0.85);
  border: 1px solid var(--sand); display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
}
.box > .btitle { font: bold 11px var(--sans); color: var(--brown); }
.box > * { max-width: 100%; }
.kv { display: flex; align-self: stretch; align-items: baseline; font-size: 12px; gap: 8px; }
.kv .k { color: rgba(41, 28, 15, 0.8); }
.kv .vv { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv .vv.b { font-weight: bold; }

/* ---------- Folders ---------- */
.folders { display: flex; gap: 2px; align-self: stretch; }
.folders button {
  font: 12px var(--sans); color: var(--ink); padding: 5px 12px; border: 1px solid var(--sand); border-bottom: 0;
  border-radius: 5px 5px 0 0; background: var(--paper-dark); cursor: pointer;
}
.folders button.on { background: var(--paper); font-weight: bold; }
.fbody { align-self: stretch; padding: 10px; background: var(--paper); border: 1px solid var(--sand); }

/* ---------- Segmented picker ---------- */
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.07); border-radius: 6px; padding: 2px; gap: 1px; flex: none; }
.seg button {
  flex: 1; border: 0; background: none; font: 13px var(--sans); color: var(--ink); padding: 2px 10px; border-radius: 5px; cursor: pointer; white-space: nowrap;
}
.seg button.on { background: rgba(0, 0, 0, 0.12); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1); }

/* ---------- form controls ---------- */
.tf {
  font: 13px var(--sans); padding: 3px 6px; border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 5px; background: #fff;
  color: var(--ink); outline: none; height: 24px; font-variant-numeric: tabular-nums;
}
.tf:focus { box-shadow: 0 0 0 3px rgba(80, 140, 230, 0.45); border-color: rgba(60, 120, 220, .8); }
.tf:disabled { background: rgba(255, 255, 255, 0.5); color: rgba(41, 28, 15, 0.45); }
input[type=checkbox], input[type=radio] { accent-color: #4a4a4a; width: 14px; height: 14px; margin: 0; cursor: pointer; }
label.chk { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
label.chk.dis { opacity: .45; cursor: default; }
input[type=range] { accent-color: #8a8a8a; width: 100%; margin: 4px 0; cursor: pointer; }
.stepper { display: inline-flex; flex-direction: column; border-radius: 5px; overflow: hidden; border: 1px solid rgba(0,0,0,.15); background: rgba(255,255,255,.6); }
.stepper button { border: 0; background: none; width: 16px; height: 11px; padding: 0; cursor: pointer; display: grid; place-items: center; color: #555; }
.stepper button:hover { background: rgba(0,0,0,.08); }
.stepper button:disabled { opacity: .35; }
select.sel { font: 12px var(--sans); height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.18); background: #fff; }

/* ---------- PlayerDot ---------- */
.pdot { display: inline-block; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.7); flex: none; }

/* ---------- board ---------- */
.board { position: absolute; left: 0; top: 0; width: 960px; height: 681px; isolation: isolate; z-index: 0; }
.board > img.bg { position: absolute; left: 0; top: 0; width: 960px; height: 681px; }
.abs { position: absolute; }
.center-at { position: absolute; transform: translate(-50%, -50%); }
.clock {
  font: bold 15px var(--mono); color: var(--ink); padding: 2px 8px; border-radius: 4px; background: rgba(242, 235, 214, 0.75);
}
.mini {
  position: absolute; padding: 6px; border-radius: 5px; background: rgba(242, 235, 214, 0.82);
  border: 1px solid rgba(92, 56, 26, 0.45); display: flex; flex-direction: column; gap: 2px;
}
.mini > .mtitle { font: bold 11px var(--serif); color: var(--brown); }
.mini .row { display: flex; align-items: center; font-size: 10.5px; font-variant-numeric: tabular-nums; line-height: 14px; }
.mini .row .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .row .a { text-align: right; flex: none; }
.mini .empty { font-size: 10px; color: rgba(41, 28, 15, 0.5); }
.mini .divider { margin: 1px 0; }
.clickable { cursor: pointer; }
.site-hit { position: absolute; background: rgba(255, 255, 255, 0.001); cursor: pointer; }
.site-hover { position: absolute; border: 2px solid #fff; box-shadow: 0 0 4px #fff, inset 0 0 4px #fff; pointer-events: none; }
.owner { position: absolute; transform: translate(-50%, -50%); display: flex; gap: 1px; align-items: center; pointer-events: none; }
.owner.vert { flex-direction: row; }
.owner.horz { flex-direction: column; }
.owner .flag {
  width: 18px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.85); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center; gap: 1px;
}
.owner .flag i { width: 3px; height: 3px; border-radius: 50%; background: rgba(0, 0, 0, 0.6); }
.owner img { width: 11px; height: 11px; }
.gbadge {
  position: absolute; transform: translate(-50%, -50%); padding: 3px; border-radius: 4px; background: rgba(0, 0, 0, 0.55);
  color: #fff; display: flex; gap: 4px; pointer-events: none;
}
.gbadge.vert { flex-direction: column; gap: 2px; }
.gbadge .b { display: flex; align-items: center; gap: 1px; font: bold 10px var(--sans); font-variant-numeric: tabular-nums; }
.token { position: absolute; left: 0; top: 0; width: 34px; height: 32px; pointer-events: none; transition-property: transform; transition-timing-function: ease-in-out; }
.token .ti {
  position: absolute; inset: 0; border-radius: 3px; overflow: hidden; border: 3px solid; box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.6);
  outline: 1px solid rgba(0, 0, 0, 0.8); outline-offset: 1px;
}
.token .ti img { width: 100%; height: 100%; display: block; }
.token .ti { background-size: 100% 100%; }
.token .lock { position: absolute; right: -8px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; display: grid; place-items: center; }

/* ---------- players column ---------- */
.players { isolation: isolate; z-index: 0; position: absolute; left: 960px; top: 0; width: 320px; height: 681px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.players::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: rgba(92, 56, 26, 0.6); }
.pcard {
  border-radius: 6px; padding: 5px 0; display: flex; flex-direction: column; gap: 3px; cursor: pointer;
  background: rgba(242, 235, 214, 0.8); border: 1px solid var(--sand); flex: none;
}
.pcard.turn { background: var(--paper); border: 3px solid var(--gold); box-shadow: 0 0 6px rgba(237, 196, 77, 0.8); padding: 3px 0; margin: 0 -2px; }
.pcard.bk { opacity: 0.6; }
.pcard .bar { position: relative; height: 26px; }
.pcard .bar > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard .bar .in { position: absolute; inset: 0; padding: 0 8px; display: flex; align-items: center; gap: 6px; }
.pcard .bar .in img { width: 22px; height: 20px; }
.pcard .bar .nm { font: bold 13px var(--sans); }
.pcard .bar .ic { margin-left: auto; display: flex; gap: 3px; align-items: center; }
.pcard .bankrupt { font: 900 16px var(--serif); color: var(--red); min-height: 80px; display: grid; place-items: center; }
.pcard .kvs { padding: 0 8px; display: flex; flex-direction: column; gap: 1px; }
.pcard .foot { padding: 0 8px; display: flex; font-size: 10px; color: var(--brown); }

/* ---------- control panel ---------- */
.cpanel { isolation: isolate; z-index: 0; position: absolute; left: 0; top: 681px; width: 1280px; height: 179px; }
.cpanel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(92, 56, 26, 0.7); z-index: 1; }
.cpanel .top { height: 150px; padding: 8px 10px 0; display: flex; gap: 8px; align-items: flex-start; }
.cpanel .left { width: 600px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gamebtn { width: 92px; height: 66px; display: block; cursor: pointer; }
.gamebtn.off { filter: saturate(0.2); opacity: 0.6; cursor: default; }
.turnstatus {
  align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 6px;
  background: rgba(242, 235, 214, 0.7); border: 1px solid var(--sand);
}
.turnstatus .die { width: 36px; height: 36px; filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.4)); }
.turnstatus .ttl { font: bold 15px var(--serif); }
.turnstatus .sub { font-size: 11px; color: var(--brown); }
.turnstatus .gt { font: 600 10px var(--sans); color: var(--brown); text-align: right; margin-left: auto; }
.msgboard {
  flex: 1; min-width: 0; height: 136px; overflow-y: auto; padding: 6px; border-radius: 4px; background: var(--paper);
  border: 1px solid rgba(92, 56, 26, 0.5); user-select: text; -webkit-user-select: text;
}
.msgboard .e { display: flex; gap: 5px; align-items: flex-start; font-size: 11px; line-height: 14px; margin-bottom: 3px; white-space: pre-wrap; }
.msgboard .e.imp { color: var(--red); font-weight: 600; }
.msgboard .e .pdot, .msgboard .e svg { margin-top: 3px; }
.msgboard::-webkit-scrollbar { width: 8px; }
.msgboard::-webkit-scrollbar-thumb { background: rgba(92, 56, 26, .35); border-radius: 4px; }
.ticker { position: relative; height: 29px; background: rgba(0, 0, 0, 0.85); overflow: hidden; cursor: pointer; }
.ticker .track { position: absolute; left: 0; top: 0; height: 29px; display: flex; animation: tick 130.667s linear infinite; will-change: transform; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-5880px); } }
.ticker .it { width: 210px; flex: none; display: flex; gap: 5px; align-items: center; font: 600 12px var(--mono); white-space: nowrap; overflow: hidden; }
.ticker .idx { position: absolute; left: 0; top: 0; bottom: 0; background: #000; padding: 0 8px; display: flex; gap: 4px; align-items: center; font: bold 12px var(--mono); }
.up { color: #33c84a; } .dn { color: #ff3b30; }

/* ---------- tables in dialogs ---------- */
.tbl { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--sand); display: flex; flex-direction: column; }
.tbl .th { display: flex; align-items: center; gap: 8px; font: bold 11px var(--sans); padding: 4px 6px; background: var(--paper-dark); flex: none; }
.tbl .tb { overflow-y: auto; flex: 1; }
.tbl .tr { display: flex; align-items: center; gap: 8px; font-size: 11.5px; padding: 3px 6px; font-variant-numeric: tabular-nums; cursor: pointer; line-height: 15px; }
.tbl .tr.alt { background: rgba(224, 212, 181, 0.35); }
.tbl .tr.sel { background: rgb(179, 217, 255); }
.r { text-align: right; } .c { text-align: center; }
.msg { font-size: 11.5px; color: var(--red); white-space: pre-wrap; }
.hint { font-size: 11px; color: var(--brown); }
.para { font-size: 11px; line-height: 1.35; }
.ill { padding: 6px; border-radius: 6px; background: rgb(255, 245, 199); border: 2px solid var(--sand); flex: none; display: flex; }
.ill img { object-fit: contain; display: block; }
svg.chart text { font-family: var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* prompts */
.r21 { width: 30px; height: 20px; border-radius: 3px; color: #fff; font: 900 13px var(--sans); display: grid; place-items: center; }
.coinbtn { border: 0; background: none; padding: 0; cursor: pointer; }
.coinbtn img { width: 74px; height: 74px; display: block; }
@keyframes coinspin { from { transform: perspective(300px) rotateY(0); } to { transform: perspective(300px) rotateY(360deg); } }
.spin { animation: coinspin 1.2s ease-in-out 2; }
.carpick { border: 0; padding: 0; background: none; cursor: pointer; }
.carpick img { width: 54px; height: 34px; display: block; }
.night { transition: color .25s; }

/* help/about */
.hof { align-self: stretch; padding: 8px; border-radius: 4px; display: flex; align-items: center; gap: 8px; }

/* save / open dialog */
.savelist { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto;
  background: rgba(255, 252, 240, .7); border: 1px solid rgba(120, 85, 40, .35); border-radius: 4px; padding: 6px; }
.saverow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 3px; }
.saverow:nth-child(odd) { background: rgba(120, 85, 40, .07); }
.savename { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.savedate { font-size: 10.5px; color: #7a5a30; }
.saveempty { font-size: 12.5px; color: #7a5a30; padding: 18px; text-align: center; }
.savehint { font-size: 11px; color: #7a5a30; margin-right: auto; }
a.item { color: inherit; text-decoration: none; cursor: default; }
svg.die { display: block; width: 100%; height: 100%; }

/* ---------- title screen (new game) ---------- */
.modal.titlescreen { display: block; animation: none; color: #f3e6c4; font-family: Inter, var(--sans); --ts-gold: #e8c25a; --ts-gold2: #fff1b8; --ts-line: rgba(232, 194, 90, 0.28); }
.ts-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(232, 194, 90, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(40, 110, 200, 0.18), transparent 70%),
    linear-gradient(rgba(232, 194, 90, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(232, 194, 90, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(160deg, #141a2b 0%, #0a0d17 55%, #07090f 100%);
}
.ts { position: absolute; inset: 0 0 40px 0; display: flex; flex-direction: column; align-items: center; padding: 34px 64px 0; gap: 22px; }
.ts-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ts-eyebrow { font: 600 12px Inter, var(--sans); letter-spacing: .42em; text-transform: uppercase; color: #8fb6ff;
  padding: 4px 14px; border: 1px solid rgba(143, 182, 255, .35); border-radius: 99px; background: rgba(143, 182, 255, .08); }
.ts-title { margin: 4px 0 0; font: 800 84px/1 Cinzel, var(--serif); letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--ts-gold2) 0%, var(--ts-gold) 45%, #a8771f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(232, 194, 90, .25)); }
.ts-tag { margin: 2px 0 0; font-size: 15px; color: #c9bb98; }
.ts-sec { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.ts-label { font: 600 12px Inter, var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ts-gold); }
.ts-label span { letter-spacing: 0; text-transform: none; color: #8d8470; font-weight: 400; }
.ts-players { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pc { position: relative; height: 290px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)); border: 1px solid rgba(255, 255, 255, .1);
  border-top: 3px solid var(--pc); border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.pc-top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; }
.pc-seat { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #a99e83; }
.pc-x { width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: #c9bb98; font-size: 15px; line-height: 1; cursor: pointer; }
.pc-x:hover { background: rgba(255, 90, 80, .35); color: #fff; }
.pc-token { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff8e0, #d9c48e); box-shadow: 0 0 0 3px var(--pc), 0 6px 16px rgba(0, 0, 0, .45); }
.pc-token img { width: 40px; height: 37px; }
.pc-name { width: 100%; text-align: center; font: 600 17px Inter, var(--sans); color: #fff6dc; background: transparent;
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .18); padding: 4px 2px 6px; outline: none; }
.pc-name:focus { border-bottom-color: var(--ts-gold); }
.pc-seg { display: flex; width: 100%; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, .35); }
.pc-seg button { flex: 1; border: 0; border-radius: 7px; padding: 6px 0; font: 600 12px Inter, var(--sans); background: transparent; color: #9c927a; cursor: pointer; }
.pc-seg button.on { background: linear-gradient(#f3d47a, #c9962e); color: #2a1a06; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.pc-cap { width: 100%; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: #a99e83; }
.pc-cap .tf, .mode-x .tf { width: 100% !important; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .14); color: #fff6dc;
  border-radius: 7px; padding: 6px 9px; font: 600 14px var(--mono); }
.pc-tokens { display: flex; gap: 6px; margin-top: auto; }
.tok { width: 34px; height: 32px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); padding: 0; display: grid; place-items: center; cursor: pointer; }
.tok img { width: 24px; height: 22px; }
.tok.sel { border-color: var(--pc); box-shadow: 0 0 0 2px var(--pc); background: rgba(255, 255, 255, .16); }
.tok:disabled { opacity: .2; cursor: default; }
.pc-empty { justify-content: center; gap: 6px; cursor: pointer; border-style: dashed; border-top-style: solid; color: #a99e83; font: 600 15px Inter, var(--sans);
  background: rgba(255, 255, 255, .02); box-shadow: none; }
.pc-empty .plus { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 300; border: 1px dashed rgba(255, 255, 255, .25); color: var(--pc); }
.pc-empty small { font-weight: 400; font-size: 12px; color: #7d745f; }
.pc-empty:hover { background: rgba(255, 255, 255, .06); color: #f3e6c4; }
.ts-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mode { height: 118px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); transition: background .15s, border-color .15s; }
.mode:hover { background: rgba(255, 255, 255, .07); }
.mode.sel { border-color: var(--ts-gold); background: linear-gradient(180deg, rgba(232, 194, 90, .16), rgba(232, 194, 90, .05)); }
.mode-h { display: flex; align-items: center; gap: 9px; font: 600 15px Inter, var(--sans); color: #fff6dc; }
.mode .radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8d8470; flex: none; }
.mode.sel .radio { border-color: var(--ts-gold); background: radial-gradient(circle, var(--ts-gold) 0 4px, transparent 5px); }
.mode-t { font-size: 12.5px; color: #a99e83; line-height: 1.35; }
.mode-x { margin-top: auto; }
.mode-x .mins { font: 600 14px var(--mono); color: #fff6dc; min-width: 70px; }
.ts-actions { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ts-err { flex: 1; color: #ff8a7a; font-size: 13px; font-weight: 600; }
.ts-btn { border-radius: 10px; padding: 12px 22px; font: 600 15px Inter, var(--sans); cursor: pointer; }
.ts-btn.ghost { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .18); color: #e7d9b4; }
.ts-btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.ts-btn.gold { padding: 13px 40px; font-size: 17px; font-weight: 700; color: #2a1a06; border: 1px solid #f7dc8a;
  background: linear-gradient(180deg, #fbe39a, #e8c25a 50%, #c18f2a); box-shadow: 0 8px 24px rgba(232, 194, 90, .3), inset 0 1px 0 rgba(255, 255, 255, .6); }
.ts-btn.gold:hover { filter: brightness(1.07); }
.ts-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; overflow: hidden; display: flex; align-items: center;
  background: rgba(0, 0, 0, .55); border-top: 1px solid var(--ts-line); }
.ts-track { display: flex; gap: 36px; white-space: nowrap; animation: ts-scroll 70s linear infinite; padding-left: 36px; }
.ts-track .tk { font: 13px var(--mono); color: #8fe08f; }
.ts-track .tk b { color: #f3e6c4; font-weight: 600; margin-right: 4px; }
@keyframes ts-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ts { animation: fadein .3s ease-out; }
