:root {
  color-scheme: dark;
  --bg: #101318;
  --panel: #171b22;
  --panel-2: #1e242d;
  --panel-3: #242b35;
  --text: #edf2f7;
  --muted: #97a4b5;
  --line: #2d3542;
  --accent: #7dd3fc;
  --accent-2: #65d6ad;
  --danger: #ff6b6b;
  --warning: #ffca5c;
  --good: #42d392;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.08), transparent 220px),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(125, 211, 252, 0.4);
  border-radius: 16px;
  background:
    radial-gradient(circle at 34% 28%, rgba(101, 214, 173, 0.28), transparent 34px),
    linear-gradient(145deg, rgba(125, 211, 252, 0.18), rgba(101, 214, 173, 0.08) 52%, rgba(12, 16, 22, 0.55));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  width: 44px;
  height: 44px;
  overflow: visible;
}

.brand-shield,
.brand-pulse,
.brand-monogram,
.brand-trend,
.brand-arrow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-shield {
  fill: rgba(15, 23, 33, 0.78);
  stroke: rgba(125, 211, 252, 0.46);
  stroke-width: 3;
}

.brand-pulse {
  stroke: rgba(148, 163, 184, 0.36);
  stroke-width: 3.6;
}

.brand-monogram {
  stroke: var(--text);
  stroke-width: 4.9;
}

.brand-trend {
  stroke: url(#trendforgeMarkStroke);
  stroke-width: 5.7;
  filter: drop-shadow(0 0 5px rgba(103, 232, 249, 0.32));
}

.brand-arrow {
  stroke: var(--accent);
  stroke-width: 4.3;
  filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.28));
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0;
}

.brand h1 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.brand h1 span {
  font-weight: 850;
}

.brand h1 em {
  color: var(--muted);
  font-size: clamp(0.92rem, 2vw, 1.08rem);
  font-style: normal;
  font-weight: 750;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill,
.icon-button,
.secondary-button,
select,
input[type="number"],
input[type="search"],
textarea,
.tab,
.paper-jump-tab {
  border: 1px solid var(--line);
  background: rgba(23, 27, 34, 0.92);
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.status-pill[data-state="online"] .dot {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(66, 211, 146, 0.14);
}

.status-pill[data-state="loading"] .dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 202, 92, 0.14);
}

.status-pill[data-state="error"] .dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover,
.secondary-button:hover,
.tab:hover,
.paper-jump-tab:hover,
.favorite-button:hover {
  border-color: rgba(240, 185, 11, 0.8);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

select,
input[type="number"],
input[type="search"],
textarea {
  min-height: 40px;
  border-radius: 10px;
  padding: 0 12px;
  outline: none;
}

textarea {
  min-height: 78px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  resize: vertical;
  line-height: 1.35;
}

select:focus,
input[type="number"]:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.16);
}

.workspace {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.control-panel,
.market-panel {
  border: 1px solid var(--line);
  background: rgba(23, 27, 34, 0.92);
  box-shadow: var(--shadow);
}

.control-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
}

.field,
.sort-control {
  display: grid;
  gap: 8px;
}

.field span,
.sort-control span,
.toggle-row {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.field b {
  color: var(--text);
  font-weight: 800;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.compact-toggle {
  min-height: 40px;
}

.alert-controls {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(101, 214, 173, 0.24);
  border-radius: 8px;
  background: rgba(101, 214, 173, 0.06);
}

.paper-controls {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(240, 185, 11, 0.26);
  border-radius: 8px;
  background: rgba(240, 185, 11, 0.06);
}

.paper-server-status {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 19, 24, 0.28);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.paper-server-status.ok {
  border-color: rgba(66, 211, 146, 0.38);
  background: rgba(66, 211, 146, 0.08);
  color: var(--good);
}

.paper-server-status.warn {
  border-color: rgba(255, 202, 92, 0.38);
  background: rgba(255, 202, 92, 0.08);
  color: var(--warning);
}

.paper-server-status.error {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.08);
  color: #ffb0b0;
}

.testnet-live-panel {
  display: grid;
  gap: 10px;
  max-height: 520px;
  min-height: 46px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(99, 179, 237, 0.26);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
  scrollbar-width: thin;
}

.testnet-live-head {
  display: grid;
  gap: 3px;
}

.testnet-live-head strong {
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.25;
}

.testnet-live-head span,
.testnet-live-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.testnet-live-metrics,
.testnet-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.testnet-live-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.testnet-live-metric span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.testnet-live-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.testnet-live-list {
  display: grid;
  gap: 8px;
}

.testnet-live-position {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 26, 36, 0.72);
}

