:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08090d;
  color: #f4f4f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #08090d;
  font-size: 13px;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid #333846;
  border-radius: 6px;
  background: #171a22;
  color: #f4f4f5;
  padding: 8px 12px;
  cursor: pointer;
  transition: filter 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

button:hover {
  filter: brightness(1.16);
}

button:disabled {
  cursor: not-allowed;
  filter: none;
  opacity: 0.45;
}

button.secondary {
  border-color: #333846;
  background: #171a22;
}

button.link {
  border: 0;
  background: transparent;
  color: #d9d9df;
  padding: 0;
}

input {
  width: 100%;
  border: 1px solid #303442;
  border-radius: 6px;
  background: #0e1118;
  color: #fff;
  padding: 12px;
}

.page {
  min-height: 100vh;
  padding: 10px 14px 42px;
}

.desktop-only-notice {
  display: none;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.desktop-app {
  display: block;
}

.centered {
  display: grid;
  place-items: center;
}

.panel {
  border: 1px solid #202532;
  border-radius: 10px;
  background: #0d1017;
  padding: 12px;
}

.narrow {
  width: min(520px, 100%);
}

.wide {
  grid-column: span 2;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.logo img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 5px;
  color: #b7bac6;
  font-size: 11px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
}

.muted,
.fine {
  color: #a4a8b5;
}

.fine {
  font-size: 12px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}

.field small {
  color: #858997;
}

.topbar,
.preview-controls,
footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar {
  border-bottom: 1px solid #242836;
  padding-bottom: 6px;
}

.topbar .logo {
  margin: 0;
}

.simulation-shell {
  width: min(100%, 1560px);
  margin: 0 auto;
}

.simulation-header {
  display: grid;
  gap: 3px;
  justify-content: space-between;
}

.header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-line-secondary {
  color: #858997;
  font-size: 11px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 11px;
}

.pill {
  border: 1px solid #333846;
  border-radius: 7px;
  background: #171a22;
  padding: 4px 10px;
  color: #d9d9df;
  font-size: 12px;
}

.small {
  color: #a4a8b5;
  font-size: 12px;
}

.recording {
  color: #d9d9df;
  font-size: 12px;
}

.recording span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d42135;
  margin-right: 6px;
}

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}

.main-trading-area,
.asset-row,
.lower-panel {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.main-trading-area {
  grid-template-columns: 1fr;
}

.asset-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  margin-top: 0;
}

.lower-panel {
  grid-template-columns: 1fr 1fr 1fr;
}

.portfolio-summary-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 9px;
  min-height: 84px;
  align-items: center;
}

.summary-metric {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.summary-metric strong {
  display: block;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.metric-icon,
.asset-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #303442;
  border-radius: 50%;
  background: #0b0e14;
  color: #d9d9df;
  flex: 0 0 auto;
}

.allocation-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(#6f1420 0 30%, #2d5f75 30% 52%, #5b3f86 52% 72%, #2c3140 72% 100%);
  position: relative;
  flex: 0 0 auto;
}

.allocation-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #10131a;
}

.market-signal-bar {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
  align-items: center;
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  min-height: 56px;
}

.market-signal-bar p {
  margin: 0;
  color: #d7d9e0;
  border-left: 1px solid #252936;
  padding: 11px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.market-signal-label {
  color: #b7bac6;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0 14px;
}

.asset-card {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  height: clamp(430px, calc(100vh - 360px), 525px);
  padding: 14px;
  overflow: hidden;
}

.asset-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  min-height: 56px;
}

.asset-title {
  display: flex;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.asset-title h2,
.asset-title p {
  margin: 0;
}

.asset-title h2 {
  font-size: 17px;
  line-height: 1.1;
}

.asset-title .muted {
  max-width: 190px;
  font-size: 11px;
  line-height: 1.25;
}

.asset-card .asset-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 15px;
}

.asset-price-block {
  text-align: right;
  min-width: 128px;
}

.asset-price-block span,
.asset-price-block strong {
  display: block;
}

.asset-price-block span {
  color: #858997;
  font-size: 11px;
}

.asset-price-block strong {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price {
  margin-bottom: 0;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.chart-placeholder,
.chart-frame {
  display: grid;
  place-items: center;
  height: 172px;
  border: 1px dashed #343948;
  border-radius: 6px;
  color: #858997;
  margin-bottom: 10px;
}

.chart-frame {
  overflow: hidden;
  border-style: solid;
  background: #0b0e14;
  flex: 1 1 150px;
  min-height: 138px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.candle-chart {
  width: 100%;
  height: 100%;
}

.grid-line {
  stroke: #242936;
  stroke-width: 1;
}

.wick,
.candle {
  shape-rendering: crispEdges;
}

.wick.up,
.candle.up {
  stroke: #20c77a;
  fill: #20c77a;
}

.wick.down,
.candle.down {
  stroke: #d43a49;
  fill: #d43a49;
}

.asset-card {
  border-color: #252936;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.asset-card.selected.asset-as1 {
  border-color: #20c77a;
  box-shadow: 0 0 0 1px rgb(32 199 122 / 24%);
}

.asset-card.selected.asset-as2 {
  border-color: #4b83f1;
  box-shadow: 0 0 0 1px rgb(75 131 241 / 24%);
}

.asset-card.selected.asset-as3 {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 1px rgb(139 92 246 / 24%);
}

.positive {
  color: #20c77a;
}

.negative {
  color: #d43a49;
}

.asset-primary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid #222633;
  padding-top: 9px;
  color: #a4a8b5;
  font-size: 11px;
}

.asset-primary-stats strong {
  display: block;
  color: #fff;
  margin-top: 3px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.asset-secondary-stats {
  display: grid;
  grid-template-columns: 0.8fr 1.25fr 0.8fr;
  gap: 5px 10px;
  border-top: 1px solid #1f2330;
  margin-top: 8px;
  padding-top: 8px;
  color: #858997;
  font-size: 10px;
  text-transform: uppercase;
}

.asset-secondary-stats strong {
  display: block;
  margin-top: 2px;
  color: #c7cad4;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  white-space: nowrap;
}

.asset-trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.asset-trade-button {
  min-height: 38px;
  border-radius: 7px;
  font-size: 14px;
}

.asset-trade-button.buy {
  background: #0f3025;
  border-color: #16734f;
  color: #b6f3d4;
}

.asset-trade-button.buy.asset-as2 {
  background: #122138;
  border-color: #315d9d;
  color: #c6dcff;
}

.asset-trade-button.buy.asset-as3 {
  background: #241a3a;
  border-color: #5b3f9e;
  color: #d9ccff;
}

.asset-trade-button.sell {
  background: #2b0e12;
  border-color: #681d24;
  color: #e7a1a8;
}

.recent-actions-card,
.portfolio-overview-card,
.trade-panel-card,
.trace-monitor-card,
.portfolio-value-card {
  min-height: 0;
}

.recent-actions-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 8px;
}

.recent-actions-scroll::-webkit-scrollbar {
  width: 6px;
}

.recent-actions-scroll::-webkit-scrollbar-thumb {
  background: #343948;
  border-radius: 999px;
}

.action-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  border-bottom: 1px solid #242836;
  padding: 8px 0;
}

.action-row-rich {
  grid-template-columns: 54px 1fr auto;
  align-items: start;
}

.action-row span {
  color: #858997;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.action-row p {
  margin: 0;
  color: #c7cad4;
}

.action-row em {
  color: #a4a8b5;
  font-style: normal;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.action-pill {
  display: inline-block;
  min-width: 42px;
  border-radius: 6px;
  margin-right: 8px;
  padding: 3px 8px;
  text-align: center;
  font-size: 12px;
}

.action-pill.buy {
  background: #0d3b29;
  color: #75e1aa;
}

.action-pill.sell {
  background: #421418;
  color: #eaa0a8;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading .eyebrow {
  margin: 0;
}

.panel-value {
  margin: 18px 0 10px;
  color: #f4f4f5;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.panel-value span {
  color: #858997;
  font-size: 13px;
}

.panel-value strong {
  margin-left: 10px;
  font-size: 14px;
}

.portfolio-line-frame {
  height: 190px;
}

.portfolio-line-chart {
  width: 100%;
  height: 100%;
}

.portfolio-line {
  fill: none;
  stroke: #b7791f;
  stroke-width: 2;
}

.portfolio-line-area {
  fill: rgb(183 121 31 / 16%);
  stroke: none;
}

.placeholder-list,
.control-placeholder {
  display: grid;
  gap: 8px;
  color: #a4a8b5;
}

.placeholder-list span,
.control-placeholder span {
  border: 1px solid #2c3140;
  border-radius: 6px;
  background: #0b0e14;
  padding: 8px 10px;
}

.portfolio-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.portfolio-list strong {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.trace-monitor-card {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: hidden;
}

.trace-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trace-monitor-header .eyebrow {
  margin: 0;
}

.trace-monitor-header span {
  color: #858997;
  font-size: 12px;
}

.trace-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin: 2px auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgb(78 132 156 / 14%) 0 24%, transparent 25%),
    repeating-radial-gradient(circle, rgb(111 139 166 / 34%) 0 2px, transparent 3px 9px);
  animation: trace-spin 18s linear infinite;
}

.trace-orb::before,
.trace-orb::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgb(93 133 163 / 28%);
}

.trace-orb::before {
  inset: 24px;
}

.trace-orb::after {
  inset: 44px;
}

.trace-orb span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0b0e14;
  border: 1px solid #343948;
}

@keyframes trace-spin {
  to {
    transform: rotate(360deg);
  }
}

.trade-panel-card {
  position: sticky;
  top: 10px;
}

.trade-panel-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.trade-selector-side,
.trade-action-side {
  display: grid;
  gap: 10px;
}

.trade-label {
  margin: 0;
  color: #c7cad4;
  font-size: 13px;
}

.asset-selector-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.asset-selector-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #2c3140;
  background: #0b0e14;
  padding: 7px;
}

.asset-selector-option.active {
  border-color: #8f1d2c;
  background: #171018;
}

.asset-selector-option.asset-as1.active {
  border-color: #20c77a;
}

.asset-selector-option.asset-as2.active {
  border-color: #4b83f1;
}

.asset-selector-option.asset-as3.active {
  border-color: #8b5cf6;
}

.asset-selector-option .asset-icon {
  width: 20px;
  height: 20px;
}

.selected-asset-summary,
.compact-placeholder-rows {
  display: grid;
  gap: 6px;
  color: #a4a8b5;
}

.selected-asset-summary strong {
  color: #fff;
}

.compact-placeholder-rows span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #2c3140;
  border-radius: 6px;
  background: #0b0e14;
  padding: 8px 10px;
}

.compact-placeholder-rows strong {
  color: #fff;
}

.trade-action-side {
  align-content: start;
}

.trade-timer {
  color: #a4a8b5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.trade-action-button {
  width: 100%;
  min-height: 62px;
  font-size: 17px;
}

.trade-action-button.buy {
  border-color: #157347;
  background: #0d6b3b;
}

.trade-action-button.buy:hover {
  filter: brightness(1.16);
}

.trade-action-button.sell {
  border-color: #7f1d1d;
  background: #7f1d1d;
}

.trade-action-button.sell:hover {
  filter: brightness(1.16);
}

.phase-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #222633;
}

.phase-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #8e93a3;
}

.trade-toast {
  display: grid;
  gap: 2px;
  border: 1px solid #2f3747;
  border-radius: 6px;
  background: #0b0e14;
  padding: 9px 10px;
  color: #d9d9df;
  font-size: 12px;
}

.trade-toast strong,
.trade-toast span {
  display: block;
}

.trade-toast.success {
  border-color: #166534;
  background: #092816;
}

.trade-toast.sell-success {
  border-color: #7f1d1d;
  background: #2a0d10;
}

.trade-toast.info {
  border-color: #1d4ed8;
  background: #0c1730;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-controls {
  justify-content: center;
  border: 1px solid #252936;
  border-radius: 8px;
  background: #0c0f15;
  padding: 10px;
  margin-top: 10px;
}

.simulation-header .secondary {
  padding: 7px 12px;
  font-size: 13px;
}

footer {
  justify-content: center;
  color: #8e93a3;
  font-size: 12px;
  margin-top: 10px;
}

.trace-engine-inline,
.trace-engine-floating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 auto;
  border-color: #333846;
  background: #171a22;
  font-size: 12px;
}

.trace-engine-inline span,
.trace-engine-floating span {
  color: #b7bac6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.calibration-list {
  color: #c7cad4;
  line-height: 1.8;
  padding-left: 20px;
}

.calibration-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(14, 116, 144, 0.09), transparent 34%),
    radial-gradient(circle at 50% 52%, rgba(30, 64, 175, 0.12), transparent 46%),
    linear-gradient(180deg, #020817 0%, #02040d 55%, #010208 100%);
  padding: 0 24px;
}

.calibration-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 440px;
  transform: translateY(-18px);
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.calibration-orb {
  position: relative;
  width: min(58vw, 380px);
  aspect-ratio: 1;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.12), transparent 34%),
    #02040a;
  filter: saturate(0.82) brightness(0.74);
  transform: scale(0.72);
  transform-origin: center;
  mask-image: radial-gradient(circle, #000 0 40%, transparent 56%);
  -webkit-mask-image: radial-gradient(circle, #000 0 40%, transparent 56%);
  animation: calibration-orb-expand 5s cubic-bezier(0.2, 0.8, 0.24, 1) forwards;
}

.calibration-orb::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, transparent 38%, rgba(2, 8, 23, 0.5) 72%, #02040d 100%);
  content: "";
  pointer-events: none;
}

.calibration-orb.is-fallback {
  box-shadow:
    inset 0 0 70px rgba(14, 165, 233, 0.22),
    0 0 42px rgba(14, 165, 233, 0.08);
}

.calibration-shader {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.calibration-title {
  margin-top: 4px;
  color: rgba(203, 213, 225, 0.72);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.46em;
  line-height: 1;
  text-indent: 0.46em;
  text-transform: uppercase;
}

.calibration-track {
  position: relative;
  width: min(74%, 284px);
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.calibration-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(24, 204, 252, 0), rgba(24, 204, 252, 0.8), rgba(99, 68, 245, 0.45));
  box-shadow: 0 0 10px rgba(24, 204, 252, 0.36);
}

@keyframes calibration-orb-expand {
  to {
    transform: scale(1);
    mask-image: radial-gradient(circle, #000 0 58%, transparent 73%);
    -webkit-mask-image: radial-gradient(circle, #000 0 58%, transparent 73%);
  }
}

.result-card {
  width: min(760px, 100%);
}

.result-section {
  border-top: 1px solid #272b38;
  margin-top: 20px;
  padding-top: 20px;
}

.band-row,
.status-grid {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.band-row {
  grid-template-columns: repeat(5, 1fr);
}

.band-row span,
.status-grid span {
  border: 1px solid #2c3140;
  border-radius: 6px;
  background: #0b0e14;
  padding: 10px;
}

.band-row strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: #fff;
}

.status-grid {
  grid-template-columns: repeat(2, 1fr);
  color: #b7bac6;
  font-size: 13px;
}

.s0-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--background);
  padding: 40px 24px;
}

