/* Mercury Journal — glass UI */
:root {
  --font: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --brand-font: 'Unbounded', var(--font);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --chrome: linear-gradient(172deg, #fff 18%, #b9bbc5 44%, #55575f 52%, #dfe0e6 70%, #fff 92%);
  --radius: 18px;
  --radius-sm: calc(var(--radius) * .6);
  --glass: .045;
  --blur: 22px;
  --border-a: .07;
  --accent: #ffffff;
  --accent-rgb: 255, 255, 255;
  --bg-dim: .55;
  --bg-blur: 0px;
  --bg-filter: none;
  --bg1: #050505;
  --bg2: #16161d;

  --text: rgba(255, 255, 255, .93);
  --text-2: rgba(255, 255, 255, .58);
  --text-3: rgba(255, 255, 255, .36);
  --line: rgba(255, 255, 255, var(--border-a));
  --line-2: rgba(255, 255, 255, .045);
  --panel: rgba(255, 255, 255, var(--glass));
  --panel-2: rgba(255, 255, 255, calc(var(--glass) + .03));
  --hover: rgba(255, 255, 255, .06);
  --pos: rgba(255, 255, 255, .95);
  --neg: rgba(255, 255, 255, .42);
  --pos-bg: rgba(255, 255, 255, .16);
  --neg-bg: rgba(255, 255, 255, .035);
  --chart-line: #ffffff;
  --gap: 14px;
  --pad: 20px;
  color-scheme: dark;
}
body.pnl-classic { --pos: #4ade80; --neg: #f87171; --pos-bg: rgba(74, 222, 128, .16); --neg-bg: rgba(248, 113, 113, .12); }
body.density-compact { --gap: 10px; --pad: 15px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg1);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
::selection { background: rgba(var(--accent-rgb), .3); }
.num, .money { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.flat { color: var(--text-2); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.ic { flex: none; display: block; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .16); }
::-webkit-scrollbar-track { background: transparent; }

/* ───────── background ───────── */
#bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 90% at 70% 0%, var(--bg2), var(--bg1) 70%); }
#bg > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--bg-pos, center); opacity: var(--bg-opacity, 1); filter: var(--bg-filter) blur(var(--bg-blur)); transform: translate(var(--px, 0px), var(--py, 0px)) scale(calc(var(--bg-zoom, 1) * 1.04)); transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
#bg[data-type="none"] { background: var(--bg1); }
#bg-dim { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: rgba(0, 0, 0, var(--bg-dim)); }
#grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--grain, .055); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#bg-dim::after { content: ''; position: absolute; inset: 0; background: radial-gradient(140% 100% at 50% 0%, transparent 40%, rgba(0, 0, 0, var(--vignette, .55))); }
/* colour tint: recolours the background while keeping its light and shadow */
#bg-dim::before { content: ''; position: absolute; inset: 0; background: var(--bg-tint, #7c5cff); opacity: var(--bg-tint-a, 0); mix-blend-mode: color; }

/* ───────── glass ───────── */
.glass {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid rgba(255, 255, 255, calc(var(--border-a) * .55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 50px -24px rgba(0, 0, 0, .7);
}
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(165deg, rgba(255, 255, 255, calc(var(--border-a) * 3.2)), rgba(255, 255, 255, calc(var(--border-a) * .4)) 34%, transparent 58%, rgba(255, 255, 255, calc(var(--border-a) * 1.4)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.panel { border-radius: var(--radius); padding: var(--pad); position: relative; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; min-height: 26px; }
.panel-title { font-size: 13px; font-weight: 500; color: var(--text-2); display: flex; align-items: center; gap: 7px; letter-spacing: .005em; }
.panel-title .ic { opacity: .55; }
.panel-sub { font-size: 12px; color: var(--text-3); }

/* ───────── app shell ───────── */
#app { position: relative; z-index: 2; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.topbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; padding: 14px 22px 10px; gap: 28px; position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -.03em; text-decoration: none; color: var(--text); }
.brand svg { filter: drop-shadow(0 0 12px rgba(255, 255, 255, .28)); transition: transform .6s var(--ease); }
.brand:hover svg { transform: translateY(-1px) scale(1.08); }
/* The "Mercury" wordmark beside the logo, everywhere it appears. */
:is(.brand, .ah-brand, .ob-brand) > span { font-family: var(--brand-font); font-style: normal; font-weight: 500; font-size: .94em; letter-spacing: -.02em; }
.nav { position: relative; display: flex; align-items: center; gap: 2px; justify-self: start; }
.nav a { position: relative; z-index: 1; padding: 8px 14px; border-radius: 999px; color: var(--text-3); text-decoration: none; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; transition: color .3s; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a.on { color: #0a0a0b; }
/* the liquid-metal drop behind the active tab */
.nav-ind {
  position: absolute; left: 0; top: 0; width: var(--iw, 0); height: var(--ih, 0); transform: translate(var(--ix, 0), var(--iy, 0)); border-radius: 999px; pointer-events: none; opacity: 0;
  background: linear-gradient(172deg, #fff 10%, #d9dae0 42%, #8d8f98 54%, #eceef2 72%, #fff 95%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 6px 22px -6px rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .18), inset 0 1px 1px #fff;
  transition: transform .55s cubic-bezier(.3, 1.35, .45, 1), width .55s cubic-bezier(.3, 1.35, .45, 1), height .55s cubic-bezier(.3, 1.35, .45, 1), opacity .3s;
}
.nav-i { display: none; }
.topbar-right { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.acct-wrap { position: relative; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; color: var(--text-3); text-decoration: none; white-space: nowrap; transition: color .2s; }
.status:hover { color: var(--text); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: #6b7280; box-shadow: 0 0 0 3px rgba(107, 114, 128, .18); }
.status .dot.live { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .16), 0 0 10px #34d399; animation: pulse 2.4s infinite; }
.pill { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: var(--text-2); white-space: nowrap; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: color .2s, background .2s, border-color .2s; }
.pill:hover { color: var(--text); background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, .06), 0 0 14px #34d399; } }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: var(--text-2); transition: background .2s, color .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn.on { color: var(--text); background: rgba(255, 255, 255, .1); }

.shell { display: grid; grid-template-columns: 1fr auto; min-height: 0; }
main { overflow-y: auto; overflow-x: hidden; padding: 10px 22px 120px; min-width: 0; scroll-behavior: smooth; }
.view { max-width: 1480px; margin: 0 auto; animation: viewIn .45s cubic-bezier(.2, .8, .2, 1); }
.view.still { animation: none; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* sidebar */
.sidebar { width: 292px; overflow-y: auto; padding: 8px 18px 120px 6px; border-left: 1px solid var(--line-2); transition: width .3s, opacity .3s, padding .3s; }
body.no-sidebar .sidebar { width: 0; padding: 0; opacity: 0; overflow: hidden; border: 0; }
.sb-sec { padding: 12px 6px 14px 14px; border-bottom: 1px solid var(--line-2); }
.sb-sec:last-child { border-bottom: 0; }
.sb-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); cursor: pointer; user-select: none; margin-bottom: 9px; }
.sb-head .ic { transition: transform .2s; }
.sb-sec.collapsed .sb-head .ic { transform: rotate(-90deg); }
.sb-sec.collapsed .sb-body { display: none; }
.sb-label { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--text-2); text-transform: uppercase; margin: 10px 0 3px; }
.sb-text { font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; min-height: 18px; outline: none; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }
.sb-text:focus { background: rgba(255, 255, 255, .05); color: var(--text); }
.sb-text:empty::before { content: attr(data-ph); color: var(--text-3); opacity: .55; }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); padding: 4px 0; cursor: pointer; }
.check input { display: none; }
.check .box { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--text-3); flex: none; margin-top: 1px; display: grid; place-items: center; transition: all .2s; }
.check input:checked + .box { background: var(--text); border-color: var(--text); }
.check input:checked + .box::after { content: ''; width: 6px; height: 3px; border: 1.6px solid #000; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:checked ~ span { color: var(--text-3); text-decoration: line-through; }
.sb-big { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.recent { display: flex; flex-direction: column; gap: 2px; }
.recent a { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; padding: 7px 6px; margin: 0 -6px; border-radius: 9px; text-decoration: none; transition: background .2s; }
.recent a:hover { background: rgba(255, 255, 255, .05); }
.recent .r-top { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
.recent .r-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .r-val { font-size: 12.5px; font-weight: 600; text-align: right; }
.recent .day-sep { font-size: 11px; color: var(--text-3); padding: 8px 0 2px; }
.sb-more { display: inline-flex; align-items: center; gap: 2px; margin-top: 8px; font-size: 12px; color: var(--text-3); text-decoration: none; transition: color .2s; }
.sb-more:hover { color: var(--text); }

/* ───────── layout helpers ───────── */
.grid { display: grid; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: var(--gap); }
.h-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 44px; line-height: 1; letter-spacing: -.01em; margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.005em; padding-right: .05em; }
.sub-tabs { display: flex; gap: 22px; padding: 4px 2px 14px; }
.sub-tabs button { color: var(--text-3); font-size: 14px; font-weight: 500; padding: 4px 0; transition: color .2s; }
.sub-tabs button:hover, .sub-tabs button.on { color: var(--text); }

/* buttons */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .07); transition: background .2s, transform .1s; white-space: nowrap; }
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #000; border-color: transparent; }
.btn.primary:hover { filter: brightness(.92); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.btn.danger:hover { background: rgba(248, 113, 113, .16); color: #fca5a5; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); padding: 4px 9px; border-radius: 8px; }
.chip-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2); gap: 2px; flex-wrap: wrap; }
.seg button { padding: 5px 11px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); transition: all .2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, .11); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; font-size: 12px; color: var(--text-2); border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: all .2s; white-space: nowrap; }
button.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .15); }
.chip.on { color: var(--text); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
.chip.bad.on { color: #fca5a5; background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; background: rgba(255, 255, 255, .08); color: var(--text-2); border: 1px solid var(--line); }
.badge.grade { color: var(--text); }

input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=password], select, textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); outline: none; transition: border-color .2s, background .2s; font-size: 13px;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .35); }
select option { background: #111; }
input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); cursor: pointer; }
.lbl { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 7px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--text-2); }
.switch { position: relative; width: 36px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: rgba(255, 255, 255, .14); transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(15px); background: #000; }
.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.tog input { display: none; }
.tog span { display: inline-block; padding: 5px 11px; border-radius: 8px; font-size: 12.5px; border: 1px solid var(--line); color: var(--text-3); cursor: pointer; transition: all .2s; }
.tog input:checked + span { color: var(--text); background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .16); }