.testnet-live-position.long {
  border-color: rgba(52, 211, 153, 0.22);
}

.testnet-live-position.short {
  border-color: rgba(251, 113, 133, 0.28);
}

.testnet-live-position-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.testnet-live-position-top strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.secondary-button {
  min-height: 38px;
  border-radius: 10px;
  color: var(--accent-2);
  cursor: pointer;
}

.source-note {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(240, 185, 11, 0.22);
  border-radius: 8px;
  background: rgba(240, 185, 11, 0.07);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.source-note strong {
  color: var(--accent);
}

.market-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(30, 36, 45, 0.72);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  white-space: nowrap;
  cursor: pointer;
}

.tab b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(101, 214, 173, 0.12);
  color: var(--accent-2);
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.paper-jump-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.paper-jump-tab b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(101, 214, 173, 0.12);
  color: var(--accent-2);
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.paper-jump-tab:focus-visible,
.paper-order-panel:focus-visible {
  outline: 2px solid rgba(240, 185, 11, 0.78);
  outline-offset: 2px;
}

.tab.active {
  border-color: rgba(240, 185, 11, 0.9);
  background: rgba(240, 185, 11, 0.14);
  color: var(--accent);
}

.tab.active b {
  background: rgba(240, 185, 11, 0.16);
  color: var(--accent);
}

.sort-control {
  grid-template-columns: auto minmax(142px, 1fr);
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.demo-notice {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 202, 92, 0.26);
  background: rgba(255, 202, 92, 0.1);
  color: var(--warning);
  font-size: 0.86rem;
  font-weight: 800;
}

.source-health {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.24);
  scrollbar-width: none;
}

.source-health::-webkit-scrollbar {
  display: none;
}

.source-chip {
  display: grid;
  grid-template-columns: auto minmax(94px, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 184px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 36, 45, 0.72);
}

.source-chip > span:not(.source-dot) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.source-chip strong,
.source-chip b {
  font-size: 0.88rem;
}

.source-chip span span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-chip b {
  color: var(--text);
  justify-self: end;
}

.source-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.source-chip.online .source-dot {
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(66, 211, 146, 0.14);
}

.source-chip.loading .source-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 202, 92, 0.14);
}

.source-chip.error .source-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}

.source-chip.disabled {
  opacity: 0.62;
}

.news-brief-panel {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.38);
}

.news-brief-panel[hidden] {
  display: none;
}

.news-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(139, 157, 183, 0.16);
}

.news-brief-head div {
  display: grid;
  gap: 3px;
}

.news-brief-head strong {
  font-size: 1rem;
}

.news-brief-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

.news-brief-head b {
  min-width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
}

.news-brief-list {
  display: grid;
  gap: 0;
  min-width: 0;
  padding-left: 30px;
}

.news-brief-card {
  --news-dot: var(--accent);
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 0 0 22px;
  border: 0;
  background: transparent;
}

.news-brief-card::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -26px;
  width: 11px;
  height: 11px;
  border: 3px solid rgba(16, 19, 24, 0.96);
  border-radius: 999px;
  background: var(--news-dot);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--news-dot) 16%, transparent);
}

.news-brief-card::after {
  content: "";
  position: absolute;
  top: 23px;
  bottom: 0;
  left: -21px;
  border-left: 1px dashed rgba(139, 157, 183, 0.34);
}

.news-brief-card:last-child::after {
  display: none;
}

.news-brief-date {
  margin: 8px 0 14px -30px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0;
}

.news-brief-card[data-tone="listing"] {
  --news-dot: var(--accent);
}

.news-brief-card[data-tone="korea"] {
  --news-dot: var(--accent-2);
}

.news-brief-card[data-tone="macro"] {
  --news-dot: #b7c8ff;
}

.news-brief-card[data-tone="risk"] {
  --news-dot: var(--danger);
}

.news-brief-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.news-brief-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.news-brief-source span:first-child {
  color: var(--accent);
  font-weight: 850;
}

.news-brief-source span:last-child {
  color: #8aa8d4;
}

.news-brief-card > strong {
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.32;
}

.news-brief-card p {
  margin: 0;
  color: #c9d3e2;
  font-size: 0.86rem;
  line-height: 1.55;
}

.news-brief-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.news-brief-symbols:empty {
  display: none;
}

.news-brief-symbols span {
  padding: 3px 7px;
  border: 1px solid rgba(101, 214, 173, 0.34);
  border-radius: 999px;
  background: rgba(101, 214, 173, 0.08);
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 850;
}

.news-ai-box {
  display: grid;
  gap: 5px;
  padding: 0 0 0 10px;
  border-left: 2px solid rgba(183, 200, 255, 0.35);
  background: transparent;
}