.s0-inner {
  display: flex;
  width: 100%;
  max-width: 448px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.s0-icon {
  width: 56px;
  height: 56px;
  color: color-mix(in oklab, var(--muted-foreground) 45%, transparent);
}

.s0-title {
  margin: 24px 0 0;
  color: color-mix(in oklab, var(--foreground) 95%, transparent);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.s0-copy {
  margin: 24px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.6;
}

.s0-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
}

.s0-return {
  min-width: 172px;
  border: 1px solid color-mix(in oklab, var(--muted-gold) 44%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--muted-gold) 9%, transparent);
  padding: 8px 16px;
  color: color-mix(in oklab, var(--muted-gold) 76%, var(--foreground));
  font-size: 12px;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.s0-return:hover {
  border-color: color-mix(in oklab, var(--muted-gold) 72%, transparent);
  background: color-mix(in oklab, var(--muted-gold) 16%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--muted-gold) 10%, transparent),
    0 0 18px color-mix(in oklab, var(--muted-gold) 9%, transparent);
  color: color-mix(in oklab, var(--muted-gold) 88%, white);
}

.s0-trace-engine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
  border: 0;
  background: transparent;
  padding: 4px 6px;
  color: rgba(148, 163, 184, 0.62);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.s0-trace-engine:hover {
  color: rgba(203, 213, 225, 0.78);
}

.s0-trace-engine svg {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  padding: 16px;
}

.modal {
  width: min(460px, 100%);
  border: 1px solid #363b4c;
  border-radius: 8px;
  background: #10131a;
  padding: 24px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.end-modal {
  width: 100%;
  max-width: 384px;
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 12px;
  background: var(--background);
  padding: 20px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

.end-modal h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
}

.end-modal p {
  margin: 12px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.trace-access-backdrop {
  z-index: 90;
  background: rgba(0, 0, 0, 0.8);
  animation: trace-access-backdrop-in 200ms ease-out both;
}

.trace-access-modal {
  display: flex;
  width: 100%;
  max-width: 320px;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: var(--background);
  padding: 24px;
  color: var(--foreground);
  box-shadow: 0 18px 42px -26px rgba(0, 0, 0, 0.9);
  animation: trace-access-modal-in 200ms ease-out both;
}

.trace-access-modal:has(.trace-debug-panel) {
  max-width: min(920px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
}

.trace-access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trace-access-header h2 {
  margin: 0;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.trace-access-close {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  padding: 0;
  color: rgba(203, 213, 225, 0.48);
}

.trace-access-close:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.76);
}

.trace-access-close svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

.trace-password-field {
  position: relative;
  margin-top: 0;
}

.trace-password-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: color-mix(in oklab, var(--background) 60%, transparent);
  padding: 6px 34px 6px 10px;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  outline: none;
}

.trace-password-input::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

.trace-password-input:focus {
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.06);
}

.trace-password-icon {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border-radius: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.58);
}

.trace-password-icon svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

.trace-access-error {
  margin: -7px 0 0;
  color: rgba(248, 113, 113, 0.8);
  font-size: 10.5px;
  line-height: 1.3;
}

.trace-access-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}

.trace-access-cancel,
.trace-access-unlock {
  min-width: 0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.35;
}

.trace-access-cancel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  color: rgba(203, 213, 225, 0.72);
}

.trace-access-cancel:hover {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 232, 240, 0.88);
}

.trace-access-unlock {
  border: 1px solid rgba(203, 213, 225, 0.24);
  background: rgba(226, 232, 240, 0.1);
  color: rgba(226, 232, 240, 0.86);
}

.trace-access-unlock:hover {
  border-color: rgba(203, 213, 225, 0.36);
  background: rgba(226, 232, 240, 0.14);
}

.trace-access-pending {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px;
}

.trace-access-pending-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.06);
  color: rgba(203, 213, 225, 0.72);
}

.trace-access-pending-icon svg {
  width: 14px;
  height: 14px;
}

.trace-access-pending strong {
  display: block;
  color: rgba(226, 232, 240, 0.9);
  font-size: 12.5px;
}

.trace-access-pending p {
  margin: 4px 0 0;
  color: rgba(203, 213, 225, 0.62);
  font-size: 11.5px;
}

.trace-debug-panel {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.trace-debug-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(100, 230, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.44);
  padding: 12px;
}

.trace-debug-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(100, 230, 255, 0.16);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 0 22px -16px rgba(82, 223, 255, 0.9);
  overflow: hidden;
}

.trace-debug-brand-mark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.trace-debug-brand-label {
  display: block;
  margin-bottom: 5px;
  color: rgba(100, 230, 255, 0.74);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.22em;
}

.trace-debug-summary strong {
  display: block;
  color: rgba(226, 238, 247, 0.92);
  font-size: 12.5px;
}

.trace-debug-summary p {
  margin: 4px 0 0;
  color: rgba(178, 190, 202, 0.68);
  font-size: 11.5px;
  line-height: 1.35;
}

.trace-debug-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.trace-debug-pipeline span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(100, 230, 255, 0.12);
  border-radius: 999px;
  color: rgba(221, 230, 239, 0.76);
  background: rgba(4, 11, 17, 0.54);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.trace-debug-pipeline span:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -9px;
  color: rgba(100, 230, 255, 0.45);
  font-size: 9px;
}

.trace-debug-integrity {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.trace-debug-integrity span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 5px;
  color: rgba(178, 190, 202, 0.70);
  background: rgba(255, 255, 255, 0.018);
  font-size: 9.5px;
  line-height: 1;
}

.trace-debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trace-debug-section {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  padding: 12px;
}

.trace-debug-section-wide {
  grid-column: span 2;
  overflow-x: auto;
}

.trace-debug-section h3 {
  margin: 0 0 10px;
  color: rgba(100, 230, 255, 0.72);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.trace-debug-section dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.trace-debug-section dl > div {
  display: grid;
  grid-template-columns: minmax(126px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: baseline;
}

.trace-debug-section dt {
  color: rgba(148, 163, 184, 0.70);
  font-size: 10.5px;
  line-height: 1.25;
}

.trace-debug-section dd {
  min-width: 0;
  margin: 0;
  color: rgba(226, 232, 240, 0.84);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trace-debug-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-debug-section li {
  position: relative;
  padding-left: 13px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 11px;
  line-height: 1.4;
}

.trace-debug-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(100, 230, 255, 0.70);
}

.trace-debug-empty {
  margin: 0;
  color: rgba(148, 163, 184, 0.70);
  font-size: 11px;
}

.trace-family-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
}

.trace-family-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  min-height: 27px;
  border: 1px solid rgba(100, 230, 255, 0.09);
  border-radius: 6px;
  background: rgba(3, 9, 14, 0.34);
  padding: 5px 7px;
}

.trace-family-code,
.trace-family-row strong {
  color: rgba(100, 230, 255, 0.78);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.trace-family-name {
  min-width: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-family-row strong {
  justify-self: end;
  color: rgba(226, 232, 240, 0.88);
}

.trace-action-table {
  display: grid;
  min-width: 980px;
  overflow: hidden;
  border: 1px solid rgba(100, 230, 255, 0.10);
  border-radius: 8px;
}

.trace-action-head,
.trace-action-row {
  display: grid;
  grid-template-columns: 42px 62px 78px 86px 112px 80px 58px minmax(260px, 1fr);
  align-items: start;
  gap: 9px;
  padding: 7px 9px;
}

.trace-action-head {
  background: rgba(100, 230, 255, 0.07);
  color: rgba(100, 230, 255, 0.72);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.trace-action-row {
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  color: rgba(226, 232, 240, 0.78);
  font-family: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.8px;
  line-height: 1.32;
}

.trace-action-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.012);
}

.trace-action-row strong,
.trace-action-row em,
.trace-action-row i,
.trace-action-row small {
  display: block;
  font-style: normal;
}

.trace-action-row strong {
  color: rgba(226, 232, 240, 0.88);
}

.trace-action-row em {
  margin-top: 2px;
  color: rgba(100, 230, 255, 0.66);
}

.trace-action-row i {
  margin-top: 2px;
  color: rgba(216, 137, 69, 0.82);
}

.trace-action-row small {
  margin-top: 3px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 9.4px;
  white-space: normal;
}

@keyframes trace-access-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes trace-access-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.continue-btn {
  border: 1px solid rgba(203, 213, 225, 0.35);
  border-radius: 6px;
  background: rgba(241, 245, 249, 0.04);
  padding: 6px 12px;
  color: #f1f5f9;
  font-size: 11.5px;
}

.end-anyway-btn {
  border: 1px solid var(--sell-border);
  border-radius: 6px;
  background: var(--sell-bg);
  padding: 6px 12px;
  color: var(--sell-fg);
  font-size: 11.5px;
}

.session-complete {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(15, 23, 42, 0.42), transparent 42%),
    linear-gradient(180deg, #020817 0%, #030712 54%, #02040d 100%);
  padding: 40px 24px;
}

.ambient-red {
  position: absolute;
  left: -10%;
  top: -24%;
  width: 620px;
  height: 460px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.035);
  filter: blur(48px);
}

.ambient-blue {
  position: absolute;
  right: -12%;
  bottom: -26%;
  width: 680px;
  height: 520px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.07);
  filter: blur(48px);
}

.session-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(15, 23, 42, 0.2), transparent 36%);
}

.complete-trace-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(88vw, 858px);
  height: auto;
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.complete-trace-base {
  stroke: transparent;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.complete-trace-glow {
  opacity: 0;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(24, 204, 252, 0.24));
}

.complete-trace-point {
  display: none;
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
  vector-effect: non-scaling-stroke;
}

.session-card {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 400px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.26);
  border-radius: 12px;
  background: #020309;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 82px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(148, 163, 184, 0.035);
  backdrop-filter: blur(12px);
}

.session-card::before {
  content: none;
}

.session-card::after {
  content: none;
}

