:root {
  --bg: #07080f;
  --panel: #12131c;
  --panel-2: #171a26;
  --panel-3: #0e111a;
  --line: #2a2d3a;
  --text: #f3f5fb;
  --muted: #9ca3af;
  --blue: #5b8cff;
  --blue-2: #2f5ed7;
  --green: #09c988;
  --red: #ff4769;
  --amber: #f0b84f;
  --cyan: #32b7ff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(92px + env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(31, 42, 66, 0.32) 0%, rgba(7, 8, 15, 0) 210px),
    var(--bg);
}

.topbar,
.brand-row,
.market-strip,
.tabs,
.bottom-nav,
.card-head,
.row-between,
.signal-row,
.notice-card {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.brand-row {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  background:
    radial-gradient(circle at 35% 25%, #8bb3ff 0 18%, transparent 19%),
    linear-gradient(135deg, #5b8cff, #293a99 58%, #0bbd8b);
  box-shadow: var(--shadow);
}

h1 {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

#helloLine {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: #1b2030;
  color: var(--text);
  font-weight: 800;
}

.market-strip {
  gap: 14px;
  margin: 10px 0 24px;
}

.market-card {
  flex: 1;
  min-height: 80px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, #191b25, #11131b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.market-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.market-value {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.market-value strong {
  font-size: 19px;
  line-height: 1;
}

.change-pill {
  min-width: 64px;
  padding: 7px 8px;
  border-radius: 9px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 71, 105, 0.14);
  color: var(--red);
}

.change-pill.positive {
  background: rgba(9, 201, 136, 0.14);
  color: var(--green);
}

.search-box {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 23px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #101119;
  margin-bottom: 26px;
}

.search-box span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 2px solid #747b8a;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.tabs {
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  min-width: max-content;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #11131c;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.tab.is-active {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.notice-card,
.section-card,
.signal-card,
.mini-card,
.ai-card,
.command-card,
.ai-hero {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #171a26, #11131b);
  border-radius: 8px;
}

.notice-card {
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.notice-badge {
  padding: 8px 12px;
  border-radius: 12px;
  color: #b8d4ff;
  background: rgba(91, 140, 255, 0.18);
  font-weight: 800;
  font-size: 13px;
}

.notice-card strong,
.notice-card span {
  display: block;
}

.notice-card span {
  color: var(--muted);
  margin-top: 3px;
}

.section-title {
  margin: 18px 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-card {
  min-height: 82px;
  padding: 14px 10px;
  text-align: center;
}

.mini-card strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 10px;
}

.mini-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.bad {
  color: var(--red);
}

.warn {
  color: var(--amber);
}

.section-card {
  padding: 16px;
  margin: 12px 0;
}

.card-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h2,
.signal-main h3 {
  margin: 0;
  letter-spacing: 0;
}

.card-head h2 {
  font-size: 16px;
}

.chart-box {
  width: 100%;
  min-height: 150px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  align-items: center;
}

.donut {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 25%, var(--red) 25% 100%);
  position: relative;
}

.donut::after {
  content: attr(data-total);
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-weight: 900;
}

.stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin: 8px 0;
  background: #11131b;
}

.stat-line strong {
  font-size: 20px;
}

.signal-list {
  display: grid;
  gap: 10px;
}

.signal-card {
  padding: 14px;
}

.signal-row {
  justify-content: space-between;
  gap: 12px;
}

.signal-main {
  min-width: 0;
}

.signal-main h3 {
  font-size: 17px;
}

.signal-main p {
  margin-top: 5px;
  font-size: 12px;
}

.grade {
  min-width: 42px;
  height: 34px;
  border: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue-2);
  font-weight: 900;
}

.symbol-open {
  cursor: pointer;
}

.signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag {
  padding: 6px 8px;
  border-radius: 10px;
  color: #cbd5e1;
  background: #1a1f2d;
  font-size: 12px;
  font-weight: 800;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.order-cell {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f121b;
}

.order-cell span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.order-cell strong {
  font-size: 14px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  height: calc(74px + env(safe-area-inset-bottom));
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(9, 10, 17, 0.94);
  backdrop-filter: blur(18px);
  justify-content: space-between;
  z-index: 10;
}

.bottom-item {
  width: 19%;
  height: 56px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #7f8492;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 800;
}

.bottom-item.is-active {
  color: #94b7ff;
  background: rgba(91, 140, 255, 0.14);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.empty {
  padding: 26px 16px;
  color: var(--muted);
  text-align: center;
}

.ai-hero {
  padding: 18px;
  margin: 4px 0 12px;
  background:
    radial-gradient(circle at 88% 16%, rgba(91, 140, 255, 0.25), transparent 30%),
    linear-gradient(180deg, #162033, #11131b);
}

.ai-hero span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.ai-hero h2 {
  margin: 8px 0;
  font-size: 21px;
}

.command-card {
  padding: 14px;
  margin: 12px 0;
}

.command-card label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.command-row {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 8px;
}

.command-row input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text);
  background: #0f121b;
  outline: 0;
}

.command-row button,
.quick-question {
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.quick-question {
  padding: 8px 10px;
  color: #cfe0ff;
  background: rgba(91, 140, 255, 0.18);
  font-size: 12px;
}

.ai-answer {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  color: var(--text);
  background: #0e111a;
}

.ai-card {
  padding: 14px;
}

.ai-card.good {
  border-color: rgba(9, 201, 136, 0.36);
}

.ai-card.warn {
  border-color: rgba(240, 184, 79, 0.42);
}

.ai-card.bad {
  border-color: rgba(255, 71, 105, 0.42);
}

.ai-head {
  display: grid;
  gap: 6px;
}

.ai-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.ai-head strong {
  font-size: 16px;
}

.ai-card p {
  margin-top: 10px;
}

.ai-card em {
  display: block;
  margin-top: 10px;
  color: #cfe0ff;
  font-style: normal;
  font-size: 13px;
}

.health-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.health-card {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f121b;
}

.health-card span,
.health-card em {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.health-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 18px;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.compact-row {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f121b;
}

.compact-row strong,
.compact-row span {
  display: block;
}

.compact-row span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.detail-reason {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #0f121b;
}

@media (max-width: 360px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .market-strip {
    gap: 8px;
  }

  .market-card {
    padding: 13px 12px;
  }

  .summary-grid,
  .order-grid,
  .health-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .chart-box {
    grid-template-columns: 1fr;
  }
}
