/* MeowJones — the GATO Vice City skin. Dark navy, neon pink and lavender, Bebas headlines,
   Plex Mono numbers. Four tabs, one loop strip, a buy/sell sheet that turns into a receipt. */
:root {
  --bg: #07080f; --bg-2: #0c0d1b; --bg-3: #11121f; --panel: rgba(255, 255, 255, .035); --panel-2: rgba(255, 255, 255, .06);
  --ink: #f4f1ff; --muted: #b9b4d6; --dim: #8b85b0;   /* dim stays at 4.7:1 or better on every panel */ --hair: rgba(255, 255, 255, .11);
  --lav: #d9d1f6; --cream: #fff9cb; --sky: #b8e8ff; --lime: #f0ff9e; --pink: #ffb2c6; --hot: #ff5fa0; --sun: #ffb050;
  --up: #5ef0a6; --down: #ff5c7a; --up-bg: rgba(94, 240, 166, .14); --down-bg: rgba(255, 92, 122, .14);
  --font-display: "Bebas Neue", "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif; --font-body: "Jost", system-ui, sans-serif; --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-weight: 400; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 8px; background: var(--cream); color: #1a1030; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }                                   /* headings and main take focus only so screen readers hear the new view */
html { scroll-padding-top: 64px; }                                           /* focus and anchors clear the sticky tabs */
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; line-height: 1; }
.eyebrow { font-family: var(--font-display); font-size: .95rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.up, .positive { color: var(--up); }
.down, .negative { color: var(--down); }
.flat { color: var(--muted); }
.muted { color: var(--muted); }
::selection { background: rgba(255, 95, 160, .4); }

/* masthead */
.mast { position: relative; min-height: 250px; overflow: hidden; background: #150a33; }
.mast__sky { position: absolute; inset: 0; display: block; }
.mast__sky img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; transition: filter 1.2s ease; }
/* the wordmark and the scorebox sit over the bottom of the picture: shade it there so they stay readable */
.mast__sky::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(12, 6, 30, .86) 0%, rgba(12, 6, 30, .4) 40%, rgba(12, 6, 30, 0) 72%), linear-gradient(to right, rgba(12, 6, 30, .5) 0%, rgba(12, 6, 30, 0) 38%); }
/* the city takes the player's mood, like the cat: warmer when the game is up, greyer when it is down */
.mast[data-mood="rich"] .mast__sky img { filter: saturate(1.15) brightness(1.06); }
.mast[data-mood="down"] .mast__sky img { filter: saturate(.75) brightness(.9); }
.mast[data-mood="wrecked"] .mast__sky img { filter: saturate(.35) brightness(.72); }
.mast__inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 14px 24px 18px; min-height: 250px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.mast__brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
@property --ring-a { syntax: '<color>'; inherits: false; initial-value: #ff5fa0; }   /* registered so the ring colours can fade between moods (older browsers just swap) */
@property --ring-b { syntax: '<color>'; inherits: false; initial-value: #ff9a5c; }
.mast__cat { position: relative; flex: none; display: block; width: 96px; height: 96px; padding: 3px; border-radius: 50%; --ring-a: #ff5fa0; --ring-b: #ff9a5c; background: linear-gradient(135deg, var(--ring-a), var(--ring-b)); box-shadow: 0 10px 24px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 95, 160, .45); rotate: 0deg; transition: --ring-a .5s, --ring-b .5s, box-shadow .5s, filter .5s, rotate .5s; }   /* the tilt is the separate `rotate` property so the reaction keyframes (transform) add to it instead of replacing it */
.mast__cat img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #150a33; }
.mast__cat[data-mood="rich"] { --ring-a: #f2c14e; --ring-b: #ffe9a3; box-shadow: 0 10px 24px rgba(0, 0, 0, .5), 0 0 32px rgba(242, 193, 78, .65); }
.mast__cat[data-mood="down"] { --ring-a: #ff5c7a; --ring-b: #8a2f4e; box-shadow: 0 10px 24px rgba(0, 0, 0, .5), 0 0 22px rgba(255, 92, 122, .4); filter: saturate(.8); }
.mast__cat[data-mood="wrecked"] { --ring-a: #8d87b0; --ring-b: #3a3552; box-shadow: 0 10px 24px rgba(0, 0, 0, .5); filter: saturate(.8) grayscale(.85); rotate: -9deg; }   /* same filter list shape as "down" so the step between them fades too */
.mast__cat.react-news { animation: catTwitch .8s ease; }
.mast__cat.react-win { animation: catNod .9s ease; }
.mast__cat.react-loss { animation: catShake .7s ease; }
@keyframes catTwitch { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 60% { transform: rotate(5deg); } }
@keyframes catNod { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-9px); } 50% { transform: translateY(0); } 75% { transform: translateY(-4px); } }
@keyframes catShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.mast__words { display: flex; flex-direction: column; }
.wordmark { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.6rem); line-height: .9; letter-spacing: .02em; color: #fff; text-shadow: 0 0 22px rgba(255, 95, 160, .55), 0 6px 0 rgba(60, 10, 70, .6); }
.wordmark em { font-style: normal; color: var(--pink); text-shadow: 0 0 22px rgba(255, 178, 198, .7), 0 6px 0 rgba(60, 10, 70, .6); }
.tagline { margin-top: 7px; font-family: var(--font-display); font-size: .95rem; letter-spacing: .28em; text-transform: uppercase; color: var(--cream); text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.mast__right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mast__site { padding: 3px 10px; border-radius: 999px; background: rgba(12, 13, 27, .55); backdrop-filter: blur(6px); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--cream); text-decoration: none; opacity: .9; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.mast__site:hover { opacity: 1; }
.scorebox { min-width: 250px; padding: 10px 16px 11px; border-radius: var(--r); background: rgba(12, 13, 27, .8); border: 1px solid rgba(255, 178, 198, .35); backdrop-filter: blur(10px); box-shadow: var(--shadow); text-align: right; }
.scorebox small { display: block; font-family: var(--font-display); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--pink); }
.scorebox__who { display: block; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 178, 198, .2); font-family: var(--font-display); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorebox__who:hover { color: #fff; }
.scorebox__who img { display: inline-block; width: 22px; height: 22px; margin: -3px 8px -3px 0; border-radius: 6px; vertical-align: middle; object-fit: cover; }
.scorebox__who img[hidden] { display: none; }
.scorebox__who.active { color: #fff; border-bottom-color: var(--hot); box-shadow: inset 0 -2px 0 var(--hot); }   /* the account page has no tab: the chip shows where you are */
.scorebox strong { display: block; margin: 2px 0 0; font-family: var(--font-mono); font-weight: 600; font-size: 1.6rem; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.scorebox__since { display: block; font-family: var(--font-mono); font-size: .8rem; font-weight: 600; }
.scorebox__cash { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.scorebox__cash b { font-weight: 500; color: var(--lav); }

/* tabs (sticky) with the money strip */
.tabs { position: sticky; top: 0; z-index: 30; background: rgba(7, 8, 15, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--hair); }
.tabs__inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; align-items: stretch; gap: 2px; }
.tabs__inner a { position: relative; padding: 15px 18px 13px; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .2s; }
.tabs__inner a:hover { color: var(--ink); }
.tabs__inner a.active { color: #fff; }
.tabs__inner a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--hot), var(--sun)); box-shadow: 0 0 14px var(--hot); }
.tabs__inner a.tabs__help:not(.active) { color: var(--cream); }
.tab-short { display: none; }
.tab-ava { width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; border: 1px solid rgba(255, 178, 198, .55); vertical-align: -3px; object-fit: cover; }   /* the account tab carries GATO's face, like a profile picture */
@media (max-width: 820px) and (min-width: 641px) {                         /* six tabs on a tablet: tighter spacing and the short names */
  .tabs__inner a { padding: 15px 10px 13px; letter-spacing: .06em; }
  .tab-long { display: none; } .tab-short { display: inline; }
}
.count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--hot); color: #2a0a1e; font-family: var(--font-mono); font-size: .68rem; line-height: 18px; text-align: center; vertical-align: 2px; }
.count--own { background: transparent; border: 1px solid var(--lav); color: var(--lav); line-height: 16px; }
.count:empty { display: none; }
.tabs__money { margin-left: auto; align-self: center; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.tabs__money b { font-weight: 500; color: var(--lav); }
.tabs__money b.up { color: var(--up); } .tabs__money b.down { color: var(--down); } .tabs__money b.flat { color: var(--lav); }
/* toasts (trade receipts, badges, the newsflash) sit at the foot of the screen, over content only: the tabs,
   the ticker and the round bar stay readable */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; max-width: min(92vw, 560px); padding: 10px 18px; border-radius: 10px; background: rgba(12, 13, 27, .96); border: 1px solid var(--hair); color: var(--ink); font-size: .9rem; text-decoration: none; box-shadow: var(--shadow); animation: toastIn .3s ease both; }
.toast.flash { color: #fff; border-color: rgba(255, 95, 160, .55); background: linear-gradient(90deg, rgba(255, 45, 111, .26), rgba(255, 109, 74, .2)), rgba(12, 13, 27, .97); }
.toast.flash b { padding: 1px 7px; border-radius: 4px; background: linear-gradient(90deg, #ff2d6f, #ff6d4a); color: #2a0a1e; }
.toast.flash:hover { border-color: var(--hot); }
.toast.out { animation: toastOut .3s ease both; }
.toast b { font-family: var(--font-display); letter-spacing: .16em; margin-right: 8px; color: var(--pink); }
.toast.good { border-color: rgba(94, 240, 166, .5); } .toast.good b { color: var(--up); }
.toast.bad { border-color: rgba(255, 92, 122, .5); } .toast.bad b { color: var(--down); }
.toast.gold { border-color: rgba(255, 176, 80, .6); } .toast.gold b { color: var(--sun); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@media (min-width: 641px) { .toasts { left: 24px; right: auto; align-items: flex-start; } }   /* on wide screens the corner keeps clear of the rows' Buy and Sell buttons */

/* ticker */
.ticker { position: relative; overflow: hidden; height: 36px; background: #000; border-bottom: 1px solid var(--hair); }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 4%; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, #000, transparent); } .ticker::after { right: 36px; background: linear-gradient(270deg, #000, transparent); }
.ticker__pause { position: absolute; top: 0; right: 0; z-index: 2; width: 36px; height: 100%; border: 0; border-left: 1px solid var(--hair); background: #000; color: var(--dim); font-size: .8rem; }
.ticker__pause:hover, .ticker__pause[aria-pressed="true"] { color: var(--cream); }
.tk-set { display: inline-flex; align-items: center; }
.ticker__track { display: inline-flex; align-items: center; height: 36px; white-space: nowrap; animation: ticker 110s linear infinite; }
.ticker:hover .ticker__track, .ticker--paused .ticker__track { animation-play-state: paused; }
.ticker__pause:focus-visible { outline-offset: -3px; }                      /* the ticker clips anything outside it */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 22px; font-family: var(--font-mono); font-size: .8rem; border-right: 1px solid rgba(255, 255, 255, .08); }
.tk b { color: var(--cream); font-weight: 600; letter-spacing: .04em; }
.tk em { font-style: normal; font-weight: 500; }

/* the loop strip: PICK → BUY → WATCH → SELL → SCORE, the clock, pause and speed */
.loopbar { background: var(--bg-2); border-bottom: 1px solid var(--hair); }
.loopbar__inner { max-width: 1180px; margin: 0 auto; padding: 5px 24px; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.loop { display: flex; align-items: center; }
.loop__lbl { margin-right: 12px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.loop button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 4px; border: 1px solid transparent; border-radius: 999px; background: none; font-family: var(--font-display); font-size: .98rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.loop button + button { margin-left: 14px; }
.loop button + button::before { content: ""; position: absolute; right: 100%; top: 50%; width: 14px; height: 1px; background: var(--hair); }
.loop button i { font-style: normal; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hair); font-family: var(--font-mono); font-size: .7rem; line-height: 1; color: var(--muted); transition: background .2s, border-color .2s; }
.loop button:hover { color: var(--muted); border-color: var(--hair); }
.loop button.on { color: #fff; border-color: rgba(255, 95, 160, .45); background: rgba(255, 95, 160, .12); }
.loop button.on i { background: var(--hot); border-color: var(--hot); color: #2a0a1e; box-shadow: 0 0 12px var(--hot); }
.loop--done .loop__lbl { color: var(--sun); }
.loop button.done { color: var(--muted); }
.loop button.done i { border-color: rgba(94, 240, 166, .5); color: var(--up); font-size: 0; }
.loop button.done i::before { content: "✓"; font-size: .72rem; }
.loop button.flash { animation: goldFlash 1.4s ease; }
@keyframes goldFlash { 0%, 100% { color: #fff; } 30%, 60% { color: var(--sun); text-shadow: 0 0 18px var(--sun); } }
.loop__now { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--hair); background: var(--panel-2); font-family: var(--font-display); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.loop__now:hover { border-color: var(--pink); }
.loopbar__clock { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.loopbar__ctl { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.speed { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--hair); }
.seg button { padding: 5px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: var(--bg); }
.warn { margin: 12px auto 0; max-width: 1132px; padding: 10px 16px; border-radius: 10px; background: rgba(255, 176, 80, .14); border: 1px solid rgba(255, 176, 80, .5); color: var(--cream); font-size: .9rem; }
.boot-fail { max-width: 560px; margin: 32px auto; text-align: center; }
.boot-fail h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: 2rem; letter-spacing: .04em; }
.boot-fail__why { font-family: var(--font-mono); font-size: .76rem; color: var(--dim); overflow-wrap: anywhere; }
.boot-fail__why:empty { display: none; }

/* page layout */
main { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; min-height: 60vh; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); color: #fff; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }
main.first-paint .page-head, main.first-paint .coach, main.first-paint .table-wrap, main.first-paint .news-card, main.first-paint .detail-banner, main.first-paint .chart-panel, main.first-paint .help-grid .panel, main.first-paint .summary, main.first-paint .holds { animation: rise .45s ease both; }
main.first-paint .detail-side { animation: fadeIn .45s ease both; }     /* opacity only: a transform here would trap the fixed Buy/Sell bar inside the panel on phones */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.panel { padding: 20px 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--hair); }
.panel h2 { font-size: 1.6rem; margin-bottom: 10px; color: #fff; }
.panel p { color: var(--muted); margin: 0 0 10px; }
.panel p:last-child { margin-bottom: 0; }
.section-title { margin: 30px 0 12px; font-size: 1.55rem; color: #fff; }
.section-title small { margin-left: 8px; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--dim); }
.rule { border: 0; border-top: 1px solid var(--hair); margin: 14px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--hair); background: var(--panel-2); color: var(--ink); font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { background: linear-gradient(135deg, #ff5fa0, #ff9a5c); border-color: transparent; color: #2a0a1e; box-shadow: 0 8px 26px rgba(255, 95, 160, .35); }
.btn--primary:hover { background: linear-gradient(135deg, #ff74ad, #ffab72); box-shadow: 0 10px 30px rgba(255, 95, 160, .5); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 13px; font-size: .95rem; letter-spacing: .12em; border-radius: 8px; }
.btn--big { width: 100%; padding: 15px; font-size: 1.3rem; }
.btn--up { background: var(--up); border-color: transparent; color: #052; }
.btn--up:hover { background: #7cf5b8; }
.btn--down { background: var(--down); border-color: transparent; color: #300; }
.btn--down:hover { background: #ff7a93; }
.btn--buy { background: rgba(94, 240, 166, .1); border-color: rgba(94, 240, 166, .45); color: var(--up); }
.btn--buy:hover { background: rgba(94, 240, 166, .22); border-color: var(--up); }
.btn--sell { background: rgba(255, 92, 122, .1); border-color: rgba(255, 92, 122, .45); color: var(--down); }
.btn--sell:hover { background: rgba(255, 92, 122, .22); border-color: var(--down); }
.btn--danger { color: var(--down); border-color: rgba(255, 92, 122, .5); }

/* the coach (round one) */
.coach { position: relative; margin: 0 0 18px; padding: 18px 20px; border-radius: var(--r); background: linear-gradient(120deg, rgba(255, 95, 160, .14), rgba(255, 176, 80, .08)); border: 1px solid rgba(255, 178, 198, .4); }
.coach__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.coach__head .eyebrow { font-size: .8rem; color: var(--pink); }
.coach__hide { margin-left: auto; padding: 4px 8px; border: 0; background: none; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.coach__hide:hover { color: var(--ink); }
.coach h2 { font-size: 2rem; color: #fff; margin-bottom: 6px; }
.coach p { margin: 0; color: var(--lav); max-width: 64ch; }
.coach p b { color: var(--up); font-weight: 600; }
.coach p a { color: var(--cream); }
.coach__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.coach--line { padding: 12px 16px; margin: 14px 0; }
.coach--line .coach__head { margin-bottom: 4px; }

/* companies toolbar + table */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 14px; }
.toolbar .seg button { padding: 7px 13px; font-family: var(--font-display); font-size: 1rem; letter-spacing: .12em; }
.toolbar input { margin-left: auto; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--hair); background: var(--panel-2); color: var(--ink); font: inherit; font-size: .9rem; min-width: 200px; }
.toolbar input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 178, 198, .2); }
.chip--sector { border: 1px solid rgba(255, 178, 198, .5); background: rgba(255, 178, 198, .12); color: var(--pink); cursor: pointer; }
.sector-pick { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--hair); background: var(--panel-2); color: var(--ink); font: inherit; font-size: .9rem; }
.sector-pick option { background: #11121f; color: var(--ink); }
.sortbar { display: none; }
.sortbar__lbl { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
#table-slot { scroll-margin-top: 70px; }
.table-wrap { border-radius: var(--r); border: 1px solid var(--hair); background: var(--bg-2); overflow: hidden; overflow-x: auto; }
.mkt { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mkt th { padding: 11px 14px; text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--hair); white-space: nowrap; }
.mkt th button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.mkt th button:hover { color: var(--ink); }
.mkt td { padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: middle; }
.mkt tbody tr { transition: background .2s; }
.mkt tbody tr:hover { background: rgba(255, 255, 255, .035); }
.mkt tbody tr:last-child td { border-bottom: 0; }
.mkt tbody tr.owned { background: rgba(255, 95, 160, .05); }
.c-num, .c-chg, .c-act { text-align: right; white-space: nowrap; }
.c-act { width: 1%; }
.c-act .btn + .btn { margin-left: 6px; }
.c-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.c-spark { width: 110px; }
.c-spark canvas { display: block; width: 96px; height: 30px; margin-left: auto; }
.co { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.co__t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.co__t b { font-weight: 500; color: var(--lav); white-space: nowrap; }
.chev { font-style: normal; margin-left: 4px; color: var(--dim); }
.co:hover .co__t b { color: var(--pink); }
.co:hover .chev { color: var(--pink); }
.co__sec, .co__sub { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.co__sub { display: none; }
.own-pill { display: inline-block; align-self: flex-start; margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: rgba(255, 95, 160, .18); border: 1px solid rgba(255, 95, 160, .5); color: var(--pink); font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.badge { --c: var(--pink); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c); font-family: var(--font-display); font-size: 1.25rem; flex: none; }
.badge--xl { width: 64px; height: 64px; border-radius: 16px; font-size: 2.2rem; }
.badge--gato { --c: var(--pink); padding: 0; overflow: hidden; background: #150a33; }
.badge--gato img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-block; min-width: 68px; padding: 3px 9px; border-radius: 6px; font-family: var(--font-mono); font-size: .8rem; font-weight: 600; text-align: center; }
.chip.up { background: var(--up-bg); color: var(--up); }
.chip.down { background: var(--down-bg); color: var(--down); }
tr.flash-up td:first-child, .hold.flash-up { box-shadow: inset 3px 0 0 var(--up); }
tr.flash-down td:first-child, .hold.flash-down { box-shadow: inset 3px 0 0 var(--down); }
.flash-up { animation: rowUp .9s ease; }
.flash-down { animation: rowDown .9s ease; }
@keyframes rowUp { 0% { background: rgba(94, 240, 166, .22); } 100% { background: transparent; } }
@keyframes rowDown { 0% { background: rgba(255, 92, 122, .22); } 100% { background: transparent; } }
.flash-up-text { animation: textUp .9s ease; } .flash-down-text { animation: textDown .9s ease; }
@keyframes textUp { 0% { color: var(--up); } 100% { } } @keyframes textDown { 0% { color: var(--down); } 100% { } }
.news-hit { animation: newsHit 2.4s ease; }
@keyframes newsHit { 0%, 60% { background: rgba(255, 95, 160, .18); } 100% { background: transparent; } }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty h2 { font-size: 2rem; color: #fff; margin-bottom: 6px; }
.empty p { max-width: 50ch; margin: 0 auto 14px; }
.empty b { color: #fff; font-family: var(--font-mono); font-weight: 500; }

/* news */
.news-strip { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--hair); font-size: .9rem; color: var(--muted); text-decoration: none; }
.news-strip:hover { border-color: rgba(255, 178, 198, .5); }
.news-strip strong { font-family: var(--font-display); letter-spacing: .2em; color: var(--pink); white-space: nowrap; }
.news-strip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-strip em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cream); white-space: nowrap; }
.city-line { margin: -4px 0 16px; font-size: .95rem; color: var(--muted); }
.city-line b { font-family: var(--font-mono); font-weight: 600; }
.news { display: grid; gap: 12px; }
.news-card { position: relative; padding: 18px 20px 16px 24px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--hair); }
.news-card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--pink); }
.news-card.bull::before { background: var(--up); } .news-card.bear::before { background: var(--down); }
.news-card .meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.news-card .meta b { color: var(--cream); font-weight: 500; }
.news-card h3 { font-size: 1.55rem; color: #fff; margin-bottom: 6px; }
.news-card p { margin: 0 0 10px; color: var(--muted); }
.news-card .tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-card .tags small { color: var(--dim); font-size: .72rem; }
.tag { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--hair); background: var(--panel-2); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; color: var(--lav); text-decoration: none; }
.tag.up { color: var(--up); border-color: rgba(94, 240, 166, .4); } .tag.down { color: var(--down); border-color: rgba(255, 92, 122, .4); }
.tag:hover { background: rgba(255, 255, 255, .1); }
.news-card.fresh { animation: freshNews 1.2s ease both; }
@keyframes freshNews { 0% { opacity: 0; transform: translateY(-8px); box-shadow: 0 0 0 2px var(--hot); } 100% { opacity: 1; transform: none; box-shadow: none; } }

/* the company page */
.back { display: inline-block; margin-bottom: 14px; font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.detail-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 22%, #0c0d1b), #0c0d1b 70%); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.detail-banner h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: #fff; }
.detail-banner h1 span { color: var(--muted); font-size: .6em; margin-left: 8px; }
.detail-banner .blurb { margin: 4px 0 6px; color: var(--muted); max-width: 60ch; }
.detail-banner .eyebrow { color: var(--c); font-size: .8rem; }
.detail-banner .lead { display: flex; align-items: center; gap: 18px; }
.detail-banner .slogan { font-style: italic; color: var(--cream); font-size: 1.05rem; text-align: right; max-width: 24ch; flex: none; }
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.detail-grid > * { min-width: 0; }
.chart-panel { padding: 16px 18px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--hair); }
.chart-panel__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.chart-lbl, .chart-caption { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.chart-panel canvas.big { display: block; width: 100%; height: 300px; }
.chart-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.detail-side { margin: 0; }
.quote-big { font-family: var(--font-mono); font-weight: 600; font-size: 2.3rem; letter-spacing: -.02em; color: #fff; transition: color .3s; }
.quote-chg { font-family: var(--font-mono); font-weight: 600; font-size: .95rem; }
.yours { margin: 14px 0 12px; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hair); font-size: .92rem; color: var(--muted); line-height: 1.55; }
.yours b { color: #fff; font-family: var(--font-mono); font-weight: 500; }
.yours b.up { color: var(--up); } .yours b.down { color: var(--down); }
.yours--none { font-style: italic; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-actions .btn { flex: 1; }
.more { margin-top: 8px; border-top: 1px solid var(--hair); }
.more summary { padding: 10px 0; cursor: pointer; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.more[open] summary::after { transform: rotate(180deg); }
.more summary:hover { color: var(--ink); }
.info-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: .92rem; }
.info-table td { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.info-table td:first-child { color: var(--muted); }
.info-table td:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; }
.lore-mini { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--hair); }
.lore-mini h2 { font-size: 1.2rem; color: #fff; margin-bottom: 4px; }
.lore-mini p { margin: 0; font-size: .86rem; color: var(--muted); }
.lore-note { margin-top: 18px; }
.lore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.lore-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--hair); }
.lore-card .head { display: flex; align-items: center; gap: 12px; }
.lore-card h3 { font-size: 1.35rem; color: #fff; }
.lore-card .head > div > span { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.lore-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.lore-card dl { margin: 0; font-size: .82rem; } .lore-card dt { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); } .lore-card dd { margin: 0; color: var(--lav); }
.lore-card blockquote { margin: 0; font-style: italic; color: var(--cream); }
.lore-card small { color: var(--dim); font-size: .72rem; }
.lore-card .btn { margin-top: auto; }

/* my shares */
.summary { margin-bottom: 18px; padding: 18px 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--hair); border-left: 4px solid var(--up); }
.summary.down, .summary.wrecked { border-left-color: var(--down); }
.summary__big { margin: 4px 0 6px; font-family: var(--font-mono); font-weight: 600; font-size: 2.2rem; line-height: 1.1; }
.summary__big.up { color: var(--up); } .summary__big.down { color: var(--down); } .summary__big.flat { color: var(--lav); }
.summary__big small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.summary__line { margin: 0; color: var(--muted); font-size: .95rem; }
.summary__line b { font-family: var(--font-mono); font-weight: 500; color: var(--lav); }
.summary__latest { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.summary__latest a { color: var(--lav); text-decoration: none; }
.summary__latest b { font-family: var(--font-mono); font-weight: 500; }
.holds { border-radius: var(--r); border: 1px solid var(--hair); background: var(--bg-2); overflow: hidden; }
.holds__head, .hold { display: grid; grid-template-columns: 2.2fr 1fr 1.2fr 1.1fr 1.2fr 1.5fr auto; gap: 12px; align-items: center; padding: 10px 16px; }
.holds__head { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); background: rgba(255, 255, 255, .03); border-bottom: 1px solid var(--hair); }
.holds__head span:not(:first-child), .hold__cell { text-align: right; }
.hold { border-bottom: 1px solid rgba(255, 255, 255, .05); transition: background .2s; scroll-margin: 84px 0 16px; }
.hold:last-child { border-bottom: 0; }
.hold__cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.hold__co { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hold .co__t b { white-space: normal; overflow-wrap: anywhere; }
.hold__cell.up, .hold__cell.down { white-space: normal; }
.hold__act { display: flex; justify-content: flex-end; }
.hold__chip, .hold__sum { display: none; }
.hold.just-traded { animation: glow 1.5s ease; }
@keyframes glow { 0%, 60% { background: rgba(255, 95, 160, .22); box-shadow: inset 0 0 0 1px var(--hot); } 100% { background: transparent; } }
.history { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; font-size: .95rem; color: var(--muted); }
.history .when { font-family: var(--font-mono); font-size: .78rem; color: var(--dim); }
.history a { color: var(--lav); text-decoration: none; }
.history a:hover { color: var(--pink); }
.history b { font-family: var(--font-mono); font-weight: 500; }
/* leaderboard */
.board-you { margin-bottom: 18px; }
.board-you__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.board-you__stats .eyebrow { display: block; font-size: .72rem; margin-bottom: 2px; }
.board-you__stats > div { min-width: 0; }
.board-you__stats b { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 500; color: #fff; overflow-wrap: anywhere; }
.board-you__stats b.up { color: var(--up); } .board-you__stats b.down { color: var(--down); }
.board-you__act { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.board-you__act .muted b { color: var(--ink); font-weight: 500; }
#profile-line { margin-bottom: 10px; }
dialog.gate [data-close-post] { display: none; }
dialog.gate .dlg__head h2 { font-size: 2.3rem; }
dialog.gate::backdrop { background: rgba(5, 5, 12, .88); backdrop-filter: blur(10px); }
.signed-in .btn { margin-left: 6px; }
.board-why { margin: 0; color: var(--muted); }
.board td.c-rank { width: 48px; font-family: var(--font-mono); color: var(--dim); }
.board td.c-name { font-weight: 500; color: var(--ink); }
.board td.c-name small { color: var(--dim); font-weight: 400; }
.board td.c-num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.board th.c-num { text-align: right; }
.board td.c-when { font-family: var(--font-mono); font-size: .78rem; color: var(--dim); white-space: nowrap; }
.board tr.me td { background: rgba(255, 178, 198, .08); }
.board tr.me td.c-name { color: var(--pink); }
.board .row-cat { display: inline-block; width: 28px; height: 28px; margin: -4px 10px -4px 0; border-radius: 8px; vertical-align: middle; object-fit: cover; background: rgba(255, 255, 255, .06); }   /* each player's cat; an empty tile for a row from before the cats */
.board tr.me .row-cat { box-shadow: 0 0 0 2px var(--pink); }
.board-note { padding: 18px 22px; color: var(--muted); }
.board-note .btn { margin-left: 10px; }
.board-stamp { margin: 0 0 8px; }
.board-stamp .link { margin-left: 6px; }
.board-why .btn { margin: 0 6px; }
/* The board keeps itself current: a live dot beside the player's row line, amber while a post is on its way. */
.board-live { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.board-live .live { flex: none; width: 9px; height: 9px; margin-top: .45em; border-radius: 50%; background: var(--up); animation: livePulse 2.4s ease-out infinite; }
.board-live.busy .live { background: var(--sun); }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(94, 240, 166, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(94, 240, 166, 0); } }
.board-err { margin-top: 8px; }
#board-act:focus { outline: none; }
.field { display: block; margin: 6px 0 4px; }
.field > span:first-child, .field > label { display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--hair); background: var(--bg-3); color: var(--ink); font-family: var(--font-body); font-size: 1.05rem; }
.field input:focus { outline: 2px solid var(--pink); outline-offset: 1px; }
.field-note { margin: 0 0 8px; font-size: .82rem; color: var(--dim); }
.field-note.ok { color: var(--up); }
.field .field-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 0; font: inherit; letter-spacing: 0; text-transform: none; }
.field-row input { flex: 1; min-width: 180px; font-family: var(--font-body); font-size: 1rem; }
.field-row .btn { white-space: nowrap; }
.field .opt { margin-left: 6px; font-family: var(--font-body); font-size: .72rem; letter-spacing: .04em; text-transform: none; color: var(--dim); }
#post-wallet { font-family: var(--font-mono); font-size: .9rem; }
.seg--auth { display: flex; width: 100%; margin: 0 0 12px; }
.seg--auth button { flex: 1; padding: 9px 10px; font-family: var(--font-body); font-size: .9rem; letter-spacing: 0; }
#acct-switch { margin-top: 4px; }
.steps { display: flex; gap: 6px; margin: -6px 0 14px; }
.steps span { width: 30px; height: 4px; border-radius: 2px; background: var(--hair); }
.steps span.on { background: var(--pink); }
.welcome-list { margin: 0 0 16px; padding-left: 18px; color: var(--muted); }
.welcome-list li { margin: 7px 0; }
/* account */
.account__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.account__head h2 { margin: 0; font-size: 2rem; line-height: 1; }
.account__head .muted { font-size: .9rem; }
.account__head .btn { margin-left: auto; }
.account__head .btn + .btn { margin-left: 0; }
.account__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 0; }
.account__grid div { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hair); }
.account__grid .eyebrow { display: block; font-size: .72rem; margin-bottom: 4px; }
.account__grid dd { margin: 0; }
/* The choice between two games saved to one account (both moved on in different places). */
.sync-games { display: grid; gap: 10px; margin: 14px 0 6px; }
.sync-games div { padding: 10px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--hair); }
.sync-games .eyebrow { display: block; font-size: .72rem; margin-bottom: 4px; }
.sync-games dd { margin: 0; color: var(--ink); font-weight: 600; }
.sync-games dd .sub { display: block; margin-top: 2px; font-weight: 400; font-size: .9em; color: var(--muted); }
.account__grid b { font-family: var(--font-mono); font-weight: 500; font-size: 1.05rem; color: #fff; overflow-wrap: anywhere; }
.account__grid b.addr { font-size: .88rem; overflow-wrap: anywhere; }
.acct-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.board-you__act.verify p { flex: 1 1 100%; margin: 0; color: var(--muted); }
.board-you__act.verify p b { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.account__grid .sub { display: block; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.account .tools { margin-top: 16px; }
.link { padding: 0; border: 0; background: none; color: var(--lav); text-decoration: underline; cursor: pointer; font: inherit; font-size: .86rem; }
.link:hover { color: var(--pink); }
@media (max-width: 1100px) {
  .tabs__inner { flex-wrap: wrap; }                                          /* the money strip takes its own row before the tab bar runs off the screen */
  .tabs__money { flex: 1 1 100%; margin: 0; height: 26px; line-height: 26px; text-align: center; border-top: 1px solid var(--hair); overflow: hidden; text-overflow: ellipsis; }
  html { scroll-padding-top: 88px; }
}
.form-err, .dlg .form-err { margin: 0 0 8px; color: var(--down); font-size: .9rem; }
.dlg .field-note.ok { color: var(--up); }
.owner-tools { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.small { font-size: .84rem; }
.rank-panel { margin-top: 26px; }
.rank { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.rank p { margin: 0; font-size: .88rem; }
.rank__title { font-size: 2rem; color: var(--cream); }
.rank__bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin: 8px 0 6px; }
.rank__bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--hot), var(--sun)); transition: width .8s ease; }
.rank-panel h3 { margin: 16px 0 8px; font-size: 1.2rem; color: #fff; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 6px; }
.badge-pill { padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 176, 80, .45); background: rgba(255, 176, 80, .1); color: var(--muted); font-size: .84rem; }
.badge-pill b { color: var(--sun); font-weight: 500; }
.badge-pill.locked { border-style: dashed; border-color: var(--hair); background: transparent; color: var(--dim); }
.badge-pill.locked b { color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* help */
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help-grid h2 span { color: var(--pink); margin-right: 8px; }
.help-grid a { color: var(--cream); }

/* dialogs: the buy/sell sheet, its receipt, and start over */
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 0; border: 1px solid rgba(255, 178, 198, .3); border-radius: 18px; background: #11121f; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); }
dialog::backdrop { background: rgba(5, 5, 12, .72); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .25s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes pop { from { transform: scale(.94) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg { padding: 22px 24px 20px; }
.dlg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dlg__head h2 { font-size: 1.9rem; color: #fff; }
.dlg p { color: var(--muted); }
.dlg__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair); background: var(--panel-2); font-size: 1.3rem; line-height: 1; flex: none; }
.x:hover { background: rgba(255, 255, 255, .12); }
/* The share card: the picture the server drew, the X buttons, the cat and colour pickers, and paw points. */
#card-dialog { width: min(720px, calc(100% - 32px)); }
.card-pic { position: relative; display: grid; place-items: center; margin: 0 0 12px; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: #1a0f2e linear-gradient(120deg, #2a0838, #0c0d1b); box-shadow: 0 0 0 1px var(--hair), 0 14px 40px rgba(0, 0, 0, .45); }
.card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.card-pic.busy img { opacity: .45; }
.card-pic figcaption { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 7px 12px; border-radius: 8px; background: rgba(7, 8, 15, .78); color: var(--ink); font-size: .9rem; text-align: center; }
.card-pic figcaption.form-err { color: var(--down); }
.card-pic:not(:has(img:not([hidden]))) figcaption { position: static; background: none; }
.card-words { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--hair); background: var(--bg-3); }
.dlg .card-words { color: var(--ink); }
.card-words:empty { display: none; }
.card-acts { display: grid; gap: 8px; }
.card-acts__x { display: flex; flex-wrap: wrap; gap: 8px; }
.card-acts__x .btn { flex: 1 1 180px; }
.card-acts__more { display: flex; flex-wrap: wrap; gap: 6px; }
a.btn:not([href]) { opacity: .45; cursor: not-allowed; transform: none; }
#card-note { margin: 8px 0 0; }
#card-note.form-err { color: var(--down); }
.card-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 14px; }
.pick { min-width: 0; margin: 0; padding: 0; border: 0; }
.pick legend { margin-bottom: 7px; padding: 0; font-family: var(--font-display); font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pick__row { display: flex; flex-wrap: wrap; gap: 6px; }
.pick__look, .pick__frame { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; width: 76px; padding: 5px 4px 6px; border-radius: 10px; border: 1px solid var(--hair); background: var(--panel); color: var(--muted); font-family: var(--font-body); font-size: .72rem; line-height: 1.15; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.pick__look img { display: block; width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.pick__frame i { display: block; width: 52px; height: 32px; border-radius: 7px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 4px var(--t); }
.pick__look:hover, .pick__frame:hover { border-color: rgba(255, 255, 255, .3); }
.pick__look.on, .pick__frame.on { border-color: var(--pink); background: rgba(255, 178, 198, .1); color: var(--ink); }
.pick__look[aria-disabled="true"], .pick__frame[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.pick__look small, .pick__frame small { display: block; margin-top: 2px; color: var(--dim); font-size: .64rem; }
.paws-box { padding: 14px 14px 4px; border-radius: 12px; border: 1px solid rgba(255, 178, 198, .25); background: rgba(255, 95, 160, .06); }
.paws-box h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.45rem; font-weight: 400; letter-spacing: .06em; color: #fff; }
.dlg .paws-box #paws-stats { margin: 0 0 8px; color: var(--ink); }
.board-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0; }
.acct-card { margin-top: 8px; }
.paw-pts { margin-left: 6px; font-family: var(--font-mono); font-size: .74rem; color: var(--pink); white-space: nowrap; }
@media (max-width: 640px) { .card-picks { grid-template-columns: 1fr; } .dlg--card { padding: 18px 16px 16px; } }
.ticket { position: relative; padding: 20px 22px 18px; }
.ticket__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ticket__head .lead { display: flex; gap: 12px; align-items: center; }
.ticket__head h2 { font-size: 1.9rem; color: #fff; }
.ticket__quote { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 11px 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--hair); }
.ticket__quote span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ticket__quote strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; }
.ticket__quote em { font-style: normal; font-family: var(--font-mono); font-size: .8rem; font-weight: 600; }
.ticket__own { margin: 0 0 10px; font-size: .88rem; color: var(--muted); }
.ticket__lbl { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 4px 0 6px; }
.chips--money { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.ticket.sell .chips--money { grid-template-columns: repeat(2, 1fr); }
.chips--money button { padding: 9px 6px; border-radius: 8px; border: 1px solid var(--hair); background: var(--panel-2); font-family: var(--font-mono); font-size: .8rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chips--money button:hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.chips--money button:disabled { opacity: .35; cursor: not-allowed; }
.chips--money button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.stepper button { width: 42px; height: 42px; flex: none; border-radius: 9px; border: 1px solid var(--hair); background: var(--panel-2); font-size: 1.3rem; line-height: 1; }
.stepper button:hover { background: rgba(255, 255, 255, .12); }
.stepper input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--hair); background: var(--bg-2); color: var(--ink); font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 178, 198, .2); }
.stepper span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.ticket__sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; margin: 10px 0; font-size: .92rem; }
.ticket__sum dt { color: var(--muted); } .ticket__sum dd { margin: 0; text-align: right; font-family: var(--font-mono); font-weight: 500; }
.ticket__sum dd.total { font-size: 1.25rem; font-weight: 600; color: #fff; }
.ticket__sum dd.up { color: var(--up); } .ticket__sum dd.down { color: var(--down); }
.ticket__sum dd, .r-result b { white-space: nowrap; }
.ticket__err { margin: 6px 0 10px; color: var(--down); font-size: .9rem; }
.ticket__note { margin: 10px 0 0; font-size: .76rem; color: var(--dim); text-align: center; }
.ticket__coach, .r-coach { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(255, 178, 198, .1); border: 1px dashed rgba(255, 178, 198, .4); font-size: .84rem; color: var(--lav); }
.ticket__coach b, .r-coach b { color: var(--cream); font-weight: 500; }
.receipt { position: relative; padding: 24px 22px 20px; text-align: center; }
.receipt .x { position: absolute; top: 12px; right: 12px; }
.rstamp { display: inline-block; margin-bottom: 10px; animation: stampHit .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.rstamp span { display: inline-block; padding: 6px 18px; border: 4px solid var(--up); border-radius: 10px; color: var(--up); font-family: var(--font-display); font-size: 2.4rem; letter-spacing: .2em; text-transform: uppercase; transform: rotate(-6deg); text-shadow: 0 0 16px rgba(94, 240, 166, .5); }
.receipt.sell .rstamp span { border-color: var(--sun); color: var(--sun); text-shadow: 0 0 16px rgba(255, 176, 80, .5); }
@keyframes stampHit { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.round-done { margin: 0 auto 10px; padding: 4px 12px; width: max-content; border-radius: 999px; background: linear-gradient(90deg, var(--sun), #ffe07a); color: #3a2200; font-family: var(--font-display); letter-spacing: .2em; font-size: 1rem; text-transform: uppercase; }
.receipt h2 { font-size: 1.8rem; color: #fff; margin-bottom: 6px; }
.r-line { margin: 4px 0; color: var(--muted); font-size: .95rem; }
.r-line b { font-family: var(--font-mono); font-weight: 500; color: #fff; }
.r-total { font-family: var(--font-mono); color: var(--lav); }
.r-result { font-size: 1.05rem; color: var(--ink); }
.r-result b.up { color: var(--up); } .r-result b.down { color: var(--down); }
.r-note { margin: 8px 0; color: var(--lav); font-size: .9rem; }
.r-score { margin: 10px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); color: var(--lav); font-size: .92rem; }
.r-score b { font-family: var(--font-mono); font-weight: 500; }
.r-badge { margin: 6px 0 0; font-size: .86rem; color: var(--cream); }
.r-badge b { color: var(--sun); font-weight: 500; }
.r-gato { margin: 10px 0 0; font-style: italic; color: var(--dim); font-size: .86rem; }
.r-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* footer */
.foot { border-top: 1px solid var(--hair); background: var(--bg-2); }
.foot__inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px 34px; display: flex; gap: 22px; align-items: center; font-size: .78rem; color: var(--dim); }
.foot strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .14em; color: var(--muted); }
.foot a { margin-left: auto; color: var(--cream); white-space: nowrap; }

/* responsive */
@media (max-width: 900px) {
  .detail-grid, .help-grid { grid-template-columns: 1fr; }
  .detail-side { order: -1; }
  .mast__cat { width: 84px; height: 84px; }
  .holds__head, .hold { grid-template-columns: 2fr 1fr 1.2fr 1.2fr 1.5fr auto; }
  .holds__head span:nth-child(4), .hold__cell:nth-of-type(3) { display: none; }
  .c-act .btn { display: block; width: 100%; margin: 0; } .c-act .btn + .btn { margin: 6px 0 0; }   /* stacked Sell and Buy keep the table inside the screen */
  .tagline { letter-spacing: .16em; }
}
@media (max-width: 640px) {
  .mast { min-height: 172px; }
  .mast__inner { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 8px; padding: 12px 16px 12px; min-height: 172px; }
  .mast__brand { gap: 10px; }
  .mast__cat { width: 64px; height: 64px; }
  .wordmark { font-size: 2.4rem; }
  .tagline { font-size: .72rem; letter-spacing: .18em; margin-top: 3px; }
  .mast__right { flex-direction: row; align-items: stretch; }
  .mast__site { display: none; }
  .scorebox { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "who who" "lbl lbl" "total since"; gap: 0 10px; padding: 8px 12px; text-align: left; align-items: baseline; }
  .scorebox__who { grid-area: who; margin: 0 0 4px; padding-bottom: 4px; font-size: .74rem; letter-spacing: .06em; }
  .scorebox small { grid-area: lbl; font-size: .62rem; letter-spacing: .16em; white-space: nowrap; }
  .scorebox strong { grid-area: total; font-size: 1.35rem; margin: 0; }
  .scorebox__since { grid-area: since; text-align: right; font-size: .74rem; }
  .scorebox__cash { display: none; }                                         /* the money strip under the tabs shows cash and shares */
  .scorebox__who { min-height: 32px; display: flex; align-items: center; }
  #pause span { display: none; }
  .tabs__inner { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 4px; gap: 0; }
  .tab-ava { display: none; }
  .tabs__inner a { padding: 14px 0 12px; font-size: .84rem; letter-spacing: 0; text-align: center; }
  .tab-long { display: none; } .tab-short { display: inline; }
  .tabs__inner a.active::after { left: 6px; right: 6px; }
  .count { margin-left: 3px; min-width: 15px; padding: 0 4px; font-size: .6rem; line-height: 15px; vertical-align: 1px; }
  .count--own { line-height: 13px; }
  .tabs__money { grid-column: 1 / -1; margin: 0; height: 26px; line-height: 26px; text-align: center; font-size: .68rem; border-top: 1px solid var(--hair); overflow: hidden; text-overflow: ellipsis; }
  main.has-stock ~ .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 88px; scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .loopbar__inner { padding: 6px 12px; gap: 4px 10px; }
  .board-you__stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .board-you__stats b { font-size: clamp(1rem, 4.2vw, 1.25rem); }
  .board td.c-when, .board th.c-when, .board td.c-days, .board th.c-days { display: none; }
  .warn { margin: 12px 16px 0; }
  .loop { width: 100%; }
  .loop__lbl { display: none; }
  .loopbar__inner { padding: 2px 12px; }
  .loop button { min-width: 44px; min-height: 40px; justify-content: center; padding: 0 9px 0 3px; font-size: .86rem; letter-spacing: .06em; gap: 5px; }
  .loop button:not(.on) { padding-right: 3px; }
  .seg--speed button { min-width: 40px; }
  .link { padding: 6px 0; }
  .loop button:not(.on) span { display: none; }
  .loop button + button { margin-left: 10px; } .loop button + button::before { width: 10px; }
  .seg button { min-height: 34px; }
  .tag { padding: 8px 12px; }
  .x { width: 40px; height: 40px; }
  .mkt th button, .back { display: inline-block; padding: 9px 0; }
  .coach__hide, .chip--sector { min-height: 34px; }
  .detail-actions .btn { white-space: nowrap; padding-left: 10px; padding-right: 10px; letter-spacing: .1em; }
  .btn--sm, .chips--money button { min-height: 40px; }
  .more summary { padding: 12px 0; }
  .foot a { padding: 8px 0; }
  .foot__inner { flex-wrap: wrap; gap: 10px 16px; padding: 18px 16px 30px; }
  .foot__inner > span { flex: 1 1 100%; order: 1; }
  main.has-stock ~ .foot { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .loopbar__clock { font-size: .68rem; }
  .loopbar__ctl { margin-left: auto; gap: 6px; }
  .speed__lbl { display: none; }
  .seg--speed button { padding: 4px 8px; font-size: .68rem; }
  main { padding: 18px 16px 60px; }
  main.has-stock { padding-bottom: 70px; }
  .page-head h1 { font-size: 2rem; }
  .c-spark, .c-price, .c-chg { display: none; }
  .co__sec { display: none; }
  .co__sub { display: block; font-size: .74rem; letter-spacing: .04em; color: var(--muted); }
  .sortbar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
  .seg--sort button { min-height: 36px; }
  .sector-pick { flex: 1; min-height: 40px; }
  .co__t b { white-space: normal; }
  .c-act .btn { display: block; width: 100%; margin: 0; }
  .c-act .btn + .btn { margin: 6px 0 0; }
  .mkt td { padding: 10px 12px; } .mkt th { padding: 9px 12px; }
  .toolbar input { margin-left: 0; width: 100%; min-width: 0; }
  .toolbar .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .detail-banner { flex-direction: column; align-items: flex-start; padding: 16px; }
  .detail-banner .slogan { text-align: left; }
  .detail-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 8, 15, .92); backdrop-filter: blur(14px); border-top: 1px solid var(--hair); }
  .chart-panel canvas.big { height: 220px; }
  .holds__head { display: none; }
  .hold { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .hold__co { width: 100%; justify-content: space-between; }
  .hold__chip { display: inline-block; }
  .hold__cell { display: none; }
  .hold__sum { display: block; width: 100%; margin: 0; font-size: .86rem; color: var(--muted); }
  .hold__sum b { font-family: var(--font-mono); color: var(--lav); font-weight: 500; }
  .hold__act, .hold__sell { width: 100%; }
  .summary__big { font-size: 1.8rem; }
  .news-strip em { display: none; }
  dialog#ticket { width: 100%; max-width: 100%; margin: 0; inset: auto 0 0 0; max-height: 92vh; border-radius: 18px 18px 0 0; border-bottom: 0; }
  dialog#ticket[open] { animation: sheetUp .3s ease both; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-motion: reduce) { .mast__cat { animation: none !important; transition: none; } .mast__sky img { transition: none; } }
/* touch screens: inputs at 16px, so iOS never zooms the page when one takes focus */
@media (pointer: coarse) { .field input, .toolbar input, .sector-pick, .stepper input { font-size: 16px; } }
/* landscape phones: a short masthead and tabs that scroll away, so the game keeps most of the screen */
@media (max-height: 500px) and (orientation: landscape) {
  .mast, .mast__inner { min-height: 0; }
  .mast__inner { padding-top: 8px; padding-bottom: 8px; }
  .mast__cat { width: 52px; height: 52px; }
  .wordmark { font-size: 2.2rem; }
  .tagline { display: none; }
  .mast__site, .scorebox__since, .scorebox__cash { display: none; }
  .scorebox { padding: 6px 12px; } .scorebox__who { margin-bottom: 2px; padding-bottom: 2px; }
  .tabs { position: static; }
  html { scroll-padding-top: 0; }
}
/* print: the dark skin turns to black on white, and the screen furniture stays off the paper */
@media print {
  :root { --bg: #fff; --bg-2: #fff; --bg-3: #fff; --panel: #fff; --panel-2: #f3f3f3; --ink: #000; --muted: #333; --dim: #555; --hair: #ccc; --lav: #222; --cream: #222; --pink: #9a0046; --up: #0a6b3a; --down: #a3001c; }
  body { background: #fff; color: #000; }
  .mast, .tabs, .ticker, .loopbar, .toasts, .foot, .detail-actions, .coach, dialog, .btn, .c-act, .c-spark, .sortbar, .toolbar, .warn, .more summary::after { display: none !important; }
  main { max-width: none; padding: 0; }
  h1, h2, h3, .page-head h1, .panel h2, .section-title, .news-card h3, .detail-banner h1, .quote-big, .board-you__stats b, .account__grid b, .yours b, .empty b, .r-line b, .ticket__sum dd.total, .summary__big small { color: #000 !important; text-shadow: none !important; }
  .panel, .news-card, .table-wrap, .holds, .summary, .chart-panel, .detail-banner, .account__grid div { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