/* ───────── dashboard ───────── */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 4px 22px; flex-wrap: wrap; }
.hero-k { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.hero-k em { font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--text-2); font-weight: 400; }
.hero-v { font-size: clamp(44px, 6vw, 80px); font-weight: 600; letter-spacing: -.05em; line-height: 1; margin: 10px 0 12px; font-variant-numeric: tabular-nums; }
.chrome-text, body:not(.pnl-classic):not(.pnl-custom) .hero-v.pos, body:not(.pnl-classic):not(.pnl-custom) .acc-net .big.pos, body:not(.pnl-classic):not(.pnl-custom) .td-pnl.pos {
  background: var(--chrome); background-size: 100% 220%;
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 0 26px rgba(255, 255, 255, .14));
  animation: sheen 7s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 0 100%; } }
.hero-s { color: var(--text-3); font-size: 13.5px; display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.hero-s b { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap); }
.stat { padding: 16px 18px 18px; border-radius: var(--radius); transition: transform .35s var(--ease); }
.stat:hover { transform: translateY(-2px); }
.stat-k { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-k .ic { opacity: .5; }
.stat-v { font-size: 28px; font-weight: 600; letter-spacing: -.035em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stat .tip { opacity: 0; transition: opacity .2s; }
.stat:hover .tip { opacity: 1; }
@media (hover: none) { .stat .tip { display: none; } }
.tip { position: relative; cursor: help; }
.tip:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 240px; padding: 8px 10px; border-radius: 9px; background: rgba(20, 20, 22, .96); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); z-index: 50; white-space: normal; font-weight: 400; letter-spacing: 0; text-transform: none; pointer-events: none; }

/* the dashboard: panels you pick, on a 12-column grid */
.dash-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 6px; }
.dw-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.dw { grid-column: span 12; position: relative; min-width: 0; }
.dw-s { grid-column: span 4; }
.dw-m { grid-column: span 6; }
.dw-l { grid-column: span 8; }
@media (max-width: 1250px) { .dw-s, .dw-m { grid-column: span 6; } .dw-l { grid-column: span 12; } }
@media (max-width: 760px) { .dw-grid > * { grid-column: span 12 !important; } }
.dw-empty { grid-column: span 12; padding: 70px 0; text-align: center; }

/* Net P&L: left, centered or right; three sizes */
.dw-pnl .hero { display: block; padding: 14px 4px 10px; }
.dw-pnl.al-center .hero { text-align: center; }
.dw-pnl.al-right .hero { text-align: right; }
.dw-pnl.al-center .hero-s { justify-content: center; }
.dw-pnl.al-right .hero-s { justify-content: flex-end; }
.dw-pnl.sc-m .hero-v { font-size: clamp(38px, 4.4vw, 58px); }
.dw-pnl.sc-xl .hero-v { font-size: clamp(58px, 10vw, 140px); }
.dw-pnl.sc-xl.al-center .hero { padding: 34px 4px 26px; }
.hero-spark { max-width: 520px; margin-top: 12px; }
.dw-pnl.al-center .hero-spark { margin-inline: auto; }
.dw-pnl.al-right .hero-spark { margin-left: auto; }
.stat-v small { font-size: .55em; color: var(--text-3); font-weight: 500; }

/* small panels */
.dw-big { font-size: 30px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dw-note { font-size: 12.5px; margin-top: 5px; }
.dw-kvs { margin-top: 14px; }
.dw-kvs small { color: var(--text-3); font-weight: 500; }
.dw-ring { position: relative; width: 136px; aspect-ratio: 1; margin: 4px auto 2px; display: grid; place-items: center; text-align: center; }
.dw-ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--text) calc(var(--p) * 360deg), rgba(255, 255, 255, .08) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px)); }
.dw-ring b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.dw-ring span { font-size: 12px; color: var(--text-3); }
.dw-text { white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.dw-trades { display: flex; flex-direction: column; }
.dw-trades a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px; border-radius: 9px; text-decoration: none; font-size: 13px; transition: background .15s; }
.dw-trades a:hover { background: rgba(255, 255, 255, .05); }
.dw-trades .dim { font-size: 12px; }