.session-title {
  margin: 0;
  color: color-mix(in oklab, var(--foreground) 94%, transparent);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.record-sealed {
  margin: 20px 0 0;
  color: #d4a24a;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.view-result-btn {
  position: relative;
  display: inline-flex;
  min-width: 198px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 6px;
  background: #020817;
  margin-top: 40px;
  padding: 11px 23px;
  color: color-mix(in oklab, var(--foreground) 92%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  box-shadow:
    0 0 16px rgba(24, 204, 252, 0.08),
    0 0 12px rgba(99, 68, 245, 0.05),
    inset 0 0 0 1px rgba(56, 189, 248, 0.12);
}

.view-result-btn:hover {
  border-color: rgba(24, 204, 252, 0.72);
  background: #04101f;
  color: #fff;
  box-shadow:
    0 0 22px rgba(24, 204, 252, 0.14),
    0 0 16px rgba(99, 68, 245, 0.08),
    inset 0 0 0 1px rgba(56, 189, 248, 0.18);
}

.view-result-btn::before {
  content: "";
  display: none;
}

.view-result-btn > span:not(.view-result-sheen) {
  position: relative;
  z-index: 1;
}

.view-result-sheen {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -58px;
  width: 52px;
  transform: rotate(12deg);
  background: linear-gradient(90deg, transparent, rgba(24, 204, 252, 0.04), rgba(24, 204, 252, 0.28), rgba(99, 68, 245, 0.24), rgba(174, 72, 255, 0.14), transparent);
  animation: session-complete-result-sheen 4.6s ease-in-out infinite;
}

@keyframes session-complete-result-sheen {
  0%, 62%, 100% {
    transform: translateX(0) rotate(12deg);
    opacity: 0;
  }
  72% {
    opacity: 0.42;
  }
  88% {
    transform: translateX(230px) rotate(12deg);
    opacity: 0;
  }
}

.modal h2,
.order-modal h2 {
  font-size: 24px;
}

.order-modal {
  width: min(340px, calc(100% - 30px));
}

.floating-order-modal {
  position: absolute;
  left: 50%;
  bottom: 60px;
  z-index: 12;
  transform: translateX(-50%);
  border: 1px solid #30384a;
  border-radius: 10px;
  background: #101621;
  padding: 12px;
  box-shadow: 0 20px 70px rgb(0 0 0 / 58%);
}

.floating-order-modal.asset-as1 {
  border-color: #27664c;
}

.floating-order-modal.asset-as2 {
  border-color: #315d9d;
}

.floating-order-modal.asset-as3 {
  border-color: #5b3f9e;
}

.modal-heading-row,
.order-reference,
.order-estimate {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.modal-heading-row h2 {
  font-size: 14px;
  margin-bottom: 0;
}

.modal-heading-row .muted {
  margin: 3px 0 0;
  font-size: 11px;
}

.modal-close {
  margin-left: auto;
  color: #858997;
  font-size: 20px;
}

.order-reference,
.order-estimate {
  border: 1px solid #2c3140;
  border-radius: 6px;
  background: #0b0e14;
  padding: 8px;
  color: #a4a8b5;
  font-size: 11px;
}

.order-reference strong,
.order-estimate strong {
  display: block;
  color: #fff;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

.order-reference small {
  color: #858997;
  font-size: 10px;
}

.order-field {
  margin: 12px 0 8px;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.quick-actions button,
.order-modal .button-row button {
  padding: 7px 9px;
  font-size: 12px;
}

.confirm-buy {
  border-color: #166534;
  background: #103b2c;
  color: #b7f4d4;
}

.confirm-sell {
  border-color: #7f1d1d;
  background: #3c1015;
  color: #f0b3ba;
}

.validation-message {
  color: #9fc5ff;
  font-size: 13px;
}

@media (max-width: 1023px) and (pointer: coarse) {
  .desktop-app {
    display: none;
  }

  .desktop-only-notice {
    display: grid;
  }
}

@media (min-width: 1024px), (pointer: fine) {
  .desktop-app {
    display: block;
  }

  .desktop-only-notice {
    display: none;
  }
}

/* Stage 8.5A-Fix: compact Lovable-style trading terminal remap. */
:root {
  --terminal-bg: #07090f;
  --terminal-card: rgba(13, 16, 25, 0.62);
  --terminal-card-strong: rgba(12, 16, 25, 0.82);
  --terminal-border: rgba(148, 163, 184, 0.16);
  --terminal-border-soft: rgba(148, 163, 184, 0.10);
  --terminal-text: rgba(244, 247, 251, 0.92);
  --terminal-muted: rgba(148, 163, 184, 0.82);
  --terminal-dim: rgba(148, 163, 184, 0.56);
  --terminal-green: #34d399;
  --terminal-blue: #60a5fa;
  --terminal-purple: #a78bfa;
  --terminal-red: #f87171;
  --terminal-amber: #d4923a;
  --terminal-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(46, 70, 116, 0.16), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(52, 211, 153, 0.06), transparent 28%),
    var(--terminal-bg);
  color: var(--terminal-text);
  font-size: 12px;
}

.page[data-route="simulation"] {
  min-height: 100vh;
  padding: 10px 20px 28px;
}

.page[data-route="simulation"] .simulation-shell {
  width: min(100%, 1500px);
  margin: 0 auto;
}

.page[data-route="simulation"] .panel {
  border: 1px solid var(--terminal-border);
  border-radius: 12px;
  background: var(--terminal-card);
  box-shadow: inset 0 0 26px rgba(99, 130, 168, 0.035);
}

.page[data-route="simulation"] .topbar {
  border-bottom: 0;
  padding: 0 0 8px;
}

.page[data-route="simulation"] .simulation-header {
  display: grid;
  gap: 0;
  justify-content: stretch;
  width: 100%;
}

.page[data-route="simulation"] .header-line-primary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 34px;
  width: 100%;
}

.page[data-route="simulation"] .header-left,
.page[data-route="simulation"] .header-right {
  gap: 12px;
}

.page[data-route="simulation"] .header-right {
  justify-content: end;
}

.page[data-route="simulation"] .logo {
  gap: 9px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.page[data-route="simulation"] .logo span {
  font-weight: 500;
}

.page[data-route="simulation"] .logo img {
  width: 27px;
  height: 27px;
}

.page[data-route="simulation"] .pill {
  border-color: rgba(96, 165, 250, 0.16);
  border-radius: 5px;
  background: rgba(96, 165, 250, 0.12);
  padding: 3px 8px;
  color: #9ec5fb;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.page[data-route="simulation"] .recording {
  justify-self: center;
  color: rgba(244, 247, 251, 0.86);
  font-size: 12.5px;
  white-space: nowrap;
}

.page[data-route="simulation"] .recording span {
  width: 6px;
  height: 6px;
  margin-right: 7px;
  background: #ef4444;
  box-shadow: 0 0 9px rgba(239, 68, 68, 0.65);
}

.page[data-route="simulation"] .recording i {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  margin-left: 7px;
  border: 1px solid rgba(148, 163, 184, 0.52);
  border-radius: 50%;
  color: rgba(148, 163, 184, 0.82);
  font-size: 9px;
  font-style: normal;
  line-height: 1;
}

.page[data-route="simulation"] .timer {
  font-family: var(--terminal-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.page[data-route="simulation"] .session-time {
  display: grid;
  gap: 1px;
  justify-items: center;
  color: var(--terminal-muted);
  font-family: var(--terminal-mono);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.page[data-route="simulation"] .session-time em {
  color: rgba(148, 163, 184, 0.70);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.18em;
}

.page[data-route="simulation"] .session-time strong {
  color: rgba(244, 247, 251, 0.90);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.page[data-route="simulation"] .simulation-header .secondary {
  border-color: rgba(120, 30, 30, 0.62);
  border-radius: 6px;
  background: rgba(76, 15, 15, 0.55);
  color: #e9b3b3;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 400;
}

.page[data-route="simulation"] .portfolio-summary-bar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr)) 1.2fr 1.6fr;
  gap: 14px;
  min-height: 78px;
  margin-top: 0;
  padding: 10px 18px;
  align-items: center;
}

.page[data-route="simulation"] .summary-metric {
  grid-column: span 2;
  gap: 10px;
}

.page[data-route="simulation"] .summary-metric strong {
  color: rgba(244, 247, 251, 0.94);
  font-size: 13.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.page[data-route="simulation"] .summary-metric small {
  display: block;
  margin-top: 2px;
  color: var(--terminal-muted);
  font-weight: 400;
  font-size: 9.5px;
  line-height: 1.15;
}

.page[data-route="simulation"] .summary-metric.metric-positive small {
  color: var(--terminal-green);
}

.page[data-route="simulation"] .summary-metric.metric-negative small {
  color: var(--terminal-red);
}

.page[data-route="simulation"] .summary-metric.metric-neutral small,
.page[data-route="simulation"] .summary-metric strong.neutral {
  color: rgba(148, 163, 184, 0.82);
}

.page[data-route="simulation"] .eyebrow {
  margin: 0 0 4px;
  color: var(--terminal-muted);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
}

.page[data-route="simulation"] .metric-icon,
.page[data-route="simulation"] .asset-icon {
  border-color: var(--terminal-border);
  background: rgba(8, 12, 22, 0.76);
  color: var(--terminal-muted);
}

.page[data-route="simulation"] .metric-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.page[data-route="simulation"] .metric-icon-wallet {
  border-color: rgba(197, 154, 58, 0.18);
  background: rgba(197, 154, 58, 0.10);
  color: #c59a3a;
}

.page[data-route="simulation"] .metric-icon-line,
.page[data-route="simulation"] .metric-icon-target {
  border-color: rgba(52, 227, 164, 0.18);
  background: rgba(52, 227, 164, 0.10);
  color: #34e3a4;
}

.page[data-route="simulation"] .metric-icon-trend {
  border-color: rgba(90, 157, 255, 0.18);
  background: rgba(90, 157, 255, 0.10);
  color: #5a9dff;
}

.page[data-route="simulation"] .metric-icon svg,
.page[data-route="simulation"] .asset-icon svg,
.page[data-route="simulation"] .eyebrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page[data-route="simulation"] .allocation-summary {
  grid-column: span 2;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  padding-left: 16px;
  justify-content: end;
}

.page[data-route="simulation"] .allocation-label-inline {
  display: flex;
  align-items: center;
  color: var(--terminal-muted);
  font-size: 10.5px;
  font-weight: 400;
}

.page[data-route="simulation"] .allocation-label-inline svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--terminal-purple);
  stroke-width: 1.8;
}

.page[data-route="simulation"] .allocation-ring {
  width: 42px;
  height: 42px;
}

.page[data-route="simulation"] .allocation-ring::after {
  inset: 11px;
  background: #07090f;
}

.allocation-legend {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 130px;
}

.allocation-legend li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 7px;
  align-items: center;
  color: rgba(226, 232, 240, 0.88);
  font-family: var(--terminal-mono);
  font-size: 10px;
  font-weight: 400;
}

.allocation-legend strong {
  color: var(--terminal-muted);
  font-weight: 400;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c59a3a;
}

.legend-dot.as1 { background: #34e3a4; }
.legend-dot.as2 { background: #5a9dff; }
.legend-dot.as3 { background: #a982ff; }

.page[data-route="simulation"] .market-signal-bar {
  display: grid;
  grid-template-columns: 136px 1fr;
  min-height: 42px;
  margin-top: 10px;
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(8, 12, 22, 0.72);
  box-shadow: inset 0 0 28px rgba(99, 130, 168, 0.07);
}

.page[data-route="simulation"] .market-signal-label {
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid var(--terminal-border);
  background: rgba(8, 12, 22, 0.92);
  padding: 0 11px;
  color: rgba(148, 163, 184, 0.84);
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.page[data-route="simulation"] .market-signal-label strong {
  color: #f87171;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.page[data-route="simulation"] .market-signal-bar.high-alert {
  border-color: rgba(248, 113, 113, 0.30);
  background: rgba(34, 10, 14, 0.38);
  box-shadow: inset 0 0 28px rgba(248, 113, 113, 0.05);
}

.page[data-route="simulation"] .market-signal-bar.high-alert .market-signal-label {
  border-right-color: rgba(248, 113, 113, 0.28);
  background: rgba(34, 10, 14, 0.54);
}

.page[data-route="simulation"] .market-signal-bar.high-alert p {
  color: rgba(248, 113, 113, 0.94);
}

.page[data-route="simulation"] .market-signal-bar p {
  margin: 0;
  border-left: 0;
  padding: 7px 13px;
  color: rgba(229, 231, 235, 0.92);
  font-family: var(--terminal-mono);
  font-size: 11.5px;
  line-height: 1.35;
}

.ticker-caret {
  display: inline-block;
  width: 0.55ch;
  margin-left: 1px;
  animation: ticker-caret 1s steps(2) infinite;
}

.ticker-caret[hidden] {
  display: none;
}

@keyframes ticker-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.page[data-route="simulation"] .main-trading-area,
.page[data-route="simulation"] .asset-row,
.page[data-route="simulation"] .lower-panel {
  gap: 16px;
  margin-top: 12px;
}

.page[data-route="simulation"] .asset-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page[data-route="simulation"] .asset-card {
  height: clamp(380px, calc(100vh - 292px), 460px);
  min-height: 380px;
  padding: 16px 18px 14px;
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.13);
  background: rgba(10, 13, 21, 0.64);
  box-shadow: none;
}

.page[data-route="simulation"] .asset-card.selected.asset-as1 {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.18);
}

.page[data-route="simulation"] .asset-card.selected.asset-as2 {
  border-color: rgba(96, 165, 250, 0.62);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.page[data-route="simulation"] .asset-card.selected.asset-as3 {
  border-color: rgba(167, 139, 250, 0.62);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.18);
}

.page[data-route="simulation"] .asset-card-header {
  gap: 10px;
  min-height: 46px;
  margin-bottom: 9px;
}

.page[data-route="simulation"] .asset-title {
  gap: 12px;
}

.page[data-route="simulation"] .asset-card .asset-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.page[data-route="simulation"] .asset-as1 .asset-icon {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.10);
  color: var(--terminal-green);
}

.page[data-route="simulation"] .asset-as2 .asset-icon {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.10);
  color: var(--terminal-blue);
}

.page[data-route="simulation"] .asset-as3 .asset-icon {
  border-color: rgba(167, 139, 250, 0.38);
  background: rgba(167, 139, 250, 0.13);
  color: var(--terminal-purple);
}

.page[data-route="simulation"] .asset-title h2 {
  margin: 0;
  color: rgba(244, 247, 251, 0.96);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.1;
}

.page[data-route="simulation"] .asset-title .muted {
  max-width: 210px;
  margin-top: 4px;
  color: var(--terminal-muted);
  font-size: 10.5px;
  line-height: 1.25;
}

.page[data-route="simulation"] .asset-price-block {
  min-width: 112px;
}

.page[data-route="simulation"] .price {
  margin: 0;
  color: rgba(244, 247, 251, 0.95);
  font-family: var(--terminal-mono);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.1;
}

.page[data-route="simulation"] .asset-price-block span {
  color: var(--terminal-muted);
  font-size: 9.5px;
  line-height: 1.1;
}

.page[data-route="simulation"] .asset-price-block strong {
  margin-top: 5px;
  font-family: var(--terminal-mono);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.2;
}

.page[data-route="simulation"] .chart-frame {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-height: 134px;
  height: auto;
  margin: 2px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--terminal-dim);
  overflow: visible;
}

.asset-line-chart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  cursor: crosshair;
}

.asset-line-path {
  fill: none;
  stroke-width: 1;
  stroke-linejoin: round;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.055);
  stroke-width: 1;
}

.chart-axis-label {
  fill: rgba(148, 163, 184, 0.58);
  font-family: var(--terminal-mono);
  font-size: 8.5px;
}

.chart-crosshair line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.chart-crosshair rect {
  fill: rgba(18, 18, 20, 0.94);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.5;
}

.chart-crosshair text {
  fill: rgba(235, 238, 243, 0.95);
  font-family: var(--terminal-mono);
  font-size: 9px;
}

.chart-crosshair .tooltip-muted {
  fill: rgba(148, 163, 184, 0.72);
}

.live-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 6px;
  background: rgba(5, 7, 11, 0.72);
  padding: 4px 8px;
  color: rgba(203, 213, 225, 0.78);
  font-size: 9.5px;
}

.live-badge i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #10b981;
}

.page[data-route="simulation"] .asset-primary-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  border-top-color: rgba(148, 163, 184, 0.09);
  padding-top: 8px;
  color: var(--terminal-muted);
  font-size: 10.5px;
}

.page[data-route="simulation"] .asset-primary-stats strong {
  margin-top: 5px;
  color: rgba(244, 247, 251, 0.92);
  font-size: 12px;
  font-weight: 400;
}

.page[data-route="simulation"] .asset-secondary-stats {
  grid-template-columns: 0.82fr 1.18fr 0.82fr;
  gap: 4px 10px;
  margin-top: 7px;
  padding-top: 7px;
  border-top-color: rgba(148, 163, 184, 0.08);
  color: var(--terminal-dim);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.page[data-route="simulation"] .asset-secondary-stats strong {
  margin-top: 3px;
  color: rgba(226, 232, 240, 0.82);
  font-family: var(--terminal-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
}

.page[data-route="simulation"] .asset-trade-actions {
  gap: 12px;
  margin-top: 10px;
}

.page[data-route="simulation"] .asset-trade-button {
  min-height: 34px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 400;
}

.page[data-route="simulation"] .asset-trade-button.buy {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(52, 211, 153, 0.14);
  color: #a7f3d0;
}

.page[data-route="simulation"] .asset-trade-button.buy.asset-as2 {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
}

.page[data-route="simulation"] .asset-trade-button.buy.asset-as3 {
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(167, 139, 250, 0.16);
  color: #ddd6fe;
}

.page[data-route="simulation"] .asset-trade-button.sell {
  border-color: rgba(120, 30, 30, 0.50);
  background: rgba(76, 15, 15, 0.46);
  color: #e9b3b3;
}

.execution-flash {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.execution-flash.buy { color: rgba(134, 239, 172, 0.78); }
.execution-flash.sell { color: rgba(252, 165, 165, 0.76); }

.page[data-route="simulation"] .lower-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page[data-route="simulation"] .recent-actions-card,
.page[data-route="simulation"] .trace-monitor-card,
.page[data-route="simulation"] .portfolio-value-card {
  min-height: 252px;
  padding: 16px;
}

.page[data-route="simulation"] .compact-panel-header,
.page[data-route="simulation"] .panel-heading,
.page[data-route="simulation"] .trace-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page[data-route="simulation"] .compact-panel-header .eyebrow,
.page[data-route="simulation"] .panel-heading .eyebrow,
.page[data-route="simulation"] .trace-monitor-header .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(244, 247, 251, 0.86);
  font-size: 12px;
  font-weight: 500;
}

.page[data-route="simulation"] .compact-panel-header span,
.page[data-route="simulation"] .trace-monitor-header span {
  color: var(--terminal-muted);
  font-size: 10.5px;
}

.page[data-route="simulation"] .panel-value {
  margin: 12px 0 8px;
  font-size: 15px;
  font-weight: 400;
}

.page[data-route="simulation"] .panel-value span {
  font-size: 10px;
}

.page[data-route="simulation"] .panel-value strong {
  font-size: 11px;
  font-weight: 400;
}

.page[data-route="simulation"] .portfolio-line-frame {
  height: 186px;
}

.page[data-route="simulation"] .recent-actions-scroll {
  max-height: 200px;
  margin-top: 12px;
}

.page[data-route="simulation"] .action-row {
  grid-template-columns: 52px 1fr;
  gap: 10px;
  border-bottom-color: rgba(148, 163, 184, 0.10);
  padding: 7px 0;
}

.page[data-route="simulation"] .action-row-rich {
  grid-template-columns: 52px 1fr auto;
}

.page[data-route="simulation"] .action-row span,
.page[data-route="simulation"] .action-row em {
  font-family: var(--terminal-mono);
  font-size: 10.5px;
}

.page[data-route="simulation"] .action-row p {
  font-size: 12px;
}

.page[data-route="simulation"] .action-pill {
  min-width: 36px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 500;
}

.page[data-route="simulation"] .trace-orb {
  width: 180px;
  height: 180px;
  margin: 2px auto;
  background:
    radial-gradient(circle, rgba(78, 132, 156, 0.10) 0 16%, transparent 17%),
    repeating-radial-gradient(circle, rgba(111, 139, 166, 0.30) 0 2px, transparent 3px 8px);
}

.page[data-route="simulation"] .trace-monitor-card .muted {
  display: none;
}

.page[data-route="simulation"] .preview-controls {
  width: min(100%, 1500px);
  margin: 14px auto 0;
  padding: 8px;
  border-color: var(--terminal-border-soft);
  background: rgba(10, 13, 21, 0.52);
  font-size: 12px;
}

.page[data-route="simulation"] footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 1500px);
  margin: 14px auto 0;
  border: 1px solid var(--terminal-border-soft);
  border-radius: 12px;
  background: rgba(10, 13, 21, 0.42);
  padding: 10px 24px;
  color: var(--terminal-muted);
  font-size: 11px;
}