.news-ai-box b {
  color: #b7c8ff;
  font-size: 0.78rem;
}

.news-ai-box span {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.55;
}

.news-brief-link {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.news-brief-link:hover {
  text-decoration: underline;
}

.summary-item {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 15px;
  border-right: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.35);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.summary-item strong {
  min-width: 0;
  overflow: hidden;
  font-size: 1.1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-strip {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.22);
}

.paper-panel {
  display: grid;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 19, 24, 0.3);
}

.paper-head,
.paper-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.paper-head > div {
  display: grid;
  gap: 4px;
}

.paper-list-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.paper-head strong {
  color: var(--accent);
  font-size: 0.95rem;
}

.paper-list-title strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.2;
}

.paper-list-title small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.paper-head span,
.paper-list-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.paper-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.paper-metrics > div {
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 36, 45, 0.68);
}

.paper-metrics span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.paper-metrics strong {
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paper-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.paper-lists-single {
  grid-template-columns: minmax(0, 1fr);
}

.paper-order-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 19, 24, 0.24);
}

.paper-order-panel-page {
  min-height: 430px;
}

.paper-order-panel-pulse {
  animation: paper-panel-pulse 1.1s ease-out;
}

@keyframes paper-panel-pulse {
  0% {
    border-color: rgba(240, 185, 11, 0.95);
    box-shadow: 0 0 0 0 rgba(240, 185, 11, 0.3);
  }

  100% {
    border-color: var(--line);
    box-shadow: 0 0 0 14px rgba(240, 185, 11, 0);
  }
}

.paper-list {
  display: grid;
  align-content: start;
  gap: 10px;
  grid-auto-rows: max-content;
  max-height: 540px;
  min-height: 92px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
  scrollbar-width: thin;
}

.paper-order-panel-page .paper-list {
  max-height: none;
  min-height: 340px;
}

.paper-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

.paper-position {
  display: grid;
  align-content: start;
  align-self: start;
  gap: 11px;
  min-width: 0;
  min-height: 0;
  max-width: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 36, 45, 0.72);
}

.paper-position.long {
  border-color: rgba(52, 211, 153, 0.22);
}

.paper-position.short {
  border-color: rgba(251, 113, 133, 0.26);
}

.paper-position.triggered {
  border-color: rgba(251, 113, 133, 0.72);
  background: rgba(127, 29, 29, 0.2);
}

.paper-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.paper-order-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.paper-side-badge {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  color: #06130e;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.paper-position.long .paper-side-badge {
  background: var(--good);
}

.paper-position.short .paper-side-badge {
  background: var(--danger);
  color: #fff7f7;
}