/* customizing */
.dash-editbar { position: sticky; top: -10px; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px 12px 18px; margin: 2px 0 12px; border-radius: 16px; background: rgba(16, 16, 18, .88); }
.dash-editbar b { display: block; font-size: 14px; }
.dash-editbar .grow span { font-size: 12.5px; color: var(--text-3); }
.editing .dw { outline: 1px dashed rgba(255, 255, 255, .2); outline-offset: 5px; border-radius: var(--radius); }
.editing .dw[draggable] { cursor: grab; }
.editing .dw > :not(.dw-tools) { pointer-events: none; user-select: none; }
.editing .dw.dragging { opacity: .35; }
.editing .dw.drop { outline: 2px solid var(--text); }
.dw-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; padding: 4px 4px 4px 10px; border-radius: 11px; background: rgba(255, 255, 255, .05); position: relative; z-index: 2; }
.dw-grip { display: flex; align-items: center; gap: 7px; margin-right: auto; font-size: 12.5px; color: var(--text-2); }
.dw-grip b { font-weight: 600; color: var(--text); }
.dw-tools .icon-btn { width: 28px; height: 28px; }
.dw-tools .icon-btn:disabled { opacity: .25; pointer-events: none; }
.dw-sizes button { padding: 3px 9px; font-size: 11.5px; }
.dw-add { grid-column: span 4; min-height: 130px; display: grid; place-content: center; justify-items: center; gap: 6px; border: 1.5px dashed rgba(255, 255, 255, .16); border-radius: var(--radius); color: var(--text-3); font-size: 13px; transition: color .2s, border-color .2s, background .2s; }
.dw-add:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .03); }
.modal.dw-gallery-modal { width: min(740px, 100%); }
.dw-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.dw-tile { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--text); transition: background .15s, border-color .15s; }
.dw-tile:hover:not([disabled]) { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); }
.dw-tile[disabled] { opacity: .4; cursor: default; }
.dw-tile b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.dw-tile .grow > span { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.dw-tile-i { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.dw-opts { display: grid; gap: 18px; margin-top: 16px; }
.dw-opt > span:first-child { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.dw-opt.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dw-opt.inline > span:first-child { margin: 0; }
.dw-hint { font-size: 11.5px; margin-top: 7px; }
.panel-link { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-3); text-decoration: none; transition: color .2s; }
.panel-link:hover { color: var(--text); }
.score-body { display: grid; justify-items: center; gap: 8px; font-size: 12.5px; line-height: 1.5; text-align: center; }

/* charts */
.chart-wrap { position: relative; }
.chart { display: block; overflow: visible; font-family: var(--font); }
.chart .grid { stroke: rgba(255, 255, 255, .05); stroke-dasharray: 3 5; }
.chart .zero { stroke: rgba(255, 255, 255, .12); }
.chart .line { fill: none; stroke: var(--chart-line); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .25)); }
.chart .dot { fill: #fff; }
.chart .dot-glow { fill: rgba(255, 255, 255, .6); }
.chart text { fill: var(--text-3); font-size: 11.5px; }
.chart .cross, .chart .crossh { stroke: rgba(255, 255, 255, .25); stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; padding: 7px 10px; border-radius: 10px; font-size: 12px; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; background: rgba(15, 15, 17, .85); z-index: 5; }
.chart-tip b { font-size: 14px; }
.chart-tip span { color: var(--text-2); }
.chart-tip.ohlc { flex-direction: row; gap: 6px; top: 8px; left: 10px; }
.empty-chart { display: grid; place-items: center; min-height: 160px; color: var(--text-3); font-size: 13px; }
.spark { display: block; }
.bars { display: flex; align-items: stretch; gap: 8px; height: calc(var(--h) + 40px); }
.bars.dense { gap: 4px; height: calc(var(--h) + 22px); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bar-area { position: relative; width: 100%; height: var(--h); }
.bar { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(36px, 72%); border-radius: 7px; background: linear-gradient(to top, rgba(255, 255, 255, .25), rgba(255, 255, 255, .7)); min-height: 2px; animation: barIn .7s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom; }
@keyframes barIn { from { opacity: 0; clip-path: inset(100% 0 0 0); } }
.bars.has-neg .bar-area::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255, 255, 255, .1); }
.bars.has-neg .bar.pos { bottom: 50%; border-radius: 6px 6px 2px 2px; }
.bars.has-neg .bar.neg { top: 50%; bottom: auto; border-radius: 2px 2px 6px 6px; }
.bar.neg { background: rgba(255, 255, 255, .16); }
.bars.dense .bar-val { display: none; }
body.pnl-classic .bar.pos { background: linear-gradient(to top, rgba(74, 222, 128, .3), rgba(74, 222, 128, .8)); }
body.pnl-classic .bar.neg { background: linear-gradient(to bottom, rgba(248, 113, 113, .3), rgba(248, 113, 113, .7)); }
.bar-val { font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.bar-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.bar-col:hover .bar { filter: brightness(1.3); }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 76px; align-items: center; gap: 12px; font-size: 13px; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.hbar-track { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .04); overflow: hidden; }
.hbar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .8)); }
.hbar.neg { background: rgba(255, 255, 255, .16); }
body.pnl-classic .hbar.pos { background: linear-gradient(90deg, rgba(74, 222, 128, .35), #4ade80); }
body.pnl-classic .hbar.neg { background: linear-gradient(90deg, rgba(248, 113, 113, .35), #f87171); }
.hbar-val { text-align: right; font-weight: 600; font-size: 12.5px; }
.hbar-sub { grid-column: 2 / 4; font-size: 11px; color: var(--text-3); margin-top: -6px; }
.radar .ring { fill: none; stroke: rgba(255, 255, 255, .07); }
.radar .spoke { stroke: rgba(255, 255, 255, .07); }
.radar .shape { fill: rgba(255, 255, 255, .14); stroke: rgba(255, 255, 255, .85); stroke-width: 1.6; stroke-linejoin: round; animation: radarIn .9s cubic-bezier(.2, .8, .2, 1); transform-origin: center; }
@keyframes radarIn { from { transform: scale(.2); opacity: 0; } }
.radar .vertex { fill: #fff; }
.radar text { fill: var(--text-2); font-size: 11px; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: var(--h); }
.hist-bar { flex: 1; border-radius: 4px 4px 1px 1px; background: rgba(255, 255, 255, .55); min-height: 2px; }
.hist-bar.neg { background: rgba(255, 255, 255, .16); }
body.pnl-classic .hist-bar.pos { background: rgba(74, 222, 128, .7); }
body.pnl-classic .hist-bar.neg { background: rgba(248, 113, 113, .55); }
.hist-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* calendar */
.dw-calendar { container: cal / inline-size; }
.cal-head .panel-title { gap: 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.cal-head .panel-title b { font-size: 13px; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal.with-weeks { grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(70px, .9fr); }
.cal-dow { text-align: center; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--text-3); padding: 2px 0 6px; }
.cal-dow-w { text-align: right; padding-right: 8px; }
.cal-day { position: relative; container-type: inline-size; aspect-ratio: 1.3; border-radius: 11px; background: rgba(255, 255, 255, .025); border: 1px solid rgba(255, 255, 255, .035); padding: 0; display: grid; place-items: center; cursor: default; transition: transform .25s var(--ease), background .2s, border-color .2s; min-width: 0; overflow: hidden; }
.cal-day .d { position: absolute; top: 6px; left: 8px; font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.cal-day.other { opacity: .35; background: none; border-color: transparent; }
.cal-day.today { border-color: rgba(255, 255, 255, .3); }
.cal-day.today .d { color: var(--text); font-weight: 600; }
.cal-day.has { cursor: pointer; }
.cal-day.has:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .25); }
.cal-day.win { background: linear-gradient(160deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07)); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.cal-day.loss { background: rgba(255, 255, 255, .055); border-color: rgba(255, 255, 255, .07); }
.cal-day.be { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .3); }
body.pnl-classic .cal-day.win { background: linear-gradient(160deg, rgba(74, 222, 128, .28), rgba(74, 222, 128, .07)); border-color: rgba(74, 222, 128, .3); }
body.pnl-classic .cal-day.loss { background: linear-gradient(160deg, rgba(248, 113, 113, .22), rgba(248, 113, 113, .05)); border-color: rgba(248, 113, 113, .25); }
.cal-day .v { font-size: clamp(10px, 17cqi, 16px); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: 8px; }
.cal-day.loss .v { color: var(--text-2); }
body.pnl-classic .cal-day.loss .v { color: #fca5a5; }
.cal-day .note-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--text-2); }
/* narrow cells: the amount sits at the bottom so it never runs into the date */
@container cal (max-width: 520px) { .cal-day { aspect-ratio: 1; } }
@container (max-width: 84px) { .cal-day .v { align-self: end; margin: 0 0 6px; font-size: clamp(9.5px, 19cqi, 13px); } }
.cal-week { border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 6px 8px; font-size: 11px; color: var(--text-3); cursor: default; }
.cal-week b { font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.cal-week b.neg { color: var(--neg); }

/* tables / journal */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: var(--gap); }
.search { position: relative; }
.search input { padding-left: 34px; width: 220px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.day-group { margin-bottom: var(--gap); border-radius: var(--radius); overflow: hidden; }
.day-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.day-head .dh-date { font-weight: 600; font-size: 14px; }
.day-head .dh-meta { color: var(--text-3); font-size: 12.5px; }
.day-head .dh-pnl { margin-left: auto; font-weight: 600; font-size: 15px; }
.trow { display: grid; grid-template-columns: 70px minmax(150px, 1.3fr) 64px minmax(110px, 1fr) minmax(100px, .9fr) 44px 170px 64px 100px 30px; gap: 10px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; transition: background .15s; font-size: 13px; cursor: pointer; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: rgba(255, 255, 255, .035); }
.trow .t-sym { display: flex; align-items: center; gap: 9px; font-weight: 600; min-width: 0; overflow: hidden; }
.trow .t-sym > span { min-width: 0; }
.trow .t-sym small { display: block; font-weight: 400; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t-pnl { text-align: right; font-weight: 600; font-size: 14px; }
.trow .t-r { text-align: right; color: var(--text-2); }
.trow .ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .share-btn { opacity: 0; transition: opacity .2s; }
.trow:hover .share-btn { opacity: 1; }
.side { font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.side.Long { color: var(--text); }
.thead { color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: default; padding-top: 8px; padding-bottom: 8px; }
.thead:hover { background: none; }
.jt-head { border: 0; padding-top: 0; padding-bottom: 8px; }
@media (max-width: 1100px) {
  .trow { grid-template-columns: 64px 1fr 60px 90px 30px; }
  .trow > :nth-child(4), .trow > :nth-child(5), .trow > :nth-child(6), .trow > :nth-child(8) { display: none; }
}
.sym-icon { display: inline-grid; place-items: center; border-radius: 50%; background: var(--sc); color: #fff; flex: none; box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .15); }
.firm-mark { display: inline-grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--fc) 22%, #0a0a0c); color: var(--fc); font-weight: 700; border: 1px solid color-mix(in srgb, var(--fc) 30%, transparent); flex: none; }
.empty { text-align: center; padding: 70px 20px; color: var(--text-2); }
.empty h3 { color: var(--text); font-size: 18px; font-weight: 600; margin: 14px 0 6px; }
.empty p { max-width: 460px; margin: 0 auto 18px; font-size: 13.5px; }

/* trade detail: layout lives in journal.css */
.kv { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--line-2); gap: 10px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--text-2); }
.kv b { font-weight: 600; }
.kv input { width: 110px; height: 28px; text-align: right; padding: 0 8px; }
.scale { margin: 6px 0 16px; }
.scale-top { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; margin-bottom: 8px; }
.scale-top b { color: var(--text); letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.scale-bar { height: 10px; border-radius: 10px; background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .95)); position: relative; overflow: hidden; }
.scale-bar i { position: absolute; top: 0; bottom: 0; right: 0; background: rgba(10, 10, 12, .85); transition: left .8s cubic-bezier(.2, .8, .2, 1); }
.r-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.r-tile { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); }
.r-tile span { font-size: 10.5px; letter-spacing: .08em; font-weight: 600; color: var(--text-3); text-transform: uppercase; }
.r-tile b { display: block; font-size: 19px; font-weight: 600; margin-top: 4px; }
.grades { display: flex; gap: 5px; }
.grades button { flex: 1; height: 32px; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--text-3); transition: all .2s; }
.grades button:hover { color: var(--text); }
.grades button.on { color: #000; background: #fff; border-color: #fff; }
.tf-bar { display: flex; gap: 2px; flex-wrap: wrap; }
.tf-bar button { padding: 4px 9px; border-radius: 7px; font-size: 12px; color: var(--text-3); }
.tf-bar button.on { background: rgba(255, 255, 255, .1); color: var(--text); }
.tf-bar button:disabled { opacity: .3; cursor: default; }
.candle-box { position: relative; height: 440px; cursor: crosshair; user-select: none; }
.candle-box.dragging { cursor: grabbing; }
.candles .wick { stroke-width: 1; }
.candles .wick.up { stroke: rgba(255, 255, 255, .75); }
.candles .wick.dn { stroke: rgba(255, 255, 255, .35); }
.candles .body.up { fill: rgba(255, 255, 255, .9); }
.candles .body.dn { fill: rgba(255, 255, 255, .22); stroke: rgba(255, 255, 255, .4); stroke-width: .6; }
body.pnl-classic .candles .body.up { fill: #4ade80; }
body.pnl-classic .candles .wick.up { stroke: #4ade80; }
body.pnl-classic .candles .body.dn { fill: #f87171; stroke: none; }
body.pnl-classic .candles .wick.dn { stroke: #f87171; }
.candles .vol { fill: rgba(255, 255, 255, .07); }
.candles .py { font-size: 11px; }
.candles .lvl { stroke-dasharray: 2 4; stroke-width: 1; }
.candles .lvl.entry { stroke: #6a8dff; }
.candles .lvl.exit { stroke: #a5b4fc; }
.candles .lvl.stop { stroke: rgba(255, 255, 255, .45); }
.candles .lvl.target { stroke: rgba(255, 255, 255, .45); }
.candles .tag rect { fill: rgba(40, 40, 44, .95); }
.candles .tag.entry rect { fill: #2848a8; }
.candles .tag.exit rect { fill: #4b4f8a; }
.candles .tag text { fill: #fff; font-size: 11px; font-weight: 600; }
.candles .fill-mark circle { fill: #fff; stroke: #000; stroke-width: 1.5; }
.candles .fill-mark path { fill: #fff; }
.candles .fill-mark.exit circle { fill: #c7d2fe; }
.candles .fill-mark text { fill: #fff; font-size: 11.5px; font-weight: 600; paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 3px; }
.bars-state { display: grid; place-items: center; height: 440px; text-align: center; color: var(--text-2); font-size: 13px; padding: 20px; }
.bars-state p { max-width: 380px; margin: 6px auto 14px; color: var(--text-3); }
.exec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.exec-table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.exec-table td { padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.shot { position: relative; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.shot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.shot button { position: absolute; top: 5px; right: 5px; opacity: 0; background: rgba(0, 0, 0, .6); border-radius: 7px; width: 24px; height: 24px; display: grid; place-items: center; }
.shot:hover button { opacity: 1; }
.dropzone { border: 1.5px dashed rgba(255, 255, 255, .12); border-radius: 12px; padding: 14px; text-align: center; color: var(--text-3); font-size: 12.5px; transition: all .2s; cursor: pointer; }
.dropzone.over, .dropzone:hover { border-color: rgba(255, 255, 255, .3); color: var(--text-2); background: rgba(255, 255, 255, .03); }
.csv-warn { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 11px 13px; border-radius: 12px; background: rgba(250, 204, 21, .08); color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.csv-warn > svg { flex: none; margin-top: 2px; color: #facc15; }
.csv-warn b { color: var(--text); font-weight: 600; }
.csv-table { margin-top: 14px; max-height: 420px; overflow: auto; }
.csv-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.csv-table th { position: sticky; top: 0; text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 6px 10px; background: rgba(14, 14, 16, .9); }
.csv-table td { padding: 7px 10px; color: var(--text-2); white-space: nowrap; }
.csv-table .num { text-align: right; }
.csv-table tr.have td { opacity: .4; }
.csv-table tr.closed td:first-child, .csv-table tr.closed td:nth-child(2) { color: #facc15; }
.notes-area { min-height: 150px; font-size: 13.5px; }

/* accounts */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--gap); }
.acc-card { padding: 18px 18px 0; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.acc-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .13); }
.acc-card.dim-card { opacity: .5; }
.acc-top { display: flex; gap: 12px; align-items: flex-start; }
.acc-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.acc-sub { font-size: 12.5px; color: var(--text-3); }
.acc-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.acc-cols span { font-size: 10.5px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.acc-cols b { display: block; font-size: 16px; font-weight: 600; margin-top: 3px; }
.acc-net span { font-size: 10.5px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.acc-net .big { font-size: 28px; font-weight: 600; letter-spacing: -.03em; text-shadow: 0 0 24px rgba(255, 255, 255, .2); }
.acc-spark { margin: 8px -18px 0; height: 56px; }
.type-badge { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--text-2); display: inline-flex; gap: 4px; align-items: center; text-transform: uppercase; }

/* studio / media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
[hidden] { display: none !important; }

/* meme & movie-clip search */
.gs-bar { margin-bottom: 10px; }
.gs-bar input { width: 100%; max-width: 520px; }
.gs-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.gs-chips::-webkit-scrollbar { display: none; }
.gs-chips .chip { flex: none; }
.gs-grid { columns: 5 180px; column-gap: 8px; min-height: 120px; }
.gs-tile { position: relative; break-inside: avoid; margin-bottom: 8px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .05); cursor: pointer; }
.gs-tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 7px; font-size: 11.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); pointer-events: none; }
.gs-acts { position: absolute; top: 7px; right: 7px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: all .18s var(--ease, ease); }
.gs-tile:hover .gs-acts { opacity: 1; transform: none; }
@media (hover: none) { .gs-acts { opacity: 1; transform: none; } }
.gs-acts button { padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(10, 10, 12, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .16); }
.gs-acts button:hover { background: #fff; color: #000; }
.gs-tile.busy { opacity: .55; pointer-events: none; }
.gs-tile.busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .8s linear infinite; }
.gs-tile.added::before { content: '✓ Added'; position: absolute; left: 7px; top: 7px; z-index: 1; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #fff; color: #000; }
.gs-tile.picked { outline: 2px solid #fff; outline-offset: -2px; }
.gs-msg { column-span: all; display: grid; place-items: center; padding: 34px 0; color: var(--text-3); font-size: 13px; }
.gs-foot { margin-top: 4px; font-size: 11px; color: var(--text-3); }
.gs.compact .gs-bar input { max-width: none; }
/* Compact pickers scroll inside a fixed height. A multi-column layout spills extra columns sideways
   when its height is capped (tiles end up over the rest of the page), so they use an even grid. */
.gs { min-width: 0; }
.gs.compact .gs-grid { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-content: start; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.gs.compact .gs-tile { margin-bottom: 0; border-radius: 9px; aspect-ratio: 4 / 3 !important; }
.gs.compact .gs-msg { grid-column: 1 / -1; }
.gs.compact .gs-title { font-size: 10.5px; padding: 14px 6px 5px; }

.media-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 8px; }
.media-cats .chip { flex: none; }
.media-grid.compact { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.media-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #0b0b0d; border: 1px solid var(--line); transition: transform .2s, border-color .2s; display: block; width: 100%; }
.media-grid:not(.compact) .media-thumb { aspect-ratio: 16/10; }
.media-thumb:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.media-thumb.selected { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.media-thumb video, .media-thumb img, .media-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .mt-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .85); }
.media-thumb .mt-mood { position: absolute; top: 6px; left: 6px; }
.media-thumb .mt-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 7px; background: rgba(0, 0, 0, .6); display: none; place-items: center; }
.media-thumb:hover .mt-del { display: grid; }
.thumb-none { display: grid; place-items: center; height: 100%; color: var(--text-3); font-size: 12px; }
.thumb-shader { width: 100%; height: 100%; }
.shader-chrome { background: radial-gradient(circle at 42% 40%, #fff 0 6%, #777 14%, #111 28%, transparent 29%), radial-gradient(ellipse 46% 40% at 50% 50%, transparent 52%, #ddd 56%, #333 64%, #eee 70%, #222 78%, transparent 80%), #000; }
.shader-aurora { background: linear-gradient(180deg, #000 10%, #0d3b2e 45%, #2a6b8c 55%, #000 90%); }
.shader-mesh { background: radial-gradient(circle at 25% 30%, #6d7cff 0, transparent 50%), radial-gradient(circle at 75% 70%, #c9cbd6 0, transparent 50%), #0b0b10; }
.shader-silk { background: repeating-linear-gradient(170deg, #000 0 6px, #2b2b36 7px, #000 9px); }
.shader-smoke { background: radial-gradient(circle at 40% 50%, #444 0, #111 40%, #000 70%); }
.shader-stars { background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent), radial-gradient(1px 1px at 85% 20%, #fff, transparent), #02020a; }
.shader-grain { background: radial-gradient(circle at 50% 0, #2a2a2a, #050505 70%); }
.cat-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 22px 0 10px; }
.card-media-host { position: fixed; left: -10px; top: -10px; width: 4px; height: 4px; overflow: hidden; opacity: .01; pointer-events: none; z-index: -1; }
.card-media-host > * { width: 4px; height: 4px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.modal-wrap.in { opacity: 1; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: calc(var(--radius) + 4px); padding: 24px; background: rgba(18, 18, 20, .82); transform: translateY(12px) scale(.98); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.modal-wrap.in .modal { transform: none; }
.modal.wide { width: min(1240px, 100%); }
.modal h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal .form { display: grid; gap: 12px; margin-top: 18px; }
.modal .form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.studio-modal { padding: 0; overflow: hidden; height: min(860px, calc(100vh - 48px)); }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: 100%; }
.studio-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .05), transparent 70%); min-height: 0; }
.stage-inner { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.card-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(min(860px, 100vh - 48px) - 110px); border-radius: 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
.stage-hint { font-size: 12px; color: var(--text-3); margin-top: 14px; }
.studio-side { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: rgba(0, 0, 0, .2); }
.studio-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 6px 22px; }
.studio-scroll { flex: 1; overflow-y: auto; padding: 0 22px 20px; }
.studio-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.studio-actions.sc-post { grid-template-columns: 1fr 1.2fr; }
.sc-post-to { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .62; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } .studio-modal { height: auto; } }

/* drawer (customize) */
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 380px; z-index: 60; border-radius: calc(var(--radius) + 4px); background: rgba(14, 14, 16, .78); display: flex; flex-direction: column; transform: translateX(calc(100% + 30px)); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px 22px; }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 22px 30px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { border-radius: 12px; border: 1px solid var(--line); padding: 8px; text-align: left; transition: all .2s; }
.preset:hover { border-color: rgba(255, 255, 255, .2); }
.preset.on { border-color: #fff; }
.preset .sw { height: 40px; border-radius: 8px; margin-bottom: 6px; }
.preset span { font-size: 11.5px; color: var(--text-2); }
.range-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); margin: 9px 0; }
.range-row output { text-align: right; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.color-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin: 8px 0; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.swatch.on { border-color: #fff; }

/* settings page */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 1100px) { .settings-grid { grid-template-columns: 1fr; } }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { font-size: 13.5px; }
.set-row .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.code { font-family: var(--mono); font-size: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 8px; padding: 2px 7px; word-break: break-all; }
.steps { counter-reset: s; display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13px; color: var(--text-2); }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: rgba(255, 255, 255, .08); color: var(--text); }
.status-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); }
.status-card .big-dot { width: 12px; height: 12px; border-radius: 50%; background: #6b7280; flex: none; }
.status-card .big-dot.live { background: #34d399; box-shadow: 0 0 14px #34d399; }
.status-card .big-dot.wait { background: #fbbf24; box-shadow: 0 0 14px rgba(251, 191, 36, .6); }

/* breakeven */
.be-tag { display: inline-block; font: 600 9.5px/1 var(--font); letter-spacing: .08em; padding: 3px 5px 2px; margin-right: 7px; border-radius: 5px; color: var(--text-2); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px var(--line-2); vertical-align: 2px; }
.set-row.wrap { flex-wrap: wrap; }
.be-f > span:first-child { font-size: 11px; }
.be-in { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-3); }
.be-in input { width: 92px; }

/* wallets */
.wallets { display: grid; gap: 8px; }
.wallet { display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line-2); }
.wallet .big-dot { width: 10px; height: 10px; border-radius: 50%; background: #f87171; flex: none; }
.wallet .big-dot.live { background: #34d399; box-shadow: 0 0 12px #34d399; }
.wallet .big-dot.wait { background: #fbbf24; box-shadow: 0 0 12px rgba(251, 191, 36, .6); animation: pulse 2s infinite; }
.w-adv { margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.w-adv summary { cursor: pointer; color: var(--text-3); }
.w-adv summary:hover { color: var(--text); }
img.sym-icon.tok { object-fit: cover; background: #111; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }

/* trade tag groups */
.tg-kind { margin-left: 8px; font-weight: 500; letter-spacing: .04em; text-transform: none; color: var(--text-3); opacity: .7; }
.tg-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 0 28px; }
.tg { padding: 14px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.tg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tg-head .tg-name { width: auto; flex: 0 1 220px; min-width: 120px; height: 32px; font-weight: 600; background: transparent; border-color: transparent; padding: 0 8px; margin-left: -8px; }
.tg-head .tg-name:hover, .tg-head .tg-name:focus { border-color: var(--line); background: rgba(0, 0, 0, .28); }
.tg-head .seg button { padding: 4px 10px; font-size: 12px; }
.tg-head .icon-btn { width: 30px; height: 30px; }
.tg-head .icon-btn:disabled { opacity: .25; pointer-events: none; }

/* toasts */
#toasts { position: fixed; top: 70px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; font-size: 13px; background: rgba(20, 20, 22, .85); transform: translateX(30px); opacity: 0; transition: all .35s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; max-width: 360px; }
.toast.in { transform: none; opacity: 1; }
.toast.neg { border-color: rgba(248, 113, 113, .35); }
.toast .tt { display: flex; align-items: center; gap: 10px; }
.toast .tt b { font-size: 17px; }

/* celebration overlay */
.celebrate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; pointer-events: none; }
.celebrate canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.celebrate .c-card { position: relative; text-align: center; padding: 34px 48px; border-radius: 28px; animation: cIn .7s cubic-bezier(.2, 1.4, .3, 1) both; }
.celebrate .c-k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.celebrate .c-v { font-size: 72px; font-weight: 700; letter-spacing: -.04em; text-shadow: 0 0 50px rgba(255, 255, 255, .5); }
.celebrate.out .c-card { animation: cOut .5s ease forwards; }
@keyframes cIn { from { transform: scale(.6) translateY(30px); opacity: 0; } }
@keyframes cOut { to { transform: scale(.9); opacity: 0; } }

/* privacy */
body.privacy .money-blur { filter: blur(7px); }

/* misc */
.loading { display: grid; place-items: center; height: 60vh; color: var(--text-3); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.list-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.list-edit .chip button { margin-left: 2px; opacity: .5; }
.list-edit .chip button:hover { opacity: 1; }
.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--text-3); }
.acct-menu { position: absolute; top: 44px; right: 0; width: 300px; max-height: 420px; overflow: auto; z-index: 70; border-radius: 14px; padding: 8px; background: rgba(16, 16, 18, .9); }
.acct-menu label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13px; cursor: pointer; }
.acct-menu label:hover { background: rgba(255, 255, 255, .05); }
.acct-menu .am-sub { font-size: 11px; color: var(--text-3); }
.acct-menu input { accent-color: #fff; }
.am-manage { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 0; padding: 9px 8px 3px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.am-manage:hover { color: var(--text); }
.me-wrap { position: relative; display: flex; }
.me-menu { position: absolute; top: 44px; right: 0; width: 240px; z-index: 70; border-radius: 14px; padding: 6px; background: rgba(16, 16, 18, .92); animation: menuIn .18s var(--ease); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.me-menu .mm-who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.me-menu .mm-av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--chrome); }
.me-menu .mm-who img { width: 100%; height: 100%; object-fit: cover; }
.me-menu .mm-who b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-menu .mm-who .grow span { font-size: 12px; color: var(--text-3); }
.me-menu a, .me-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: 9px; font-size: 13px; color: var(--text-2); text-decoration: none; text-align: left; transition: background .15s, color .15s; }
.me-menu a:hover, .me-menu button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.me-menu .ic { opacity: .7; flex: none; }
.me-menu .kbd { margin-left: auto; }
@media (hover: none) { .me-menu .kbd { display: none; } }

/* first-run tour: a spotlight with a note beside it */
.tour { position: fixed; inset: 0; z-index: 500; animation: tourIn .3s ease; }
.tour.out { opacity: 0; transition: opacity .25s; }
@keyframes tourIn { from { opacity: 0; } }
.tour-block { position: absolute; }
.tour-hole { position: absolute; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .64), 0 0 0 1.5px rgba(255, 255, 255, .55), 0 0 28px rgba(255, 255, 255, .18); transition: left .35s var(--ease), top .35s var(--ease), width .35s var(--ease), height .35s var(--ease), border-radius .35s; }
.tour-hole.none { border-radius: 50%; box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .7); }
.tour:not(.interactive) .tour-hole { pointer-events: auto; }
.tour.interactive .tour-hole { pointer-events: none; animation: tourPulse 1.6s ease-in-out infinite; }
@keyframes tourPulse { 50% { box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .64), 0 0 0 3px rgba(255, 255, 255, .8), 0 0 36px rgba(255, 255, 255, .35); } }
.tour-card { position: absolute; width: min(360px, calc(100vw - 24px)); padding: 18px 18px 14px; border-radius: 18px; background: rgba(16, 16, 19, .96); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); transition: left .35s var(--ease), top .35s var(--ease), opacity .2s; }
.tour-card.busy { opacity: .6; pointer-events: none; }
.tour-card h4 { margin: 6px 0 6px; font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
.tour-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }
.tour-card p b { color: var(--text); font-weight: 600; }
.tc-bar { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 10px; }
.tc-bar i { display: block; height: 100%; background: var(--text); transition: width .35s var(--ease); }
.tc-k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tc-logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); margin-bottom: 6px; }
.tc-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.tc-skip { font-size: 12.5px; color: var(--text-3); padding: 6px 2px; }
/* hands-on steps: no dimming, the page takes clicks, the note waits in a corner */
.tour.play { pointer-events: none; }
.tour.play .tour-block { display: none; }
.tour.play .tour-hole { pointer-events: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7), 0 0 30px rgba(255, 255, 255, .22); }
.tour.play .tour-hole.none { display: none; }
.tour.play .tour-card { pointer-events: auto; }
body:has(.modal-wrap) .tour.play .tour-card:not(:hover) { opacity: .35; }
.tc-play { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.tc-play .ic { flex: none; margin-top: 2px; color: var(--text); }
.tc-play b { color: var(--text); font-weight: 600; }
.tc-skip:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition: none; } .tour.interactive .tour-hole { animation: none; } }
.me-menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 4px; }

/* ───────── login (cloud copy) ───────── */
.login { position: relative; width: min(360px, calc(100vw - 32px)); padding: 34px 28px 26px; border-radius: calc(var(--radius) + 8px); display: grid; gap: 12px; text-align: center; animation: viewIn .5s cubic-bezier(.2, .8, .2, 1); }
#app:has(.login) { display: grid; place-items: center; grid-template-rows: 1fr; }
.login-brand { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 20px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.login-brand svg { filter: drop-shadow(0 0 12px rgba(255, 255, 255, .35)); }
.login h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.login p { margin: -6px 0 10px; font-size: 13px; }
.login input[type=password] { height: 44px; font-size: 16px; text-align: center; }
.login .btn { height: 44px; font-size: 14px; }
.login-err { min-height: 18px; font-size: 12.5px; color: #fca5a5; }
.login.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ───────── phones & small tablets ───────── */
.tabbar, .sb-scrim, .more-sheet { display: none; }
@media (hover: none) {
  .trow .share-btn, .shot button { opacity: 1; }
  .media-thumb .mt-del { display: grid; }
}
@media (max-width: 760px) {
  :root { --gap: 10px; --pad: 15px; }
  body { font-size: 13.5px; }
  /* iOS zooms into inputs smaller than 16px */
  input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=password], select, textarea { font-size: 16px; }

  .topbar { grid-template-columns: auto minmax(0, 1fr); padding: calc(10px + env(safe-area-inset-top)) 12px 6px; gap: 8px; }
  .topbar .nav, .tb-sep { display: none; }
  .brand span { display: none; }
  .topbar-right { gap: 2px; min-width: 0; }
  .status { padding: 0 6px; }
  .h-title { font-size: 34px; }
  #acct-label { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .pill { padding: 0 9px; font-size: 12.5px; }
  #conn-label { display: none; }
  .topbar-right .icon-btn { width: 32px; }
  .acct-menu, .me-menu { position: fixed; left: 12px; right: 12px; top: calc(56px + env(safe-area-inset-top)); width: auto; }

  .shell { grid-template-columns: minmax(0, 1fr); }
  main { padding: 4px 12px calc(96px + env(safe-area-inset-bottom)); }
  .view { animation-duration: .3s; }

  /* bottom tab bar replaces the top nav */
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 30; padding: 6px; border-radius: 20px; background: rgba(14, 14, 16, calc(var(--glass) + .55)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; border-radius: 14px; color: var(--text-3); text-decoration: none; font-size: 10px; font-weight: 500; transition: color .2s, background .2s; min-width: 0; }
  .tabbar a span, .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.on, .tabbar button.on { color: #0a0a0b; background: linear-gradient(172deg, #fff 10%, #d9dae0 42%, #8d8f98 54%, #eceef2 72%, #fff 95%); box-shadow: 0 6px 18px -6px rgba(255, 255, 255, .4), inset 0 -2px 3px rgba(0, 0, 0, .18); }

  /* sidebar slides over the page */
  .sidebar, body.no-sidebar .sidebar { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(330px, 88vw); padding: calc(14px + env(safe-area-inset-top)) 16px 30px 4px; background: rgba(12, 12, 14, .92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-left: 1px solid var(--line); transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); opacity: 1; overflow-y: auto; }
  body.sb-open .sidebar { transform: none; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.sb-open .sb-scrim, body.more-open .sb-scrim { opacity: 1; pointer-events: auto; }
  body.more-open .sb-scrim { z-index: 29; }
  body.more-open #tb-more { color: var(--text); background: rgba(255, 255, 255, .1); }

  /* "More": the pages that don't fit in the tab bar, in a sheet above it */
  .more-sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; position: fixed; left: 8px; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 31; padding: 10px; border-radius: 22px; background: rgba(16, 16, 19, calc(var(--glass) + .7)); opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none; transition: opacity .22s, transform .3s var(--ease); }
  body.more-open .more-sheet { opacity: 1; transform: none; pointer-events: auto; }
  .more-sheet a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; border-radius: 16px; color: var(--text-2); text-decoration: none; font-size: 12px; font-weight: 500; background: rgba(255, 255, 255, .035); }
  .more-sheet a.on { color: var(--text); background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }

  /* dashboard */
  .hero { padding: 10px 2px 14px; gap: 14px; }
  .hero-v { font-size: 46px; }
  .hero-s { gap: 4px 12px; font-size: 12.5px; }
  .hero-actions { width: 100%; }
  .dash-bar #period { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .dash-bar #period button { padding: 6px 0; }
  .dash-bar #dash-edit span { display: none; }
  .dash-editbar { top: 0; padding: 10px 12px; }
  .dash-editbar .grow span { display: none; }
  .dw-gallery { grid-template-columns: minmax(0, 1fr); }
  .dw-tools .dw-grip b { display: none; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 13px 14px 14px; }
  .stat-v { font-size: 21px; margin-top: 6px; }
  .h-title { font-size: 22px; }
  .cal { gap: 3px; }
  .cal.with-weeks { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-week, .cal-dow-w { display: none; }
  .cal-day { aspect-ratio: .9; border-radius: 7px; padding: 2px; }
  .cal-day .d { top: 2px; right: 4px; font-size: 9.5px; }
  .cal-day .v { font-size: 10px; letter-spacing: -.03em; margin-top: 6px; }
  .cal-day .note-dot { display: none; }
  .cal-dow { font-size: 9.5px; letter-spacing: .02em; }
  .bars { gap: 4px; }
  .bar-val { font-size: 10px; }
  .hbar-row { grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) 64px; gap: 8px; font-size: 12.5px; }

  /* trade lists: time · symbol · P&L · share */
  .toolbar .search, .toolbar .search input { width: 100%; }
  .day-head { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .trow { grid-template-columns: 52px minmax(0, 1fr) auto 26px; gap: 8px; padding: 10px 12px; font-size: 12.5px; }
  .trow > :first-child { white-space: nowrap; font-size: 11.5px; }
  .panel-head { flex-wrap: wrap; row-gap: 8px; }
  .trow > :nth-child(3), .trow > :nth-child(4), .trow > :nth-child(5), .trow > :nth-child(6), .trow > :nth-child(7), .trow > :nth-child(8) { display: none; }
  .trow[style] { grid-template-columns: 52px minmax(0, 1fr) auto !important; }
  .trow[style] > :nth-child(5) { display: block; }
  .trow .t-pnl { font-size: 13px; }
  .thead { display: none; }

  /* sub-page tabs scroll sideways instead of wrapping */
  .sub-tabs { gap: 18px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 4px 12px 14px; }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tabs button { flex: none; white-space: nowrap; }
  /* 30 bars: every fifth date */
  .bars.dense .bar-col:not(:nth-child(5n + 1)) .bar-label { visibility: hidden; }
  .bars.dense .bar-label { overflow: visible; white-space: nowrap; }
  .gs-grid { columns: 2; column-gap: 6px; }
  .gs-acts { left: 5px; right: 5px; top: 5px; gap: 3px; }
  .gs-acts button { flex: 1; padding: 4px 0; font-size: 11px; }
  .toolbar select { flex: 1 1 40%; min-width: 0; }

  /* trade page */
  .candle-box, .bars-state { height: 300px; }
  .kv input { width: 96px; }

  /* multi-column grids written inline in the views collapse to one column */
  .view .grid[style*="repeat("], .view .grid[style*="2fr"] { grid-template-columns: minmax(0, 1fr) !important; }
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid > .panel { grid-row: auto !important; }

  /* overlays become bottom sheets */
  .modal-wrap { padding: 8px; align-items: end; }
  .modal { padding: 18px; max-height: calc(100dvh - 16px); border-radius: 22px; }
  .modal .form-2 { grid-template-columns: minmax(0, 1fr); }
  .modal-actions .btn { flex: 1; }
  .studio-modal { height: auto; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .studio { display: block; }
  .studio-stage { padding: 14px; }
  .card-canvas { max-height: 56dvh; border-radius: 18px; }
  .studio-side { border-left: 0; border-top: 1px solid var(--line); }
  .studio-scroll { overflow: visible; padding: 0 16px 16px; }
  .studio-actions { position: sticky; bottom: 0; background: rgba(14, 14, 16, .94); grid-template-columns: 1fr 1fr; }
  .studio-actions > :last-child { grid-column: 1 / -1; }
  .studio-actions.sc-post > :last-child { grid-column: auto; }
  .drawer { top: auto; left: 6px; right: 6px; bottom: 6px; width: auto; height: 78dvh; transform: translateY(calc(100% + 30px)); }
  .drawer.open { transform: none; }
  .range-row { grid-template-columns: 92px minmax(0, 1fr) 40px; }
  #toasts { top: calc(60px + env(safe-area-inset-top)); left: 12px; right: 12px; }
  .toast { max-width: none; }
  .celebrate .c-v { font-size: 48px; }
  .celebrate .c-card { padding: 26px 30px; }
}
/* narrow laptops / tablets: tighten the bar */
@media (min-width: 761px) and (max-width: 1280px) {
  .topbar { gap: 16px; }
  #conn-label { display: none; }
  .nav a { padding: 8px 11px; }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .brand span, #acct-label { display: none; }
  .nav a { padding: 7px 9px; font-size: 13px; }
}

/* ───────── profile ───────── */
:root {
  --bronze: linear-gradient(150deg, #ffd9b5 0%, #c98a55 40%, #6b3d1c 58%, #e8b487 85%);
  --silver: linear-gradient(150deg, #fff 0%, #c4c7d0 40%, #62656e 58%, #eef0f4 85%);
  --gold: linear-gradient(150deg, #fff6cf 0%, #e0b44a 40%, #7d5514 58%, #f7df94 85%);
  --mythic: linear-gradient(135deg, #ffc9f1 0%, #a9dcff 28%, #c3b2ff 50%, #fff 64%, #9ff3d6 85%, #ffc9f1 100%);
}
.tb-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; margin-left: 4px; flex: none; text-decoration: none; background: var(--chrome); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); transition: box-shadow .25s, transform .25s var(--ease); }
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-avatar .av-init { font-size: 12px; }
.tb-avatar:hover { transform: scale(1.07); }
.tb-avatar.on { box-shadow: 0 0 0 2px #0a0a0b, 0 0 0 3.5px #fff, 0 0 16px rgba(255, 255, 255, .35); }
.av-init { font-weight: 700; color: #0a0a0b; letter-spacing: -.02em; }

.pf-hero { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; margin-top: 8px; }
.pf-cover { position: absolute; inset: 0; pointer-events: none; }
.pf-cover > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-cover.on::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 7, .9) 0%, rgba(5, 5, 7, .66) 42%, rgba(5, 5, 7, .2) 72%, rgba(5, 5, 7, .5)), linear-gradient(0deg, rgba(5, 5, 7, .65), transparent 55%); }
.pf-hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center; padding: 34px 38px 36px; }
.pf-avatar { --s: 104px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; text-decoration: none; margin-bottom: 18px; }
.pf-avatar::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(transparent 0 62%, rgba(255, 255, 255, .55) 80%, transparent 96%); -webkit-mask: radial-gradient(circle, transparent calc(50% - 1.5px), #000 calc(50% - 1px)); mask: radial-gradient(circle, transparent calc(50% - 1.5px), #000 calc(50% - 1px)); animation: spin 7s linear infinite; }
.pf-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#fff, #9a9aa2 calc(var(--p, 0) * 50%), #fff calc(var(--p, 0) * 100%), rgba(255, 255, 255, .1) 0); -webkit-mask: radial-gradient(circle, transparent calc(50% - 4px), #000 calc(50% - 3.5px)); mask: radial-gradient(circle, transparent calc(50% - 4px), #000 calc(50% - 3.5px)); filter: drop-shadow(0 0 8px rgba(255, 255, 255, .4)); }
.pf-face { position: absolute; inset: 8px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--chrome); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: filter .25s; }
.pf-face img { width: 100%; height: 100%; object-fit: cover; }
.pf-face .av-init { font-size: calc(var(--s) * .32); }
.pf-avatar:hover .pf-face { filter: brightness(1.12); }
.pf-lv { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #0a0a0b; white-space: nowrap; background: linear-gradient(172deg, #fff 10%, #d9dae0 42%, #8d8f98 54%, #eceef2 72%, #fff 95%); box-shadow: 0 4px 14px -4px rgba(255, 255, 255, .5), inset 0 -1px 2px rgba(0, 0, 0, .2); }
.pf-avatar.md { --s: 78px; margin: 0; }
.pf-avatar.sm { --s: 64px; margin: 0; }
.pf-avatar.sm::before { display: none; }
.pf-greet { font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.pf-name { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(46px, 6vw, 86px); line-height: .98; letter-spacing: -.02em; margin: 4px 0 16px; padding-right: .12em; overflow-wrap: anywhere;
  background: var(--chrome); background-size: 100% 220%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 7s ease-in-out infinite alternate; filter: drop-shadow(0 0 30px rgba(255, 255, 255, .14)); }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.pf-meta > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); white-space: nowrap; }
.pf-meta .pf-rank { color: var(--text); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
.pf-bio { margin: 14px 0 0; max-width: 540px; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.pf-motto { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; max-width: 540px; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.3; }
.pf-motto .ic { opacity: .4; margin-top: 4px; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* Trader ID: a holographic card that tilts with the pointer */
.idcard-wrap { perspective: 900px; padding: 12px; }
.idcard { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; width: 360px; aspect-ratio: 1.586; border-radius: 20px; padding: 18px 20px 16px; display: flex; flex-direction: column; overflow: hidden; cursor: pointer; color: #fff;
  background: radial-gradient(120% 130% at 0% 0%, #2c2d34, #0d0d10 62%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .22), 0 34px 60px -24px rgba(0, 0, 0, .95), 0 0 60px -14px rgba(255, 255, 255, .14);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .7s var(--ease); }
.idcard.live { transition: transform .08s linear; }
.idc-foil { position: absolute; inset: 0; pointer-events: none; opacity: .28; mix-blend-mode: color-dodge; transition: opacity .4s;
  background: repeating-linear-gradient(115deg, #ff8ad8 0%, #8ad1ff 6%, #b4ff9a 12%, #ffe68a 18%, #ff8ad8 24%); background-size: 260% 260%; background-position: var(--mx) var(--my);
  -webkit-mask: radial-gradient(circle at var(--mx) var(--my), #000, transparent 65%); mask: radial-gradient(circle at var(--mx) var(--my), #000, transparent 65%); }
.idcard:not(.live) .idc-foil { opacity: .14; }
.idc-glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .3), transparent 45%); mix-blend-mode: overlay; }
.idc-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 600; letter-spacing: .2em; color: rgba(255, 255, 255, .5); }
.idc-brand { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-family: var(--brand-font); font-weight: 500; }
.idc-brand svg { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .5)); }
.idc-mid { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.idc-av { width: 46px; height: 46px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; background: var(--chrome); flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.idc-av img { width: 100%; height: 100%; object-fit: cover; }
.idc-av .av-init { font-size: 17px; }
.idc-name { font-size: 18px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idc-rank { font-size: 11.5px; color: rgba(255, 255, 255, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idc-chip { position: relative; width: 38px; height: 29px; border-radius: 6px; flex: none; background: linear-gradient(135deg, #f4e2a1, #b8913d 50%, #f7e7b0); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.idc-chip::before { content: ''; position: absolute; inset: 6px 5px; border: 1px solid rgba(0, 0, 0, .28); border-radius: 3px; background: linear-gradient(90deg, transparent 44%, rgba(0, 0, 0, .28) 44% 56%, transparent 56%), linear-gradient(0deg, transparent 44%, rgba(0, 0, 0, .28) 44% 56%, transparent 56%); }
.idc-spark { height: 40px; margin: 8px -4px 0; opacity: .75; }
.idc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.idc-stats span { display: block; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.idc-stats b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.idc-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: rgba(255, 255, 255, .45); white-space: nowrap; }
.idc-code { display: flex; gap: 1.5px; height: 13px; flex: 1; justify-content: center; overflow: hidden; }
.idc-code i { background: rgba(255, 255, 255, .45); flex: none; }

.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
@media (max-width: 1250px) { .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-grid > :last-child { grid-column: 1 / -1; } }
.pf-lvl-row { display: flex; align-items: center; gap: 16px; }
.pf-lvl-num { font-size: 66px; font-weight: 700; letter-spacing: -.05em; line-height: 1; padding-right: .04em; background: var(--chrome); background-size: 100% 220%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s ease-in-out infinite alternate; filter: drop-shadow(0 0 22px rgba(255, 255, 255, .18)); }
.pf-rank-name { font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1.05; }
.xp-bar { position: relative; height: 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); overflow: hidden; margin-top: 18px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.xp-bar i, .trait-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(172deg, #fff 10%, #d9dae0 42%, #8d8f98 54%, #eceef2 72%, #fff 95%); box-shadow: 0 0 14px rgba(255, 255, 255, .3); transition: width 1.3s cubic-bezier(.2, .8, .2, 1); }
.pf-anim.in i, .trait-bar:not(.pf-anim) i { width: calc(var(--p) * 100%); }
.xp-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .9) 50%, transparent 70%); background-size: 220% 100%; animation: xpShine 2.8s ease-in-out infinite; mix-blend-mode: overlay; }
@keyframes xpShine { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.ladder { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-top: 22px; }
.ladder::before { content: ''; position: absolute; left: 6%; right: 6%; top: 5px; height: 1px; background: var(--line); }
.ladder div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.ladder i { width: 11px; height: 11px; border-radius: 50%; background: #18181c; border: 1px solid rgba(255, 255, 255, .18); }
.ladder .on i { background: #fff; border-color: #fff; }
.ladder .cur i { box-shadow: 0 0 0 4px rgba(255, 255, 255, .14), 0 0 14px #fff; }
.ladder span { font-size: 9.5px; color: var(--text-3); text-align: center; line-height: 1.2; }
.ladder .cur span { color: var(--text); font-weight: 600; }

.pf-arch { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); margin-bottom: 16px; }
.pf-arch-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #0a0a0b; background: linear-gradient(172deg, #fff 10%, #d9dae0 42%, #8d8f98 54%, #eceef2 72%, #fff 95%); box-shadow: 0 8px 22px -8px rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .2); }
.pf-arch-name { font-family: var(--serif); font-style: italic; font-size: 25px; line-height: 1.1; }
.traits { display: grid; gap: 11px; }
.trait { display: grid; grid-template-columns: 84px minmax(0, 1fr) 26px 20px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.trait b { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.trait-bar { position: relative; height: 7px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.trait .tier { font: 800 10.5px/1 var(--font); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; padding: 0; background: rgba(255, 255, 255, .07); color: var(--text-3); }
.tier-S { background: var(--mythic) !important; color: #0a0a0b !important; }
.tier-A { background: var(--gold) !important; color: #1a1205 !important; }
.tier-B { background: var(--silver) !important; color: #0a0a0b !important; }
.tier-C { background: var(--bronze) !important; color: #1a0d05 !important; }

.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; margin-top: 4px; }
.ring { position: relative; width: 100%; max-width: 124px; aspect-ratio: 1; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.r-track { fill: none; stroke: rgba(255, 255, 255, .07); stroke-width: 7; }
.r-val { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dashoffset: 263.9; transition: stroke-dashoffset 1.5s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .55)); }
.r-val.in { stroke-dashoffset: var(--off); }
.ring.off .r-val { stroke: transparent; filter: none; }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; padding: 0 14px; }
.ring-c b { font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring.off .ring-c b { color: var(--text-3); }
.ring-c span { font-size: 10px; color: var(--text-3); line-height: 1.25; margin-top: 2px; }
.ring-k { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2); margin-top: 10px; }
.ring-s { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

#pf-heat { position: relative; }
.hm-sum { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.hm-sum b { color: var(--text); font-weight: 600; }
.hm-scroll { overflow-x: auto; padding: 4px 0 6px; scrollbar-width: thin; }
.hm { --c: 13px; --g: 3px; display: grid; grid-template-columns: 28px auto; gap: 6px 8px; width: max-content; margin: 0 auto; }
.hm-months { grid-column: 2; display: grid; grid-template-columns: repeat(var(--weeks), var(--c)); column-gap: var(--g); font-size: 10.5px; color: var(--text-3); height: 14px; }
.hm-months span { white-space: nowrap; }
.hm-dows { display: grid; grid-template-rows: repeat(7, var(--c)); row-gap: var(--g); font-size: 10px; color: var(--text-3); line-height: var(--c); }
.hm-cells { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--c)); grid-auto-columns: var(--c); gap: var(--g); }
#pf-heat i { display: block; width: var(--c, 11px); height: var(--c, 11px); border-radius: 3.5px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025); transition: transform .15s; }
.hm-cells i[class*="p"], .hm-cells i[class*="n"] { cursor: pointer; }
.hm-cells i:hover { transform: scale(1.4); position: relative; z-index: 1; }
#pf-heat i.p1 { background: color-mix(in srgb, var(--pos) 24%, transparent); }
#pf-heat i.p2 { background: color-mix(in srgb, var(--pos) 46%, transparent); }
#pf-heat i.p3 { background: color-mix(in srgb, var(--pos) 72%, transparent); }
#pf-heat i.p4 { background: var(--pos); box-shadow: 0 0 8px color-mix(in srgb, var(--pos) 60%, transparent); }
#pf-heat i.n1 { --ha: .16; background: color-mix(in srgb, var(--neg) 22%, transparent); }
#pf-heat i.n2 { --ha: .24; background: color-mix(in srgb, var(--neg) 38%, transparent); }
#pf-heat i.n3 { --ha: .34; background: color-mix(in srgb, var(--neg) 56%, transparent); }
#pf-heat i.n4 { --ha: .46; background: color-mix(in srgb, var(--neg) 78%, transparent); }
/* monochrome: losses are hatched so they never read as small wins */
body:not(.pnl-classic):not(.pnl-custom) #pf-heat i[class^="n"] { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, var(--ha)) 0 1.5px, transparent 1.5px 3.5px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, calc(var(--ha) * .8)); }
#pf-heat i.today { outline: 1.5px solid #fff; outline-offset: 1px; }
.hm-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: 11px; color: var(--text-3); margin-top: 10px; }
.hm-legend span { margin: 0 4px; }
.hm-tip { position: absolute; z-index: 5; pointer-events: none; padding: 7px 10px; border-radius: 10px; background: rgba(15, 15, 17, .94); border: 1px solid var(--line); font-size: 12.5px; display: flex; flex-direction: column; white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8); }
.hm-tip span { color: var(--text-2); font-size: 11.5px; }

.pf-count { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text); font-size: 11.5px; font-weight: 600; }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.trophy { display: flex; gap: 13px; align-items: center; padding: 13px 14px; border-radius: 15px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line-2); transition: transform .3s var(--ease), border-color .3s; }
.trophy.won { background: rgba(255, 255, 255, .05); border-color: var(--line); }
.trophy.won:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .18); }
.trophy.won.t-mythic { border-color: transparent; background: linear-gradient(rgba(18, 18, 22, .92), rgba(18, 18, 22, .92)) padding-box, var(--mythic) border-box; }
.medal { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); background: rgba(255, 255, 255, .03); border: 1px dashed rgba(255, 255, 255, .14); overflow: hidden; }
.trophy.won .medal, .badge-toast .medal { border: 0; color: rgba(0, 0, 0, .78); background: var(--m); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .28), inset 0 2px 3px rgba(255, 255, 255, .65), 0 8px 22px -8px var(--mg); }
.trophy.won .medal::after, .badge-toast .medal::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%); background-size: 260% 100%; animation: medalShine 5s ease-in-out infinite; mix-blend-mode: overlay; }
@keyframes medalShine { 0%, 60% { background-position: 160% 0; } 100% { background-position: -110% 0; } }
.t-bronze { --m: var(--bronze); --mg: rgba(214, 140, 80, .55); }
.t-silver { --m: var(--silver); --mg: rgba(220, 222, 230, .5); }
.t-gold { --m: var(--gold); --mg: rgba(240, 190, 70, .6); }
.t-mythic { --m: var(--mythic); --mg: rgba(190, 170, 255, .65); }
.tr-name { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.trophy:not(.won) .tr-name { color: var(--text-2); }
.tr-tier { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.tr-desc { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.tr-prog { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-prog .trait-bar { flex: 1; height: 4px; }
.badge-toast { text-decoration: none; color: inherit; }
.badge-toast .medal { width: 42px; height: 42px; }

.pf-sec-h { display: flex; align-items: baseline; gap: 12px; margin: 12px 2px 12px; flex-wrap: wrap; }
.pf-sec-h h2 { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 32px; letter-spacing: -.01em; }
.pf-sec-h span { font-size: 12.5px; }
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--gap); }
.record { display: block; text-decoration: none; padding: 16px 18px; border-radius: var(--radius); min-width: 0; transition: transform .3s var(--ease), border-color .3s; }
a.record:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .16); }
.rec-k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.rec-k .ic { opacity: .6; }
.rec-v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; margin-top: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-s { font-size: 12px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-modal { width: min(680px, 100%); }

/* ───────── settings layout ───────── */
.set-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px 22px; flex-wrap: wrap; }
.set-search input { width: 300px; padding-right: 36px; }
.set-search .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; transition: opacity .2s; }
.set-search input:focus ~ .kbd, .set-search input:not(:placeholder-shown) ~ .kbd { opacity: 0; }
.set-layout { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-rail { position: sticky; top: 6px; display: flex; flex-direction: column; gap: 2px; }
.set-rail button { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; font-size: 13px; color: var(--text-3); text-align: left; white-space: nowrap; transition: color .2s, background .2s, opacity .2s; }
.set-rail button:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.set-rail button.on { color: var(--text); background: rgba(255, 255, 255, .08); }
.set-rail button.on::before { content: ''; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .7); }
.set-rail button.miss { opacity: .28; }
.set-sec { scroll-margin-top: 10px; margin-bottom: 44px; }
.set-sec-h { display: flex; align-items: center; gap: 14px; margin: 0 2px 14px; }
.set-sec-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.set-sec-h h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.set-sec-h p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.set-layout .settings-grid { align-items: start; }
@media (max-width: 1320px) { .set-layout .settings-grid { grid-template-columns: minmax(0, 1fr); } .set-layout .settings-grid > .panel { grid-row: auto !important; } }
.set-empty { display: grid; justify-items: center; gap: 12px; padding: 70px 0; color: var(--text-3); font-size: 14px; }
.you-main { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.you-name { font-family: var(--serif); font-style: italic; font-size: 36px; line-height: 1; }
.you-voice { border-top: 1px solid var(--line-2); margin-top: 18px; padding-bottom: 0; }
.theme-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 7px 7px 9px; border-radius: 14px; border: 1px solid var(--line); text-align: left; font-size: 12.5px; color: var(--text-2); transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.theme-card > span:last-child { padding-left: 3px; }
.theme-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .22); color: var(--text); }
.theme-card.on { border-color: #fff; color: var(--text); box-shadow: 0 0 0 1px #fff, 0 12px 30px -12px rgba(255, 255, 255, .35); }
.tc-sw { position: relative; display: block; height: 66px; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tc-sw i { position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45); }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.key { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .025); }
.keycap { min-width: 38px; height: 34px; padding: 0 9px; display: grid; place-items: center; border-radius: 9px; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text); background: linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 3px 0 rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .22); }
.about { display: flex; align-items: center; gap: 22px; }
.about-drop { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; flex: none; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); }
.about-drop svg { filter: drop-shadow(0 0 16px rgba(255, 255, 255, .35)); animation: drift 5s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-4px) rotate(-8deg); } }
.about-drop.wob svg { animation: wob .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wob { 30% { transform: scale(1.25, .8); } 60% { transform: scale(.9, 1.12); } }
.about-name { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.about-name em { font-size: 27px; }
.about-line { margin-top: 10px; font-size: 13.5px; color: var(--text-2); }

@media (max-width: 1100px) {
  .pf-hero-in { grid-template-columns: minmax(0, 1fr); }
  .idcard-wrap { justify-self: start; }
}
@media (max-width: 760px) {
  .tb-avatar { width: 30px; height: 30px; margin-left: 2px; }
  .pf-hero-in { padding: 22px 18px 24px; gap: 18px; }
  .pf-avatar { --s: 84px; }
  .pf-name { font-size: 50px; }
  .pf-motto { font-size: 17px; }
  .pf-actions .btn { flex: 1; }
  .idcard-wrap { justify-self: stretch; padding: 0; }
  .idcard { width: 100%; max-width: 380px; margin: 0 auto; padding: 15px 16px 13px; }
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-grid > :last-child { grid-column: auto; }
  .hm { --c: 11px; --g: 2.5px; }
  .records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rec-v { font-size: 20px; }
  .pf-sec-h h2 { font-size: 26px; }

  .set-top { padding: 10px 2px 12px; }
  .set-search { flex: 1 1 100%; }
  .set-search input { width: 100%; }
  .set-search .kbd { display: none; }
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .set-rail { top: -4px; z-index: 6; flex-direction: row; overflow-x: auto; margin: 0 -12px; padding: 8px 12px; scrollbar-width: none; background: rgba(10, 10, 12, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line-2); }
  .set-rail::-webkit-scrollbar { display: none; }
  .set-rail button { flex: none; padding: 7px 11px; font-size: 12.5px; }
  .set-rail button.on::before { display: none; }
  .set-sec { scroll-margin-top: 64px; margin-bottom: 30px; }
  .set-row { flex-wrap: wrap; }
  .set-row .seg { max-width: 100%; }
  .you-name { font-size: 30px; }
  .theme-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tc-sw { height: 46px; }
  .about { flex-direction: column; align-items: flex-start; }
}

/* leaderboard verification (verify.js): status chip + request button on accounts and wallets */
.vf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 12px; }
.vf.compact { margin-top: 6px; }
.vf-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-3); background: rgba(255, 255, 255, .03); }
.vf-chip.vf-synced, .vf-chip.vf-verified { color: var(--text); border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); }
.vf-chip.vf-unverified { border-style: dashed; }
.vf-chip.vf-pending { color: #fde68a; border-color: rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .08); }
.vf-chip.vf-declined { color: #fca5a5; border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }
.vf-ask { padding: 3px 8px; font-weight: 600; color: var(--text); }
.vf-reply { width: 100%; font-size: 12px; font-style: italic; }
.vf-target { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 14px 0 2px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); font-size: 13px; }
.vf-target .code { font-size: 11.5px; overflow-wrap: anywhere; }
.lb-verify { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin: 0 0 10px; padding: 0 4px; }
