:root {
  --bg: #0a0b0e;
  --panel: rgba(14, 16, 22, 0.74);
  --panel-solid: #12141a;
  --panel-2: #181b22;
  --line: rgba(255, 255, 255, 0.1);
  --line-accent: rgba(94, 242, 255, 0.22);
  --text: #e8eaee;
  --muted: #8b909c;
  --accent: #5ef2ff;
  --accent2: #8b7bff;
  --red: #e0485f;
  --good: #4fe3a0;
  --warn: #f0c35a;
  --bad: #ff6a5c;
  --cond: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --type: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --glow: 0 0 0 1px rgba(94, 242, 255, 0.12), 0 10px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--cond); letter-spacing: 0.02em; }

/* ---------- stage (full screen) ---------- */

.stage { position: fixed; inset: 0; background: var(--bg); }
#town { position: absolute; inset: 0; display: block; touch-action: none; }
.loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--bg); z-index: 5; font-family: var(--cond); font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hud { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-width: 230px; z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; background: var(--red); color: #f4e9dc; font-weight: 700; font-family: var(--cond); font-size: 18px; }
.brand b { font-family: var(--type); font-size: 20px; letter-spacing: 0.04em; display: block; line-height: 1; }
.ticker { color: var(--accent); font-family: var(--cond); font-size: 11px; letter-spacing: 0.08em; }
.clock { font-family: var(--cond); font-size: 15px; letter-spacing: 0.05em; display: flex; gap: 8px; align-items: center; }
.pills { display: flex; gap: 6px; }
.pill { font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; padding: 3px 8px; border-radius: 3px; border: 1px solid; white-space: nowrap; }
.pill.live { color: #9fc27a; border-color: #3b5a2a; background: #15220f; }
.pill.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9fc27a; margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s infinite; }
.pill.dormant { color: #e07a72; border-color: #5a2a2a; background: #241212; }
.pill.offline { color: var(--muted); border-color: var(--line); }
.pill.demo { color: var(--muted); border-color: var(--line); }
@keyframes pulse { 50% { opacity: 0.25; } }
.compute { display: flex; align-items: center; gap: 8px; font-family: var(--cond); font-size: 12px; letter-spacing: 0.04em; }
.compute .label { color: var(--muted); letter-spacing: 0.1em; font-size: 10px; }
.meter { flex: 1; height: 7px; background: #26282d; border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--good); transition: width 0.6s, background 0.6s; }

.topright { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; z-index: 9; }
.hbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-family: var(--cond); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.hbtn:hover { border-color: #55585e; }
.hbtn.primary { background: var(--red); border-color: #7a2a24; color: #f6ece0; }
.hbtn.primary:hover { background: #b84239; }

.zoom { position: absolute; left: 12px; bottom: 44px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.zoom button { width: 36px; height: 36px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-size: 18px; line-height: 1; }
.zoom button:hover { border-color: #55585e; }

.dormant-note { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 12px 18px; border-radius: 6px; background: var(--panel); border: 1px solid #5a2a2a; max-width: min(420px, calc(100% - 32px)); z-index: 3; }
.dormant-note span { color: var(--muted); font-size: 13px; }

/* moodles: status icons on the right edge, like the game's */
.moodles { position: absolute; right: 12px; top: 64px; display: flex; flex-direction: column; gap: 6px; z-index: 3; align-items: flex-end; }
.moodles .who { font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--panel); border: 1px solid var(--line); padding: 3px 8px; border-radius: 3px; }
.moodle { display: flex; align-items: center; gap: 8px; }
.moodle span { font-family: var(--cond); font-size: 12px; letter-spacing: 0.04em; color: var(--text); background: var(--panel); border: 1px solid var(--line); padding: 2px 8px; border-radius: 3px; }
.moodle i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 18px; border: 2px solid var(--line); background: #1d1f23; box-shadow: 0 0 0 2px rgba(0,0,0,0.4); }
.moodle.good i { border-color: #3f6b2a; background: #1b2a14; }
.moodle.warn i { border-color: #8f7a2a; background: #2a2614; }
.moodle.bad i { border-color: #8f2f2a; background: #2a1414; }

.ticker-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: rgba(12, 13, 16, 0.86); border-top: 1px solid var(--line); display: flex; align-items: center; padding: 0 12px; gap: 24px; overflow: hidden; white-space: nowrap; font-family: var(--cond); font-size: 13px; letter-spacing: 0.03em; color: #cfcbc2; z-index: 3; }
.ticker-bar span b { color: var(--accent); font-weight: 600; margin-right: 6px; }

/* ---------- side panel (overlay) ---------- */

.side { position: fixed; top: 56px; right: 0; bottom: 30px; width: 400px; max-width: 100%; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; z-index: 6; box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45); }
.tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); align-items: center; }
.tabs button { flex: 1; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 7px; color: var(--muted); cursor: pointer; font-family: var(--cond); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.tabs button.on { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.tabs .close { flex: 0 0 32px; }
.pane { flex: 1; overflow-y: auto; min-height: 0; }

.filters { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; flex-wrap: wrap; }
.filters button { background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 3px 10px; font-size: 12px; color: var(--muted); cursor: pointer; font-family: var(--cond); letter-spacing: 0.06em; text-transform: uppercase; }
.filters button.on { color: var(--text); border-color: #55585e; background: var(--panel-2); }
#feed[data-filter='talk'] .ev:not(.convo),
#feed[data-filter='mind'] .ev:not(.thought):not(.plan),
#feed[data-filter='diary'] .ev:not(.diary),
#feed[data-filter='drama'] .ev:not(.dark):not(.drama):not(.money) { display: none; }

.ev { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ev.new { animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(-4px); } }
.ev .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev .time { margin-left: auto; font-family: var(--cond); font-size: 11px; color: var(--muted); white-space: nowrap; letter-spacing: 0.04em; }
.ev p { margin: 6px 0 0; line-height: 1.45; }
.ev.sys { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 13px; }
.ev.sys .time { order: 2; }
.ev.thought p { color: #d3cfc6; font-style: italic; }
.ev.plan .steps { display: flex; flex-wrap: wrap; gap: 4px; }
.ev.plan .steps span { font-family: var(--cond); font-size: 11px; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; }
.ev.diary { background: linear-gradient(0deg, transparent, rgba(217, 168, 74, 0.05)); }
.ev.diary p { font-family: var(--type); font-size: 13px; color: #e6dcc6; }
.ev.convo .lines { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ev.convo .line { line-height: 1.45; }
.ev.convo .line b { font-weight: 600; margin-right: 4px; font-family: var(--cond); letter-spacing: 0.03em; }
.ev.convo .sum { margin-top: 6px; color: var(--muted); font-size: 12px; }
.ev.dark { background: linear-gradient(0deg, transparent, rgba(166, 58, 50, 0.1)); border-left: 2px solid var(--red); }
.ev.dark p { color: #efd6d2; }
.ev.drama { border-left: 2px solid #5a4a24; }
.ev.money { border-left: 2px solid #3f5a2e; }
.ev .q { font-style: italic; color: var(--muted); }
.delta { font-family: var(--cond); font-size: 11px; padding: 0 5px; border-radius: 3px; margin-left: 4px; }
.delta.up { color: #9fc27a; background: #15220f; }
.delta.down { color: #e07a72; background: #2a1414; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px 2px 4px; cursor: pointer; font-weight: 600; font-size: 13px; font-family: var(--cond); letter-spacing: 0.03em; }
.chip i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.chip:hover { border-color: #55585e; }

/* ---------- citizens ---------- */

#citizens { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.cit { display: flex; gap: 12px; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px; cursor: pointer; }
.cit:hover { border-color: #55585e; }
.cit.gone { opacity: 0.55; }
.cit .info { flex: 1; min-width: 0; }
.cit .top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cit .top b { font-family: var(--cond); font-size: 15px; }
.cit .top .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cit .doing { font-size: 12px; color: #cfccc5; margin: 3px 0 7px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 4px; background: #2a3b2a; }
.avatar.big { width: 64px; height: 64px; }
.needs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.needs span { height: 5px; background: #262c34; border-radius: 2px; overflow: hidden; }
.needs i { display: block; height: 100%; }
.mine-tag, .visitor-tag { font-family: var(--cond); font-size: 10px; letter-spacing: 0.08em; padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.mine-tag { color: #1a1205; background: var(--accent); }
.visitor-tag { color: var(--muted); border: 1px solid var(--line); }
.create-wide { display: block; width: calc(100% - 16px); margin: 8px 8px 0; background: transparent; border: 1px dashed #5a4a24; color: var(--accent); border-radius: 4px; padding: 10px; cursor: pointer; font-family: var(--cond); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- token ---------- */

#tokenPanel { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 14px; }
.card h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.card p { margin: 10px 0 0; line-height: 1.5; }
.ca { display: flex; align-items: center; gap: 8px; }
.ca code { font-family: var(--cond); font-size: 12px; background: #0e1114; border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.ca button, .ca a { background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--text); text-decoration: none; white-space: nowrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stats label { display: block; font-size: 10px; color: var(--muted); font-family: var(--cond); letter-spacing: 0.1em; }
.stats b { font-family: var(--cond); font-size: 17px; }
.up { color: #9fc27a; }
.down { color: #e07a72; }
.btn { display: block; margin-top: 12px; text-align: center; background: var(--red); color: #f6ece0; font-weight: 600; text-decoration: none; padding: 10px; border-radius: 4px; font-family: var(--cond); letter-spacing: 0.08em; text-transform: uppercase; }
.big { font-family: var(--cond); font-size: 22px; margin-top: 10px; }

/* ---------- drawer ---------- */

.drawer { position: fixed; top: 0; right: 0; bottom: 30px; width: 440px; max-width: 100%; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; z-index: 7; padding: 60px 18px 18px; box-shadow: -20px 0 50px rgba(0, 0, 0, 0.45); animation: slidein 0.2s ease; }
body.drawer-open .moodles, body.panel-open .moodles { display: none; }
@keyframes slidein { from { transform: translateX(30px); } }
.drawer .close, .sheet .close, .tabs .close { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; width: 32px; height: 32px; cursor: pointer; }
.drawer .close { position: absolute; top: 60px; right: 12px; }
.who { display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.who h2 { margin: 0; font-size: 24px; }
.who .muted { font-size: 13px; }
.who .identity { margin-top: 6px; font-family: var(--type); font-size: 13px; color: #e6dcc6; }
.drawer h4 { font-size: 11px; letter-spacing: 0.12em; color: var(--accent); margin: 20px 0 8px; text-transform: uppercase; }
.drawer .bio { line-height: 1.5; color: #d9d6cf; margin: 14px 0 0; font-family: var(--type); font-size: 13px; }
.facts-mini { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 13px; margin-top: 12px; }
.facts-mini dt { color: var(--muted); font-family: var(--cond); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 2px; }
.facts-mini dd { margin: 0; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actions button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 7px 12px; cursor: pointer; font-family: var(--cond); letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.actions button.on { border-color: var(--accent); color: var(--accent); }
.actions button.danger { border-color: #5a2a2a; color: #e07a72; }
.yours { margin-top: 12px; padding: 8px 10px; border-radius: 4px; background: #231d12; border: 1px solid #4a3a1c; font-size: 13px; }
.banner { margin-top: 12px; padding: 8px 10px; border-radius: 4px; font-size: 13px; }
.banner.dead { background: #2a1414; border: 1px solid #5a2a2a; }
.banner.jail { background: #1a1d24; border: 1px solid #3a4049; }
.now { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
.now q { display: block; margin-top: 6px; font-style: italic; color: #d9d6cf; }
.needbars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.needbars label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 3px; font-family: var(--cond); letter-spacing: 0.06em; text-transform: uppercase; }
.needbars .bar { height: 6px; background: #262c34; border-radius: 2px; overflow: hidden; }
.needbars .bar i { display: block; height: 100%; }
.plan { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.plan li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 6px 8px; border-radius: 4px; }
.plan li.cur { background: #231d12; outline: 1px solid #4a3a1c; }
.plan time { font-family: var(--cond); font-size: 12px; color: var(--muted); }
.plan .t { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.rels { display: flex; flex-direction: column; gap: 8px; }
.rel .head { display: flex; justify-content: space-between; font-size: 13px; }
.rel .aff { height: 5px; background: #262c34; border-radius: 2px; position: relative; margin: 4px 0; }
.rel .aff i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.rel .aff::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: #4a515c; }
.rel p { margin: 0; font-size: 12px; color: var(--muted); }
.rel-status { font-size: 11px; margin-left: 6px; }
.diary-entry { font-family: var(--type); font-size: 13px; line-height: 1.5; color: #e6dcc6; border-left: 2px solid #4a3a1c; padding-left: 10px; margin-bottom: 10px; }
.diary-entry small { display: block; font-family: var(--cond); color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.mem { font-size: 13px; line-height: 1.45; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.mem small { font-family: var(--cond); color: var(--muted); font-size: 11px; margin-right: 6px; letter-spacing: 0.04em; }

/* ---------- harbor rep ---------- */
.mo-rep { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 5px 0 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); background: none; color: #c9ced8; font: 600 12px var(--sans); cursor: pointer; }
.mo-rep span { white-space: nowrap; color: #e3bf62; }
.mo-rep .mo-bar { flex: 1; }
.mo-rep .mo-bar i { background: linear-gradient(90deg, #e3bf62, #ffd98a); }
.mo-rep b { font: 600 12px var(--sans); color: #ffb36b; min-width: 18px; text-align: right; }
.title-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font: 600 11px var(--sans); color: #e3bf62; border: 1px solid rgba(227, 191, 98, 0.5); background: rgba(227, 191, 98, 0.1); vertical-align: middle; }
.hr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; font-size: 18px; }
.hr-streak { font: 600 13px var(--sans); color: #ffb36b; }
.hr-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 6px; }
.hr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e3bf62, #ffd98a); border-radius: 999px; }
.hr-stock { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0 4px; font-size: 13px; color: #c9ced8; }
.hr-stock b { color: #fff; }
.hr-how, .hr-rewards { margin: 0; padding-left: 18px; line-height: 1.6; font-size: 13px; color: #d4d9e2; }
.hr-rewards { list-style: none; padding: 0; }
.hr-rewards li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: #9aa3b5; }
.hr-rewards li b { min-width: 44px; color: #c9ced8; }
.hr-rewards li.got { color: #e8ecf3; }
.hr-rewards li.got b { color: #e3bf62; }
.hr-rewards li i { margin-left: auto; color: #4fe3a0; font-style: normal; }
.hr-ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.hr-ach div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); opacity: 0.6; font-size: 12px; }
.hr-ach div.done { opacity: 1; border-color: rgba(227, 191, 98, 0.5); background: rgba(227, 191, 98, 0.06); }
.hr-ach b { font-size: 13px; }
.hr-ach span { color: #9aa3b5; }
.hr-ach em { font-style: normal; color: #e3bf62; font-weight: 600; }
.sheet.recap h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; }
/* paying (cash / wallet / free drinks) and the bar's own look */
.gm-pay { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 14px 2px; background: #f1e9d6; font: 700 12px var(--sans); color: #6b6458; }
.gm-pay button { border: 1px solid #d8cfbd; background: #fff; color: #1d1d1f; font: 700 12px var(--sans); padding: 5px 11px; border-radius: 999px; cursor: pointer; font-variant-numeric: tabular-nums; }
.gm-pay button.on { background: #1d1d1f; color: #f2c14e; border-color: #1d1d1f; }
.gm-swatches button.won { box-shadow: 0 0 0 2px #d4af37; }
.store-sheet.bar { background: #24180f; color: #f3e6d0; }
.store-sheet.bar .gm-head { background: #24180f; }
.store-sheet.bar .gm-head::after { background: linear-gradient(#7a2a24 0 50%, #c99a4a 50%); height: 6px; }
.store-sheet.bar .gm-logo b { color: #e3bf62; font-family: Georgia, 'Times New Roman', serif; font-style: italic; letter-spacing: 0; }
.store-sheet.bar .gm-logo span { background: #7a2a24; color: #f3e6d0; }
.store-sheet.bar .gm-close { color: #c9b89a; }
.store-sheet.bar .gm-pay, .store-sheet.bar .gm-tabs, .store-sheet.bar .gm-foot { background: #2f2116; color: #c9b89a; }
.store-sheet.bar .gm-pay button { background: #3a291b; border-color: #4f3a27; color: #f3e6d0; }
.store-sheet.bar .gm-pay button.on { background: #e3bf62; color: #24180f; border-color: #e3bf62; }
.store-sheet.bar .gm-tabs button { color: #c9b89a; }
.store-sheet.bar .gm-tabs button.on { background: #1b120b; color: #f3e6d0; }
.store-sheet.bar .gm-body { background: #1b120b; }
.store-sheet.bar .gm-item { background: #2a1c12; border-color: #3f2d1e; }
.store-sheet.bar .gm-item p { color: #b8a68a; }
.store-sheet.bar .gm-item.show { border-color: #c99a4a; background: #33220f; }
.store-sheet.bar .gm-price { background: #e3bf62; }
.store-sheet.bar .gm-buy { background: #7a2a24; }
.store-sheet.bar .gm-buy:disabled { background: #3a2c20; color: #7d6c55; }
.store-sheet.bar .gm-tag { color: #e3bf62; }

.mo-quest { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 4px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(94, 242, 255, 0.35); background: rgba(94, 242, 255, 0.06); color: #cfe9ee; font: 600 12px var(--sans); cursor: pointer; text-align: left; }
.mo-quest b { color: #5ef2ff; }
.mo-quest span { margin-left: auto; color: #5ef2ff; }
.hr-quests { list-style: none; margin: 0; padding: 0; }
.hr-quests li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 13px; color: #d4d9e2; }
.hr-quests li i { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 1.5px solid #4a5160; display: grid; place-items: center; font-style: normal; font-size: 11px; color: #06111a; }
.hr-quests li.done i { background: #4fe3a0; border-color: #4fe3a0; }
.hr-quests li.done span { color: #8d97a8; text-decoration: line-through; }
.hr-quests li small { color: #8d97a8; margin-left: 4px; }
.hr-quests li em { margin-left: auto; font-style: normal; color: #e3bf62; font-weight: 600; }

/* ---------- house rules ---------- */
.rules-lead { margin: 0 0 8px; }
.rules { display: grid; gap: 6px; }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #c9ced8; }
.rule .seg { display: flex; gap: 2px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.rule .seg button { border: 0; background: transparent; color: #9aa3b5; font: 600 12px var(--sans); padding: 4px 9px; border-radius: 6px; cursor: pointer; }
.rule .seg button.on { background: var(--accent); color: #06111a; }

/* ---------- while you were away, share cards ---------- */
.sheet.recap { width: min(560px, 100%); }
.rc + .rc { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.rc-who { display: flex; gap: 12px; align-items: center; margin: 10px 0 12px; }
.rc-who .avatar { width: 48px; height: 48px; }
.rc-money { display: flex; align-items: baseline; gap: 10px; font: 600 22px var(--mono, monospace); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.rc-money span { color: #9aa3b5; }
.rc-money i { color: #6b7385; font-style: normal; }
.rc-money .up { color: #4fe3a0; }
.rc-money .down { color: #ff8a7c; }
.rc-money em { font: 500 14px var(--sans); font-style: normal; }
.rc-spark { width: 100%; height: 50px; margin: 6px 0 8px; }
.rc-spark polyline { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.rc-spark.up polyline { stroke: #4fe3a0; }
.rc-spark.down polyline { stroke: #ff8a7c; }
.rc-lines { margin: 10px 0 0; padding-left: 18px; line-height: 1.5; color: #d4d9e2; }
.rc-lines li + li { margin-top: 6px; }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.rc-actions button, .rc-actions .btn { margin: 0; display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text); font: 600 13px var(--sans); text-decoration: none; cursor: pointer; letter-spacing: 0; text-transform: none; box-shadow: none; }
.rc-actions .primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border: 0; }
.rc-card { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); margin-top: 8px; }

/* ---------- create a citizen ---------- */

.modal { position: fixed; inset: 0; background: rgba(5, 6, 8, 0.75); display: grid; place-items: center; z-index: 20; padding: 16px; overflow-y: auto; }
.sheet { position: relative; width: min(700px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 6px; padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.sheet h2 { margin: 0 0 6px; font-size: 26px; }
.sheet > p { margin: 0 0 16px; line-height: 1.5; }
.sheet .close { position: absolute; top: 14px; right: 14px; }
.sheet h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 22px 0 10px; }
.sheet h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; font-family: var(--sans); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); font-family: var(--cond); letter-spacing: 0.08em; text-transform: uppercase; position: relative; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .sheet textarea, .rel-row select, .rel-row input { background: #0e1114; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; color: var(--text); font: 14px var(--sans); }
.sheet textarea.story { width: 100%; resize: vertical; line-height: 1.5; font-family: var(--type); font-size: 14px; }
.form-grid input:focus, .form-grid select:focus, .sheet textarea:focus { outline: none; border-color: #6b5426; }
.form-grid select:disabled { opacity: 0.4; }
.pair { display: flex; gap: 6px; }
.pair select { flex: 1; min-width: 0; }
.count { text-align: right; font-size: 11px; color: var(--muted); font-family: var(--cond); letter-spacing: 0.06em; margin-top: 4px; }
.count.over { color: var(--bad); }
.advanced { margin-top: 16px; border: 1px solid var(--line); border-radius: 4px; padding: 0 12px; }
.advanced summary { cursor: pointer; padding: 10px 0; font-family: var(--cond); letter-spacing: 0.04em; color: var(--muted); }
.advanced[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.advanced > .form-grid, .advanced > .rel-rows { margin-bottom: 12px; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-bottom: 12px; }
.slider label { display: flex; justify-content: space-between; font-family: var(--cond); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.slider label b { color: var(--text); font-weight: 600; }
.slider input { width: 100%; accent-color: var(--accent); }
.rel-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.rel-rows .title { font-family: var(--cond); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.rel-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 6px; }
.rel-row select, .rel-row input { padding: 7px 8px; font-size: 13px; min-width: 0; }
.looks { display: flex; gap: 16px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 12px; }
#preview { width: 140px; height: 140px; flex: none; border-radius: 4px; background: #3f4a33; }
.swatch-rows { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.swatch-rows > div { display: flex; align-items: center; gap: 10px; }
.swatch-rows span { width: 60px; flex: none; font-family: var(--cond); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatches button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel-2) inset; }
.options { display: flex; flex-wrap: wrap; gap: 4px; }
.options button { background: #0e1114; border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; font-size: 12px; cursor: pointer; color: var(--muted); }
.options button.on { color: var(--text); border-color: var(--accent); }
.error { color: var(--bad); margin: 12px 0 0; }
.btn.submit { width: 100%; border: 0; cursor: pointer; font-size: 15px; margin-top: 16px; }
.btn.submit:disabled { opacity: 0.6; cursor: wait; }

/* ---------- how it works ---------- */

body.doc-page { overflow: auto; }
.doc { max-width: 760px; margin: 0 auto; padding: 48px 16px 80px; line-height: 1.6; }
.doc .topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.doc h1 { font-size: 44px; line-height: 1.05; margin: 0 0 12px; font-family: var(--type); }
.doc .lead { font-size: 18px; color: #cfccc5; }
.doc h2 { font-size: 13px; letter-spacing: 0.14em; color: var(--accent); margin: 40px 0 8px; text-transform: uppercase; }
.doc p { color: #d9d6cf; }
.steps-list { counter-reset: s; list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps-list li { counter-increment: s; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px 14px 54px; position: relative; }
.steps-list li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--cond); font-size: 13px; color: var(--accent); }
.steps-list b { display: block; font-family: var(--cond); font-size: 16px; }
.loop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--cond); font-size: 13px; margin: 16px 0; letter-spacing: 0.04em; }
.loop span { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; }
.loop em { color: var(--muted); font-style: normal; }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 13px; }
.facts dt { color: var(--muted); font-family: var(--cond); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 0; word-break: break-all; font-family: var(--cond); font-size: 13px; }
.disclaimer { margin-top: 48px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.credits { font-size: 12px; color: var(--muted); }

/* ---------- mobile ---------- */

@media (max-width: 900px) {
  .hud { min-width: 0; left: 8px; top: 8px; padding: 8px 10px; gap: 6px; }
  .brand b { font-size: 16px; }
  .compute { display: none; }
  .topright { right: 8px; top: 8px; }
  .hbtn { padding: 7px 9px; font-size: 12px; }
  .hbtn.primary span { display: none; }
  .moodles { display: none; }
  .side, .drawer { width: 100%; }
  .form-grid, .sliders { grid-template-columns: 1fr; }
  .rel-row { grid-template-columns: 1fr 1fr; }
  .rel-row input { grid-column: 1 / -1; }
  .looks { flex-direction: column; align-items: stretch; }
  #preview { align-self: center; }
  .doc h1 { font-size: 32px; }
  .facts { grid-template-columns: 1fr; }
}

/* ---------- landing page ---------- */

body.home { overflow: hidden; }
body.home #bg { position: fixed; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
body.home.ready #bg { opacity: 1; }
body.home .veil { position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(8, 9, 12, 0.5) 0%, rgba(8, 9, 12, 0.66) 55%, rgba(8, 9, 12, 0.86) 100%); pointer-events: none; }
.home-top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; z-index: 2; }
.home-top .brand { text-decoration: none; color: var(--text); }
.home-top .brand b { font-family: var(--type); font-size: 22px; }
.home-right { display: flex; align-items: center; gap: 12px; }
.live-pill { font-family: var(--cond); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #9fc27a; border: 1px solid #3b5a2a; background: rgba(21, 34, 15, 0.8); padding: 4px 10px; border-radius: 3px; }
.live-pill::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9fc27a; margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s infinite; }
.langs { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.langs button { background: rgba(20, 21, 24, 0.8); border: 0; padding: 6px 10px; font-family: var(--cond); letter-spacing: 0.08em; cursor: pointer; color: var(--muted); }
.langs button.on { background: var(--text); color: #111; }
.hero { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 90px 20px 40px; gap: 18px; }
.hero h1 { font-family: var(--type); font-size: clamp(34px, 6vw, 76px); line-height: 1.08; margin: 0; max-width: 1100px; color: #f1ece2; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 12px 40px rgba(0, 0, 0, 0.6); }
.hero h1 span { display: inline; }
.hero .sub { font-size: clamp(16px, 1.6vw, 21px); color: #d7d2c7; max-width: 720px; line-height: 1.45; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.hero .cta { display: inline-block; margin-top: 10px; background: var(--red); color: #f8efe4; text-decoration: none; font-family: var(--cond); font-weight: 700; font-size: clamp(18px, 2vw, 24px); letter-spacing: 0.1em; text-transform: uppercase; padding: 16px 34px; border-radius: 6px; border: 1px solid #c0493f; box-shadow: 0 10px 40px rgba(166, 58, 50, 0.45); transition: transform 0.15s, background 0.15s; }
.hero .cta:hover { background: #b84239; transform: translateY(-2px); }
.hero .secondary { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.hero .secondary a, .hero .secondary button { background: none; border: 0; color: #b9b4a9; font-family: var(--cond); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; padding: 4px 0; border-bottom: 1px solid transparent; }
.hero .secondary a:hover, .hero .secondary button:hover { color: var(--text); border-bottom-color: var(--text); }
.hero .steps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; }
.hero .steps li { display: flex; align-items: center; gap: 10px; color: #d7d2c7; font-size: 15px; }
.hero .steps i { font-style: normal; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(20, 21, 24, 0.8); font-family: var(--cond); color: var(--accent); }
.hero .fiction { margin-top: 10px; font-size: 12px; color: var(--muted); }
.sheet.settings h3 { margin-top: 18px; }
.options.big button { padding: 8px 12px; font-size: 14px; }
html[data-textsize='large'] { font-size: 17px; }
@media (max-width: 700px) { .hero { padding-top: 70px; } .hero .steps { flex-direction: column; align-items: flex-start; } }

/* ---------- character creation page ---------- */

/* pages that scroll (the game itself never does) */
html:has(body.create), html:has(body.home) { overflow: auto; height: auto; }
body.create { overflow: visible; height: auto; min-height: 100vh; background: var(--bg) radial-gradient(ellipse at 50% 0%, #1a1c21 0%, var(--bg) 60%); }
body.create .home-top { background: linear-gradient(rgba(11, 12, 14, 0.95), rgba(11, 12, 14, 0)); }
.toplink { color: #b9b4a9; font-family: var(--cond); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.toplink:hover { color: var(--text); }
.create-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; max-width: 1140px; margin: 0 auto; padding: 84px 20px 60px; align-items: start; }
.create-main h1 { font-family: var(--type); font-size: 34px; margin: 0 0 14px; }
.steps-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.steps-nav button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-family: var(--cond); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 12px; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; margin-bottom: -1px; }
.steps-nav button i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; }
.steps-nav button.on { color: var(--text); border-bottom-color: var(--accent); }
.steps-nav button.on i { border-color: var(--accent); color: var(--accent); }
.steps-nav button.done i { background: var(--good); border-color: var(--good); color: #0b0c0e; }
.step-panel { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; min-height: 360px; }
.step-panel h3 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin: 20px 0 10px; }
.step-panel h3:first-child { margin-top: 0; }
.step-panel .lead { margin: 0 0 10px; color: #d7d2c7; line-height: 1.45; }
.step-panel .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.step-panel label { display: flex; flex-direction: column; gap: 5px; font-family: var(--cond); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.step-panel input, .step-panel select, .step-panel textarea { font: inherit; font-family: var(--sans); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); background: #0e1114; border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px; width: 100%; }
.step-panel input:focus, .step-panel select:focus, .step-panel textarea:focus { outline: none; border-color: var(--accent); }
.step-panel input:disabled { opacity: 0.4; }
.step-panel .hours { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.step-panel .hours input { width: 70px; }
.step-panel textarea.story { width: 100%; resize: vertical; line-height: 1.55; font-family: var(--type); font-size: 14px; min-height: 160px; }
.step-panel .count { text-align: right; font-size: 11px; color: var(--muted); font-family: var(--cond); letter-spacing: 0.06em; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { background: #0e1114; border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: #b9b4a9; font-family: var(--sans); }
.chips button:hover { border-color: #5a5d64; color: var(--text); }
.chips button.on { color: #0b0c0e; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.look-rows { display: flex; flex-direction: column; gap: 10px; }
.look-rows > div { display: flex; align-items: center; gap: 12px; }
.look-rows > div > span { width: 56px; flex: none; font-family: var(--cond); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.look-rows .chips button { padding: 4px 10px; font-size: 12px; }
.arch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.arch-grid button { text-align: left; background: #0e1114; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; cursor: pointer; color: var(--text); display: flex; flex-direction: column; gap: 4px; }
.arch-grid button b { font-family: var(--type); font-size: 14px; }
.arch-grid button span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.arch-grid button:hover { border-color: #5a5d64; }
.arch-grid button.on { border-color: var(--accent); background: #1a1812; }
.step-panel .sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.step-panel .slider label { flex-direction: row; justify-content: space-between; align-items: baseline; }
.step-panel .slider label b { color: var(--text); font-weight: 600; font-size: 12px; }
.step-panel .slider input { padding: 0; border: 0; background: none; accent-color: var(--accent); }
details.more { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-family: var(--cond); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.rel-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; margin-bottom: 8px; }
.ghost { background: none; border: 1px solid var(--line); color: #b9b4a9; border-radius: 4px; padding: 10px 16px; font-family: var(--cond); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; font-size: 14px; }
.ghost:hover { color: var(--text); border-color: #5a5d64; }
.ghost.small { padding: 6px 12px; font-size: 12px; margin-top: 6px; }
.nav-buttons { display: flex; gap: 10px; margin-top: 16px; align-items: center; position: sticky; bottom: 0; padding: 12px 0 16px; background: linear-gradient(rgba(11, 12, 14, 0), rgba(11, 12, 14, 0.96) 30%); z-index: 3; }
.nav-buttons .spacer { flex: 1; }
.nav-buttons .btn.next { margin: 0; border: 0; cursor: pointer; padding: 12px 26px; font-size: 15px; }
.nav-buttons .btn.next.launch { background: var(--good); color: #0b0c0e; box-shadow: 0 8px 30px rgba(108, 143, 74, 0.35); }
.nav-buttons .btn.next:disabled { opacity: 0.5; cursor: wait; }
.preview-card { position: sticky; top: 84px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 6px; padding: 16px; text-align: center; }
.preview-card canvas { width: 220px; height: 250px; cursor: pointer; background: radial-gradient(ellipse at 50% 90%, #22252b 0%, transparent 70%); border-radius: 4px; }
.pv-name { font-family: var(--type); font-size: 22px; margin-top: 6px; }
.pv-identity { font-size: 13px; color: #d7d2c7; line-height: 1.4; margin: 6px 0 10px; min-height: 18px; }
.pv-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 10px; }
.pv-tags span { font-size: 11px; background: #0e1114; border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; color: #b9b4a9; }
.pv-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; text-align: left; font-size: 12px; margin: 0 0 10px; }
.pv-facts dt { color: var(--muted); font-family: var(--cond); letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; align-self: baseline; }
.pv-facts dd { margin: 0; }
.preview-card .small { font-size: 11px; }
.reading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; gap: 16px; color: #d7d2c7; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sum-title { font-family: var(--type); font-size: 24px; margin: 0 0 10px; }
.identity-line input { font-family: var(--type); font-size: 17px; color: #f1ece2; background: #0e1114; }
.sum-story { margin-top: 10px; }
.adapted { color: var(--warn); font-size: 13px; margin: 10px 0 0; }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.sum-row span { display: block; font-family: var(--cond); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.step-panel input.wide { margin-top: 12px; }
@media (max-width: 900px) {
  .create-wrap { grid-template-columns: minmax(0, 1fr); padding: 70px 16px 40px; }
  .create-main h1 { font-size: 26px; }
  .create-main { min-width: 0; }
  .toplink { display: none; }
  .preview-card { position: static; order: -1; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 0 14px; text-align: left; align-items: center; padding: 10px 14px; }
  .preview-card canvas { width: 110px; height: 125px; grid-row: span 4; }
  .pv-facts { display: none; }
  .pv-name { font-size: 18px; margin-top: 0; }
  .pv-tags { justify-content: flex-start; }
  .preview-card .small { display: none; }
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .step-panel .grid2, .step-panel .sliders, .sum-grid { grid-template-columns: 1fr; }
  .rel-row { grid-template-columns: 1fr; }
}

a.brand { text-decoration: none; color: inherit; }


/* ---------- the Exchange panel ---------- */

.ev.market { border-left: 2px solid #3a6ea5; }
.up { color: #4fe3a0; }
.down { color: #ff6a5c; }
.market-head > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.market-head h3 { margin: 0; }
.regime { font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--line); color: var(--muted); }
.regime.bull, .regime.euphoria { color: #4fe3a0; border-color: #2d6b4f; background: rgba(79, 227, 160, 0.08); }
.regime.bear, .regime.crash { color: #ff6a5c; border-color: #7a332b; background: rgba(255, 106, 92, 0.08); }
.regime.euphoria, .regime.crash { animation: pulse 1.2s infinite; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.chart-head h3 { margin: 0; }
.chart-head h3 small { color: var(--muted); font-weight: 400; font-family: var(--sans); font-size: 12px; }
.chart-head .price { text-align: right; }
.chart-head .price b { display: block; font-family: var(--type); font-size: 20px; }
.chart-head .price span { font-size: 12px; font-family: var(--cond); letter-spacing: 0.06em; }
#candles { width: 100%; height: 170px; display: block; background: #0a0f14; border-radius: 4px; border: 1px solid var(--line); }
table.assets { width: 100%; border-collapse: collapse; }
table.assets tr { cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
table.assets tr:hover { background: rgba(255, 255, 255, 0.03); }
table.assets tr.sel { background: rgba(217, 168, 74, 0.08); }
table.assets td { padding: 6px 4px; font-size: 13px; vertical-align: middle; }
table.assets td small { display: block; color: var(--muted); font-size: 11px; }
table.assets td.num, .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--cond); font-size: 13px; }
canvas.spark { display: block; width: 72px; height: 22px; }
.lb-row { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; }
.lb-row:hover { background: rgba(255, 255, 255, 0.03); }
.lb-row .rank { font-family: var(--cond); color: var(--muted); }
.lb-row .who small { display: block; color: var(--muted); font-size: 11px; }
.news { font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); line-height: 1.35; }
.news b { font-family: var(--cond); letter-spacing: 0.04em; margin-right: 4px; }
.news small { color: var(--muted); margin-left: 4px; }
.tape-row { display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 8px; font-size: 12px; padding: 3px 0; color: #d7d2c7; }
.trading .stats { margin-bottom: 6px; }
table.positions { width: 100%; border-collapse: collapse; font-size: 13px; }
table.positions td { padding: 4px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
table.positions td:last-child { text-align: right; font-family: var(--cond); }
table.positions small { color: var(--muted); }


/* ---------- Neo Terminal theme (2026 · AI) ---------- */
/* The world keeps its Zomboid look; the interface is glass, mono labels and a cyan-violet accent. */

body { letter-spacing: 0; }
h1, h2, h3, h4, .brand b, .pv-name, .sum-title, .create-main h1, .hero h1, .drawer h2, .sheet h2 { font-family: var(--type); letter-spacing: -0.01em; }
.hero h1 { font-weight: 700; letter-spacing: -0.025em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 20px 60px rgba(94, 242, 255, 0.12); }
.brand .logo { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border-radius: 8px; font-family: var(--type); font-weight: 700; }
.brand b { letter-spacing: -0.02em; }
.hud, .side, .drawer, .sheet, .step-panel, .preview-card, .card, .moodles, .ticker-bar, .settings, .opt { background: var(--panel); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); border: 1px solid var(--line); box-shadow: var(--glow); }
.hud { border-radius: 14px; }
.side, .drawer { border-radius: 14px 0 0 14px; }
.sheet, .step-panel, .preview-card, .card { border-radius: 14px; }
.card { box-shadow: none; background: rgba(255, 255, 255, 0.03); border-color: var(--line); }
.pill, .live-pill, .regime, .tag, .filters button, .tabs button, .count, .steps-nav button, .labels, .pv-facts dt, .facts-mini dt, .step-panel label, .step-panel h3, .sheet h3, .look-rows > div > span, .swatch-rows span, .slider label, .sum-row span, .stats label, .toplink, .hero .secondary a, .hero .secondary button, .hbtn, .btn, .ghost, .nav-buttons .btn.next, .create-wide, .cta { font-family: var(--cond); letter-spacing: 0.06em; }
.pill { border-radius: 8px; border: 1px solid var(--line-accent); background: rgba(94, 242, 255, 0.05); color: #bfefff; font-size: 10px; padding: 4px 8px; }
.pill.live, .live-pill { color: var(--accent); border-color: var(--line-accent); background: rgba(94, 242, 255, 0.07); box-shadow: 0 0 18px rgba(94, 242, 255, 0.14); }
.live-pill::before, .pill.live::before { background: var(--accent); }
.hbtn, .ghost { border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: #d9dde6; font-size: 11px; }
.hbtn:hover, .ghost:hover { border-color: var(--line-accent); color: #fff; }
.btn, .btn.primary, .hero .cta, .nav-buttons .btn.next, .create-wide, .btn.submit { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border: 0; border-radius: 10px; font-weight: 600; letter-spacing: 0.08em; box-shadow: 0 10px 34px rgba(94, 242, 255, 0.18); }
.btn:hover, .hero .cta:hover, .nav-buttons .btn.next:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.nav-buttons .btn.next.launch { background: linear-gradient(135deg, #4fe3a0, #5ef2ff); color: #06111a; box-shadow: 0 10px 34px rgba(79, 227, 160, 0.25); }
.btn.danger, button.danger { background: rgba(224, 72, 95, 0.12); color: #ff8a9b; border: 1px solid rgba(224, 72, 95, 0.35); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs button, .filters button { font-size: 10px; letter-spacing: 0.1em; }
.filters button.on, .chips button.on, .options button.on { background: rgba(94, 242, 255, 0.12); color: var(--accent); border-color: var(--line-accent); }
.chips button.on { background: rgba(94, 242, 255, 0.14); font-weight: 600; }
.steps-nav button.on { color: var(--accent); border-bottom-color: var(--accent); }
.steps-nav button.on i { border-color: var(--accent); color: var(--accent); }
.steps-nav button.done i { background: var(--good); border-color: var(--good); }
.step-panel h3, .sheet h3, .drawer h4, .card h3 { color: var(--accent); font-size: 10px; letter-spacing: 0.14em; }
.step-panel label, .look-rows > div > span, .slider label, .sum-row span, .pv-facts dt, .facts-mini dt, .stats label { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); }
.step-panel input:focus, .step-panel select:focus, .step-panel textarea:focus, .sheet input:focus, .sheet textarea:focus { border-color: var(--line-accent); box-shadow: 0 0 0 3px rgba(94, 242, 255, 0.1); }
.step-panel textarea.story, .sheet textarea.story, .identity-line input, .bio, .diary-entry, .who .identity { font-family: var(--sans); font-size: 14px; }
.identity-line input { font-family: var(--type); font-size: 17px; font-weight: 500; }
.ticker-bar { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.ticker-bar b { color: var(--accent); font-family: var(--cond); }
.compute i, .meter i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.ev.market { border-left-color: var(--accent2); }
.regime { font-size: 10px; letter-spacing: 0.12em; border-radius: 6px; }
.simchip, .chip { font-family: var(--sans); }
.drawer .who h2 { font-size: 24px; }
.hero .steps i { border-color: var(--line-accent); color: var(--accent); background: rgba(94, 242, 255, 0.06); }
.hero .sub { color: #cfd6e2; }
.langs { border-radius: 8px; }
.langs button.on { background: var(--accent); color: #06111a; }
.moodles { border-radius: 12px; }
::selection { background: rgba(94, 242, 255, 0.3); }
.topright a.btn.primary, .topright .btn.primary, a#openCreate { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border: 0; box-shadow: 0 8px 26px rgba(94, 242, 255, 0.2); }
.hbtn.primary, .hbtn.primary:hover { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; border-color: transparent; box-shadow: 0 8px 26px rgba(94, 242, 255, 0.2); }


/* ---------- landing: the billboard ---------- */

body.billboard .home-top { padding: 14px 18px; }
.corner { display: flex; gap: 14px; align-items: center; }
.corner a, .corner button { background: none; border: 0; padding: 4px 2px; color: rgba(232, 234, 238, 0.55); font-family: var(--cond); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.corner a:hover, .corner button:hover { color: var(--text); }
body.billboard .veil { background: radial-gradient(ellipse at 50% 50%, rgba(8, 9, 12, 0.45) 0%, rgba(8, 9, 12, 0.7) 60%, rgba(8, 9, 12, 0.9) 100%); }
body.billboard .hero { padding: 72px 16px 32px; gap: 0; }
.plate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 28px clamp(16px, 4vw, 56px); border-radius: 22px; background: rgba(8, 9, 12, 0.7); border: 1px solid rgba(255, 255, 255, 0.07); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5); max-width: 1180px; }
body.billboard .hero h1 { font-family: var(--type); font-weight: 700; font-size: clamp(42px, 6.6vw, 96px); line-height: 0.98; letter-spacing: -0.035em; text-transform: uppercase; color: #ffffff; margin: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 24px 70px rgba(0, 0, 0, 0.55); }
body.billboard .hero .sub { font-family: var(--sans); font-size: clamp(14px, 1.7vw, 24px); color: #ffffff; margin: 0; line-height: 1.35; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.cta.giant { display: inline-block; margin-top: 6px; padding: clamp(16px, 2.2vw, 26px) clamp(28px, 4vw, 56px); font-size: clamp(16px, 1.6vw, 22px); border-radius: 14px; }
.caption { min-height: 24px; font-family: var(--cond); font-size: 13px; letter-spacing: 0.02em; color: #bfefff; opacity: 0; transition: opacity 0.4s ease; }
.caption::before { content: '●'; color: var(--accent); margin-right: 8px; font-size: 9px; vertical-align: 2px; }
.caption.in { opacity: 1; }
@media (max-width: 700px) {
  body.billboard .hero { padding: 64px 12px 24px; min-height: 100svh; }
  .plate { padding: 26px 16px; border-radius: 16px; gap: 18px; }
  body.billboard .hero .sub { font-size: 13px; }
  .corner a:not(#continueLink), .corner button { display: none; }
  .corner #continueLink { display: inline; }
}

/* ---------- quick start ---------- */

.quick { max-width: 760px; margin: 0 auto; padding: 110px 20px 60px; display: flex; flex-direction: column; gap: 18px; align-items: stretch; }
.quick h1 { font-family: var(--type); font-weight: 700; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.02; letter-spacing: -0.03em; margin: 0; }
.quick textarea { width: 100%; min-height: 160px; resize: vertical; font: 18px/1.5 var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.quick textarea:focus { outline: none; border-color: var(--line-accent); box-shadow: 0 0 0 4px rgba(94, 242, 255, 0.1); }
.quick-actions { display: flex; gap: 12px; align-items: stretch; }
.quick-actions .ghost { flex: 0 0 auto; }
.quick-actions .btn.start { flex: 1; margin: 0; padding: 18px; font-size: 18px; letter-spacing: 0.12em; }
.quick-actions .btn.start:disabled { opacity: 0.7; cursor: wait; }
.linklike { align-self: center; background: none; border: 0; color: var(--muted); font-family: var(--cond); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; padding: 6px; }
.linklike:hover { color: var(--text); }
@media (max-width: 700px) { .quick { padding: 84px 16px 40px; } .quick-actions { flex-direction: column; } }

/* ---------- the purpose, inside the game ---------- */

.hud .purpose { font-family: var(--sans); font-size: 11px; color: rgba(232, 234, 238, 0.6); margin-top: 6px; }
.arrival { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(8, 9, 12, 0.78); backdrop-filter: blur(6px); transition: opacity 0.9s ease; }
.arrival.out { opacity: 0; pointer-events: none; }
.arrival p { font-family: var(--type); font-weight: 700; font-size: clamp(26px, 4.5vw, 56px); line-height: 1.05; letter-spacing: -0.03em; text-align: center; max-width: 900px; padding: 0 24px; color: #fff; margin: 0; }


/* ---------- drama meter ---------- */
.hud .drama { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-family: var(--cond); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.hud .drama .bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; min-width: 60px; }
.hud .drama .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4fe3a0, #f0c35a 60%, #ff6a5c); transition: width 0.6s ease; }
.hud .drama .val { color: #d9dde6; }
.hud .drama.hot .val { color: #ff6a5c; }


/* ---------- Axiom-style terminal ---------- */
.hero-coin { border: 1px solid var(--line-accent); background: linear-gradient(160deg, rgba(94, 242, 255, 0.08), rgba(139, 123, 255, 0.05)); cursor: pointer; }
.hero-top, .hero-id { display: flex; align-items: center; gap: 10px; }
.hero-top { justify-content: space-between; }
.hero-coin h3 { margin: 0; font-size: 20px; color: var(--text); letter-spacing: -0.01em; }
.hero-coin h3 small, .chart-head h3 small { color: var(--muted); font-weight: 400; font-family: var(--sans); font-size: 12px; }
.hero-price { text-align: right; }
.hero-price b { display: block; font-family: var(--type); font-size: 26px; }
.hero-price span, .chart-head .price span { font-family: var(--cond); font-size: 11px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin: 12px 0 8px; }
.hero-stats label { display: block; font-family: var(--cond); font-size: 9px; letter-spacing: 0.12em; color: var(--muted); }
.hero-stats b { font-family: var(--cond); font-size: 13px; }
.hero-spark { width: 100%; height: 56px; display: block; }
.tok-av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-family: var(--cond); font-size: 10px; font-weight: 600; color: #fff; flex: none; }
.tok-av.launch { border-radius: 50%; }
.pulse h3 { margin-bottom: 8px; }
.pulse-cols { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pulse-cols h4 { margin: 0 0 6px; font-family: var(--cond); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pulse-cols h4 small { color: var(--accent); margin-left: 4px; }
.tok { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; background: rgba(255, 255, 255, 0.02); }
.tok:hover { border-color: var(--line-accent); }
.tok.sel { border-color: var(--accent); }
.tok-head { display: flex; align-items: center; gap: 8px; }
.tok-name { flex: 1; min-width: 0; }
.tok-name b { font-family: var(--cond); font-size: 12px; }
.tok-name small, .tok-mc span { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-mc { text-align: right; }
.tok-mc b { font-family: var(--cond); font-size: 12px; }
.tok-mc span { font-family: var(--cond); }
.tok-stats { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-family: var(--cond); font-size: 10px; color: var(--muted); }
.tok-stats b { color: var(--text); }
.tok-stats .curve { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.tok-stats .curve i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.tok-stats .grad { color: var(--good); }
.tok-stats .dead { color: var(--bad); }
.crown { font-size: 11px; }
.rug { font-size: 9px; color: #fff; background: var(--bad); border-radius: 3px; padding: 1px 4px; vertical-align: middle; }
table.assets.axiom th { font-family: var(--cond); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 4px; font-weight: 500; }
table.assets.axiom th:first-child { text-align: left; }
table.assets.axiom td { padding: 5px 4px; font-size: 12px; }
table.assets.axiom td.tk { display: flex; align-items: center; gap: 8px; }
table.assets.axiom td.tk b { font-family: var(--cond); font-size: 12px; }
table.assets.axiom td.tk small { display: block; font-size: 10px; }
table.assets.axiom td.num { font-size: 11px; }
.trades { margin-top: 8px; font-family: var(--cond); font-size: 10px; }
.trades-head, .trade { display: grid; grid-template-columns: 44px 36px 1fr 1fr 1fr; gap: 6px; padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.trades-head { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.trade .side { font-weight: 600; }
.trade.buy .side { color: var(--good); }
.trade.sell .side { color: var(--bad); }
.trade .who { text-align: right; color: #d9dde6; }
.wallet { display: grid; grid-template-columns: 20px 1fr auto auto 44px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; font-size: 12px; }
.wallet:hover { background: rgba(255, 255, 255, 0.03); }
.wallet .rank { font-family: var(--cond); color: var(--muted); font-size: 10px; }
.wallet .who small { display: block; color: var(--muted); font-size: 10px; }
.wallet .pos { font-family: var(--cond); font-size: 10px; color: var(--muted); text-align: right; }

/* the real coin */
.hero-coin.is-real { border-color: rgba(79, 227, 160, 0.45); box-shadow: 0 0 0 1px rgba(79, 227, 160, 0.15), 0 12px 40px rgba(79, 227, 160, 0.08); }
.live-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.live-badge { font-family: var(--cond); font-size: 10px; letter-spacing: 0.12em; color: var(--good); border: 1px solid rgba(79, 227, 160, 0.4); border-radius: 6px; padding: 3px 8px; background: rgba(79, 227, 160, 0.08); animation: pulse 1.6s infinite; }
.trade-link { margin-left: auto; font-family: var(--cond); font-size: 11px; letter-spacing: 0.06em; color: #06111a; background: linear-gradient(135deg, #4fe3a0, var(--accent)); border-radius: 8px; padding: 6px 10px; text-decoration: none; font-weight: 600; }
.ca-row { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 6px; }
.ca-row code { font-family: var(--cond); color: #bfefff; background: rgba(255, 255, 255, 0.05); padding: 3px 6px; border-radius: 5px; }
.ca-row .copy { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 3px 8px; font-family: var(--cond); font-size: 10px; cursor: pointer; }
.ca-row a { color: var(--muted); font-family: var(--cond); font-size: 10px; }
.hero-stats.real { border-top: 1px dashed rgba(79, 227, 160, 0.25); padding-top: 8px; }
.tok-img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }

/* holders, flags, PnL card */
.subtabs { display: flex; gap: 4px; margin: 10px 0 6px; }
.subtabs button { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 4px 10px; font-family: var(--cond); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.subtabs button.on { color: var(--accent); border-color: var(--line-accent); background: rgba(94, 242, 255, 0.07); }
.flags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.flag { font-family: var(--cond); font-size: 9.5px; letter-spacing: 0.08em; border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: #d9dde6; }
.flag.bad { color: #ff8a7c; border-color: rgba(255, 106, 92, 0.4); background: rgba(255, 106, 92, 0.06); }
.flag.live { color: var(--good); border-color: rgba(79, 227, 160, 0.4); }
.holder { display: grid; grid-template-columns: 18px 1fr auto auto auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 11px; cursor: pointer; }
.holder:hover { background: rgba(255, 255, 255, 0.03); }
.holder .rank { font-family: var(--cond); color: var(--muted); font-size: 10px; }
.tag { font-style: normal; font-family: var(--cond); font-size: 8.5px; letter-spacing: 0.08em; border-radius: 3px; padding: 1px 4px; background: rgba(255, 255, 255, 0.08); color: #d9dde6; }
.tag.dev { background: rgba(240, 195, 90, 0.18); color: #f0c35a; }
.tag.snipe { background: rgba(255, 106, 92, 0.16); color: #ff8a7c; }
.pnl-card { position: relative; border-radius: 14px; padding: 14px 16px; margin: 6px 0 10px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 140% at 100% 0%, rgba(94, 242, 255, 0.16), transparent 60%), linear-gradient(160deg, #10141b, #0b0d12); }
.pnl-card.loss { background: radial-gradient(120% 140% at 100% 0%, rgba(255, 106, 92, 0.16), transparent 60%), linear-gradient(160deg, #14100f, #0d0b0b); }
.pnl-top { display: flex; justify-content: space-between; font-family: var(--cond); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pnl-big { font-family: var(--type); font-weight: 700; font-size: 34px; letter-spacing: -0.02em; margin: 6px 0 2px; }
.pnl-sub { font-family: var(--cond); font-size: 11px; color: #d9dde6; }
.pnl-brand { margin-top: 10px; font-family: var(--cond); font-size: 9px; letter-spacing: 0.16em; color: rgba(94, 242, 255, 0.7); }

/* wallet creation */
.quick .lead { color: #cfd6e2; margin: -6px 0 4px; font-size: 16px; line-height: 1.45; }
.quick .field { display: flex; flex-direction: column; gap: 6px; font-family: var(--cond); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.quick .field input { font: 17px/1.4 var(--sans); text-transform: none; letter-spacing: 0; color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.quick .field input:focus { outline: none; border-color: var(--line-accent); box-shadow: 0 0 0 4px rgba(94, 242, 255, 0.1); }
#wAddress { font-family: var(--cond) !important; font-size: 15px !important; }
.quick .safety { margin: -4px 0 0; font-size: 12px; color: #f0c35a; }
.quick .safety::before { content: '🔒 '; }
.reading-wallet { display: flex; align-items: center; gap: 12px; color: #cfd6e2; font-family: var(--cond); font-size: 13px; }
.reading-wallet .spinner { width: 22px; height: 22px; border-width: 2px; }
.secret-alarm { border: 1px solid rgba(255, 106, 92, 0.6); background: rgba(255, 106, 92, 0.1); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: #ffd0ca; font-size: 14px; line-height: 1.45; }
.secret-alarm b { color: #ff8a7c; font-size: 16px; }
/* the wallet card on the sheet */
.wallet-card { border: 1px solid rgba(153, 69, 255, 0.35); border-radius: 14px; padding: 12px 14px; background: linear-gradient(160deg, rgba(20, 241, 149, 0.06), rgba(153, 69, 255, 0.07)); margin: 6px 0 10px; }
.wallet-card .wc-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--cond); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.wallet-card .wc-top a { color: #b9a6ff; text-decoration: none; }
.wallet-card .wc-big { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 2px; }
.wallet-card .wc-big b { font-family: var(--type); font-size: 26px; }
.wallet-card .wc-big span { font-family: var(--cond); font-size: 13px; }
.wallet-card canvas { width: 100%; height: 40px; display: block; margin: 4px 0; }
.wallet-card .wc-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; font-size: 12px; }
.wallet-card .wc-stats label { font-family: var(--cond); font-size: 9px; letter-spacing: 0.1em; color: var(--muted); display: block; }
.wallet-card .wc-bags { margin-top: 6px; font-family: var(--cond); font-size: 11px; color: #d9dde6; }

/* camera lock */
.camlock { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(12, 14, 20, 0.88); border: 1px solid var(--line); backdrop-filter: blur(10px); font-family: var(--cond); font-size: 12px; color: #cfd6e2; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); transition: transform 0.2s; }
.camlock.on { border-color: var(--line-accent); }
.camlock .cl-state { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.camlock.on .cl-state svg { color: var(--accent); }
.camlock b { color: #fff; font-weight: 600; }
.camlock button { border: 0; border-radius: 999px; padding: 6px 12px; font-family: var(--cond); font-size: 11px; letter-spacing: 0.06em; cursor: pointer; color: #06111a; background: linear-gradient(135deg, var(--accent), var(--accent2)); white-space: nowrap; }
.camlock:not(.on) button { background: rgba(255, 255, 255, 0.08); color: #e8eaee; border: 1px solid var(--line); }
.camlock.nudge { animation: camnudge 0.45s 2; }
@keyframes camnudge { 0%, 100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 6px)); } 75% { transform: translateX(calc(-50% + 6px)); } }
body.drawer-open .camlock { left: calc((100% - 440px) / 2); }
@media (max-width: 640px) { body.drawer-open .camlock { display: none; } }
@media (max-width: 640px) { .camlock { bottom: 40px; font-size: 11px; } }

/* ===== HUD v3: compact, readable, no blur over the canvas ===== */
.hud, .moodles, .ticker-bar, .side, .drawer, .camlock, .topright .hbtn, .zoom button { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.hud { --hud-bg: rgba(13, 15, 21, 0.88); top: 12px; left: 12px; width: 300px; min-width: 0; padding: 12px 14px 12px; gap: 8px; background: var(--hud-bg); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-family: var(--sans); }
.hud .purpose, .hud .compute, .hud .pills { display: none; }
.hud-top { display: flex; align-items: center; gap: 8px; }
.hud .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.hud .brand .logo { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #06111a; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.hud .brand b { font-family: var(--type); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: #f4f5f7; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #4fe3a0; box-shadow: 0 0 0 0 rgba(79, 227, 160, 0.6); animation: livepulse 1.8s infinite; font-size: 0; color: transparent; overflow: hidden; flex: none; }
.live-dot.dormant { background: #f0c35a; animation: none; }
.live-dot.offline { background: #ff6a5c; animation: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(79, 227, 160, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(79, 227, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 227, 160, 0); } }
.hud-min { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.04); color: #c9ced8; display: grid; place-items: center; cursor: pointer; }
.hud-min:hover { background: rgba(255, 255, 255, 0.1); }
.hud-time { display: flex; align-items: center; gap: 9px; color: #f4f5f7; }
.hud-time .sky { display: grid; place-items: center; width: 22px; height: 22px; }
.hud-time .day { font-size: 15px; font-weight: 600; color: #c9ced8; }
.hud-time .time { font-family: var(--cond); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1; }
.hud-time .weather { margin-left: auto; font-size: 13px; color: #9fb0c6; }
.hud-goat { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; padding: 5px 10px; width: 100%; border-radius: 10px; border: 1px solid rgba(242, 193, 78, 0.55); background: linear-gradient(90deg, rgba(242, 193, 78, 0.18), rgba(242, 193, 78, 0.04)); color: #f2c14e; font: 700 11px var(--sans); letter-spacing: 0.08em; cursor: pointer; text-align: left; }
.hud-goat b { color: #fff3cf; font: 700 13px var(--sans); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-goat:hover { background: linear-gradient(90deg, rgba(242, 193, 78, 0.3), rgba(242, 193, 78, 0.08)); }
body.hud-collapsed .hud-goat { display: none; }
.goat-line { margin-top: 4px; font: 600 13px var(--sans); color: #f2c14e; }
.goat-tag { padding: 1px 7px; border-radius: 999px; font: 700 10px var(--sans); letter-spacing: 0.08em; color: #1b1405; background: #f2c14e; }
.hud-bell { margin: -2px 0 2px 31px; font: 500 12px var(--sans); color: #8d97a8; }
.hud-bell.live { color: #f0c35a; }
body.hud-collapsed .hud-bell { display: none; }
.hud-drama { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; margin: 0; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.03); color: #dfe3ea; font: 500 13px var(--sans); cursor: pointer; text-align: left; }
.hud-drama:hover { border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06); }
.hud-drama .bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; min-width: 70px; }
.hud-drama .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4fe3a0, #f0c35a 60%, #ff6a5c); transition: width 0.6s ease; }
.hud-drama .val { white-space: nowrap; }
.hud-drama.hot .val { color: #ff8a7c; }
.hud-alert { align-self: flex-start; font: 600 12px var(--sans); color: #ffd0ca; background: rgba(255, 106, 92, 0.16); border: 1px solid rgba(255, 106, 92, 0.4); border-radius: 6px; padding: 2px 8px; }
body.hud-collapsed .hud { width: auto; padding: 8px 10px; flex-direction: row; align-items: center; gap: 12px; }
body.hud-collapsed .hud-drama, body.hud-collapsed .hud-time .weather, body.hud-collapsed .hud-time .day { display: none; }
body.hud-collapsed .hud-time .time { font-size: 18px; }
body.hud-collapsed .hud-min svg { transform: rotate(90deg); }
/* first visit tip */
.intro-tip { position: absolute; top: 150px; left: 12px; z-index: 4; max-width: 300px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: rgba(13, 15, 21, 0.92); border: 1px solid var(--line-accent); color: #e8ecf2; font: 500 14px/1.4 var(--sans); }
.intro-tip button { border: 0; background: none; color: #9fb0c6; font-size: 18px; cursor: pointer; line-height: 1; }
/* "?" menu */
.menu-pop { position: absolute; top: 56px; right: 12px; z-index: 8; width: 280px; padding: 12px; border-radius: 12px; background: rgba(13, 15, 21, 0.96); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 8px; font: 500 14px var(--sans); color: #e8ecf2; }
.menu-pop .menu-lead { margin: 0 0 4px; color: #b9c2d0; font-size: 13px; line-height: 1.4; }
.menu-pop a, .menu-pop > button { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; color: #e8ecf2; text-decoration: none; background: rgba(255, 255, 255, 0.04); border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop > button:hover { background: rgba(255, 255, 255, 0.09); }
.menu-pop kbd { font: 600 11px var(--cond); color: #9fb0c6; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 4px; padding: 1px 5px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 4px 10px; }
.seg { display: flex; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; color: #b9c2d0; font: 500 12px var(--sans); padding: 5px 9px; cursor: pointer; }
.seg button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #06111a; }
/* debug panel (F3) */
.debug-panel { position: absolute; left: 12px; bottom: 44px; z-index: 6; width: 250px; padding: 10px 12px; border-radius: 10px; background: rgba(13, 15, 21, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); font: 500 13px var(--sans); color: #dfe3ea; display: flex; flex-direction: column; gap: 6px; }
.debug-panel:not([hidden]) ~ .zoom { display: none; }
.dbg-head { display: flex; justify-content: space-between; font-weight: 600; }
.dbg-head button { border: 0; background: none; color: #9fb0c6; font-size: 18px; cursor: pointer; line-height: 1; }
.dbg-row { display: flex; justify-content: space-between; gap: 10px; }
.dbg-row span { color: #9fb0c6; }
.dbg-row b { font-family: var(--cond); font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.action-bar .ab-release { opacity: 0.85; }
.dbg-sub { color: #7f8ea3; font-size: 10.5px; margin: -2px 0 4px; line-height: 1.3; }
#dbgPets { display: grid; gap: 3px; margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); max-height: 260px; overflow: auto; }
.dbg-meter { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dbg-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
/* right-hand stats card, same style as the HUD */
.moodles { top: 64px; right: 12px; width: 220px; padding: 10px 12px; gap: 6px; align-items: stretch; background: rgba(13, 15, 21, 0.88); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font-family: var(--sans); }
.mo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.mo-head b { font-size: 15px; color: #f4f5f7; }
.mo-mood { font-size: 13px; color: #b9c2d0; text-align: right; }
.mo-row { display: grid; grid-template-columns: 52px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; color: #c9ced8; }
.mo-row b { font: 500 13px var(--cond); font-variant-numeric: tabular-nums; text-align: right; color: #e8ecf2; }
.mo-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.mo-bar i { display: block; height: 100%; border-radius: 3px; background: #4fe3a0; }
.mo-row.warn .mo-bar i { background: #f0c35a; }
.mo-row.bad .mo-bar i { background: #ff6a5c; }
.mo-rank { display: flex; align-items: center; gap: 8px; }
.mo-cap { font: 500 11px var(--sans); color: #8d97a8; }
.mo-states { display: flex; flex-wrap: wrap; gap: 4px; }
.mo-st { padding: 1px 7px; border-radius: 999px; font: 600 11px var(--sans); border: 1px solid currentColor; }
.mo-low { color: #9aa3b5; background: rgba(120, 130, 150, 0.15); }
.mo-drunk { color: #f0c35a; background: rgba(240, 195, 90, 0.12); }
.mo-alcoholic { color: #ff8a7c; background: rgba(255, 138, 124, 0.12); }
.mo-evicted { color: #c9a27a; background: rgba(201, 162, 122, 0.12); }
.mo-money { display: flex; justify-content: space-between; font-size: 13px; color: #c9ced8; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 6px; margin-top: 2px; }
.mo-money b { font: 600 14px var(--cond); color: #4fe3a0; font-variant-numeric: tabular-nums; }
.mo-money b.bad { color: #ff8a7c; }
@media (max-width: 640px) {
  .hud { width: auto; max-width: calc(100% - 120px); padding: 8px 10px; }
  .hud-time .time { font-size: 20px; }
  .moodles { display: none; }
  .intro-tip { top: 120px; max-width: calc(100% - 24px); }
}

/* a static vignette over the town, composited by the browser (no canvas cost); off in Low quality */
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.34) 100%); }
body.gfx-low .vignette { display: none; }

/* steering your character */
.action-bar { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(13, 15, 21, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); font: 500 13px var(--sans); color: #dfe3ea; white-space: nowrap; }
.action-bar .ab-who { padding: 0 6px 0 10px; font-weight: 600; color: #fff; }
.action-bar button { border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #f1f3f7; border-radius: 999px; padding: 7px 14px; font: 600 13px var(--sans); cursor: pointer; }
.action-bar button:hover { background: rgba(255, 255, 255, 0.12); }
.action-bar .ab-trade { border: 0; color: #06111a; background: linear-gradient(135deg, #14f195, #5ef2ff 50%, #9945ff); }
.action-bar .ab-hint { color: #8d97a8; font-size: 12px; padding: 0 8px; }
body.drawer-open .action-bar { left: calc((100% - 440px) / 2); }
.ctx-menu { position: fixed; z-index: 9; width: 230px; padding: 8px; border-radius: 12px; background: rgba(13, 15, 21, 0.97); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 4px; font-family: var(--sans); }
.ctx-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 6px; color: #fff; font-size: 15px; }
.ctx-head span { font-size: 12px; color: #8d97a8; }
.ctx-menu button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 0; border-radius: 8px; padding: 8px 10px; background: rgba(255, 255, 255, 0.04); color: #eef0f4; cursor: pointer; font: 600 14px var(--sans); }
.ctx-menu button span { font: 400 12px var(--sans); color: #9aa3b2; }
.ctx-menu button:hover { background: rgba(94, 242, 255, 0.12); }
.ctx-menu .ctx-profile { font-weight: 500; color: #b9c2d0; }
#tsLev { width: 100%; accent-color: #5ef2ff; }
.toast { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 10; padding: 9px 16px; border-radius: 999px; background: rgba(13, 15, 21, 0.95); border: 1px solid rgba(94, 242, 255, 0.3); color: #eef0f4; font: 500 14px var(--sans); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
.toast.bad { border-color: rgba(255, 106, 92, 0.5); color: #ffd0ca; }
@media (max-width: 640px) {
  .action-bar { bottom: 84px; max-width: calc(100% - 24px); overflow-x: auto; }
  .action-bar .ab-hint { display: none; }
}

.ctx-menu .ctx-fight b { color: #ff9a8c; }
.ctx-menu .ctx-fight:hover { background: rgba(255, 106, 92, 0.14); }
.action-bar .ab-leave { border-color: rgba(240, 195, 90, 0.5); color: #ffe2a3; }

/* The Tide: rank badges */
.rank-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--sans); color: var(--rk); border: 1px solid color-mix(in srgb, var(--rk) 55%, transparent); background: color-mix(in srgb, var(--rk) 12%, transparent); border-radius: 999px; padding: 2px 9px; vertical-align: middle; letter-spacing: 0; }
.rank-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--rk); }
.rank-whale { box-shadow: 0 0 12px rgba(227, 191, 98, 0.25); }
.drawer h2 .rank-badge { font-size: 12px; margin-left: 6px; }
.mo-rank { margin: -2px 0 2px; }

/* ---------- Gull Mart: the store menu ---------- */
.store-sheet { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9; width: min(620px, calc(100vw - 24px)); max-height: min(640px, calc(100% - 90px)); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fbf6ea; color: #1d1d1f; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); font-family: var(--sans); }
.gm-head { position: relative; padding: 14px 16px 18px; background: #fbf6ea; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: linear-gradient(#f47b20 0 33%, #e3262c 33% 66%, #1f9e74 66%); }
.gm-logo { display: flex; align-items: baseline; gap: 8px; }
.gm-logo b { font: 900 26px/1 var(--sans); letter-spacing: -0.02em; color: #e3262c; }
.gm-logo span { font: 800 13px var(--sans); color: #fff; background: #1f9e74; border-radius: 6px; padding: 2px 6px; }
.gm-cash { font: 700 15px var(--cond); font-variant-numeric: tabular-nums; background: #1d1d1f; color: #f2c14e; padding: 6px 10px; border-radius: 9px; }
.gm-close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b6458; }
.gm-tabs { display: flex; gap: 4px; padding: 10px 12px 0; overflow-x: auto; background: #f1e9d6; }
.gm-tabs button { flex: none; border: 0; padding: 8px 12px; border-radius: 10px 10px 0 0; background: transparent; font: 700 13px var(--sans); color: #6b6458; cursor: pointer; }
.gm-tabs button.on { background: #fff; color: #1d1d1f; }
.gm-body { flex: 1; overflow-y: auto; background: #fff; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-content: start; }
.gm-item { position: relative; border: 1px solid #ece4d2; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fffdf8; }
.gm-item .ic { font-size: 30px; line-height: 1; }
.gm-item b { font: 700 14px var(--sans); }
.gm-item p { margin: 0; font-size: 12px; color: #6b6458; min-height: 30px; }
.gm-price { position: absolute; top: 8px; right: 8px; background: #f2c14e; color: #1d1d1f; font: 800 13px var(--cond); padding: 3px 7px; border-radius: 6px; transform: rotate(4deg); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.gm-item.weapon { border-color: #f2c4c4; background: #fff8f7; }
.gm-buy { margin-top: auto; border: 0; border-radius: 9px; padding: 8px; font: 700 13px var(--sans); cursor: pointer; color: #fff; background: #e3262c; }
.gm-buy.alt { background: #1f9e74; }
.gm-buy:disabled { background: #d6d0c4; color: #8a8478; cursor: not-allowed; }
.gm-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.gm-swatches button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d6d0c4; cursor: pointer; padding: 0; }
.gm-swatches button.on { box-shadow: 0 0 0 2px #1d1d1f; }
.gm-tag { font: 700 10px var(--sans); color: #1f9e74; text-transform: uppercase; letter-spacing: 0.04em; }
.gm-foot { padding: 9px 14px; background: #f1e9d6; font-size: 12px; color: #6b6458; display: flex; justify-content: space-between; gap: 8px; }
.gm-empty { grid-column: 1 / -1; color: #8a8478; font-size: 13px; padding: 20px 6px; text-align: center; }
@media (max-width: 520px) { .gm-body { grid-template-columns: 1fr 1fr; } .gm-logo b { font-size: 21px; } }
.action-bar .ab-store { border: 0; color: #fff; background: linear-gradient(135deg, #f47b20, #e3262c); }
#soundBtn.off { opacity: 0.45; text-decoration: line-through; }
.menu-row input[type='range'] { width: 120px; accent-color: #5ef2ff; }

/* ---------- the Exchange terminal (Axiom style) ---------- */
.trade-sheet { position: fixed; inset: 18px; z-index: 60; display: flex; flex-direction: column; background: #0b0d10; color: #e6e8eb; border: 1px solid #1f232b; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7); font: 13px var(--sans); overflow: hidden; }
.trade-sheet .up { color: #2ebd85; }
.trade-sheet .down { color: #f6465d; }
.tm-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #1c1f26; }
.tm-coins { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.tm-coins button { flex: none; border: 1px solid #1f232b; background: #12151a; color: #c9ced8; border-radius: 7px; padding: 4px 9px; font: 600 12px var(--sans); cursor: pointer; }
.tm-coins button i { font-style: normal; font-weight: 500; margin-left: 4px; }
.tm-coins button.on { border-color: #5ef2ff; background: rgba(94, 242, 255, 0.08); color: #fff; }
.tm-x { border: 0; background: none; color: #9aa3b2; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.tm-head { display: flex; align-items: center; gap: 18px; padding: 10px 14px; border-bottom: 1px solid #1c1f26; flex-wrap: wrap; }
.tm-id { display: flex; align-items: center; gap: 10px; }
.tm-id b { font-size: 16px; display: block; }
.tm-id small { color: #7c8594; }
.tm-live { color: #2ebd85; font-weight: 700; }
.tm-mc b { font: 700 22px var(--cond); font-variant-numeric: tabular-nums; margin-right: 8px; }
.tm-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.tm-stat label { display: block; font-size: 11px; color: #7c8594; }
.tm-stat b { font: 600 13px var(--mono, monospace); font-variant-numeric: tabular-nums; }
.tm-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; }
.tm-chart { position: relative; min-height: 0; border-right: 1px solid #1c1f26; min-width: 0; }
.tm-canvas { position: absolute; inset: 0; overflow: hidden; }
.tm-chart canvas { display: block; }
.tm-panel { position: absolute; left: 12px; bottom: 30px; width: 300px; padding: 10px; border-radius: 10px; background: rgba(18, 21, 26, 0.96); border: 1px solid #262a33; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 7px; }
.tm-ph { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #7c8594; }
.tm-ph b { color: #e6e8eb; font-size: 13px; }
.tm-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tm-btns button { border-radius: 999px; padding: 7px 0; font: 700 13px var(--sans); cursor: pointer; background: transparent; font-variant-numeric: tabular-nums; }
.tm-btns .buy { border: 1px solid #2ebd85; color: #2ebd85; }
.tm-btns .buy:hover:not(:disabled) { background: rgba(46, 189, 133, 0.14); }
.tm-btns .sell { border: 1px solid #f6465d; color: #f6465d; }
.tm-btns .sell:hover:not(:disabled) { background: rgba(246, 70, 93, 0.14); }
.tm-btns button:disabled { opacity: 0.3; cursor: not-allowed; }
.tm-pf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 6px; border-top: 1px solid #1f232b; font-variant-numeric: tabular-nums; }
.tm-pf label { display: block; font-size: 10px; color: #7c8594; }
.tm-pf b { color: #e6e8eb; font: 600 12px var(--mono, monospace); }
.tm-pf b.up { color: #2ebd85; }
.tm-pf b.down { color: #f6465d; }
.tm-warn { font-size: 11px; color: #f2c14e; }
.tm-trades { display: flex; flex-direction: column; min-height: 0; }
.tm-th, .tm-tr { display: grid; grid-template-columns: 1fr 1fr 1fr 44px; gap: 6px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.tm-th { font-size: 11px; color: #7c8594; border-bottom: 1px solid #1c1f26; padding-top: 8px; }
.tm-rows { overflow-y: auto; flex: 1; }
.tm-tr { font: 12px var(--mono, monospace); border-bottom: 1px solid rgba(255, 255, 255, 0.02); }
.tm-tr.buy .amt { color: #2ebd85; }
.tm-tr.sell .amt { color: #f6465d; }
.tm-tr .who { color: #7c8594; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-tr .age { color: #7c8594; text-align: right; }
.tm-tr.mine { background: rgba(242, 193, 78, 0.08); }
.tm-bottom { border-top: 1px solid #1c1f26; max-height: 30%; display: flex; flex-direction: column; min-height: 120px; }
.tm-tabs { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid #1c1f26; }
.tm-tabs button { border: 0; background: none; color: #7c8594; font: 600 12px var(--sans); padding: 5px 9px; border-radius: 6px; cursor: pointer; }
.tm-tabs button.on { color: #fff; background: #1a1e25; }
.tm-note { margin-left: auto; font-size: 11px; color: #5d6573; }
.tm-note a { color: #2ebd85; }
.tm-list, .tm-holders { overflow-y: auto; padding: 4px 10px 8px; }
.tm-li { display: grid; grid-template-columns: 28px 1fr 1fr 90px 120px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-variant-numeric: tabular-nums; cursor: default; }
.tm-li.pos { grid-template-columns: 1.2fr 1fr 1fr 1fr 1.4fr auto; }
.tm-li.pos.head { color: #7c8594; font-size: 11px; border-bottom: 1px solid #1c1f26; }
.tm-li.pos small { color: #7c8594; font-weight: 500; }
.tm-li[data-sim] { cursor: pointer; }
.tm-li b[data-coin] { cursor: pointer; color: #5ef2ff; }
.tm-li .rk { color: #7c8594; }
.tm-mini { display: flex; gap: 4px; justify-content: flex-end; }
.tm-mini button { border: 1px solid #f6465d; color: #f6465d; background: none; border-radius: 999px; padding: 3px 9px; font: 600 11px var(--sans); cursor: pointer; }
@media (max-width: 820px) {
  .trade-sheet { inset: 0; border-radius: 0; overflow-y: auto; display: block; }
  .tm-head { gap: 10px; }
  .tm-stats { gap: 12px; }
  .tm-main { display: block; }
  .tm-chart { border-right: 0; }
  .tm-canvas { position: relative; height: 260px; }
  .tm-panel { position: static; width: auto; margin: 8px; box-shadow: none; }
  .tm-btns button { padding: 9px 0; }
  .tm-trades { height: 240px; border-top: 1px solid #1c1f26; }
  .tm-bottom { max-height: none; }
  .tm-note { display: none; }
  .tm-li, .tm-li.pos { grid-template-columns: 1fr auto auto; }
  .tm-li .muted { display: none; }
  .tm-li.pos .tm-mini { grid-column: 1 / -1; justify-content: flex-start; }
}

body > .toast { position: fixed; z-index: 70; }
.tm-tr .who.town { color: #e6e8eb; font-weight: 600; }
.bail-btn { margin-left: 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid #e3bf62; background: rgba(227, 191, 98, 0.12); color: #f2c14e; font: 600 12px var(--sans); cursor: pointer; }
.tm-coins button span { color: #9aa3b2; font-weight: 500; }
.tm-new { font: 800 9px var(--sans); color: #06111a; background: #5ef2ff; border-radius: 4px; padding: 1px 4px; margin-right: 5px; vertical-align: 1px; }
@media (max-width: 820px) { .tm-li.pos.head { display: none; } }

.tm-pnl { flex: none; display: flex; flex-direction: column; padding: 2px 12px 2px 4px; margin-right: 6px; border-right: 1px solid #1f232b; font-variant-numeric: tabular-nums; }
.tm-pnl label { font-size: 10px; color: #7c8594; }
.tm-pnl b { font: 700 16px var(--mono, monospace); line-height: 1.1; }
.tm-pnl span { font-size: 10px; color: #7c8594; white-space: nowrap; }
.tm-pnl i { font-style: normal; }
.mo-pnl { border-top: 0; padding-top: 0; margin-top: 0; }
.mo-money b.up { color: #4fe3a0; }

.hud-room { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; padding: 5px 10px; width: 100%; border-radius: 10px; border: 1px solid rgba(94, 242, 255, 0.45); background: rgba(94, 242, 255, 0.08); color: #cfe9ee; font: 600 12px var(--sans); cursor: pointer; text-align: left; }
.hud-room b { color: #5ef2ff; }
body.hud-collapsed .hud-room { display: none; }
.friends-points { margin: 0; padding-left: 20px; color: #cfd6e2; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.45; }
.friends-ready { display: flex; flex-direction: column; gap: 10px; border: 1px solid rgba(94, 242, 255, 0.45); background: rgba(94, 242, 255, 0.06); border-radius: 14px; padding: 18px; color: #cfd6e2; }
.friends-ready > b { font-size: 20px; color: var(--text); }
.friends-link { display: flex; gap: 8px; }
.friends-link input { flex: 1; min-width: 0; font: 15px/1.4 var(--cond); color: #5ef2ff; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.friends-note { font-size: 13px; color: var(--muted); }