.paper-order-symbol {
  min-width: 0;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.paper-order-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.paper-order-tag {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.paper-order-state {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.paper-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px 14px;
}

.paper-order-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.paper-order-metric:nth-child(3n) {
  text-align: right;
}

.paper-order-metric span,
.paper-order-time span {
  width: max-content;
  max-width: 100%;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.32);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.paper-order-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.paper-order-times {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 14px;
}

.paper-order-time {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.paper-order-time strong {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.paper-order-note {
  padding-top: 9px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.paper-position .positive,
.paper-metrics .positive {
  color: var(--good);
}

.paper-position .negative,
.paper-metrics .negative {
  color: var(--danger);
}

.alert-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.alert-strip-head strong {
  color: var(--accent-2);
  font-size: 0.9rem;
}

.alert-strip-head span,
.feed-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.alert-feed {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.alert-feed::-webkit-scrollbar {
  display: none;
}

.alert-card {
  display: grid;
  gap: 5px;
  min-width: 178px;
  padding: 10px;
  border: 1px solid rgba(101, 214, 173, 0.28);
  border-radius: 8px;
  background: rgba(101, 214, 173, 0.08);
}

.alert-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.alert-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-card b {
  color: var(--accent-2);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1840px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid rgba(45, 53, 66, 0.82);
  text-align: right;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #151a21;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

th:nth-child(1),
td:nth-child(1),
th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3),
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7),
th:nth-child(14),
td:nth-child(14),
th:nth-child(15),
td:nth-child(15) {
  text-align: left;
}

tbody tr {
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

tbody tr:hover {
  background: rgba(240, 185, 11, 0.06);
}

tbody tr.is-hot {
  background: rgba(255, 202, 92, 0.035);
}

.pin-col,
.pin-cell {
  width: 48px;
}

.favorite-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.actions-cell {
  width: 198px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.trade-link,
.paper-trade-button,
.copy-symbol-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 36, 45, 0.82);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.trade-link {
  border-color: rgba(240, 185, 11, 0.4);
  color: var(--accent);
}

.paper-trade-button {
  border-color: rgba(101, 214, 173, 0.36);
  color: var(--accent-2);
}

.paper-trade-button.close {
  border-color: rgba(255, 107, 107, 0.42);
  color: #ffb0b0;
}

.paper-trade-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.trade-link:hover,
.paper-trade-button:hover,
.copy-symbol-button:hover {
  border-color: rgba(240, 185, 11, 0.82);
}

.copy-symbol-button.copied {
  border-color: rgba(66, 211, 146, 0.5);
  color: var(--good);
}

.copy-symbol-button.copy-failed {
  border-color: rgba(255, 107, 107, 0.5);
  color: var(--danger);
}

.sector-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.sector-pill.is-ai {
  border-color: rgba(101, 214, 173, 0.44);
  background: rgba(101, 214, 173, 0.11);
  color: var(--accent-2);
}

.sector-pill[data-sector="MEME"] {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.1);
  color: #ff9b9b;
}

.sector-pill[data-sector="LAYER1"],
.sector-pill[data-sector="LAYER2"] {
  border-color: rgba(111, 158, 255, 0.4);
  background: rgba(111, 158, 255, 0.1);
  color: #9fbaff;
}

.sector-pill[data-sector="DEFI"] {
  border-color: rgba(240, 185, 11, 0.42);
  background: rgba(240, 185, 11, 0.1);
  color: #f5cf62;
}

.sector-pill[data-sector="GAME"],
.sector-pill[data-sector="NFT_SOCIAL"] {
  border-color: rgba(202, 134, 255, 0.42);
  background: rgba(202, 134, 255, 0.11);
  color: #d9adff;
}

.sector-pill[data-sector="DEPIN"],
.sector-pill[data-sector="ORACLE"] {
  border-color: rgba(77, 210, 199, 0.4);
  background: rgba(77, 210, 199, 0.1);
  color: #8be3dc;
}

.sector-pill[data-sector="RWA"],
.sector-pill[data-sector="EXCHANGE"] {
  border-color: rgba(255, 168, 99, 0.42);
  background: rgba(255, 168, 99, 0.1);
  color: #ffc18f;
}

.sector-pill[data-sector="INSCRIPTION"],
.sector-pill[data-sector="PRIVACY"] {
  border-color: rgba(169, 181, 199, 0.4);
  background: rgba(169, 181, 199, 0.1);
  color: #c8d1df;
}

.symbol-cell,
.score-cell,
.news-cell,
.setup-cell {
  display: grid;
  gap: 4px;
}

.symbol-cell strong {
  font-size: 0.96rem;
}

.symbol-cell span,
.news-cell span,
.score-meter {
  color: var(--muted);
  font-size: 0.75rem;
}

.news-cell {
  min-width: 120px;
}

.news-cell strong {
  width: max-content;
  max-width: 128px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.news-cell[data-tone="listing"] strong {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(125, 211, 252, 0.1);
  color: var(--accent);
}

.news-cell[data-tone="korea"] strong {
  border-color: rgba(101, 214, 173, 0.5);
  background: rgba(101, 214, 173, 0.12);
  color: var(--accent-2);
}

.news-cell[data-tone="macro"] strong {
  border-color: rgba(183, 200, 255, 0.46);
  background: rgba(183, 200, 255, 0.11);
  color: #c3d0ff;
}

.news-cell[data-tone="risk"] strong {
  border-color: rgba(255, 107, 107, 0.52);
  background: rgba(255, 107, 107, 0.12);
  color: #ff9b9b;
}

.news-cell span {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-cell strong {
  font-size: 1rem;
}

.setup-cell strong {
  color: var(--accent-2);
  font-size: 1rem;
}

.trade-plan-cell {
  display: grid;
  gap: 4px;
  min-width: 180px;
  max-width: 220px;
}

.trade-plan-cell strong {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-plan-cell span {
  max-width: 210px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.trade-plan-cell.soft-buy strong {
  border-color: rgba(101, 214, 173, 0.36);
  background: rgba(101, 214, 173, 0.08);
  color: var(--accent-2);
}

.trade-plan-cell.buy strong {
  border-color: rgba(66, 211, 146, 0.48);
  background: rgba(66, 211, 146, 0.12);
  color: var(--good);
}

.trade-plan-cell.strong-buy strong {
  border-color: rgba(255, 202, 92, 0.58);
  background: rgba(255, 202, 92, 0.14);
  color: var(--warning);
}

.trade-plan-cell.sell strong {
  border-color: rgba(255, 107, 107, 0.52);
  background: rgba(255, 107, 107, 0.12);
  color: var(--danger);
}

.trade-plan-cell.strong-sell strong {
  border-color: rgba(255, 107, 107, 0.72);
  background: rgba(255, 107, 107, 0.2);
  color: #ffb0b0;
}

.signal-status-cell {
  color: var(--muted);
  font-weight: 800;
  min-width: 340px;
  width: 360px;
  white-space: normal;
}

.signal-status-wrap {
  display: grid;
  gap: 6px;
  min-width: 320px;
  max-width: 360px;
  justify-items: start;
}

.signal-status-wrap strong {
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.1;
}

.signal-status-wrap span {
  max-width: none;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.signal-status-detail,
.signal-status-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.signal-status-detail[hidden],
.signal-status-extra[hidden] {
  display: none;
}

.signal-part {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(169, 181, 199, 0.2);
  border-radius: 999px;
  background: rgba(169, 181, 199, 0.07);
  color: var(--muted);
  line-height: 1.2;
}

.signal-status-detail .signal-part:first-child,
.signal-status-extra .signal-part:first-child {
  border-color: rgba(101, 214, 173, 0.28);
  background: rgba(101, 214, 173, 0.09);
  color: #c7f6e2;
}

.signal-status-cell[data-tone="caution"] .signal-status-extra .signal-part:first-child {
  border-color: rgba(255, 202, 92, 0.34);
  background: rgba(255, 202, 92, 0.1);
  color: #f5cf62;
}

.signal-status-cell[data-tone="sell-good"] .signal-status-detail .signal-part:first-child,
.signal-status-cell[data-tone="sell-good"] .signal-status-extra .signal-part:first-child,
.signal-status-cell[data-tone="sell-risk"] .signal-status-detail .signal-part:first-child,
.signal-status-cell[data-tone="sell-risk"] .signal-status-extra .signal-part:first-child {
  border-color: rgba(255, 107, 107, 0.36);
  background: rgba(255, 107, 107, 0.12);
  color: #ffcece;
}

.signal-status-cell[data-tone="good"] {
  color: var(--good);
}

.signal-status-cell[data-tone="caution"] {
  color: var(--accent);
}

.signal-status-cell[data-tone="sell-good"],
.signal-status-cell[data-tone="sell-risk"] {
  color: #ffb0b0;
}

.setup-cell span {
  color: var(--muted);
  font-size: 0.75rem;
}

.setup-cell.is-alert strong,
.setup-cell.is-alert span {
  color: var(--warning);
}

.last-price {
  border-radius: 6px;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.last-price.price-up {
  color: var(--good);
  animation: price-flash-up 720ms ease;
}

.last-price.price-down {
  color: var(--danger);
  animation: price-flash-down 720ms ease;
}

@keyframes price-flash-up {
  0% {
    background: rgba(66, 211, 146, 0.2);
  }
  100% {
    background: transparent;
  }
}

@keyframes price-flash-down {
  0% {
    background: rgba(255, 107, 107, 0.2);
  }
  100% {
    background: transparent;
  }
}

.score-meter {
  display: block;
  width: 72px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-3);
}

.score-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), var(--danger));
}

.positive {
  color: var(--good);
}

.negative {
  color: var(--danger);
}

.signal {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 170px;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-overflow: ellipsis;
}

.signal.warning {
  border-color: rgba(255, 202, 92, 0.42);
  background: rgba(255, 202, 92, 0.1);
  color: var(--warning);
}

.signal.danger {
  border-color: rgba(255, 107, 107, 0.44);
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
}

.empty-state,
.loading-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 18px 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 1.05rem;
}

.empty-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 14px;
  border: 1px solid rgba(240, 185, 11, 0.78);
  border-radius: 10px;
  background: rgba(240, 185, 11, 0.14);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.empty-action:hover {
  background: rgba(240, 185, 11, 0.2);
}

#demoLink {
  display: none !important;
}

.loader {
  display: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

@media (max-width: 1020px) {
  .app-shell {
    width: min(100% - 22px, 980px);
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-controls {
    grid-column: 1 / -1;
  }

  .paper-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .source-note,
  .toggle-row {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 720px);
    padding-top: 14px;
  }

  .topbar,
  .panel-head,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .control-panel,
  .summary-grid,
  .paper-metrics,
  .paper-lists {
    grid-template-columns: 1fr;
  }

  .summary-item {
    min-height: 68px;
    border-right: 0;
  }

  .sort-control {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .paper-order-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-order-metric:nth-child(3n) {
    text-align: left;
  }

  .paper-order-metric:nth-child(2n) {
    text-align: right;
  }
}