.page[data-route="simulation"] .trace-engine-floating {
  display: none;
}

.page[data-route="simulation"] .trace-engine-inline {
  margin: 0;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.06);
  color: #7dd3fc;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page[data-route="simulation"] {
  position: relative;
}

.page[data-route="simulation"] .floating-order-modal {
  position: absolute;
  right: auto;
  bottom: auto;
  width: min(250px, calc(100% - 56px));
  transform: none;
  border-radius: 10px;
  background: rgba(15, 21, 33, 0.98);
  padding: 0;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.54);
  z-index: 30;
}

.page[data-route="simulation"] .modal-heading-row {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 8px 10px 7px;
}

.page[data-route="simulation"] .modal-heading-row .asset-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.page[data-route="simulation"] .modal-heading-row h2 {
  margin: 0;
  font-size: 10.5px;
  font-weight: 600;
}

.page[data-route="simulation"] .modal-heading-row .muted {
  margin: 2px 0 0;
  font-size: 9px;
  line-height: 1.2;
}

.page[data-route="simulation"] .modal-close {
  font-size: 16px;
  transition: color 120ms ease, transform 120ms ease;
}

.page[data-route="simulation"] .modal-close:hover {
  color: rgba(244, 247, 251, 0.95);
}

.page[data-route="simulation"] .modal-close:active {
  transform: scale(0.94);
}

.page[data-route="simulation"] .order-reference {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 8px;
  margin: 8px 10px 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.page[data-route="simulation"] .order-reference span {
  border-color: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 6px;
  background: rgba(7, 10, 16, 0.66);
  padding: 6px;
  font-size: 9px;
}

.page[data-route="simulation"] .order-reference strong {
  color: rgba(244, 247, 251, 0.92);
  font-family: var(--terminal-mono);
  font-size: 10px;
  font-weight: 400;
}

.page[data-route="simulation"] .order-field {
  margin: 9px 10px 6px;
}

.page[data-route="simulation"] .order-field span {
  color: var(--terminal-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page[data-route="simulation"] .order-field input {
  height: 30px;
  border-color: rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  background: rgba(5, 8, 14, 0.82);
  padding: 6px 8px;
  font-family: var(--terminal-mono);
  font-size: 11px;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.page[data-route="simulation"] .order-field input:focus {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(5, 8, 14, 0.96);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.12);
  outline: none;
}

.page[data-route="simulation"] .order-field input::-webkit-outer-spin-button,
.page[data-route="simulation"] .order-field input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.page[data-route="simulation"] .order-field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.page[data-route="simulation"] .quick-actions {
  gap: 5px;
  margin: 0 10px 7px;
}

.page[data-route="simulation"] .quick-actions button,
.page[data-route="simulation"] .order-modal .button-row button {
  border-color: rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  background: rgba(10, 14, 23, 0.78);
  padding: 5px 7px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 10px;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, transform 90ms ease;
}

.page[data-route="simulation"] .quick-actions button:not(:disabled):hover,
.page[data-route="simulation"] .order-modal .button-row button:not(:disabled):hover {
  border-color: rgba(148, 163, 184, 0.30);
  background: rgba(20, 26, 39, 0.96);
  color: rgba(244, 247, 251, 0.94);
}

.page[data-route="simulation"] .quick-actions button:not(:disabled):active,
.page[data-route="simulation"] .order-modal .button-row button:not(:disabled):active {
  transform: scale(0.985) translateY(1px);
}

.page[data-route="simulation"] .quick-actions button.active {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.14);
  color: rgba(244, 247, 251, 0.92);
}

.page[data-route="simulation"] .order-modal .fine,
.page[data-route="simulation"] .validation-message,
.page[data-route="simulation"] .trade-toast {
  margin: 7px 10px 0;
  font-size: 10px;
}

.page[data-route="simulation"] .order-estimate {
  display: grid;
  gap: 5px;
  margin: 8px 10px 0;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 6px;
  background: rgba(7, 10, 16, 0.66);
  padding: 7px 8px;
  color: rgba(148, 163, 184, 0.84);
  font-size: 10px;
}

.page[data-route="simulation"] .order-estimate span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.page[data-route="simulation"] .order-estimate em {
  font-style: normal;
}

.page[data-route="simulation"] .order-estimate strong {
  color: rgba(244, 247, 251, 0.92);
  font-family: var(--terminal-mono);
  font-size: 10.5px;
  font-weight: 400;
  text-align: right;
}

.page[data-route="simulation"] .order-modal .button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 8px 10px 10px;
}

.page[data-route="simulation"] .order-modal .button-row button {
  min-height: 30px;
}

.page[data-route="simulation"] .confirm-buy {
  border-color: rgba(52, 211, 153, 0.28) !important;
  background: rgba(52, 211, 153, 0.12) !important;
  color: #86efac !important;
}

.page[data-route="simulation"] .confirm-buy:not(:disabled):hover {
  border-color: rgba(52, 211, 153, 0.48) !important;
  background: rgba(52, 211, 153, 0.18) !important;
}

.page[data-route="simulation"] .confirm-sell {
  border-color: rgba(120, 30, 30, 0.56) !important;
  background: rgba(76, 15, 15, 0.50) !important;
  color: #e9b3b3 !important;
}

.page[data-route="simulation"] .confirm-sell:not(:disabled):hover {
  border-color: rgba(185, 60, 60, 0.68) !important;
  background: rgba(96, 24, 24, 0.66) !important;
}

.page[data-route="simulation"] .confirm-buy:disabled,
.page[data-route="simulation"] .confirm-sell:disabled {
  border-color: rgba(148, 163, 184, 0.12) !important;
  background: rgba(30, 34, 44, 0.55) !important;
  color: rgba(148, 163, 184, 0.44) !important;
  opacity: 1;
}

@media (max-width: 1280px) {
  .page[data-route="simulation"] {
    padding-inline: 16px;
  }

  .page[data-route="simulation"] .portfolio-summary-bar,
  .page[data-route="simulation"] .asset-row,
  .page[data-route="simulation"] .lower-panel {
    gap: 12px;
  }

  .page[data-route="simulation"] .asset-card {
    padding: 14px 16px 12px;
  }
}

/* UI Lab vanilla Step 1: exact Entry page and responsive workspace notice. */
:root {
  color-scheme: dark;
  --radius: 8px;
  --background: oklch(0.13 0.012 265);
  --foreground: oklch(0.96 0.005 250);
  --card: oklch(0.17 0.014 265);
  --muted-foreground: oklch(0.65 0.02 255);
  --border: oklch(1 0 0 / 8%);
  --monselic-red: oklch(0.5 0.18 18);
  --monselic-violet: oklch(0.42 0.17 295);
  --monselic-blue: oklch(0.7 0.16 230);
  --asset-green: #34d399;
  --asset-blue: #60a5fa;
  --asset-purple: #a78bfa;
  --muted-gold: #a8853a;
  --sell-bg: rgba(120, 30, 30, 0.46);
  --sell-fg: #cfa0a0;
  --sell-border: rgba(140, 40, 40, 0.55);
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
}

html,
body {
  min-height: 100%;
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(60% 50% at 20% 0%, color-mix(in oklab, var(--monselic-red) 18%, transparent), transparent 70%),
    radial-gradient(50% 40% at 100% 100%, color-mix(in oklab, var(--monselic-blue) 16%, transparent), transparent 70%);
  background-attachment: fixed;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--muted-foreground);
}

.divider {
  height: 1px;
  flex: 1;
  background-image: linear-gradient(
    90deg,
    transparent,
    color-mix(in oklab, var(--monselic-blue) 60%, transparent),
    transparent
  );
}

.logo {
  display: block;
  user-select: none;
}

.entry-page .logo,
.workspace-notice .logo {
  margin: 0;
  font-weight: inherit;
  letter-spacing: 0;
}

.entry-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 64px;
}

.entry-inner {
  width: 100%;
  max-width: 520px;
  flex: 1;
  text-align: center;
}

.entry-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.entry-logo-wrap {
  position: relative;
}

.entry-logo-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  opacity: 0.7;
  filter: blur(48px);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--monselic-red) 60%, transparent), transparent 70%);
}

.entry-logo {
  width: 80px;
  height: 80px;
}

.entry-title {
  margin: 5.1px 0 0;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
}

.entry-subtitle {
  margin: 9.2px 0 0;
  padding: 10px 0;
  color: #b89445;
  font-family: var(--font-mono);
  font-size: 13.2px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
}

.entry-form {
  margin-top: 32px;
}

.entry-card {
  margin-top: 16px;
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--card) 30%, transparent);
  padding: 20px;
  backdrop-filter: blur(4px);
}

.entry-card:first-child {
  margin-top: 0;
}

.entry-card:nth-of-type(2) {
  padding-top: 27px;
}

.entry-label {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.entry-input {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--background) 40%, transparent);
  padding: 10px 16px;
  color: var(--foreground);
  font-size: 14px;
  outline: none;
}

.entry-input::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
}

.entry-help {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 11.5px;
}

.status-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid color-mix(in oklab, var(--foreground) 4%, transparent);
  padding: 10px 0;
}

.status-line:first-child {
  border-top: 0;
  padding-top: 4px;
}

.status-line:last-child {
  padding-bottom: 4px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  font-size: 12.5px;
}

.status-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted-foreground);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.status-dot.ok {
  background: var(--monselic-blue);
  box-shadow: 0 0 8px color-mix(in oklab, var(--monselic-blue) 75%, transparent);
}

.status-dot.inactive {
  background: var(--monselic-red);
  box-shadow: 0 0 8px color-mix(in oklab, var(--monselic-red) 75%, transparent);
}

.gradient-button {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 6px;
  background-image: linear-gradient(90deg, var(--monselic-blue), var(--monselic-violet), var(--monselic-red));
  padding: 1px;
}

.gradient-button > span {
  display: block;
  width: 100%;
  border-radius: 5px;
  background: color-mix(in oklab, var(--background) 80%, transparent);
  padding: 16.1px 24px;
  color: var(--foreground);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.gradient-button:hover {
  background-image: linear-gradient(90deg, var(--monselic-blue), var(--monselic-violet), var(--monselic-red));
}

.gradient-button:hover > span {
  background: color-mix(in oklab, var(--background) 60%, transparent);
}

.entry-footer {
  display: flex;
  width: 100%;
  max-width: 520px;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 48px auto 40px;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.entry-credit-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
}

.entry-back-link {
  margin-top: 24px;
  color: color-mix(in oklab, var(--muted-gold) 52%, var(--muted-foreground));
  font-size: 9.2px;
  letter-spacing: 0.22em;
  text-decoration: none;
  opacity: 0.68;
  transition: color 160ms ease, opacity 160ms ease, text-shadow 160ms ease;
}

.entry-back-link:hover,
.entry-back-link:focus-visible {
  color: color-mix(in oklab, var(--muted-gold) 78%, white);
  opacity: 0.9;
  text-shadow: 0 0 12px color-mix(in oklab, var(--muted-gold) 16%, transparent);
  outline: none;
}

.workspace-notice {
  position: relative;
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px 20px;
}

.workspace-notice section {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 520px;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  text-align: center;
}

.notice-logo {
  width: 32px;
  height: 32px;
  opacity: 0.9;
  animation: none;
  filter: none;
  transition: none;
}

.notice-label {
  margin: 24px 0 0;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.notice-title {
  margin: 16px 0 0;
  color: color-mix(in oklab, var(--foreground) 92%, transparent);
  font-size: 22px;
  font-weight: 300;
}

.notice-copy {
  margin: 20px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.6;
}

.notice-sub {
  margin-top: 10px;
  color: color-mix(in oklab, var(--muted-foreground) 85%, transparent);
  font-size: 13.5px;
}

.notice-return {
  min-width: 164px;
  margin-top: 26px;
  border: 1px solid color-mix(in oklab, var(--muted-gold) 42%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--muted-gold) 8%, transparent);
  padding: 8px 14px;
  color: color-mix(in oklab, var(--muted-gold) 76%, var(--foreground));
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.notice-return:hover,
.notice-return:focus-visible {
  border-color: color-mix(in oklab, var(--muted-gold) 68%, transparent);
  background: color-mix(in oklab, var(--muted-gold) 14%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--muted-gold) 9%, transparent),
    0 0 16px color-mix(in oklab, var(--muted-gold) 8%, transparent);
  color: color-mix(in oklab, var(--muted-gold) 88%, white);
  outline: none;
}

@media (max-width: 1023px) {
  .s2-relic-page.requires-wide {
    min-width: 0;
    padding: 0;
  }

  .requires-wide .s2-result-surface,
  .requires-wide .product-surface {
    display: none;
  }

  .requires-wide .workspace-notice {
    display: flex;
  }
}

/* UI Lab vanilla Step 2: Simulation main surface. */
.simulation-page {
  min-height: 100vh;
  background-color: var(--background);
  background: var(--background);
  background-image: none;
  color: var(--foreground);
}

body:has(.simulation-page) {
  background-color: var(--background);
  background-image: none;
}

#app:has(.simulation-page),
.simulation-page .product-surface {
  min-height: 100vh;
  background: var(--background);
}

.simulation-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 10px 16px;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup img {
  width: 28px;
  height: 28px;
}

.simulation-brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background-image: url("/monselic-logo.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: none;
  opacity: 1;
  transform: none;
  animation: none;
  transition: none;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.mode-chip {
  margin-left: 8px;
  border-radius: 4px;
  padding: 3px 8px;
  background: rgba(96, 165, 250, 0.12);
  color: #9ec5fb;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.recording {
  display: flex;
  flex: 1;
  justify-content: center;
}

.recording-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  font-size: 12px;
}

.recording-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #ef4444;
}

