/* Crooked Mile. Two typefaces: a geometric display face for names, numbers and
   buttons, and a bookish serif for everything you read. Brass on warm black. */
@font-face { font-family: 'CM Display'; src: url('/fonts/adventor-bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'CM Display'; src: url('/fonts/adventor-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'CM Text'; src: url('/fonts/lora.woff') format('woff'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'CM Text'; src: url('/fonts/lora-italic.woff') format('woff'); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --ink: #14110d; --ground: #0e0c09; --panel: #1c1812; --raise: #272118; --line: #3b3224; --line-soft: #2b251b;
  --text: #efe6d2; --muted: #a99d85; --brass: #cfa850; --brass-hi: #e9c877; --brass-ink: #1a1408;
  --red: #c4513f; --green: #86ad6c; --blue: #76a3c0;
  --display: 'CM Display', 'Century Gothic', 'Avenir Next', Futura, system-ui, sans-serif;
  --body: 'CM Text', Georgia, 'Times New Roman', serif;
  --nav-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 16px/1.55 var(--body); min-height: 100vh; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
h2 .ico { color: var(--brass); }
h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
p { margin: 0; }
b, strong { font-weight: 700; }
.loading, .empty { text-align: center; color: var(--muted); padding: 22px 12px; font-style: italic; }
.loading { padding-top: 96px; }

/* controls */
button, input { font: inherit; color: inherit; }
button {
  font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .01em;
  background: var(--raise); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 16px; min-height: 44px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background-color .15s, border-color .15s, transform .08s;
}
button:hover:not(:disabled) { border-color: var(--brass); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
button:disabled { opacity: .38; cursor: not-allowed; }
button.primary { background: linear-gradient(180deg, var(--brass-hi), var(--brass)); border-color: var(--brass); color: var(--brass-ink); }
button.primary:hover:not(:disabled) { background: var(--brass-hi); }
button.danger { background: var(--red); border-color: var(--red); color: #fff; }
button.danger:hover:not(:disabled) { background: #d4614e; border-color: #d4614e; }
button.big { min-height: 50px; font-size: 1rem; }
button.mini { min-height: 36px; padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
button.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font-family: var(--body); font-weight: 400; font-size: .92rem; padding: 8px; }
body.busy button { pointer-events: none; }
input:not([type=checkbox]) {
  width: 100%; background: var(--ground); border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; min-height: 44px; margin-top: 5px; font-family: var(--body); font-size: 1rem;
}
input::placeholder { color: #6f6654; font-style: italic; }
input[readonly] { color: var(--muted); }
label { display: block; font-family: var(--display); font-size: .78rem; color: var(--muted); flex: 1; min-width: 0; }
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; color: var(--text); font-size: .92rem; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brass); flex: 0 0 auto; }
.check small { display: block; color: var(--muted); font-family: var(--body); font-size: .86rem; font-weight: 400; }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

/* sign-in */
.auth { max-width: 420px; margin: 0 auto; padding: 28px 16px 48px; text-align: center; }
.auth .hero { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.auth h1 { font-size: 2.5rem; color: var(--brass-hi); letter-spacing: -.03em; margin-top: 20px; }
.auth .tag { color: var(--muted); font-style: italic; margin: 2px 0 24px; }
.auth form { text-align: left; display: grid; gap: 14px; padding: 20px; }
.auth form h2 { margin: 0; }

/* frame */
.side { display: contents; }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; font-family: var(--display); font-weight: 700; color: var(--brass-hi); font-size: 1.05rem; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.hud { position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, var(--ground) 82%, transparent); padding: 10px 16px 16px; }
.who { display: flex; align-items: center; gap: 11px; }
.who-name { flex: 1; min-width: 0; display: grid; gap: 3px; justify-items: start; }
.who-name strong { font-family: var(--display); font-size: 1.05rem; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip, .pill { font-family: var(--display); font-size: .7rem; font-weight: 700; border-radius: 99px; padding: 2px 9px; background: var(--raise); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; letter-spacing: .02em; }
.pill.hot { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); }
.purse { text-align: right; display: grid; }
.purse b { font-family: var(--display); font-size: 1.3rem; color: var(--brass-hi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.purse span { color: var(--muted); font-size: .72rem; }
#h-cash.up { animation: gain .7s; } #h-cash.down { animation: loss .7s; }
@keyframes gain { 30% { color: #c8f0a8; } } @keyframes loss { 30% { color: #f08c78; } }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.meter.xp { margin-top: 10px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: .7rem; color: var(--muted); gap: 4px; margin-bottom: 3px; }
.meter-top > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.meter-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.meter-top i { font-style: normal; font-weight: 400; font-variant-numeric: tabular-nums; opacity: .8; text-align: right; }
.meters .meter-top .ico { width: 12px; height: 12px; }
.bar { height: 6px; border-radius: 4px; background: var(--raise); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--brass); transition: width .45s cubic-bezier(.2, .7, .2, 1); }
.energy .bar i { background: var(--blue); } .energy .ico { color: var(--blue); }
.stamina .bar i { background: var(--green); } .stamina .ico { color: var(--green); }
.health .bar i { background: var(--red); } .health .ico { color: var(--red); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(24, 20, 15, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.nav button { border: 0; background: none; color: var(--muted); padding: 6px 2px 4px; min-height: 52px; font-size: .68rem; display: grid; justify-items: center; align-content: center; gap: 3px; position: relative; border-radius: 10px; }
.nav .ico { width: 22px; height: 22px; }
.nav button[aria-current] { color: var(--brass-hi); }
.nav button[aria-current]::before { content: ''; position: absolute; top: -6px; left: 28%; right: 28%; height: 2px; background: var(--brass-hi); border-radius: 0 0 2px 2px; }
.nav em { position: absolute; top: 2px; left: 54%; font-style: normal; font-size: .64rem; min-width: 17px; padding: 1px 5px; border-radius: 99px; background: var(--red); color: #fff; line-height: 1.35; }
.nav .signout { display: none; }

.main { display: block; padding: 0 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); }
.page { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.page > * { min-width: 0; }

/* surfaces */
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; min-width: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 24px -18px #000; }
.card.locked, .item.locked { opacity: .55; }
.card.feature { background: radial-gradient(120% 140% at 0% 0%, #2b2416, var(--panel) 62%); border-color: var(--line); }
.eyebrow { font-family: var(--body); font-style: italic; color: var(--brass); font-size: .9rem; }
.bigcash { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1.1; color: var(--brass-hi); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.hint, .sub, .lead { color: var(--muted); font-size: .92rem; }
.lead { padding: 0 2px; }
.card > .hint { margin-bottom: 10px; }
.hint.pad { padding: 12px 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row.start { justify-content: flex-start; flex-wrap: wrap; }
.row h2 { margin: 0; }
.top { margin-top: 12px; }
.stack { display: grid; gap: 12px; }
form.card.stack > h2 { margin: 0; }
.fields { display: flex; gap: 10px; }
.inline { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.flash { border-radius: 12px; padding: 11px 14px; border: 1px solid; display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.flash .ico { margin-top: 3px; }
.flash.good { background: #1c2617; border-color: #4c6a3c; }
.flash.bad { background: #2c1813; border-color: #7d3528; }
details.card > summary { cursor: pointer; font-family: var(--display); font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: '+'; color: var(--brass); font-size: 1.3rem; line-height: 1; }
details.card[open] > summary::after { content: '–'; }
details.card[open] > summary { margin-bottom: 14px; }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; }
.seg button { flex: 1; border: 0; background: none; color: var(--muted); min-height: 40px; padding: 6px 8px; font-size: .84rem; }
.seg button[aria-selected=true] { background: var(--raise); color: var(--brass-hi); box-shadow: 0 0 0 1px var(--line) inset; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px 13px; min-width: 0; }
.card .stat { background: var(--ground); }
.stat span { display: block; color: var(--muted); font-size: .78rem; }
.stat b { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 1.15rem; overflow-wrap: anywhere; }

/* list rows */
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.card > h2 + .item, .card > .hint + .item, .card > .item:first-child, .people > .item:first-child { border-top: 0; }
.card > .item:last-child { padding-bottom: 0; }
.item-main { min-width: 0; flex: 1; }
.item-main h3 { overflow-wrap: anywhere; }
.flavor { color: var(--muted); font-style: italic; font-size: .92rem; }
.facts { display: flex; flex-wrap: wrap; gap: 3px 14px; font-family: var(--display); font-size: .8rem; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.facts span { display: inline-flex; align-items: center; gap: 4px; }
.facts .e { color: var(--blue); } .facts .e .ico { width: 13px; height: 13px; }
.gold, .facts .gold { color: var(--brass-hi); }
.miss, .facts .miss { color: var(--red); } .ok { color: var(--green); }
.needs { font-size: .84rem; color: var(--muted); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.needs span { font-family: var(--display); font-size: .74rem; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; white-space: nowrap; }
.mastery { display: flex; align-items: center; gap: 9px; margin-top: 9px; font-family: var(--display); font-size: .7rem; color: var(--muted); }
.mastery .bar { width: 130px; height: 4px; }
.btns { display: flex; gap: 6px; flex-shrink: 0; }
.gap { width: 62px; flex: 0 0 auto; }

.thumb { flex: 0 0 52px; width: 52px; height: 52px; padding: 9px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); color: var(--brass); display: grid; }
.thumb .ico { width: 100%; height: 100%; }
.face { padding: 5px 5px 0; overflow: hidden; border-radius: 50%; }
.face.sm { flex-basis: 30px; width: 30px; height: 30px; padding: 3px 3px 0; }
.face.lg { flex-basis: 76px; width: 76px; height: 76px; padding: 8px 8px 0; }
.h0 { color: #cfa850; } .h1 { color: #d0664f; } .h2 { color: #76a3c0; } .h3 { color: #86ad6c; } .h4 { color: #b592c6; } .h5 { color: #ddd2ba; }
.banner { display: block; width: calc(100% + 32px); max-width: none; height: 118px; object-fit: cover; margin: -16px -16px 14px; border-radius: 13px 13px 0 0; }
.locked .banner { filter: grayscale(1) brightness(.7); }

.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 8px; }
.skills button { display: grid; justify-items: start; text-align: left; white-space: normal; gap: 0; padding: 10px 13px; }
.skills span { color: var(--muted); font-size: .72rem; font-weight: 400; }
.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: .95rem; display: flex; gap: 10px; }
.news li:first-child { border-top: 0; }
.news time { font-family: var(--display); color: var(--muted); font-size: .72rem; flex: 0 0 30px; padding-top: 4px; }
.ranks { list-style: none; margin: 0; padding: 0; }
.ranks li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-family: var(--display); font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ranks li:first-child { border-top: 0; }
.ranks .place { flex: 0 0 24px; text-align: right; }
.ranks li:nth-child(-n+3) .place { color: var(--brass-hi); font-weight: 700; }
.ranks .rname { flex: 1; min-width: 0; color: var(--text); font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; }
.ranks .wl { flex: 0 0 62px; text-align: right; }
.ranks li.me .rname { color: var(--brass-hi); }

/* sheets and toasts */
.sheet { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 30px 80px -10px #000; }
.sheet::backdrop { background: rgba(8, 6, 4, .72); backdrop-filter: blur(3px); }
.sheet[open] { animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.sheet-in { padding: 22px; display: grid; gap: 10px; }
.sheet-in h2 { margin: 0; font-size: 1.25rem; }
.sheet-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.sheet-btns button { flex: 1; }
.menu { display: grid; gap: 8px; margin-top: 6px; }
.people { max-height: 46vh; overflow-y: auto; }
.outcome { text-align: center; display: grid; gap: 8px; justify-items: center; }
.outcome h2 { justify-content: center; }
.outcome .sheet-btns { width: 100%; }
.outcome.won .eyebrow { color: var(--brass-hi); } .outcome.lost .eyebrow { color: var(--red); }
.versus { display: flex; align-items: center; gap: 16px; font-family: var(--display); color: var(--muted); }
.outcome.lost .versus .thumb:first-child, .outcome.won .versus .thumb:last-child { filter: grayscale(1) brightness(.6); }
.bignum { font-family: var(--display); font-weight: 700; font-size: 4.5rem; line-height: 1; color: var(--brass-hi); letter-spacing: -.04em; }
.tally { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.tally div { flex: 1; background: var(--ground); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 4px; }
.tally span { display: block; color: var(--muted); font-size: .76rem; }
.tally b { font-family: var(--display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.bounty { display: flex; align-items: center; gap: 8px; color: var(--brass-hi); }
.toasts { position: fixed; z-index: 20; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { max-width: 520px; background: #232a1c; border: 1px solid #4c6a3c; color: var(--text); border-radius: 12px; padding: 10px 16px; font-size: .95rem; box-shadow: 0 14px 34px -10px #000; animation: rise .2s; }
.toast.bad { background: #2f1a15; border-color: #8a3a2c; }

/* chat */
.chat { display: grid; grid-template-columns: 1fr; max-width: 1080px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; min-height: 320px; }
.chat-list, .chat-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-list { overflow-y: auto; padding-bottom: 10px; }
.chat.pane-list .chat-pane { display: none; }
.chat:not(.pane-list) .chat-list { display: none; }
.chat-head, .conv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.chat-head h2, .conv-head h2 { margin: 0; }
.conv-title { flex: 1; min-width: 0; }
.conv-title h2 { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-title p { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan { width: 100%; justify-content: flex-start; border: 0; border-radius: 0; background: none; padding: 9px 14px; min-height: 46px; gap: 11px; font-size: .92rem; text-align: left; color: var(--text); }
.chan .ico { color: var(--muted); width: 17px; height: 17px; }
.chan:hover:not(:disabled) { background: var(--raise); }
.chan.on { background: var(--raise); box-shadow: 3px 0 0 var(--brass-hi) inset; }
.chan.on .ico { color: var(--brass-hi); }
.chan-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: grid; }
.chan-name small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: .78rem; }
.chan em { font-style: normal; font-size: .68rem; min-width: 20px; padding: 2px 6px; border-radius: 99px; background: var(--red); color: #fff; text-align: center; }
.room { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 4px; }
.room-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 2px 14px; font-family: var(--display); font-size: .76rem; color: var(--brass); letter-spacing: .02em; }
.room-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-head button { border: 0; background: none; color: var(--muted); min-width: 36px; }
.invite { margin: 8px 12px; padding: 10px 12px; border: 1px solid var(--brass); border-radius: 12px; background: #2a2314; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.invite small { display: block; color: var(--muted); font-size: .8rem; }
.pane-body { padding: 14px; overflow-y: auto; display: grid; gap: 14px; align-content: start; flex: 1; }
.pane-body .card { background: var(--ink); }
.pane-body.center { align-content: center; }
.pane-body > .inline { margin-top: 0; }
.msgs { list-style: none; margin: 0; padding: 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { display: flex; gap: 9px; align-items: flex-end; max-width: min(86%, 620px); }
.msg.mine { align-self: flex-end; }
.bubble { background: var(--raise); border: 1px solid var(--line-soft); border-radius: 14px 14px 14px 4px; padding: 7px 12px 8px; min-width: 0; }
.mine .bubble { background: #33291a; border-color: #5a4a2a; border-radius: 14px 14px 4px 14px; }
.bubble p { overflow-wrap: anywhere; line-height: 1.45; }
.meta { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); font-size: .74rem; }
.meta time { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.dots { margin-left: auto; min-height: 22px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: .7rem; letter-spacing: .08em; }
.sysmsg { align-self: center; text-align: center; color: var(--muted); font-style: italic; font-size: .86rem; max-width: 90%; }
.composer { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom) * 0); border-top: 1px solid var(--line-soft); flex: 0 0 auto; }
.composer input { margin: 0; border-radius: 22px; padding-left: 16px; }
.composer button { border-radius: 50%; width: 44px; padding: 0; flex: 0 0 44px; }
.composer .ico { width: 19px; height: 19px; }
.back { border: 0; background: none; padding: 6px; min-width: 36px; }

/* phones */
@media (max-width: 999px) {
  body.chat-mode .brand, body.chat-mode .meters, body.chat-mode .meter.xp { display: none; }
  body.chat-mode .hud { padding-bottom: 10px; background: var(--ground); }
  body.chat-mode .main { padding: 0 8px; }
}
@media (max-width: 999px) {
  .meters .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .meters .meter-top { font-size: .76rem; align-items: center; }
  .meters .meter-top .ico { width: 13px; height: 13px; }
  .ranks .wl, .ranks .gap { display: none; }
}
@media (max-width: 999px) {
  body.chat-mode .toasts { bottom: auto; top: 64px; }
}
@media (max-width: 460px) {
  .item > .btns:has(.mini) { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 46%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .fields { flex-direction: column; }
  .item > .btns:not(:has(.mini)) { flex-direction: column; }
  .thumb:not(.sm):not(.lg) { flex-basis: 46px; width: 46px; height: 46px; padding: 7px; }
  .face:not(.sm):not(.lg) { padding: 4px 4px 0; }
  .bigcash { font-size: 1.8rem; }
}

/* desktop: status and navigation move into a fixed left column */
@media (min-width: 1000px) {
  #app:has(.side) { display: grid; grid-template-columns: 312px minmax(0, 1fr); align-items: start; max-width: 1440px; margin: 0 auto; }
  .side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; padding: 22px 18px; border-right: 1px solid var(--line-soft); background: var(--ink); overflow-y: auto; }
  .brand { padding: 0 4px 14px; font-size: 1.25rem; }
  .brand img { width: 34px; height: 34px; }
  .hud { position: static; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px; }
  .meters { grid-template-columns: 1fr; gap: 9px; margin-top: 10px; }
  .nav { position: static; display: flex; flex-direction: column; gap: 2px; background: none; backdrop-filter: none; border: 0; padding: 12px 0 0; flex: 1; }
  .nav button { display: flex; justify-content: flex-start; gap: 12px; padding: 10px 12px; min-height: 46px; font-size: .95rem; }
  .nav button[aria-current] { background: var(--raise); }
  .nav button[aria-current]::before { top: 22%; bottom: 22%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 2px 2px 0; }
  .nav em { position: static; margin-left: auto; }
  .nav .signout { display: flex; margin-top: auto; font-weight: 400; }
  .main { padding: 26px 28px 40px; }
  .toasts { left: auto; right: 24px; bottom: 24px; justify-items: end; }
  .chat { grid-template-columns: 290px minmax(0, 1fr); }
  .chat .chat-list { display: flex !important; border-right: 1px solid var(--line-soft); }
  .chat.pane-list .chat-pane { display: flex; }
  .back { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
