Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

25.6 KB
Raw Blame
/* Live Trading Theater — layout & UI. Built on /tokens.css; the violet finance
   accent matches the wallet surfaces. All .th-* so it never collides with the
   global stylesheet (which this bespoke 3D page skips). */

.th-root {
	--th-accent: var(--accent-violet);
	--th-accent-fill: rgba(139, 92, 246, 0.16);
	--th-accent-stroke: rgba(139, 92, 246, 0.34);
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(120% 90% at 50% -10%, rgba(139, 92, 246, 0.14), transparent 60%),
		#05050a;
	color: var(--ink, #e8e8e8);
	font-family: var(--font-body, system-ui, sans-serif);
	overflow: hidden;
}

/* ── top bar ─────────────────────────────────────────────────────────────── */
.th-topbar {
	display: flex;
	align-items: center;
	gap: var(--space-4, 16px);
	padding: var(--space-3, 12px) var(--space-5, 20px);
	border-bottom: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	backdrop-filter: blur(var(--blur-sm, 8px));
}
.th-back {
	color: var(--ink-dim, #888);
	text-decoration: none;
	font-size: var(--text-sm, 0.78rem);
	font-weight: var(--weight-medium, 500);
	white-space: nowrap;
	transition: color var(--duration-fast) var(--ease-standard);
}
.th-back:hover { color: var(--ink-bright, #fff); }
.th-back:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 3px; border-radius: 6px; }
.th-title-wrap { flex: 1; min-width: 0; }
.th-title {
	margin: 0;
	font-family: var(--font-display, system-ui);
	font-size: var(--text-lg, 1.24rem);
	font-weight: var(--weight-bold, 700);
	letter-spacing: -0.01em;
	color: var(--ink-bright, #fff);
	line-height: 1.1;
}
.th-room-hint {
	margin: 2px 0 0;
	font-size: var(--text-xs, 0.7rem);
	color: var(--ink-dim, #888);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── status pill ─────────────────────────────────────────────────────────── */
.th-status {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2, 8px);
	padding: 6px 12px;
	border-radius: var(--radius-pill, 999px);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	font-size: var(--text-2xs, 0.69rem);
	font-weight: var(--weight-semibold, 600);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.th-status-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--ink-dim, #888);
	box-shadow: 0 0 0 0 currentColor;
}
.th-dot-green { color: var(--success, #4ade80); }
.th-dot-green .th-status-dot { background: var(--success, #4ade80); animation: th-pulse 2s infinite; }
.th-dot-amber { color: var(--warn, #fbbf24); }
.th-dot-amber .th-status-dot { background: var(--warn, #fbbf24); }
.th-dot-red { color: var(--danger, #f87171); }
.th-dot-red .th-status-dot { background: var(--danger, #f87171); }
@keyframes th-pulse {
	0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
	70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
	100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ── sound toggle ────────────────────────────────────────────────────────── */
.th-sound {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	border-radius: var(--radius-pill, 999px);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	color: var(--ink-dim, #888);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: all var(--duration-fast) var(--ease-standard);
}
.th-sound:hover { border-color: var(--th-accent-stroke); background: var(--surface-2, rgba(255, 255, 255, 0.05)); }
.th-sound:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
.th-sound.is-on { border-color: var(--th-accent-stroke); background: var(--th-accent-fill); }
.th-sound-icon { pointer-events: none; }

/* ── receipt coin badge ──────────────────────────────────────────────────── */
.th-rec-coin {
	font-family: var(--font-mono, monospace);
	font-size: 0.6rem;
	font-weight: var(--weight-bold, 700);
	color: var(--th-accent);
	background: var(--th-accent-fill);
	border-radius: var(--radius-pill, 999px);
	padding: 1px 6px;
}

/* ── rooms ───────────────────────────────────────────────────────────────── */
.th-rooms {
	display: flex;
	gap: var(--space-2, 8px);
	padding: var(--space-2, 8px) var(--space-5, 20px);
	border-bottom: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	overflow-x: auto;
	scrollbar-width: none;
}
.th-rooms::-webkit-scrollbar { display: none; }
.th-room {
	flex: 0 0 auto;
	padding: 7px 14px;
	border-radius: var(--radius-pill, 999px);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: transparent;
	color: var(--ink-dim, #888);
	font-size: var(--text-sm, 0.78rem);
	font-weight: var(--weight-medium, 500);
	cursor: pointer;
	transition: all var(--duration-fast) var(--ease-standard);
}
.th-room:hover { color: var(--ink-bright, #fff); border-color: var(--stroke-strong, rgba(255, 255, 255, 0.14)); }
.th-room.is-active {
	color: var(--ink-bright, #fff);
	background: var(--th-accent-fill);
	border-color: var(--th-accent-stroke);
}
.th-room:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }

/* ── layout ──────────────────────────────────────────────────────────────── */
.th-layout {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr 320px;
	min-height: 0;
}
.th-stage {
	position: relative;
	min-height: 0;
	overflow: hidden;
}
.th-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.th-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

/* ── performer nameplates (projected hit targets) ────────────────────────── */
.th-plate {
	position: absolute;
	top: 0; left: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 8px;
	border-radius: var(--radius-pill, 999px);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: rgba(10, 10, 18, 0.7);
	backdrop-filter: blur(var(--blur-sm, 8px));
	color: var(--ink, #e8e8e8);
	font-family: var(--font-body, system-ui);
	font-size: var(--text-2xs, 0.69rem);
	font-weight: var(--weight-semibold, 600);
	white-space: nowrap;
	cursor: pointer;
	will-change: transform, opacity;
	transition: border-color var(--duration-fast) var(--ease-standard),
		background var(--duration-fast) var(--ease-standard);
}
.th-plate:hover,
.th-plate.is-highlight { border-color: var(--th-accent-stroke); background: rgba(18, 12, 28, 0.85); }
.th-plate:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
.th-plate-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.th-plate-score {
	font-family: var(--font-mono, monospace);
	font-size: 0.6rem;
	color: var(--th-accent);
	background: var(--th-accent-fill);
	border-radius: var(--radius-pill, 999px);
	padding: 1px 5px;
}

/* ── floating receipts ───────────────────────────────────────────────────── */
.th-receipt {
	position: absolute;
	top: 0; left: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px 12px;
	border-radius: var(--radius-md, 10px);
	background: rgba(10, 10, 18, 0.82);
	border: 1px solid var(--th-accent-stroke);
	backdrop-filter: blur(var(--blur-sm, 8px));
	box-shadow: var(--shadow-2, 0 4px 24px rgba(0, 0, 0, 0.4));
	white-space: nowrap;
	pointer-events: auto;
	will-change: transform, opacity;
	transition: opacity var(--duration-fast) var(--ease-standard);
}
.th-rec-title { font-size: var(--text-2xs, 0.69rem); font-weight: var(--weight-bold, 700); color: var(--ink-bright, #fff); letter-spacing: 0.02em; }
.th-rec-sub { font-family: var(--font-mono, monospace); font-size: var(--text-2xs, 0.69rem); color: var(--th-accent); }
.th-rec-link { font-size: var(--text-2xs, 0.69rem); color: var(--ink-dim, #888); text-decoration: none; }
.th-rec-link:hover { color: var(--ink-bright, #fff); }
.th-rec-link:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; border-radius: 3px; }
.th-rec-win { border-color: rgba(74, 222, 128, 0.45); }
.th-rec-win .th-rec-sub { color: var(--success, #4ade80); }
.th-rec-loss { border-color: rgba(248, 113, 113, 0.45); }
.th-rec-loss .th-rec-sub { color: var(--danger, #f87171); }

/* ── overlay states ──────────────────────────────────────────────────────── */
.th-state {
	position: absolute;
	inset: auto 0 0 0;
	margin: auto;
	max-width: 460px;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	padding: var(--space-6, 24px);
	border-radius: var(--radius-lg, 14px);
	background: rgba(8, 8, 14, 0.72);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	backdrop-filter: blur(var(--blur-md, 16px));
	box-shadow: var(--shadow-3, 0 8px 32px rgba(0, 0, 0, 0.5));
}
.th-state[hidden] { display: none; }
.th-state h2 { margin: 0 0 8px; font-family: var(--font-display, system-ui); font-size: var(--text-lg, 1.24rem); color: var(--ink-bright, #fff); }
.th-state p { margin: 0; font-size: var(--text-sm, 0.78rem); line-height: var(--leading-normal, 1.6); }
.th-muted { color: var(--ink-dim, #888); }
.th-spinner {
	width: 34px; height: 34px; margin: 0 auto 14px;
	border: 3px solid var(--stroke-strong, rgba(255, 255, 255, 0.14));
	border-top-color: var(--th-accent);
	border-radius: 50%;
	animation: th-spin 0.9s linear infinite;
}
@keyframes th-spin { to { transform: rotate(360deg); } }
.th-loading p { color: var(--ink-dim, #888); font-size: var(--text-sm, 0.78rem); }

/* Quiet-market card rides the foot of the stage so the cast stays visible. */
.th-quiet {
	top: auto;
	right: auto;
	bottom: var(--space-5, 20px);
	transform: translateX(-50%);
	text-align: left;
	width: min(440px, calc(100% - 32px));
	pointer-events: auto;
}
.th-quiet h2 { font-size: var(--text-md, 0.81rem); }
.th-quiet > p { font-size: var(--text-xs, 0.7rem); }
.th-quiet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.th-quiet-head h2 { margin: 0; }
.th-quiet-pulse { background: var(--success, #4ade80); color: var(--success, #4ade80); animation: th-pulse 2s infinite; flex: 0 0 auto; }
.th-quiet-beat { font-variant-numeric: tabular-nums; }

.th-highlights { margin-top: var(--space-4, 16px); display: flex; flex-direction: column; gap: 6px; text-align: left; max-height: 38vh; overflow-y: auto; }
.th-hl {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius-md, 10px);
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	text-decoration: none; color: var(--ink, #e8e8e8);
	transition: background var(--duration-fast) var(--ease-standard);
}
.th-hl:hover { background: var(--surface-2, rgba(255, 255, 255, 0.05)); }
.th-hl:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
/* A highlight with no destination is not a link: no pointer, no hover lift. */
.th-hl-static { cursor: default; }
.th-hl-static:hover { background: var(--surface-1, rgba(255, 255, 255, 0.03)); }
.th-hl-title { font-size: var(--text-sm, 0.78rem); font-weight: var(--weight-semibold, 600); }
.th-hl-sub { font-family: var(--font-mono, monospace); font-size: var(--text-2xs, 0.69rem); color: var(--th-accent); }
.th-hl .th-tick-time { margin-left: auto; }

/* ── read-only HUD panel ─────────────────────────────────────────────────── */
.th-panel {
	position: absolute;
	top: var(--space-4, 16px);
	left: var(--space-4, 16px);
	width: min(340px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	overflow-y: auto;
	padding: var(--space-5, 20px);
	border-radius: var(--radius-lg, 14px);
	background: rgba(8, 8, 14, 0.9);
	border: 1px solid var(--th-accent-stroke);
	backdrop-filter: blur(var(--blur-lg, 28px));
	box-shadow: var(--shadow-3, 0 8px 32px rgba(0, 0, 0, 0.5));
	opacity: 0;
	transform: translateX(-12px) scale(0.98);
	pointer-events: none;
	transition: opacity var(--duration-base) var(--ease-emphasized, var(--ease-standard)),
		transform var(--duration-base) var(--ease-emphasized, var(--ease-standard));
}
.th-panel.is-open { opacity: 1; transform: none; pointer-events: auto; }
.th-panel-close {
	position: absolute; top: 12px; right: 12px;
	width: 28px; height: 28px;
	border-radius: var(--radius-sm, 6px);
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	color: var(--ink-dim, #888);
	cursor: pointer; font-size: 13px; line-height: 1;
}
.th-panel-close:hover { color: var(--ink-bright, #fff); }
.th-panel-close:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
.th-panel-head { display: flex; gap: var(--space-3, 12px); align-items: center; margin-bottom: var(--space-4, 16px); padding-right: 28px; }
.th-panel-av { width: 52px; height: 52px; border-radius: var(--radius-md, 10px); object-fit: cover; background: var(--surface-2, rgba(255, 255, 255, 0.05)); flex: 0 0 auto; }
.th-panel-av-fallback { display: flex; align-items: center; justify-content: center; font-family: var(--font-display, system-ui); font-weight: var(--weight-bold, 700); font-size: 22px; color: var(--th-accent); border: 1px solid var(--th-accent-stroke); }
.th-panel-name { margin: 0; font-size: var(--text-md, 0.81rem); font-weight: var(--weight-bold, 700); color: var(--ink-bright, #fff); }
.th-panel-tier { font-size: var(--text-2xs, 0.69rem); color: var(--th-accent); font-weight: var(--weight-medium, 500); }

.th-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2, 8px); margin-bottom: var(--space-3, 12px); }
.th-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; border-radius: var(--radius-md, 10px); background: var(--surface-1, rgba(255, 255, 255, 0.03)); text-align: center; }
.th-stat-v { font-family: var(--font-mono, monospace); font-size: var(--text-md, 0.81rem); font-weight: var(--weight-bold, 700); color: var(--ink-bright, #fff); }
.th-stat-l { font-size: 0.6rem; color: var(--ink-dim, #888); text-transform: uppercase; letter-spacing: 0.04em; }
.th-skel-inline { display: inline-block; width: 32px; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-1) 25%, var(--surface-3) 50%, var(--surface-1) 75%); background-size: 200% 100%; animation: th-shimmer 1.4s infinite; }
@keyframes th-shimmer { to { background-position: -200% 0; } }

.th-addr {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px; margin-bottom: var(--space-3, 12px);
	border-radius: var(--radius-md, 10px);
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	font-family: var(--font-mono, monospace); font-size: var(--text-2xs, 0.69rem);
	color: var(--ink, #e8e8e8); text-decoration: none;
}
.th-addr:hover { border-color: var(--th-accent-stroke); }
.th-addr:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
.th-addr-ext { color: var(--ink-dim, #888); }

.th-panel-actions { display: flex; flex-wrap: wrap; gap: var(--space-2, 8px); margin-bottom: var(--space-3, 12px); }
.th-btn {
	flex: 1 1 auto;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 9px 12px;
	border-radius: var(--radius-md, 10px);
	border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.14));
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	color: var(--ink, #e8e8e8);
	font-size: var(--text-sm, 0.78rem); font-weight: var(--weight-semibold, 600);
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: all var(--duration-fast) var(--ease-standard);
}
.th-btn:hover { background: var(--surface-2, rgba(255, 255, 255, 0.05)); border-color: var(--th-accent-stroke); }
.th-btn:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; }
.th-btn-primary { background: var(--th-accent-fill); border-color: var(--th-accent-stroke); color: var(--ink-bright, #fff); }
.th-btn-on { background: var(--th-accent-fill); border-color: var(--th-accent-stroke); color: var(--ink-bright, #fff); }
.th-btn-sm { flex: 0 0 auto; padding: 5px 10px; font-size: var(--text-2xs, 0.69rem); }
.th-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-dim, #888); }
.th-btn-ghost:hover { background: var(--surface-1, rgba(255, 255, 255, 0.03)); color: var(--ink, #e8e8e8); border-color: transparent; }

/* ── empty roster state ──────────────────────────────────────────────────── */
.th-empty-mark {
	font-size: 2rem;
	line-height: 1;
	color: var(--th-accent, #8b5cf6);
	opacity: 0.7;
	margin-bottom: var(--space-3, 12px);
}
.th-empty-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2, 8px);
	justify-content: center;
	margin-top: var(--space-4, 16px);
}
.th-empty-actions .th-btn { flex: 0 1 auto; }
/* ── copy-trade (mirror) affordance ──────────────────────────────────────── */
.th-mirror { margin-bottom: var(--space-3, 12px); }
.th-mirror-start { width: 100%; }
.th-mirror-hint { font-size: var(--text-2xs, 0.69rem); margin: 6px 0 0; line-height: var(--leading-normal, 1.6); }
.th-mirror-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md, 10px); background: var(--surface-1, rgba(255, 255, 255, 0.03)); border: 1px solid var(--th-accent-stroke); }
.th-mirror-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.6rem; color: var(--ink-dim, #888); text-transform: uppercase; letter-spacing: 0.04em; }
.th-mirror-select, .th-mirror-size {
	padding: 8px 10px;
	border-radius: var(--radius-sm, 6px);
	border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.14));
	background: var(--surface-2, rgba(255, 255, 255, 0.05));
	color: var(--ink-bright, #fff);
	font-size: var(--text-sm, 0.78rem);
	font-family: var(--font-body, system-ui);
}
.th-mirror-select:focus-visible, .th-mirror-size:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 1px; }
.th-mirror-actions { display: flex; gap: 8px; margin-top: 2px; }
.th-mirror-ok { font-size: var(--text-2xs, 0.69rem); color: var(--success, #4ade80); margin: 0; line-height: var(--leading-normal, 1.6); }
.th-mirror-msg { font-size: var(--text-2xs, 0.69rem); margin: 2px 0 0; }
.th-mirror-err { color: var(--danger, #f87171); }
.th-mirror-ok a, .th-mirror-msg a { color: var(--th-accent); text-decoration: none; }
.th-mirror-ok a:hover, .th-mirror-msg a:hover { text-decoration: underline; }

.th-panel-foot { font-size: var(--text-2xs, 0.69rem); line-height: var(--leading-normal, 1.6); margin: 0 0 var(--space-3, 12px); }
.th-panel-foot a { color: var(--th-accent); text-decoration: none; }
.th-panel-foot a:hover { text-decoration: underline; }
.th-panel-recent-h, .th-rail-h { font-size: var(--text-2xs, 0.69rem); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-dim, #888); margin: 0 0 8px; font-weight: var(--weight-semibold, 600); }
.th-panel-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.th-panel-recent li { display: flex; align-items: center; gap: 7px; font-size: var(--text-2xs, 0.69rem); color: var(--ink, #e8e8e8); }
.th-panel-recent .th-tick-time { margin-left: auto; }

/* ── right rail (ticker + replay) ────────────────────────────────────────── */
.th-rail {
	border-left: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.th-rail-block { padding: var(--space-4, 16px); border-bottom: 1px solid var(--stroke, rgba(255, 255, 255, 0.08)); min-height: 0; display: flex; flex-direction: column; }
.th-rail-block:first-child { flex: 1; }
.th-rail-h { display: flex; align-items: center; gap: 7px; }
.th-rail-dot { background: var(--success, #4ade80); animation: th-pulse 2s infinite; color: var(--success); }
.th-ticker { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.th-tick {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius-md, 10px);
	background: var(--surface-1, rgba(255, 255, 255, 0.03));
	animation: th-slidein var(--duration-base, 220ms) var(--ease-emphasized, ease);
}
@keyframes th-slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Tape states: skeleton rows while the snapshot is in flight, designed copy when
   the feed genuinely has nothing recent to show. */
.th-tick-skel { animation: none; }
.th-tick-skel .th-tick-dot { background: var(--surface-3, rgba(255, 255, 255, 0.09)); }
.th-tick-skel .th-tick-body { gap: 5px; }
.th-skel-title { width: 62%; height: 10px; }
.th-skel-sub { width: 38%; height: 8px; }
.th-tick-empty { padding: 10px 2px; font-size: var(--text-xs, 0.72rem); line-height: 1.5; }
.th-tick-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-dim, #888); flex: 0 0 auto; }
.th-tick-buy .th-tick-dot, .th-tick-win .th-tick-dot { background: var(--success, #4ade80); }
.th-tick-loss .th-tick-dot { background: var(--danger, #f87171); }
.th-tick-launch .th-tick-dot, .th-tick-verify .th-tick-dot, .th-tick-pay .th-tick-dot { background: var(--th-accent); }
.th-tick-guard .th-tick-dot { background: var(--warn, #fbbf24); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14); }
.th-tick-guard .th-tick-title { text-transform: none; color: var(--warn, #fbbf24); font-weight: var(--weight-medium, 500); }
.th-tick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.th-tick-title { font-size: var(--text-sm, 0.78rem); font-weight: var(--weight-semibold, 600); color: var(--ink-bright, #fff); text-transform: capitalize; }
.th-tick-sub { font-family: var(--font-mono, monospace); font-size: var(--text-2xs, 0.69rem); color: var(--ink-dim, #888); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-tick-link { color: var(--ink-dim, #888); text-decoration: none; font-size: 13px; flex: 0 0 auto; }
.th-tick-link:hover { color: var(--th-accent); }
.th-tick-link:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; border-radius: 3px; }
.th-tick-time { font-size: 0.6rem; color: var(--ink-faint, rgba(255, 255, 255, 0.45)); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

.th-replay-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.th-replay-empty { font-size: var(--text-2xs, 0.69rem); margin: 0; }
.th-replay-rail { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.th-replay-mark {
	width: 16px; height: 16px; border-radius: var(--radius-sm, 6px);
	border: 1px solid var(--stroke-strong, rgba(255, 255, 255, 0.14));
	background: var(--surface-2, rgba(255, 255, 255, 0.05));
	cursor: pointer; padding: 0;
	transition: transform var(--duration-fast) var(--ease-standard);
}
.th-replay-mark:hover { transform: scale(1.2); }
.th-replay-mark:focus-visible { outline: 2px solid var(--th-accent); outline-offset: 2px; transform: scale(1.2); }
.th-replay-mark.th-tick-buy, .th-replay-mark.th-tick-win { border-color: var(--success, #4ade80); background: rgba(74, 222, 128, 0.2); }
.th-replay-mark.th-tick-loss { border-color: var(--danger, #f87171); background: rgba(248, 113, 113, 0.2); }
.th-replay-mark.th-tick-launch, .th-replay-mark.th-tick-verify, .th-replay-mark.th-tick-pay { border-color: var(--th-accent-stroke); background: var(--th-accent-fill); }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.th-layout { grid-template-columns: 1fr; }
	.th-rail {
		position: absolute; right: 0; bottom: 0; left: 0;
		max-height: 40%;
		flex-direction: row;
		border-left: none; border-top: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
		background: rgba(8, 8, 14, 0.86);
		backdrop-filter: blur(var(--blur-md, 16px));
	}
	.th-rail-block { flex: 1; border-bottom: none; border-right: 1px solid var(--stroke, rgba(255, 255, 255, 0.08)); }
	.th-replay { max-width: 40%; }
	.th-panel { width: calc(100% - 24px); top: 12px; left: 12px; max-height: 50%; }
}
@media (max-width: 560px) {
	.th-topbar { gap: var(--space-2, 8px); padding: 10px 14px; }
	.th-title { font-size: var(--text-md, 0.81rem); }
	.th-room-hint { display: none; }
	.th-rail { flex-direction: column; max-height: 46%; }
	.th-rail-block { border-right: none; border-bottom: 1px solid var(--stroke, rgba(255, 255, 255, 0.08)); }
	.th-replay { max-width: none; }
	.th-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.th-spinner, .th-dot-green .th-status-dot, .th-rail-dot, .th-quiet-pulse { animation: none; }
	.th-tick { animation: none; }
	.th-receipt { transition: none; }
}