.recording-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(239, 68, 68, 0.7);
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.session-time {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  border-radius: 6px;
  padding: 2px 0;
  transition: color 180ms ease, filter 180ms ease, text-shadow 180ms ease;
}

.session-time-label {
  color: var(--muted-foreground);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.session-time-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.session-time.is-final-seconds .session-time-label {
  color: rgba(214, 169, 70, 0.92);
  text-shadow: 0 0 11px rgba(216, 137, 69, 0.22);
}

.session-time.is-final-seconds .session-time-value {
  color: rgba(255, 231, 180, 0.96);
  text-shadow: 0 0 14px rgba(216, 137, 69, 0.24);
}

.session-time.is-final-seconds .muted {
  color: rgba(216, 137, 69, 0.82);
}

.end-session-btn {
  border: 1px solid var(--sell-border);
  border-radius: 6px;
  background: var(--sell-bg);
  padding: 6px 14px;
  color: var(--sell-fg);
  font-size: 12px;
  font-weight: 400;
}

.simulation-page .end-session-btn:hover {
  border-color: rgba(154, 52, 52, 0.66);
  background: rgba(134, 34, 34, 0.54);
  color: #e5b8b8;
}

.summary {
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--card) 55%, transparent);
  padding: 8px 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
}

.summary-stat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.summary-stat.span-1 {
  grid-column: span 1;
}

.summary-stat.span-2 {
  grid-column: span 2;
}

.summary-stat.span-3 {
  grid-column: span 3;
}

.summary-icon {
  display: flex;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: color-mix(in oklab, var(--muted-gold) 14%, transparent);
  color: var(--muted-gold);
}

.summary-icon svg,
.recording-inner svg,
.asset-icon svg,
.footer-note svg,
.trace-engine-btn svg {
  width: 14px;
  height: 14px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.summary-stat-crosshair .summary-icon svg {
  width: 19px;
  height: 19px;
}

.summary-stat-allocation-mini .summary-icon svg.gold-pie-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  opacity: 0.82;
  stroke: none;
}

.summary-label {
  color: var(--muted-foreground);
  font-size: 10px;
}

.summary-value {
  margin-top: 2px;
  color: color-mix(in oklab, var(--foreground) 95%, transparent);
  font-size: 12.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.summary-inline-unit,
.summary-inline-detail {
  margin-left: 4px;
  color: var(--muted-foreground);
  font-size: 9px;
  white-space: nowrap;
}

.summary-value.positive .pnl-detail,
.summary-value.negative .pnl-detail,
.summary-value.neutral .pnl-detail {
  color: currentColor;
}

.summary-unit,
.summary-sub {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 9px;
}

.positive {
  color: color-mix(in oklab, #34d399 82%, var(--muted-foreground));
}

.negative {
  color: color-mix(in oklab, #f87171 82%, var(--muted-foreground));
}

.summary-value.neutral,
.summary-sub.neutral {
  color: var(--muted-foreground);
}

.allocation-block {
  grid-column: span 3;
  border-left: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  padding-left: 9px;
  padding-right: 2px;
}

.allocation-inner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.donut {
  width: 42px;
  height: 42px;
  display: block;
  overflow: visible;
}

.allocation-title {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 10px;
  line-height: 1.2;
}

.allocation-copy {
  min-width: 0;
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 7px;
}

.allocation-groups {
  display: contents;
}

.allocation-cash-group {
  display: grid;
  min-height: 42px;
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding-top: 2px;
  padding-right: 7px;
  border-right: 1px solid color-mix(in oklab, var(--foreground) 7%, transparent);
}

.allocation-asset-group {
  display: grid;
  min-height: 42px;
  min-width: 0;
  align-content: center;
  gap: 4px;
}

.alloc-item {
  display: grid;
  grid-template-columns: 6px 44px 44px;
  align-items: center;
  width: max-content;
  gap: 0 4px;
  white-space: nowrap;
  color: color-mix(in oklab, var(--foreground) 82%, transparent);
  font-size: 9.8px;
  line-height: 1;
}

.allocation-cash-group .alloc-item {
  grid-template-columns: 6px 28px 44px;
}

.allocation-asset-group .alloc-item {
  grid-template-columns: 6px 44px 38px;
}

.alloc-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.alloc-pct {
  justify-self: end;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.market-row {
  margin-top: 10px;
}

.market-ticker {
  position: relative;
  width: 100%;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(8, 12, 22, 0.72);
  box-shadow: inset 0 0 28px rgba(99, 130, 168, 0.07);
  backdrop-filter: blur(4px);
}

.market-ticker-inner {
  display: flex;
  align-items: stretch;
}

.market-label {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(8, 12, 22, 0.92);
  padding: 0 8px;
  color: rgba(148, 163, 184, 0.85);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 220ms ease, text-shadow 220ms ease, border-color 220ms ease;
}

.market-text {
  flex: 1;
  min-height: 34px;
  padding: 6px 12px;
  color: rgba(229, 231, 235, 0.92);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  opacity: var(--market-signal-opacity, 1);
  transition: color 420ms ease, opacity 220ms linear, filter 220ms linear;
}

.market-ticker.is-fading .market-text {
  filter: blur(calc((1 - var(--market-signal-opacity, 1)) * 1px));
  transition: opacity 220ms linear, filter 220ms linear, color 220ms linear;
}

.market-ticker.is-typing .market-label {
  animation: market-label-pulse 1.08s ease-in-out infinite;
}

.market-ticker.alert {
  border-color: rgba(185, 75, 75, 0.32);
  background: rgba(17, 10, 14, 0.76);
  box-shadow:
    inset 0 0 28px rgba(185, 75, 75, 0.055),
    inset 0 0 0 1px rgba(185, 75, 75, 0.035);
}

.market-ticker.alert .market-label {
  border-right-color: rgba(185, 75, 75, 0.28);
  background: rgba(18, 10, 14, 0.94);
  color: rgba(217, 120, 120, 0.84);
}

.market-ticker.alert .market-text {
  color: rgba(222, 139, 139, 0.9);
}

.market-ticker.alert.is-typing .market-label {
  animation-name: market-label-alert-pulse;
}

@keyframes market-label-pulse {
  0%, 100% {
    color: rgba(148, 163, 184, 0.82);
    text-shadow: none;
  }
  45% {
    color: rgba(100, 230, 255, 0.96);
    text-shadow: 0 0 14px rgba(82, 223, 255, 0.34);
  }
}

@keyframes market-label-alert-pulse {
  0%, 100% {
    color: rgba(217, 120, 120, 0.82);
    text-shadow: none;
  }
  45% {
    color: rgba(255, 189, 142, 0.96);
    text-shadow: 0 0 14px rgba(216, 137, 69, 0.34);
  }
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.asset-card,
.bottom-card {
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--card) 55%, transparent);
}

.asset-card {
  display: flex;
  min-height: 368px;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
}

.asset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.asset-identity {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.asset-icon {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.asset-name {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.asset-sub {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.asset-price {
  text-align: right;
  line-height: 1.15;
}

.asset-price-main {
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-price-unit {
  margin-left: 3px;
  color: var(--muted-foreground);
  font-size: 8.5px;
  font-weight: 400;
  vertical-align: baseline;
}

.asset-change {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.chart-slot {
  position: relative;
  margin-top: 8px;
}

.live-badge {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--background) 70%, transparent);
  padding: 2px 6px;
  color: var(--muted-foreground);
  font-size: 9.5px;
}

.live-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.8);
}

.chart-frame {
  display: block;
  width: 100%;
  height: 168px;
}

.simulation-page .chart-crosshair {
  pointer-events: none;
}

.simulation-page .chart-crosshair-vertical {
  stroke: color-mix(in oklab, var(--foreground) 32%, transparent);
  stroke-width: 0.8;
  stroke-dasharray: 2 5;
}

.simulation-page .chart-crosshair-tooltip rect {
  fill: color-mix(in oklab, var(--background) 88%, transparent);
  stroke: color-mix(in oklab, var(--foreground) 12%, transparent);
  stroke-width: 0.7;
}

.simulation-page .chart-crosshair-tooltip text {
  fill: color-mix(in oklab, var(--foreground) 82%, transparent);
  font-family: var(--font-mono);
  font-size: 8.2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.asset-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: auto 0 0;
  border-top: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  padding-top: 9px;
  font-size: 11px;
  line-height: 1.62;
}

.asset-strip.small {
  margin: 5px 0 0;
  border-top-color: color-mix(in oklab, var(--foreground) 6%, transparent);
  padding-top: 7px;
  font-size: 9.5px;
  line-height: 1.28;
}

.metric-label {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 9px;
  line-height: 1.5;
}

.asset-strip.small .metric-label {
  letter-spacing: 0.06em;
  line-height: 1.28;
  text-transform: uppercase;
}

.metric-value {
  margin: 2px 0 0;
  color: color-mix(in oklab, var(--foreground) 95%, transparent);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.metric-value.neutral {
  color: var(--muted-foreground);
}

.metric-value.positive {
  color: color-mix(in oklab, #34d399 82%, var(--muted-foreground));
}

.metric-value.negative {
  color: color-mix(in oklab, #f87171 82%, var(--muted-foreground));
}

.asset-pnl-compact {
  white-space: nowrap;
}

.asset-strip.small .metric-value {
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  font-family: var(--font-mono);
  line-height: 1.28;
}

.asset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.trade-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--trade-accent, #60a5fa) 30%, transparent);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.54), rgba(8, 12, 20, 0.68));
  padding: 6px 0;
  color: color-mix(in oklab, var(--trade-fg, #bfdcff) 86%, var(--muted-foreground));
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 520;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-transform: uppercase;
  transition: transform 90ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease, opacity 150ms ease, filter 150ms ease;
}

.trade-btn::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: 6px 0 0 6px;
  background: var(--trade-accent, #60a5fa);
  content: "";
  opacity: 0.88;
}

.trade-btn:disabled {
  border-color: rgba(100, 116, 139, 0.14);
  background: rgba(8, 12, 20, 0.34);
  color: rgba(148, 163, 184, 0.42);
  opacity: 1;
}

.sell-btn {
  --trade-accent: #ef5f67;
  --trade-fg: #e7a8a8;
  border-color: rgba(190, 68, 68, 0.3);
  background: linear-gradient(180deg, rgba(28, 17, 20, 0.5), rgba(15, 9, 12, 0.66));
  color: color-mix(in oklab, #e7a8a8 82%, var(--muted-foreground));
}

.sell-btn:not(:disabled) {
  border-color: rgba(190, 68, 68, 0.34);
  background: linear-gradient(180deg, rgba(30, 18, 21, 0.58), rgba(16, 10, 13, 0.7));
  color: #e6a9a9;
}

.trade-btn:not(:disabled):hover {
  border-color: color-mix(in oklab, var(--trade-accent, #60a5fa) 46%, transparent);
  background: linear-gradient(180deg, rgba(24, 32, 48, 0.62), rgba(11, 16, 26, 0.74));
  box-shadow:
    inset 0 0 0 1px color-mix(in oklab, var(--trade-accent, #60a5fa) 18%, transparent),
    inset 0 0 14px color-mix(in oklab, var(--trade-accent, #60a5fa) 7%, transparent),
    0 0 16px color-mix(in oklab, var(--trade-accent, #60a5fa) 8%, transparent);
  color: color-mix(in oklab, var(--trade-fg, #bfdcff) 96%, white);
  filter: none;
}

.trade-btn:not(:disabled):active {
  transform: translateY(1px);
  filter: brightness(0.98);
}

.sell-btn:not(:disabled):hover {
  border-color: rgba(211, 82, 82, 0.5);
  background: linear-gradient(180deg, rgba(38, 21, 24, 0.66), rgba(20, 11, 14, 0.78));
  color: #edbdbd;
  box-shadow:
    inset 0 0 0 1px rgba(211, 82, 82, 0.2),
    inset 0 0 14px rgba(248, 113, 113, 0.07),
    0 0 16px rgba(248, 113, 113, 0.08);
  filter: none;
}

.sell-btn:disabled {
  border-color: rgba(120, 50, 55, 0.16);
  background: rgba(20, 10, 12, 0.36);
  color: rgba(216, 171, 171, 0.38);
  box-shadow: none;
}

.trade-btn:disabled::before {
  opacity: 0.22;
}

.bottom-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin-top: 10px;
}

.bottom-card {
  grid-column: span 4;
  display: flex;
  height: 260px;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
}

.bottom-header {
  display: flex;
  height: 28px;
  align-items: flex-start;
  justify-content: space-between;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  font-size: 12px;
  font-weight: 500;
}

.bottom-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bottom-title svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-title:not(.decision-log-title) svg {
  color: var(--muted-gold);
}

.bottom-title.decision-log-title svg {
  color: #60a5fa;
}

.bottom-title.decision-log-title svg.decision-flow-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.bottom-title.decision-log-title svg.decision-flow-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.bottom-title.portfolio-structure-title svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}

.portfolio-rows {
  margin-top: 12px;
}

.portfolio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 5%, transparent);
  padding-bottom: 8px;
  margin-bottom: 8px;
  line-height: 1.1;
}

.portfolio-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portfolio-row-label {
  color: color-mix(in oklab, var(--muted-foreground) 80%, transparent);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portfolio-row-value {
  color: color-mix(in oklab, var(--foreground) 82%, transparent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.allocation-module {
  margin-top: auto;
  padding-top: 12px;
}

.allocation-module-title {
  color: color-mix(in oklab, var(--muted-foreground) 78%, transparent);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  line-height: 1;
}

.allocation-bar {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.045);
  margin-top: 8px;
}

.allocation-mini-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 8px;
  color: color-mix(in oklab, var(--muted-foreground) 82%, transparent);
  font-size: 8.8px;
  line-height: 1;
}

.allocation-mini-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.allocation-mini-legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  border-radius: 1px;
}

.decision-list {
  min-height: 0;
  flex: 1;
  margin: 8px 0 0;
  padding: 0 1px 0 0;
  list-style: none;
  overflow-y: hidden;
  scrollbar-color: rgba(148, 163, 184, 0.22) transparent;
  scrollbar-width: thin;
}

.decision-list.is-scrollable {
  max-height: 190px;
  overflow-y: auto;
}

.decision-list::-webkit-scrollbar {
  width: 4px;
}

.decision-list::-webkit-scrollbar-track {
  background: transparent;
}

.decision-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.decision-list::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.3);
}

.decision-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 6%, transparent);
  padding: 0 0 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.decision-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.decision-time {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.decision-side {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: 500;
}

.decision-side.buy {
  background: rgba(52, 211, 153, 0.12);
  color: #86efac;
}

.decision-side.sell {
  background: var(--sell-bg);
  color: var(--sell-fg);
}

.decision-side.trace {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(203, 213, 225, 0.78);
}

.decision-symbol {
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
}

.decision-right {
  text-align: right;
  line-height: 1.15;
}

.decision-amount {
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.decision-detail {
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 10px;
}

.trace-time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.trace-time-main {
  color: #c0d4e8;
  font-size: 11.5px;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.trace-time-main.is-final-seconds {
  color: rgba(255, 231, 180, 0.96);
  text-shadow: 0 0 14px rgba(216, 137, 69, 0.24);
}

.trace-time-sub {
  color: #a7b6c7;
  font-size: 10.5px;
}

.trace-ring-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.trace-ring {
  display: block;
  width: 156px;
  height: 156px;
  overflow: visible;
  filter: drop-shadow(0 0 12px var(--trace-glow, rgba(125, 211, 252, 0.06)));
}

.trace-monitor {
  --trace-base: #6b7280;
  --trace-accent: #7dd3fc;
  --trace-glow: rgba(125, 211, 252, 0.08);
}

.trace-monitor--stage-1 {
  --trace-base: #6b7280;
  --trace-accent: #7dd3fc;
  --trace-glow: rgba(125, 211, 252, 0.08);
}

.trace-monitor--stage-2 {
  --trace-base: #6b7280;
  --trace-accent: #63d8ff;
  --trace-glow: rgba(56, 189, 248, 0.11);
}

.trace-monitor--stage-3 {
  --trace-base: #68727d;
  --trace-accent: #58bddf;
  --trace-glow: rgba(56, 189, 248, 0.09);
}

.trace-monitor--stage-4 {
  --trace-base: #6f7170;
  --trace-accent: #d8a24a;
  --trace-glow: rgba(216, 137, 69, 0.12);
}

.trace-monitor--stage-5 {
  --trace-base: #777064;
  --trace-accent: #e4b45c;
  --trace-glow: rgba(216, 137, 69, 0.17);
}

.trace-dot-base {
  fill: var(--trace-base);
  transition: fill 600ms ease;
}

.trace-dot-accent {
  fill: var(--trace-accent);
  transition: fill 600ms ease;
}

.trace-monitor.is-final-seconds {
  --trace-base: #e4b45c;
  --trace-accent: #f0c76c;
  --trace-glow: rgba(216, 137, 69, 0.24);
}

.bottom-title .microchip-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  overflow: visible;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 2px 20px 0;
}

.footer-note {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

.trace-engine-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(110, 169, 212, 0.34);
  border-radius: 7px;
  background: rgba(8, 18, 28, 0.44);
  box-shadow: none;
  padding: 5px 11px;
  color: rgba(123, 209, 255, 0.74);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.trace-engine-btn:hover {
  border-color: rgba(110, 169, 212, 0.46);
  background: rgba(11, 24, 36, 0.54);
  color: rgba(147, 220, 255, 0.84);
}

/* UI Lab header/footer repair: isolate new Simulation chrome from legacy placeholder rules. */
.simulation-page .top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
}

.simulation-page .recording {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: center;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  font-size: 12px;
  white-space: nowrap;
}

.simulation-page .recording-inner {
  position: relative;
  display: flex;
  width: auto;
  min-width: max-content;
  align-items: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}

.simulation-page .recording-inner span:not(.recording-dot):not(.recording-info-tip):not(.recording-info-wrap) {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.simulation-page .recording-info-wrap {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in oklab, var(--muted-foreground) 82%, transparent);
  outline: none;
}

.simulation-page .recording-info-wrap:hover,
.simulation-page .recording-info-wrap:focus-visible {
  color: color-mix(in oklab, var(--foreground) 86%, transparent);
}

.simulation-page .recording-info-tip {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  z-index: 25;
  width: max-content;
  max-width: 280px;
  transform: translateX(-50%);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 5px;
  background: rgba(3, 6, 12, 0.98);
  padding: 6px 9px;
  color: rgba(203, 213, 225, 0.82);
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.85);
  transition: opacity 110ms ease, transform 110ms ease;
}

.simulation-page .recording-info-wrap:hover .recording-info-tip,
.simulation-page .recording-info-wrap:focus-visible .recording-info-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(1px);
}

.simulation-page .recording-dot {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin: 0;
  border-radius: 999px;
  background: #ef4444;
}

.simulation-page .recording-inner svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.simulation-page .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 4px 20px 0;
}

.simulation-page .footer-note {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 11px;
  text-align: center;
}

.simulation-page .footer-note-copy {
  display: inline;
}

.simulation-page .footer-info-wrap {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
  color: color-mix(in oklab, var(--muted-foreground) 82%, transparent);
  outline: none;
}

.simulation-page .footer-info-wrap:hover,
.simulation-page .footer-info-wrap:focus-visible {
  color: color-mix(in oklab, var(--foreground) 86%, transparent);
}

.simulation-page .footer-info-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 25;
  width: max-content;
  max-width: 310px;
  transform: translateX(-50%) translateY(2px);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 5px;
  background: rgba(3, 6, 12, 0.98);
  padding: 6px 9px;
  color: rgba(203, 213, 225, 0.82);
  font-size: 9.5px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.85);
  transition: opacity 110ms ease, transform 110ms ease;
}

.simulation-page .footer-info-wrap:hover .footer-info-tip,
.simulation-page .footer-info-wrap:focus-visible .footer-info-tip {
  opacity: 1;
  transform: translateX(-50%);
}

.simulation-page .footer-info-wrap svg,
.simulation-page .trace-engine-btn svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.simulation-page .trace-engine-btn {
  min-height: 26px;
  margin: 0;
  padding: 5px 11px;
  font-family: var(--font-mono);
  line-height: 1;
}

.simulation-page .trace-engine-btn svg {
  stroke-width: 2.1;
}

/* UI Lab layout contamination repair: neutralize legacy placeholder rules. */
.simulation-page .brand-lockup .logo {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  object-fit: contain;
}

.simulation-page .brand-lockup .simulation-brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0;
  animation: none;
  transition: none;
}

.simulation-page .asset-card {
  height: auto;
  min-height: 368px;
}

.simulation-page .asset-card.order-active {
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.simulation-page .asset-card.asset-as1.order-active {
  border-color: rgba(52, 211, 153, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(52, 211, 153, 0.08),
    0 14px 34px -28px rgba(52, 211, 153, 0.34);
}

.simulation-page .asset-card.asset-as2.order-active {
  border-color: rgba(59, 156, 255, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(59, 156, 255, 0.08),
    0 14px 34px -28px rgba(59, 156, 255, 0.34);
}

.simulation-page .asset-card.asset-as3.order-active {
  border-color: rgba(176, 108, 255, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(176, 108, 255, 0.09),
    0 14px 34px -28px rgba(176, 108, 255, 0.36);
}

.simulation-page .asset-card .asset-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: inherit;
}

.simulation-page .asset-card .asset-icon svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simulation-page .chart-frame {
  display: block;
  width: 100%;
  height: 168px;
  min-height: 0;
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  place-items: normal;
}

.simulation-page .live-badge {
  left: 10px;
  right: auto;
  top: 8px;
  width: auto;
  padding: 2px 6px;
}

/* UI Lab trade ticket: scoped replacement for legacy order modal styles. */
.simulation-page .popover.floating-order-modal {
  position: fixed;
  right: auto;
  bottom: auto;
  z-index: 80;
  --ticket-tint: rgba(148, 163, 184, 0.075);
  width: 232px;
  box-sizing: border-box;
  overflow: hidden;
  transform: none;
  border: 1px solid rgba(190, 204, 224, 0.24);
  border-radius: 9px;
  background:
    radial-gradient(circle at 18% 0%, var(--ticket-tint), transparent 34%),
    linear-gradient(180deg, rgba(22, 29, 42, 0.985), rgba(11, 16, 26, 0.985) 48%, rgba(8, 12, 20, 0.99));
  padding: 0;
  box-shadow:
    0 24px 58px -18px rgba(0, 0, 0, 0.88),
    0 10px 24px -16px rgba(15, 23, 42, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.simulation-page .popover.floating-order-modal.asset-as1 {
  --ticket-tint: rgba(52, 211, 153, 0.09);
}

.simulation-page .popover.floating-order-modal.asset-as2 {
  --ticket-tint: rgba(96, 165, 250, 0.085);
}

.simulation-page .popover.floating-order-modal.asset-as3 {
  --ticket-tint: rgba(167, 139, 250, 0.062);
}

.simulation-page .popover.floating-order-modal[data-side="SELL"] {
  box-shadow:
    0 24px 58px -18px rgba(0, 0, 0, 0.88),
    0 10px 24px -16px rgba(15, 23, 42, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.simulation-page .trade-ticket-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.17);
  background:
    radial-gradient(circle at 18% 0%, var(--ticket-tint), transparent 72%),
    rgba(255, 255, 255, 0.018);
  padding: 9px 10px;
  line-height: 1.15;
}

.simulation-page .popover.floating-order-modal[data-side="SELL"] .trade-ticket-header {
  border-bottom-color: rgba(148, 163, 184, 0.17);
}

.simulation-page .ticket-asset-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.simulation-page .ticket-asset-icon svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simulation-page .ticket-title-block {
  flex: 1;
  min-width: 0;
  line-height: 1.15;
}

.simulation-page .ticket-title-block h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.15;
}

.simulation-page .ticket-title-block .muted {
  margin-top: 2px;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-page .trade-ticket-header .close-btn {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.54);
  transition: color 140ms ease, transform 90ms ease;
}

.simulation-page .trade-ticket-header .close-btn:hover {
  background: transparent;
  color: rgba(248, 250, 252, 0.88);
}

.simulation-page .trade-ticket-header .close-btn:active {
  transform: translateY(1px);
  color: #ffffff;
}

.simulation-page .trade-ticket-header .close-btn svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

.simulation-page .trade-ticket-body {
  padding: 11px 10px 12px;
}

.simulation-page .ticket-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.simulation-page .ticket-stat {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: rgba(4, 8, 15, 0.46);
  padding: 4px 8px;
}

.simulation-page .ticket-stat-label {
  color: var(--muted-foreground);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.simulation-page .ticket-stat-value {
  margin-top: 2px;
  overflow: hidden;
  color: color-mix(in oklab, var(--foreground) 90%, transparent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.simulation-page .ticket-stat-unit {
  margin-left: 4px;
  color: var(--muted-foreground);
  font-size: 8.5px;
}

.simulation-page .amount-label {
  display: block;
  margin-top: 12px;
  color: var(--muted-foreground);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulation-page .amount-input {
  width: 100%;
  margin-top: 3px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 8px;
  color: #e8d8b0;
  caret-color: #c9a456;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  outline: none;
}

.simulation-page .amount-input:focus,
.simulation-page .amount-input.has-value {
  border-color: rgba(168, 133, 58, 0.75);
  box-shadow: 0 0 0 1px rgba(168, 133, 58, 0.08);
}

.simulation-page .amount-input::-webkit-outer-spin-button,
.simulation-page .amount-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.simulation-page .amount-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.simulation-page .preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.simulation-page .preset-btn {
  min-height: 29px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 5px 0;
  color: color-mix(in oklab, var(--foreground) 78%, transparent);
  font-size: 10.9px;
  line-height: 1.25;
  text-transform: uppercase;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.simulation-page .preset-btn:not(:disabled):hover {
  transform: scale(1.015);
  background: rgba(255, 255, 255, 0.055);
}

.simulation-page .preset-btn.active {
  border-color: rgba(168, 133, 58, 0.56);
  background: rgba(168, 133, 58, 0.085);
  color: rgba(232, 216, 176, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(168, 133, 58, 0.045),
    inset 0 0 10px rgba(168, 133, 58, 0.032);
}

.simulation-page .preset-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.simulation-page .ticket-est {
  margin-top: 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: rgba(4, 8, 15, 0.42);
  padding: 6px 8px;
  font-size: 10px;
}

.simulation-page .ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  line-height: 1.5;
}

.simulation-page .ticket-row:first-child {
  margin-top: 0;
}

.simulation-page .ticket-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.simulation-page .ticket-cancel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 5px;
  background: rgba(8, 12, 20, 0.42);
  padding: 6px 0;
  color: rgba(203, 213, 225, 0.66);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-transform: uppercase;
  transition: transform 90ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.simulation-page .ticket-cancel:hover {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 20, 31, 0.58);
  color: rgba(226, 232, 240, 0.82);
}

.simulation-page .ticket-cancel:active {
  transform: translateY(1px);
}

.simulation-page .ticket-confirm {
  border: 0;
  border-radius: 5px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.045em;
  line-height: 1.5;
  text-transform: uppercase;
  transition: transform 90ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease, opacity 150ms ease;
}

.simulation-page .ticket-confirm.confirm-buy {
  background: rgba(52, 211, 153, 0.18);
  color: rgba(155, 240, 200, 0.86);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.38);
}

.simulation-page .ticket-confirm.confirm-buy:not(:disabled):hover {
  background: rgba(52, 211, 153, 0.24);
  color: rgba(193, 247, 219, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(52, 211, 153, 0.58),
    inset 0 0 14px rgba(52, 211, 153, 0.06),
    0 0 14px rgba(52, 211, 153, 0.08);
}

.simulation-page .ticket-confirm.confirm-sell {
  background: rgba(120, 30, 30, 0.5);
  color: rgba(233, 179, 179, 0.86);
  box-shadow: inset 0 0 0 1px rgba(154, 52, 52, 0.58);
}

.simulation-page .ticket-confirm.confirm-sell:not(:disabled):hover {
  background: rgba(136, 38, 38, 0.62);
  color: rgba(241, 202, 202, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(190, 68, 68, 0.68),
    inset 0 0 14px rgba(248, 113, 113, 0.06),
    0 0 14px rgba(248, 113, 113, 0.08);
}

.simulation-page .ticket-confirm:not(:disabled):active {
  transform: translateY(1px);
}

.simulation-page .ticket-confirm:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.simulation-page .close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  padding: 2px;
  color: var(--muted-foreground);
}

.simulation-page .close-btn svg {
  width: 12px;
  height: 12px;
}

.simulation-page .close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--foreground);
}

.simulation-page .trade-ticket-header .close-btn,
.simulation-page .trade-ticket-header .close-btn:hover {
  background: transparent;
}

.simulation-page .trade-ticket-header .close-btn {
  color: rgba(226, 232, 240, 0.54);
}

.simulation-page .trade-ticket-header .close-btn:hover {
  color: rgba(248, 250, 252, 0.88);
}

.simulation-page .trade-ticket-header .close-btn:active {
  color: #ffffff;
}

.simulation-page .trade-ticket-header .close-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s2-relic-page {
  --s2-black: #000;
  --s2-panel: #05090d;
  --s2-gold: #d8b76c;
  --s2-gold-dim: #7d6842;
  --s2-text: #f4f7fb;
  --s2-text-dim: #9ca8b7;
  --s2-blue: #64e6ff;
  --s2-red: #ff4a66;
  --rank-s: #d88945;
  --rank-a: #d6a946;
  --rank-b: #4693bd;
  --rank-c: #0fa48b;
  --rank-d: #a5ccd9;
  --s2-mono: "SF Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --s2-body: "Inter", "Avenir Next", "Helvetica Neue", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --s2-bloodline-emblem-size: 132px;
  min-height: 100vh;
  min-width: 1100px;
  padding: 44px 16px 36px;
  background: #000;
  color: var(--s2-text);
  font-family: var(--s2-body);
  font-feature-settings: "ss01" 1, "zero" 1;
}

.s2-relic-frame-wrap {
  position: relative;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.s2-relic-backlight {
  display: none;
}

.s2-relic-rim-glow {
  display: none;
}

.s2-relic-frame {
  position: relative;
  border-radius: 10px;
  padding: 6px;
  background:
    linear-gradient(180deg, transparent 0%, transparent 62%, rgba(25, 29, 36, 0.24) 100%),
    linear-gradient(
      100deg,
      rgba(100, 230, 255, 0.68) 0%,
      rgba(72, 116, 142, 0.38) 18%,
      rgba(28, 38, 50, 0.70) 42%,
      rgba(42, 37, 45, 0.72) 59%,
      rgba(92, 35, 47, 0.50) 78%,
      rgba(150, 34, 48, 0.68) 100%
    ),
    radial-gradient(ellipse at 100% 0%, rgba(150, 34, 48, 0.34), transparent 34%),
    radial-gradient(ellipse at 0% 0%, rgba(100, 230, 255, 0.20), transparent 34%),
    #151b24;
  clip-path: polygon(24px 0, 19% 0, 21% 12px, 79% 12px, 81% 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px), 0 24px);
  box-shadow:
    0 58px 130px -46px rgba(0, 0, 0, 0.98),
    0 0 0 1px rgba(205, 214, 230, 0.035),
    0 16px 42px -28px rgba(128, 142, 166, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72);
}

.s2-relic-frame::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  clip-path: polygon(20px 0, 19% 0, 21% 10px, 79% 10px, 81% 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
  box-shadow:
    inset 0 0 0 1px rgba(220, 228, 240, 0.14),
    inset 0 0 0 2px rgba(0, 0, 0, 0.72),
    inset 0 0 0 3px rgba(90, 101, 120, 0.14),
    inset 0 0 18px rgba(155, 220, 255, 0.07);
  pointer-events: none;
}

.s2-relic-frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(170, 210, 238, 0.08);
  border-radius: 6px;
  clip-path: polygon(15px 0, 19% 0, 21% 8px, 79% 8px, 81% 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.s2-relic-inner-frame {
  position: relative;
  border-radius: 8px;
  padding: 3px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(8, 14, 22, 0.94)), rgba(0, 0, 0, 0.96);
}

.s2-relic-surface {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  clip-path: polygon(18px 0, 19% 0, 21% 9px, 79% 9px, 81% 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  padding: 40px 42px 46px;
  background:
    radial-gradient(ellipse at 50% 4%, rgba(100, 230, 255, 0.055), transparent 40%),
    radial-gradient(ellipse at 14% 52%, rgba(33, 68, 92, 0.035), transparent 42%),
    radial-gradient(ellipse at 86% 40%, rgba(255, 74, 102, 0.028), transparent 40%),
    linear-gradient(180deg, #05080c 0%, #030508 45%, #010203 100%);
  box-shadow:
    inset 0 0 0 1px rgba(100, 230, 255, 0.085),
    inset 0 0 96px rgba(0, 0, 0, 0.70),
    inset 0 0 180px rgba(0, 0, 0, 0.38);
}

.s2-relic-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 220, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 220, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px, 100% 5px;
  opacity: 0.42;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
  pointer-events: none;
}

.s2-relic-surface::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(100, 230, 255, 0.065);
  border-radius: 10px;
  pointer-events: none;
}

.s2-relic-header,
.s2-header-meta-row,
.s2-overview-grid,
.s2-relic-content-grid,
.s2-extension-panel {
  position: relative;
  z-index: 2;
}

.s2-relic-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.s2-title-plate {
  width: min(560px, 100%);
  min-height: 112px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 38%, rgba(100, 230, 255, 0.045), transparent 62%);
  clip-path: none;
  box-shadow: none;
}

.s2-title-plate::after {
  content: none;
}

.s2-title-stack {
  position: relative;
  z-index: 1;
  text-align: center;
  transform: translateY(-8px);
}

.s2-brand-logo {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 9px rgba(100, 230, 255, 0.16));
}

.s2-title-brand-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  width: 500px;
  margin: 0 auto 13px;
}

.s2-title-brand-line span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 255, 0.24));
}

.s2-title-brand-line span:last-child {
  background: linear-gradient(90deg, rgba(100, 230, 255, 0.24), transparent);
}

.s2-title-brand-line p {
  margin: 0;
  color: rgba(174, 213, 232, 0.82);
  font-family: var(--s2-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.62em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(0.31em);
}

.s2-title-stack h1 {
  margin: 0;
  color: rgba(248, 250, 252, 0.99);
  font-family: var(--s2-body);
  font-size: 33px;
  font-weight: 590;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transform: translateX(0.12em);
  background:
    linear-gradient(180deg, #ffffff 0%, #f0f7fc 38%, #aebfca 74%, #f7fbff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 5px rgba(100, 230, 255, 0.07),
    0 8px 20px rgba(0, 0, 0, 0.54);
}

.s2-title-stack h1::after {
  content: "";
  display: block;
  width: 118px;
  height: 1px;
  margin: 13px auto 0;
  transform: translateX(-0.12em);
  background:
    linear-gradient(90deg, transparent, rgba(100, 230, 255, 0.34) 18%, rgba(132, 28, 44, 0.58) 50%, rgba(100, 230, 255, 0.24) 82%, transparent);
  box-shadow: 0 0 7px rgba(132, 28, 44, 0.16);
}

.s2-header-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  width: calc(100% - 64px);
  margin: 2px auto 16px;
}

.s2-meta-block {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.s2-meta-right {
  justify-content: flex-end;
  text-align: right;
}

.s2-meta-block span,
.s2-section-label,
.s2-extension-header h2 {
  color: rgba(100, 230, 255, 0.68);
  font-family: var(--s2-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.s2-meta-block strong {
  color: rgba(226, 235, 244, 0.82);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.s2-tech-divider {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 26px;
  margin: 0 0 28px;
}

.s2-wing {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 255, 0.18) 22%, rgba(216, 183, 108, 0.72));
}

.s2-wing.right {
  background: linear-gradient(90deg, rgba(216, 183, 108, 0.72), rgba(100, 230, 255, 0.18) 78%, transparent);
}

.s2-core {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 76px;
  height: 12px;
}

.s2-core::before {
  content: none;
}

.s2-red-dot,
.s2-blue-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.s2-red-dot {
  background: var(--s2-red);
  box-shadow: 0 0 9px rgba(255, 74, 102, 0.55);
}

.s2-blue-dot {
  background: var(--s2-blue);
  box-shadow: 0 0 9px rgba(100, 230, 255, 0.45);
}

.s2-gold-bar {
  width: 34px;
  height: 2px;
  background: var(--s2-gold);
}

.s2-blue-hairline {
  display: none;
}

.s2-overview-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 42px;
}

.s2-radar-chart {
  display: block;
  width: min(386px, 100%);
  margin: 0 auto;
  overflow: visible;
  transform: translateX(18px);
}

.s2-radar-labels text {
  fill: rgba(218, 230, 240, 0.86);
  font-family: var(--s2-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  text-shadow: 0 0 13px rgba(100, 230, 255, 0.10);
}

.s2-radar-labels .grade {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.s2-radar-labels .grade-s,
.s2-signature-chips .rank-s {
  color: var(--rank-s);
  fill: var(--rank-s);
}

.s2-radar-labels .grade-a,
.s2-signature-chips .rank-a {
  color: var(--rank-a);
  fill: var(--rank-a);
}

.s2-radar-labels .grade-b,
.s2-signature-chips .rank-b {
  color: var(--rank-b);
  fill: var(--rank-b);
}

.s2-radar-labels .grade-c,
.s2-signature-chips .rank-c {
  color: var(--rank-c);
  fill: var(--rank-c);
}

.s2-radar-labels .grade-d,
.s2-signature-chips .rank-d {
  color: var(--rank-d);
  fill: var(--rank-d);
}

.s2-identity-panel {
  display: flex;
  flex-direction: column;
  gap: 17px;
  position: relative;
  width: min(500px, 100%);
  margin-left: 68px;
  padding: 8px 0 6px 12px;
}

.s2-identity-row span {
  display: block;
  margin-bottom: 7px;
  color: rgba(100, 230, 255, 0.70);
  font-family: var(--s2-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.s2-identity-row strong {
  display: block;
  color: rgba(223, 233, 243, 0.92);
  font-family: var(--s2-body);
  font-size: 17px;
  font-weight: 480;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  line-height: 1.08;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 8px rgba(100, 230, 255, 0.055),
    0 9px 22px rgba(0, 0, 0, 0.40);
}

.s2-identity-row:first-child strong {
  color: rgba(245, 249, 252, 0.98);
  font-size: 24px;
  font-weight: 460;
  letter-spacing: 0.18em;
  line-height: 1.06;
  background: none;
  -webkit-text-fill-color: rgba(238, 246, 252, 0.90);
  text-shadow: 0 0 7px rgba(100, 230, 255, 0.07), 0 8px 18px rgba(0, 0, 0, 0.36);
}

.s2-identity-row:first-child span {
  color: rgba(100, 230, 255, 0.74);
  font-size: 12px;
  letter-spacing: 0.25em;
}

.s2-identity-row:nth-of-type(3) strong {
  color: rgba(214, 225, 236, 0.82);
  font-size: 17px;
  letter-spacing: 0.14em;
}

.s2-identity-row .s2-mono-value {
  font-family: var(--s2-mono);
  font-size: 17px;
  font-weight: 520;
  letter-spacing: 0.24em;
  color: rgba(143, 232, 255, 0.94);
  text-shadow: 0 0 12px rgba(100, 230, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.34);
}

.s2-panel-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(100, 230, 255, 0.18), rgba(150, 170, 188, 0.055) 58%, transparent);
  margin: -2px 0;
}

.s2-signature-chips {
  display: flex;
  gap: 9px;
}

.s2-signature-chips b {
  display: grid;
  place-items: center;
  width: 44px;
  height: 34px;
  border: 1px solid rgba(100, 230, 255, 0.14);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(12, 20, 28, 0.82), rgba(4, 7, 11, 0.92)), rgba(5, 6, 8, 0.82);
  font-family: var(--s2-mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.035em;
  box-shadow: inset 0 1px 0 rgba(210, 244, 255, 0.045), 0 10px 22px -18px rgba(0, 0, 0, 0.9);
}

.s2-relic-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.s2-companion-card {
  position: relative;
  border-radius: 14px;
  padding: 1px;
  background:
    linear-gradient(#000, #000) padding-box,
    linear-gradient(
      132deg,
      rgba(255, 219, 126, 0.58) 0%,
      rgba(126, 96, 255, 0.34) 23%,
      rgba(82, 223, 255, 0.42) 48%,
      rgba(255, 66, 118, 0.46) 72%,
      rgba(216, 183, 108, 0.44) 100%
    ) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 18px 54px -42px rgba(0, 0, 0, 0.95),
    0 0 34px -24px rgba(82, 223, 255, 0.62),
    0 0 44px -32px rgba(255, 66, 118, 0.58),
    inset 0 0 0 1px rgba(255, 244, 210, 0.018);
  isolation: isolate;
}

.s2-companion-card::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(82, 223, 255, 0.16), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(255, 66, 118, 0.14), transparent 34%),
    radial-gradient(circle at 50% 98%, rgba(216, 183, 108, 0.10), transparent 42%);
  filter: blur(12px);
  opacity: 0.72;
  pointer-events: none;
  z-index: -1;
}

.s2-companion-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #000;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 246, 224, 0.018);
}

.s2-companion-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.s2-companion-head h2 {
  margin: 0;
  color: rgba(216, 183, 108, 0.94);
  font-family: var(--s2-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.s2-companion-head span {
  color: rgba(100, 230, 255, 0.76);
  font-family: var(--s2-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 11px rgba(82, 223, 255, 0.24);
}

.s2-dragon-art {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  border: 1px solid rgba(216, 183, 108, 0.035);
  border-radius: 4px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.008), inset 0 0 72px rgba(0, 0, 0, 0.88), 0 18px 40px -34px rgba(0, 0, 0, 0.92);
}

.s2-dragon-art::before,
.s2-bloodline-emblem::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.82;
  background:
    radial-gradient(circle at 50% 42%, rgba(82, 223, 255, 0.10), transparent 34%),
    linear-gradient(110deg, transparent 0%, rgba(216, 183, 108, 0.055) 42%, transparent 68%);
  transition: opacity 320ms ease;
  pointer-events: none;
}

.s2-dragon-art.is-image-loaded::before,
.s2-bloodline-emblem.is-image-loaded::before {
  opacity: 0;
}

.s2-dragon-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 52%;
  opacity: 0;
  filter: saturate(0.78) contrast(1.08) brightness(0.94);
  mask-image: radial-gradient(ellipse at 50% 48%, black 25%, rgba(0, 0, 0, 0.94) 45%, rgba(0, 0, 0, 0.58) 64%, rgba(0, 0, 0, 0.20) 78%, transparent 92%);
  transition: opacity 420ms ease;
}

.s2-dragon-art img.is-loaded {
  opacity: 1;
}

.s2-dragon-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, transparent 34%, rgba(0, 0, 0, 0.44) 62%, rgba(0, 0, 0, 0.92) 84%, #000 100%), linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.s2-companion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.s2-companion-footer span {
  color: rgba(230, 239, 247, 0.86);
  font-family: var(--s2-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.s2-color-dots {
  display: flex;
  gap: 5px;
}

.s2-color-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.s2-color-dots i:nth-child(1) { background: var(--rank-s); }
.s2-color-dots i:nth-child(2) { background: var(--rank-a); }
.s2-color-dots i:nth-child(3) { background: var(--rank-b); }
.s2-color-dots i:nth-child(4) { background: var(--rank-c); }
.s2-color-dots i:nth-child(5) { background: var(--rank-d); }

.s2-bloodline-panel {
  border: 1px solid rgba(216, 183, 108, 0.18);
  border-radius: 14px;
  padding: 28px 28px 14px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.016), inset 0 0 52px rgba(0, 0, 0, 0.68);
}

.s2-bloodline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 118px;
  padding-bottom: 10px;
}

.s2-bloodline-head + .s2-panel-rule {
  margin-top: 12px;
  margin-bottom: 10px;
}

.s2-bloodline-head h2 {
  margin: 22px 0 0;
  font-family: var(--s2-body);
  font-size: 25px;
  font-weight: 640;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff4d2 0%, #d8b76c 42%, #92784b 72%, #f4dfab 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 244, 210, 0.055)) drop-shadow(0 0 8px rgba(216, 183, 108, 0.10));
}

.s2-bloodline-emblem {
  position: relative;
  width: var(--s2-bloodline-emblem-size);
  height: var(--s2-bloodline-emblem-size);
  flex: 0 0 var(--s2-bloodline-emblem-size);
  display: grid;
  place-items: center;
  background: #000;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.78), 0 0 18px rgba(0, 0, 0, 0.50);
}

.s2-bloodline-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: saturate(0.82) brightness(0.96) drop-shadow(0 0 16px rgba(0, 0, 0, 0.7));
  transition: opacity 360ms ease;
}

.s2-bloodline-emblem img.is-loaded {
  opacity: 0.9;
}

.s2-copy-block {
  margin: 25px 0;
}

.s2-copy-block:last-child {
  margin-bottom: 0;
}

.s2-bloodline-panel .s2-section-label {
  display: block;
  font-size: 13px;
  letter-spacing: 0.28em;
  color: rgba(216, 183, 108, 0.86);
  font-family: var(--s2-mono);
  font-weight: 500;
  text-shadow: 0 0 8px rgba(216, 183, 108, 0.08);
}

.s2-copy-block .s2-section-label {
  margin-bottom: 14px;
}

.s2-copy-block p {
  margin: 0;
  color: rgba(232, 239, 247, 0.88);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.7;
}

.s2-dominant-force-title {
  font-weight: 700;
}

.s2-extension-copy {
  margin: 0;
  color: rgba(232, 239, 247, 0.88);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.035em;
  line-height: 1.7;
}

.s2-copy-block .s2-muted {
  color: rgba(232, 239, 247, 0.88);
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.7;
}

.s2-extension-panel {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 3px;
  clip-path: none;
  background: transparent;
  box-shadow: none;
}

.s2-extension-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "companion"
    "statusbox";
  align-items: start;
  row-gap: 12px;
}

.s2-extension-note-main {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.s2-extension-note h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(82, 223, 255, 0.76);
  font-family: var(--s2-mono);
  font-size: 9.4px;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1;
  text-transform: uppercase;
}

.s2-extension-note p {
  margin: 0;
  color: rgba(190, 194, 202, 0.54);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.42;
}

.s2-extension-companion-line {
  grid-area: companion;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 8px;
  justify-self: center;
  width: 100%;
  max-width: 980px;
  min-width: 0;
  margin: 0 auto;
  padding: 4px 18px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.s2-extension-companion-line span {
  min-width: 0;
}

.s2-extension-companion-icon {
  width: 21px;
  height: 21px;
  color: rgba(100, 230, 255, 0.68);
  display: inline-grid;
  place-items: center;
  margin-top: 0;
}

.s2-extension-companion-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s2-extension-companion-copy {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 0;
}

.s2-extension-companion-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(100, 230, 255, 0.68);
  font-family: var(--s2-mono);
  font-size: 9.6px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.1;
  text-transform: uppercase;
}

.s2-extension-companion-copy em {
  color: rgba(190, 194, 202, 0.62);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.025em;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.s2-status-dot {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(82, 223, 255, 0.78);
  box-shadow: 0 0 5px rgba(82, 223, 255, 0.32);
}

.s2-extension-status-box {
  grid-area: statusbox;
  display: grid;
  gap: 14px;
  padding: 15px 24px 16px;
  border: 1px solid rgba(82, 223, 255, 0.13);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(3, 5, 8, 0.92), rgba(1, 2, 4, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.018),
    inset 0 0 0 1px rgba(0, 0, 0, 0.72);
}

.s2-extension-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: center;
  column-gap: 34px;
  min-width: 0;
  padding-left: 0;
}

.s2-extension-mini-status {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  gap: 12px;
  color: rgba(171, 178, 190, 0.62);
  font-family: var(--s2-mono);
  line-height: 1.25;
}

.s2-extension-mini-icon {
  width: 24px;
  height: 24px;
  justify-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(82, 223, 255, 0.12);
  border-radius: 3px;
  background: rgba(5, 12, 18, 0.52);
}

.s2-extension-mini-icon svg {
  width: 14px;
  height: 14px;
  stroke: rgba(184, 206, 218, 0.66);
  fill: none;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s2-extension-mini-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  justify-items: start;
}

.s2-extension-mini-copy strong {
  color: rgba(219, 226, 235, 0.64);
  font-size: 8.3px;
  font-weight: 600;
  letter-spacing: 0.078em;
  line-height: 1.08;
  text-transform: uppercase;
  overflow-wrap: normal;
  max-width: none;
  white-space: nowrap;
}

.s2-extension-mini-copy em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(167, 177, 190, 0.64);
  font-size: 7.9px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.1;
}

.s2-extension-mini-copy em i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(82, 223, 255, 0.82);
  box-shadow: 0 0 5px rgba(82, 223, 255, 0.34);
}

.s2-bottom-actions {
  position: relative;
  width: min(1120px, 100%);
  margin: 32px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.s2-bottom-actions button {
  width: 256px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid rgba(151, 166, 182, 0.20);
  border-radius: 4px;
  color: rgba(178, 190, 202, 0.82);
  background: rgba(6, 12, 18, 0.56);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

.s2-bottom-actions button > span:first-child {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
}

.s2-bottom-actions button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.s2-bottom-actions button:hover {
  border-color: rgba(100, 230, 255, 0.46);
  color: var(--s2-text);
  background: rgba(12, 16, 18, 0.68);
}

.s2-bottom-actions .s2-trace-action {
  position: absolute;
  right: 46px;
  width: auto;
  min-height: 30px;
  gap: 7px;
  padding: 3px 4px;
  border-color: transparent;
  color: rgba(200, 205, 214, 0.68);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.s2-bottom-actions .s2-trace-action > span:first-child {
  width: 14px;
  height: 14px;
}

.s2-bottom-actions .s2-trace-action svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.s2-bottom-actions .s2-trace-action:hover {
  border-color: transparent;
  color: rgba(118, 222, 255, 0.86);
  background: transparent;
  text-shadow: 0 0 12px rgba(82, 223, 255, 0.30);
}

.s1-latent-page {
  padding-top: 58px;
}

.s1-latent-page .s2-relic-frame-wrap {
  width: min(980px, 100%);
}

.s1-latent-frame {
  background:
    linear-gradient(180deg, transparent 0%, transparent 64%, rgba(25, 29, 36, 0.20) 100%),
    linear-gradient(
      100deg,
      rgba(100, 230, 255, 0.52) 0%,
      rgba(72, 116, 142, 0.30) 20%,
      rgba(26, 36, 48, 0.68) 45%,
      rgba(48, 41, 50, 0.68) 62%,
      rgba(108, 41, 52, 0.38) 82%,
      rgba(150, 34, 48, 0.48) 100%
    ),
    radial-gradient(ellipse at 100% 0%, rgba(150, 34, 48, 0.22), transparent 34%),
    radial-gradient(ellipse at 0% 0%, rgba(100, 230, 255, 0.15), transparent 34%),
    #111821;
}

.s1-latent-surface {
  min-height: 700px;
  padding: 40px 42px 38px;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(100, 230, 255, 0.055), transparent 44%),
    radial-gradient(ellipse at 50% 58%, rgba(216, 183, 108, 0.035), transparent 42%),
    linear-gradient(180deg, #05080c 0%, #030508 48%, #010203 100%);
}

.s1-title-stack h1 {
  color: rgba(224, 235, 244, 0.96);
  font-size: 31px;
  font-weight: 520;
  letter-spacing: 0.28em;
  background:
    linear-gradient(180deg, #f8fbff 0%, #dceaf2 42%, #9fb4c2 80%, #eef7fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 5px rgba(100, 230, 255, 0.055),
    0 8px 20px rgba(0, 0, 0, 0.50);
}

.s1-title-stack h1::after {
  width: 96px;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 255, 0.26), rgba(216, 183, 108, 0.32), transparent);
  box-shadow: none;
}

.s1-tech-divider {
  margin-bottom: 34px;
}

.s1-latent-body {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 34px;
  padding: 6px 0 8px;
}

.s1-egg-stage {
  position: relative;
  width: 330px;
  height: 330px;
  display: grid;
  place-items: center;
}

.s1-egg-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(100, 230, 255, 0.14), transparent 45%),
    radial-gradient(circle at 50% 56%, rgba(216, 183, 108, 0.08), transparent 58%);
  filter: blur(18px);
}

.s1-egg-stage::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 1px;
  bottom: 38px;
  background: radial-gradient(ellipse, rgba(100, 230, 255, 0.18), transparent 70%);
}

.s1-egg {
  position: relative;
  width: 164px;
  height: 222px;
  border-radius: 50% 50% 45% 45% / 58% 58% 42% 42%;
  background:
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.20), transparent 15%),
    radial-gradient(circle at 48% 44%, rgba(100, 230, 255, 0.25), transparent 34%),
    linear-gradient(150deg, rgba(210, 229, 236, 0.24), rgba(28, 45, 58, 0.54) 34%, rgba(6, 11, 16, 0.94) 72%),
    #05080c;
  border: 1px solid rgba(155, 220, 238, 0.26);
  box-shadow:
    inset 12px 12px 28px rgba(255, 255, 255, 0.05),
    inset -18px -24px 38px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.85),
    0 26px 64px -36px rgba(100, 230, 255, 0.36);
  overflow: hidden;
}

.s1-egg::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  border: 1px solid rgba(216, 183, 108, 0.14);
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

.s1-egg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(100, 230, 255, 0.08) 49%, transparent 52%),
    repeating-linear-gradient(180deg, rgba(100, 230, 255, 0.035) 0 1px, transparent 1px 13px);
  opacity: 0.62;
  mask-image: radial-gradient(ellipse at 50% 45%, black 0 58%, transparent 78%);
}

.s1-egg-core {
  position: absolute;
  width: 66px;
  height: 66px;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 230, 255, 0.26), rgba(100, 230, 255, 0.06) 46%, transparent 68%);
  box-shadow: 0 0 24px rgba(100, 230, 255, 0.24);
}

.s1-egg-crack {
  position: absolute;
  z-index: 2;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(228, 246, 255, 0.78), rgba(100, 230, 255, 0.26), transparent);
  box-shadow: 0 0 10px rgba(100, 230, 255, 0.38);
  transform-origin: top center;
}

.s1-egg-crack.crack-a {
  height: 86px;
  left: 51%;
  top: 20%;
  transform: rotate(14deg);
}

.s1-egg-crack.crack-b {
  height: 62px;
  left: 43%;
  top: 38%;
  transform: rotate(-34deg);
}

.s1-egg-crack.crack-c {
  height: 48px;
  left: 58%;
  top: 43%;
  transform: rotate(46deg);
  opacity: 0.76;
}

.s1-egg-scan {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 35%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100, 230, 255, 0.72), transparent);
  box-shadow: 0 0 10px rgba(100, 230, 255, 0.36);
  opacity: 0.74;
}

.s1-camp-panel {
  width: min(640px, 100%);
  text-align: center;
  padding: 24px 34px 26px;
  border: 1px solid rgba(82, 223, 255, 0.13);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(3, 5, 8, 0.72), rgba(1, 2, 4, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 24px 58px -46px rgba(0, 0, 0, 0.95);
}

.s1-camp-panel .s2-section-label {
  display: block;
  margin-bottom: 15px;
}

.s1-camp-panel h2 {
  margin: 0 0 15px;
  color: rgba(232, 241, 248, 0.94);
  font-size: 22px;
  font-weight: 470;
  letter-spacing: 0.18em;
  line-height: 1.14;
  text-transform: uppercase;
}

.s1-camp-panel p {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(179, 188, 201, 0.76);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.65;
}

.s1-bottom-actions {
  width: min(980px, 100%);
  margin-top: 28px;
}

.s1-bottom-actions button:not(.s2-trace-action) {
  width: 256px;
}

.s1-bottom-actions .s2-trace-action {
  right: 18px;
}

.s1-latent-page .s1-latent-surface {
  min-height: 720px;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(100, 230, 255, 0.035), transparent 42%),
    linear-gradient(180deg, #05080c 0%, #020305 46%, #000 100%);
}

.s1-latent-page .s1-latent-body {
  gap: 18px;
  padding-top: 0;
}

.s1-latent-copy {
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: center;
}

.s1-latent-copy p {
  margin: 0;
  color: rgba(190, 200, 212, 0.76);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.035em;
  line-height: 1.62;
}

.s1-camp-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-top: 14px !important;
  font-family: var(--s2-mono);
  text-transform: uppercase;
}

.s1-camp-line span {
  color: rgba(100, 230, 255, 0.66);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
}

.s1-camp-line strong {
  color: rgba(225, 234, 243, 0.82);
  font-size: 12.65px;
  font-weight: 560;
  letter-spacing: 0.18em;
}

.s1-latent-page .s1-egg-stage {
  width: min(392px, 55vw);
  height: auto;
  margin: 0 auto;
  background: #000;
}

.s1-latent-page .s1-egg-stage::before,
.s1-latent-page .s1-egg-stage::after {
  content: none;
}

.s1-latent-page .s1-egg-stage img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
  mix-blend-mode: normal;
  filter: saturate(0.96) contrast(1.02);
  user-select: none;
}
