:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --bg: #eef3f8;
  --panel: rgba(255, 255, 255, 0.93);
  --text: #101827;
  --muted: #64748b;
  --line: #dbe5ee;
  --red: #e13d4f;
  --green: #0c9b6a;
  --blue: #2563eb;
  --cyan: #0891b2;
  --violet: #7c3aed;
  --amber: #b7791f;
  --shadow: 0 18px 42px rgba(17, 32, 51, 0.12);
  --shadow-soft: 0 8px 22px rgba(17, 32, 51, 0.08);
}

/* Review command refresh, compact mine page, and avatar sheet */
.refresh-icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: radial-gradient(circle at 30% 20%, #ffffff, #e8f2ff);
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  font-size: 19px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.refresh-icon-btn.loading span,
.refresh-overlay-icon.spinning { animation: refreshSpin 0.9s linear infinite; }

.refresh-icon-btn.done {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.36);
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
}

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

.updated-badge {
  display: none;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #047857;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.updated-badge.show {
  display: inline-flex;
  animation: softPulse 0.9s ease;
}

@keyframes softPulse {
  0% { transform: scale(0.9); opacity: 0.2; }
  100% { transform: scale(1); opacity: 1; }
}

.refresh-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(5px);
}

.refresh-overlay.hidden { display: none; }

.refresh-panel {
  width: min(360px, calc(100vw - 40px));
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(235,245,255,0.96));
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  display: grid;
  gap: 10px;
  text-align: center;
}

.refresh-overlay-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}

.refresh-panel b { color: #0f172a; font-size: 18px; }
.refresh-panel p,
.refresh-panel small,
.refresh-panel span { color: #64748b; }

.refresh-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.refresh-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #06b6d4, #22c55e);
  transition: width 0.28s ease;
}

.command-review { display: grid; gap: 14px; }

.review-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.review-scoreboard > div,
.review-command-core,
.review-battle-card,
.review-rank-grid > div,
.review-holding-plan,
.review-timeline,
.review-details {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(248,251,255,0.94));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.review-scoreboard > div {
  padding: 13px;
  display: grid;
  gap: 4px;
}

.review-scoreboard span,
.review-battle-card span,
.review-holding-row span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.review-scoreboard b { color: #0f172a; font-size: 24px; }

.review-command-core {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px;
  border-color: rgba(37, 99, 235, 0.22);
}

.review-command-core h3 {
  margin: 4px 0;
  color: #0f172a;
  font-size: 22px;
}

.review-command-core p,
.review-do-list span,
.review-holding-row p,
.review-timeline span,
.review-details p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.review-do-list {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.review-battle-grid,
.review-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-battle-card {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.review-battle-card.good { border-color: rgba(34, 197, 94, 0.32); }
.review-battle-card.warn { border-color: rgba(245, 158, 11, 0.32); }
.review-battle-card.bad { border-color: rgba(239, 68, 68, 0.32); }

.review-battle-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.review-battle-card strong { color: #0f172a; font-size: 17px; }
.review-battle-card p { margin: 0; color: #526176; line-height: 1.55; }

.review-card-metrics,
.review-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-card-metrics span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
}

.review-card-actions button {
  flex: 1;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: #fff;
  color: #1d4ed8;
  font-weight: 800;
}

.review-rank-grid > div,
.review-holding-plan,
.review-timeline,
.review-details { padding: 14px; }

.review-rank-grid h3,
.review-holding-plan h3,
.review-timeline h3 {
  margin: 0 0 10px;
  color: #0f172a;
}

.review-rank-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.review-rank-row:last-child { border-bottom: 0; }

.review-rank-row span {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
}

.review-rank-row em {
  color: #e11d48;
  font-style: normal;
  font-weight: 900;
}

.review-rank-row small {
  grid-column: 2 / 4;
  color: #64748b;
}

.review-holding-row {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f7;
}

.review-holding-row:last-child { border-bottom: 0; }

.review-holding-row > div {
  height: 8px;
  position: relative;
  border-radius: 999px;
  background: linear-gradient(90deg, #fee2e2, #fef3c7, #dcfce7);
}

.review-holding-row i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0f172a;
  transform: translate(-50%, -50%);
}

.review-timeline { display: grid; gap: 8px; }

.review-timeline > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: start;
}

.review-details summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 900;
}

#reviewSection .mobile-feedback-panel {
  display: none !important;
}

.my-page .my-header,
.my-page .membership-section-title,
.my-page .membership-card {
  display: none !important;
}

.user-avatar {
  position: relative;
  overflow: visible;
}

.avatar-face {
  font-size: 30px;
  line-height: 1;
}

.avatar-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.function-icon { min-width: 36px; }

.avatar-sheet {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end center;
  background: rgba(15, 23, 42, 0.28);
}

.avatar-sheet.hidden { display: none; }

.avatar-sheet-panel {
  width: min(520px, 100%);
  padding: 16px;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.2);
  max-height: min(78vh, 680px);
  overflow: auto;
}

.avatar-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.avatar-sheet-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.avatar-system-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.avatar-system-grid button {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(145deg, #fff, #edf6ff);
  font-size: 22px;
  font-weight: 900;
}

.avatar-system-grid button.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

@media (max-width: 640px) {
  .avatar-system-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .avatar-system-grid button {
    border-radius: 14px;
    font-size: 18px;
  }

  .review-scoreboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .review-scoreboard > div { padding: 10px; }
  .review-scoreboard b { font-size: 18px; }

  .review-command-core,
  .review-battle-grid,
  .review-rank-grid {
    grid-template-columns: 1fr;
  }

  .review-command-core { padding: 12px; }
  .review-command-core h3 { font-size: 20px; }
  .review-timeline > div { grid-template-columns: 92px 1fr; }

  .shortlist-actions {
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px;
  }

  .shortlist-actions span { max-width: 128px; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), transparent 32%),
    linear-gradient(225deg, rgba(225, 61, 79, 0.10), transparent 30%),
    linear-gradient(315deg, rgba(8, 145, 178, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
}

.action-toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  z-index: 1300;
  max-width: min(520px, calc(100vw - 28px));
  padding: 10px 14px;
  border: 1px solid rgba(29, 95, 209, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
}

.action-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.action-toast.success {
  background: rgba(11, 127, 89, 0.94);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.app-shell-header {
  position: sticky;
  top: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 28px;
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a, #17233a 58%, #0f1d32);
}

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

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.94), rgba(8, 145, 178, 0.9)),
    #1d4ed8;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.24);
}

.desktop-main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.desktop-main-nav button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #cbd5e1;
  box-shadow: none;
  font-size: 14px;
}

.desktop-main-nav button:hover,
.desktop-main-nav button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.desktop-main-nav button.active {
  box-shadow: inset 0 -2px 0 #38bdf8;
}

.header-actions {
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
}

.mobile-header-icon,
.mobile-title,
.mobile-status-line,
.mobile-market-tabs,
.mobile-drawer-mask,
.mobile-top-drawer {
  display: none;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 220px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbeafe;
  font-size: 13px;
}

.live-status-pill span {
  display: inline-block;
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-status-pill i {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.13);
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.header-tool-btn,
.user-pill {
  height: 36px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  color: #f8fafc;
  box-shadow: none;
}

.header-tool-btn {
  padding: 0 12px;
}

.header-tool-btn:hover,
.user-pill:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.header-user-menu {
  position: relative;
}

.user-pill {
  display: grid;
  min-width: 132px;
  height: 44px;
  grid-template-rows: 1fr 1fr;
  align-content: center;
  padding: 5px 12px;
  text-align: left;
}

.user-pill span,
.user-pill small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill small {
  color: #fbbf24;
  font-size: 11px;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  display: none;
  min-width: 168px;
  padding: 7px;
  border: 1px solid rgba(219, 229, 238, 0.96);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18);
}

.header-user-menu:hover .user-dropdown-menu,
.header-user-menu:focus-within .user-dropdown-menu {
  display: grid;
  gap: 4px;
}

.user-dropdown-menu button {
  width: 100%;
  justify-content: flex-start;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  box-shadow: none;
  text-align: left;
}

.user-dropdown-menu button:hover {
  background: #f1f5f9;
  box-shadow: none;
}

.quick-anchor-nav {
  position: sticky;
  top: 76px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(219, 229, 238, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(17, 32, 51, 0.08);
  overflow-x: auto;
}

.quick-anchor-nav span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.quick-anchor-nav button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 13px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  color: #31506f;
  box-shadow: none;
  font-size: 13px;
}

.quick-anchor-nav button:hover,
.quick-anchor-nav button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  font-weight: 780;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  font-weight: 780;
}

#subtitle {
  margin-top: 6px;
  color: #c8d7ea;
  font-size: 14px;
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

#accountState {
  color: #dbeafe;
  font-size: 13px;
}

button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
  color: #122033;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(17, 32, 51, 0.08);
  font-weight: 650;
}

button:hover {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 28px 92px;
}

.market-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid rgba(219, 229, 238, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.market-switch button {
  height: 38px;
  box-shadow: none;
}

.market-switch button.active {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  color: #fff;
}

.market-app {
  display: none;
}

.market-app.active {
  display: block;
}

.us-hero {
  background:
    linear-gradient(135deg, rgba(10, 22, 44, 0.98), rgba(30, 64, 175, 0.88)),
    #0f172a;
}

.us-hero b {
  color: #bfdbfe;
}

.us-layout,
.us-workbench,
.us-summary-grid {
  margin-bottom: 16px;
}

.us-market-pulse,
.us-shortlist-panel,
.us-review-panel {
  margin-bottom: 16px;
}

.index-panel {
  margin-bottom: 16px;
}

.market-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.market-index-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  min-height: 88px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.07), transparent 48%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.market-index-card b {
  display: block;
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-index-card span,
.market-index-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.market-index-card strong {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  font-size: 22px;
  letter-spacing: 0;
}

.market-index-card em {
  grid-column: 1;
  font-style: normal;
  font-size: 18px;
  font-weight: 850;
}

.market-index-card p {
  grid-column: 2;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
}

.market-index-card small {
  grid-column: 1 / -1;
}

.market-index-empty {
  grid-column: 1 / -1;
  padding: 14px;
  color: var(--muted);
}

.a-up,
.up {
  color: var(--red);
}

.a-down,
.down {
  color: var(--green);
}

.us-up {
  color: var(--green);
}

.us-down {
  color: var(--red);
}

.panel-hint {
  color: var(--muted);
  font-size: 13px;
}

.us-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 12px;
}

.us-pulse-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(140deg, #f8fbff, #ffffff);
}

.us-pulse-card span,
.us-pulse-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.us-pulse-card b {
  font-size: 19px;
}

.us-pulse-card strong {
  text-align: right;
  font-size: 15px;
}

.us-pulse-conclusion {
  margin: 0 16px 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  background: #f4f8ff;
  color: #334155;
  line-height: 1.6;
}

.us-pulse-conclusion span {
  float: right;
  color: var(--blue);
  font-weight: 800;
}

.us-shortlist-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 12px 16px;
}

.shortlist-card {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.shortlist-card.selected,
.watch-chip.selected,
tr.selected td {
  border-color: rgba(37, 99, 235, 0.5);
  background: #eff6ff;
}

.shortlist-card > span {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--red);
  background: #fff1f2;
  font-size: 12px;
  font-weight: 800;
}

.shortlist-card h3 {
  margin: 0;
  font-size: 18px;
}

.shortlist-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.shortlist-card > b {
  font-size: 13px;
}

.shortlist-card button {
  width: 100%;
  margin-top: 3px;
}

.us-battle-select {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) minmax(280px, 1.4fr);
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
}

.us-battle-select label,
.us-position-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.us-battle-select select,
.us-position-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cfe0f2;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.us-battle-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.us-battle-head span,
.us-battle-head p {
  color: var(--muted);
  line-height: 1.55;
}

.us-battle-head h3 {
  margin: 5px 0;
  font-size: 23px;
}

.us-battle-head > strong {
  align-self: center;
  font-size: 38px;
}

.us-factor-grid,
.us-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

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

.us-factor-grid div,
.us-plan-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.us-factor-grid span,
.us-plan-grid span,
.us-factor-grid small,
.us-plan-grid small {
  color: var(--muted);
  font-size: 12px;
}

.us-factor-grid b,
.us-plan-grid b {
  font-size: 20px;
}

.us-position-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 12px;
}

.us-position-summary {
  margin: 0 16px 16px;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #dce6f0;
  background: #f8fbff;
  color: #475569;
  line-height: 1.6;
}

.signal-panel tbody tr[data-us-symbol] {
  cursor: pointer;
}

.quote-session {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.app-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 82% 20%, rgba(56, 189, 248, 0.22), transparent 26%),
    linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.app-hero b {
  display: block;
  color: #bae6fd;
  margin-bottom: 6px;
}

.app-hero h2 {
  font-size: 24px;
  margin-bottom: 4px;
}

.app-hero p {
  color: #94a3b8;
  line-height: 1.55;
}

.app-hero button {
  min-width: 126px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.app-hero button:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.app-install-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.android-app-btn {
  border-color: rgba(125, 211, 252, 0.7) !important;
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  color: #fff !important;
}

.android-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.android-download-box div {
  display: grid;
  gap: 4px;
}

.android-download-box span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.android-download-box button {
  flex: 0 0 auto;
  height: 38px;
}

.download-modal-card {
  width: min(560px, calc(100vw - 24px));
  max-height: min(92vh, 760px);
  overflow: auto;
}

.download-center-panel {
  display: grid;
  gap: 14px;
}

.download-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 12px 0 4px;
  text-align: center;
}

.download-hero img {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  box-shadow: 0 16px 38px rgba(15, 35, 62, 0.24);
}

.download-hero div {
  display: grid;
  gap: 4px;
}

.download-hero b {
  color: var(--ink);
  font-size: 24px;
}

.download-hero span {
  color: #ef4444;
  font-weight: 800;
}

.version-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.version-compare div {
  display: grid;
  gap: 4px;
  text-align: center;
}

.version-compare span {
  color: var(--muted);
  font-size: 12px;
}

.version-compare b {
  color: var(--ink);
  font-size: 20px;
}

.version-compare div:last-child b {
  color: #ef4444;
}

.version-compare em {
  color: #94a3b8;
  font-size: 24px;
  font-style: normal;
}

.download-card {
  padding: 14px;
  border: 1px solid #d8e4f2;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 35, 62, 0.06);
}

.download-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 17px;
}

.download-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.download-card li {
  position: relative;
  padding-left: 16px;
  color: #334155;
  line-height: 1.55;
}

.download-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  box-shadow: none;
}

.download-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #31506f;
  font-size: 12px;
  font-weight: 800;
}

.download-primary {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.24);
}

.download-link-btn {
  border: 0;
  background: transparent;
  color: #64748b;
  font-weight: 800;
}

.risk-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(183, 121, 31, 0.24);
  border-radius: 8px;
  background: rgba(255, 251, 235, 0.92);
  color: #7a4b12;
  line-height: 1.55;
  box-shadow: var(--shadow-soft);
}

.risk-strip b {
  flex: 0 0 auto;
  color: #92400e;
}

.risk-strip span {
  font-size: 13px;
}

.rule-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.rule-strip div {
  position: relative;
  padding: 11px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.rule-strip div::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.rule-strip b {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.rule-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.rule-strip span {
  font-size: 18px;
  font-weight: 720;
}

.rule-input {
  width: 100%;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 20px;
  font-weight: 720;
  padding: 0 8px;
}

.rule-input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  outline: none;
  background: #fff;
}

.starter-panel {
  margin-bottom: 18px;
}

.starter-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.starter-chip,
.sector-card {
  display: grid;
  gap: 4px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.starter-chip {
  min-width: 180px;
  padding: 12px;
}

.sector-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed #cbd8e3;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
}

.sector-head {
  height: auto;
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  text-align: left;
  box-shadow: none;
  background:
    linear-gradient(135deg, rgba(225, 61, 79, 0.10), transparent 58%),
    linear-gradient(180deg, #ffffff, #f7fbff);
}

.sector-rank {
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(225, 61, 79, 0.10);
  color: #d72d42;
  font-size: 11px;
  font-weight: 760;
}

.sector-head b {
  font-size: 17px;
}

.sector-head strong {
  font-size: 20px;
  justify-self: end;
}

.sector-head small,
.sector-head em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.sector-head em {
  color: #354258;
  font-size: 12px;
}

.sector-stocks {
  display: none;
  border-top: 1px solid #e6edf5;
  background: rgba(248, 252, 255, 0.86);
}

.sector-stocks.show {
  display: grid;
}

.sector-stocks p {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sector-stock {
  display: grid;
  grid-template-columns: 1.2fr 72px 1.4fr 84px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #edf3f8;
}

.sector-stock b,
.sector-stock span {
  display: block;
}

.sector-stock span {
  color: var(--muted);
  font-size: 12px;
}

.sector-stock strong {
  font-size: 16px;
}

.starter-chip b {
  font-size: 15px;
}

.starter-chip span {
  color: var(--muted);
  font-size: 12px;
}

.consumer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.consumer-card {
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(219, 229, 238, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.92));
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.consumer-card::after {
  display: none;
}

.consumer-card.primary::after {
  background: radial-gradient(circle, rgba(225, 61, 79, 0.20), transparent 70%);
}

.consumer-card.accent::after {
  background: radial-gradient(circle, rgba(8, 145, 178, 0.20), transparent 70%);
}

.consumer-card b {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.consumer-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.consumer-card p {
  color: #354258;
  font-size: 13px;
  line-height: 1.55;
}

.command-panel {
  margin-bottom: 14px;
}

.command-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.command-item {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 13px 14px 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(219, 229, 238, 0.96);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-soft);
}

.command-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}

.command-item.opportunity::before {
  background: #f59e0b;
}

.command-item.risk::before {
  background: #e13d4f;
}

.command-item.action::before {
  background: #2563eb;
}

.command-item.account::before {
  background: #0c9b6a;
}

.command-item b {
  color: var(--muted);
  font-size: 12px;
}

.command-item strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.command-item p {
  color: #50637a;
  font-size: 13px;
  line-height: 1.55;
}

.push-panel {
  margin-bottom: 14px;
}

#pushState {
  color: var(--muted);
  font-size: 13px;
}

.push-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(135px, 0.55fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 10px 14px;
}

.push-sound-toggle {
  min-height: 42px;
  white-space: nowrap;
}

.push-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.signal-alert-bar {
  display: block;
  padding: 8px 14px;
  border-bottom: 1px solid #e5edf3;
  background: #f8fbff;
}

.signal-alert-bar summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}

.signal-alert-bar b,
.signal-alert-bar span {
  display: block;
}

.signal-alert-bar span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.signal-alert-bar select {
  min-height: 38px;
  max-width: 210px;
}

.signal-alert-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 10px;
}

.signal-type-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.signal-type-options .check {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #d7e4f2;
  border-radius: 6px;
  background: #fff;
}

.signal-type-summary b {
  font-size: 13px;
  color: var(--ink);
}

.signal-alert-bar .check span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.market-layout {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.workbench-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  align-items: start;
}

.workbench-main {
  display: grid;
  gap: 14px;
}

.review-layout {
  margin-top: 14px;
}

.diagnose-layout {
  margin-bottom: 18px;
}

.diagnose-box {
  padding: 16px;
}

.diagnose-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.diagnose-card {
  border: 1px solid #dce8f0;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-soft);
}

.diagnose-card.good {
  border-color: rgba(225, 61, 79, 0.45);
  background: linear-gradient(180deg, rgba(255, 247, 248, 0.98), rgba(255, 234, 238, 0.92));
  box-shadow: 0 14px 32px rgba(225, 61, 79, 0.12);
}

.diagnose-card.good strong {
  color: #d72d42;
}

.diagnose-card.bad {
  border-color: rgba(12, 155, 106, 0.45);
  background: linear-gradient(180deg, rgba(246, 255, 250, 0.98), rgba(225, 249, 239, 0.92));
  box-shadow: 0 14px 32px rgba(12, 155, 106, 0.12);
}

.diagnose-card.bad strong {
  color: #087a54;
}

.diagnose-card.neutral {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.diagnose-card b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.diagnose-card strong {
  display: block;
  font-size: 19px;
  margin-bottom: 6px;
}

.diagnose-card p {
  color: #354258;
  font-size: 13px;
  line-height: 1.45;
}

.capital-panel {
  padding: 12px 18px 0;
}

.capital-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.capital-head h3 {
  margin: 0;
  font-size: 18px;
}

.capital-head span {
  color: var(--muted);
  font-weight: 800;
}

.capital-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07111f;
  overflow-x: auto;
}

.capital-bar {
  flex: 1 0 9px;
  min-width: 9px;
  height: 32px;
  border-radius: 2px 2px 0 0;
  opacity: 0.95;
}

.capital-bar.blue,
.capital-legend i.blue {
  background: #2563eb;
}

.capital-bar.purple,
.capital-legend i.purple {
  background: #d946ef;
}

.capital-bar.red,
.capital-legend i.red {
  background: #ef4444;
}

.capital-bar.yellow,
.capital-legend i.yellow {
  background: #facc15;
}

.capital-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
  color: #354258;
  font-size: 12px;
}

.capital-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.capital-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.double-b-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.double-b-signal {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.double-b-signal b {
  display: block;
  color: #b45309;
  font-size: 16px;
}

.double-b-signal span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.double-b-signal p {
  margin: 7px 0 0;
  color: #354258;
  line-height: 1.45;
}

.double-b-signal.muted {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 255, 0.9));
}

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

.panel-actions button {
  height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

#updatedAt,
#reviewTime {
  color: var(--muted);
  font-size: 13px;
}

.source-bar {
  display: none;
  padding: 10px 16px;
  border-bottom: 1px solid #f0dfb6;
  background: #fff8e6;
  color: #7a5417;
  font-size: 13px;
}

.source-bar.show {
  display: block;
}

.sentiment-panel,
.paper-panel {
  margin-bottom: 14px;
}

.sentiment-grid,
.paper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.paper-trade-box {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(180px, 0.9fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(255, 255, 255, 0.92));
}

.paper-size-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.paper-size-actions button {
  height: 34px;
  min-width: 0;
  padding: 0 6px;
  border-color: #cfe0f3;
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  color: #31506f;
  font-size: 12px;
}

.paper-trade-actions {
  display: flex;
  gap: 8px;
}

.paper-trade-actions button {
  min-width: 86px;
}

.paper-trade-actions button:first-child {
  border-color: rgba(225, 61, 79, 0.24);
  color: #be123c;
  background: linear-gradient(180deg, #fff5f6, #ffe4e8);
}

.paper-trade-actions button:last-child {
  border-color: rgba(12, 155, 106, 0.24);
  color: #047857;
  background: linear-gradient(180deg, #f0fdf4, #dcfce7);
}

.sentiment-grid div,
.paper-grid div {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f7fbff);
}

.sentiment-grid div.good {
  border-color: rgba(225, 61, 79, 0.24);
  background: linear-gradient(145deg, rgba(255, 244, 246, 0.95), #ffffff);
}

.sentiment-grid div.bad {
  border-color: rgba(11, 155, 111, 0.24);
  background: linear-gradient(145deg, rgba(236, 253, 245, 0.95), #ffffff);
}

.sentiment-grid div.watch {
  border-color: rgba(37, 99, 235, 0.22);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.96), #ffffff);
}

.sentiment-grid .sentiment-main {
  grid-column: span 1;
}

.sentiment-grid .sentiment-main strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.sentiment-grid .sentiment-main small {
  color: var(--muted);
  font-size: 13px;
}

.sentiment-grid .sentiment-main i {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #22c55e calc(var(--sentiment, 0) * 1%), #e5edf5 0);
}

.sentiment-grid b,
.paper-grid b {
  color: var(--muted);
  font-size: 12px;
}

.sentiment-grid strong,
.paper-grid strong {
  font-size: 22px;
  color: var(--text);
}

.sentiment-grid span,
.paper-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.paper-table-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  padding: 0 14px 14px;
}

.paper-detail-fold {
  border-top: 1px solid var(--line);
}

.paper-detail-fold summary {
  cursor: pointer;
  padding: 10px 14px;
  color: #31506f;
  font-weight: 800;
}

.paper-table-wrap > div {
  display: grid;
  gap: 8px;
}

.paper-table-wrap > div > b {
  color: var(--muted);
  font-size: 13px;
}

.paper-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  min-height: 44px;
  overflow: auto;
  color: var(--muted);
  font-size: 13px;
}

.paper-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(130px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.paper-row.compact {
  grid-template-columns: minmax(130px, 1.2fr) minmax(100px, 1fr) auto;
}

.paper-row span {
  display: grid;
  gap: 2px;
}

.paper-row b {
  color: var(--text);
}

.paper-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.paper-row strong {
  font-size: 14px;
}

.paper-row button {
  height: 28px;
  padding: 0 9px;
}

.signal-buckets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 14px 0;
}

.signal-bucket {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dce8f0;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.signal-bucket b {
  font-size: 13px;
}

.signal-bucket span {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.signal-bucket.attack {
  border-color: rgba(225, 61, 79, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 242, 244, 0.96));
}

.signal-bucket.ambush {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.96));
}

.signal-bucket.hold {
  border-color: rgba(11, 127, 89, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.96));
}

.signal-bucket.avoid {
  border-color: rgba(183, 121, 31, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 237, 0.96));
}

.signal-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 14px 4px;
}

.signal-tabs button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d7e4f2;
  border-radius: 999px;
  background: #fff;
  color: #52657a;
  font-weight: 700;
  white-space: nowrap;
}

.signal-tabs button.active {
  border-color: #7db2ff;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  color: #1d5fd1;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.signal-card-list {
  display: none;
}

.signal-stock-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #dce8f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 18px rgba(17, 32, 51, 0.06);
}

.signal-stock-card.attack { border-color: rgba(225, 61, 79, 0.28); }
.signal-stock-card.ambush { border-color: rgba(37, 99, 235, 0.24); }
.signal-stock-card.hold { border-color: rgba(11, 127, 89, 0.22); }
.signal-stock-card.avoid { border-color: rgba(183, 121, 31, 0.28); }

.signal-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.signal-card-name b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.signal-card-name span,
.signal-card-meta,
.signal-card-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.signal-card-price {
  text-align: right;
  white-space: nowrap;
}

.signal-card-price strong {
  display: block;
  font-size: 18px;
}

.signal-card-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.signal-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.signal-status.attack { background: #fff1f2; color: #e13d4f; }
.signal-status.ambush { background: #eef6ff; color: #1d5fd1; }
.signal-status.hold { background: #e9f8ef; color: #0b7f59; }
.signal-status.observe { background: #fff7df; color: #9a6700; }
.signal-status.avoid { background: #f1f5f9; color: #64748b; }

.signal-strength {
  display: grid;
  gap: 5px;
}

.signal-strength div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.signal-strength i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.signal-strength em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6ea8ff, #e13d4f);
}

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

.signal-card-actions button,
.signal-load-more {
  min-height: 36px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #fff;
  color: #1d5fd1;
  font-weight: 800;
}

.signal-empty {
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
}

.signal-load-more {
  display: none;
  width: calc(100% - 28px);
  margin: 8px 14px 14px;
}

.name small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.data-pill,
.risk-tag {
  padding: 2px 6px;
  border-radius: 999px;
  font-style: normal;
  background: #eef4fb;
  color: #52657a;
}

.data-pill.full {
  background: #e9f8ef;
  color: #0b7f59;
}

.data-pill.snapshot {
  background: #fff6df;
  color: #93630d;
}

.data-pill.fallback,
.risk-tag {
  background: #fff1f2;
  color: #b42335;
}

.score-raw {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.model-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.model-strip b {
  color: #1d4ed8;
}

.model-strip span {
  color: var(--muted);
  font-size: 12px;
}

.model-strip strong {
  color: #e13d4f;
  font-size: 22px;
}

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

.factor-chain div {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.factor-chain span {
  color: var(--muted);
  font-size: 11px;
}

.factor-chain b {
  font-size: 18px;
}

.ai-panel {
  margin-bottom: 18px;
}

.ai-box {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 10px 14px;
  padding: 14px 16px;
}

.ai-box textarea {
  grid-row: 1 / span 2;
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fbfdff;
  box-shadow: inset 0 1px 2px rgba(17, 32, 51, 0.06);
}

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

.ai-actions button,
.coach-row button {
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #edf5ff);
  color: #1f5fbf;
  font-weight: 800;
  cursor: pointer;
}

.ai-actions button {
  min-width: 96px;
  height: 36px;
}

.ai-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ai-actions span {
  color: var(--muted);
  font-size: 12px;
}

.ai-answer {
  min-height: 64px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: #354258;
  line-height: 1.65;
}

.watch-panel {
  margin-bottom: 18px;
}

.watch-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.watch-search {
  position: relative;
}

.watch-form input,
.position-row input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fbfdff;
  box-shadow: inset 0 1px 2px rgba(17, 32, 51, 0.06);
}

.watch-form input {
  width: 168px;
}

.premium-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 88px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
  overflow: hidden;
}

.premium-action-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 48%);
  pointer-events: none;
}

.premium-action-btn span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}

.premium-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.add-watch-action {
  background: linear-gradient(135deg, #2563eb, #0891b2);
}

.add-watch-action span::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 15px;
  font-weight: 900;
}

.refresh-picks-action {
  min-width: 126px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
}

.refresh-picks-action span::before {
  content: "";
  width: 15px;
  height: 15px;
  margin-right: 6px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-right-color: transparent;
  border-radius: 999px;
}

.watch-suggest {
  position: absolute;
  z-index: 30;
  top: 40px;
  right: 0;
  width: 260px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(17, 32, 51, 0.16);
}

.us-watch-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.us-watch-search input {
  width: 100%;
}

.us-suggest,
#usSuggest {
  left: 0;
  right: auto;
  width: min(360px, 86vw);
}

.watch-suggest.hidden {
  display: none;
}

.watch-suggest button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #edf3f8;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.watch-suggest button:hover {
  background: #f3f8ff;
}

.watch-suggest b {
  font-size: 14px;
}

.watch-suggest span,
.suggest-empty {
  color: var(--muted);
  font-size: 12px;
}

.suggest-empty {
  padding: 12px;
}

.watch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}

.watch-chips-toggle {
  display: block;
  width: calc(100% - 32px);
  height: 32px;
  margin: 0 16px 12px;
  padding: 0 12px;
  color: #1d4ed8;
  background: #f5f9ff;
  border-color: #cfe0ff;
  box-shadow: none;
  font-size: 13px;
}

.watch-chips-toggle.hidden {
  display: none;
}

.watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px 0 10px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f1f7ff);
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.watch-chip button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #e7eef3;
  color: #526071;
  line-height: 1;
  box-shadow: none;
}

.table-wrap {
  overflow: auto;
  max-height: 560px;
}

.signal-pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid #e8eef5;
  color: var(--muted);
  font-size: 13px;
}

.signal-pager > div {
  display: flex;
  gap: 5px;
  align-items: center;
}

.signal-pager button {
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  box-shadow: none;
}

.signal-pager button.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

/* A 200+ stock pool is a scanning surface, not a wall of repeated diagnostics. */
.signal-panel.large-pool .table-wrap {
  max-height: 440px;
}

.signal-panel.large-pool th,
.signal-panel.large-pool td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.signal-panel.large-pool .name small,
.signal-panel.large-pool .score-raw {
  display: none;
}

.signal-panel.large-pool .name b {
  font-size: 15px;
}

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

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf1f3;
  text-align: right;
  font-size: 14px;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 650;
  background: linear-gradient(180deg, #f8fbff, #eef5fb);
  position: sticky;
  top: 0;
  z-index: 2;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable::after {
  content: "⇅";
  margin-left: 6px;
  font-size: 11px;
  color: #9aa8b8;
}

th.sortable.active {
  color: #1d4ed8;
}

th.sortable.active.desc::after {
  content: "↓";
  color: #1d4ed8;
}

th.sortable.active.asc::after {
  content: "↑";
  color: #1d4ed8;
}

tr {
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

tr:hover,
tr.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.10), rgba(8, 145, 178, 0.06));
}

tbody tr:hover {
  transform: translateY(-1px);
}

.name {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.name b {
  font-size: 15px;
}

.name span,
.position-row span {
  color: var(--muted);
  font-size: 12px;
}

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

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

.badge,
.review-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-weight: 720;
  font-size: 13px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.badge {
  min-width: 64px;
  height: 26px;
}

.badge.rush {
  background: linear-gradient(180deg, #ffe4e6, #fecdd3);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.24);
}

.badge.attack {
  background: linear-gradient(180deg, #ffe4e6, #fecdd3);
  color: #be123c;
  border: 1px solid rgba(225, 29, 72, 0.24);
}

.badge.buy,
.badge.ambush,
.review-tag.good {
  background: linear-gradient(180deg, #e9f5ff, #d9ecff);
  color: var(--blue);
}

.badge.wait,
.badge.degraded,
.badge.observe,
.review-tag.warn {
  background: linear-gradient(180deg, #fff7df, #ffedbb);
  color: var(--amber);
}

.badge.hold {
  background: linear-gradient(180deg, #dcfce7, #bbf7d0);
  color: #0b7f59;
}

.badge.risk,
.badge.avoid,
.review-tag.bad {
  background: linear-gradient(180deg, #ffecec, #ffd8dc);
  color: var(--red);
}

.badge.neutral,
.review-tag {
  background: linear-gradient(180deg, #f1f5f9, #e5edf3);
  color: #526071;
}

.side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail,
.notify-box,
.security-box,
.positions,
.position-summary,
.t-coach,
.review-box {
  padding: 14px 16px;
}

.t-coach {
  display: grid;
  gap: 12px;
}

.coach-picker {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 10px;
  align-items: end;
}

.coach-picker label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.coach-picker select,
.coach-search input {
  width: 100%;
  height: 38px;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.coach-picker select {
  padding: 0 10px;
}

.coach-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.coach-search input {
  padding: 0 10px;
}

.coach-search button {
  min-width: 74px;
  height: 38px;
}

.coach-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.coach-hero.good {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.98), rgba(255, 255, 255, 0.96));
}

.coach-hero.watch {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.96));
}

.coach-hero.bad {
  border-color: rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(255, 255, 255, 0.96));
}

.coach-hero span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.coach-hero h3 {
  margin: 5px 0;
  font-size: 22px;
}

.coach-hero p {
  margin: 0;
  color: #354258;
  line-height: 1.55;
}

.coach-hero strong {
  flex: 0 0 auto;
  min-width: 74px;
  text-align: center;
  font-size: 34px;
  color: var(--ink);
}

.coach-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.coach-grid div,
.coach-conflict,
.coach-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.coach-grid div {
  padding: 12px;
}

.coach-grid b,
.coach-conflict b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.coach-grid span {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.coach-grid em,
.coach-row em,
.coach-row small {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.coach-conflict {
  padding: 12px 14px;
}

.coach-conflict p {
  margin: 0;
  color: #354258;
  line-height: 1.55;
}

.coach-factor-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px 14px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 11px 14px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.coach-factor-strip b {
  color: var(--ink);
  font-size: 13px;
}

.coach-factor-strip span {
  font-weight: 800;
  color: #1d4ed8;
}

.coach-factor-strip em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.battle-orders,
.battle-selected,
.holding-battle-card,
.holding-battle-empty,
.battle-avoid-pool {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 14px;
}

.battle-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.battle-section-head b {
  font-size: 17px;
  color: var(--ink);
}

.battle-section-head span,
.battle-discipline,
.holding-battle-empty {
  color: var(--muted);
  font-size: 13px;
}

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

.battle-order {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.battle-order.urgent {
  border-color: rgba(225, 29, 72, 0.28);
  background: linear-gradient(135deg, #fff1f2, #ffffff);
}

.battle-order.pending {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.battle-order.monitoring {
  border-color: rgba(29, 95, 209, 0.2);
}

.battle-order > div:first-child,
.holding-battle-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.battle-order b,
.holding-battle-head b {
  color: var(--ink);
  font-size: 16px;
}

.battle-order small,
.holding-battle-head small {
  color: var(--muted);
  font-weight: 700;
}

.battle-order strong {
  color: #111827;
  font-size: 15px;
}

.battle-order p,
.holding-battle-card p {
  margin: 0;
  color: #4b5f7a;
  line-height: 1.5;
}

.battle-priority {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
}

.battle-priority.danger {
  background: #ffe4e6;
  color: #be123c;
}

.battle-priority.warn {
  background: #fef3c7;
  color: #b45309;
}

.battle-priority.normal {
  background: #e0f2fe;
  color: #0369a1;
}

.battle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.battle-actions button {
  min-height: 34px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
}

.battle-selected {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.battle-selected.good {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, #fff1f2, #ffffff);
}

.battle-selected.watch {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, #fffbeb, #ffffff);
}

.battle-selected.bad {
  border-color: rgba(16, 185, 129, 0.26);
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.battle-selected-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.battle-selected h3 {
  margin: 4px 0;
  font-size: 22px;
}

.battle-selected p {
  margin: 0;
  color: #354258;
  line-height: 1.55;
}

.battle-selected > strong {
  font-size: 34px;
  color: var(--ink);
}

.battle-price-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.battle-price-line div:not(.battle-range) {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.battle-price-line b {
  color: var(--ink);
  font-size: 15px;
}

.battle-range,
.holding-battle-track div {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fecaca, #fde68a 54%, #bbf7d0);
}

.battle-range i,
.holding-battle-track i {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 3px solid #2563eb;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.battle-human {
  grid-column: 1 / -1;
  border-top: 1px dashed #d8e4f2;
  padding-top: 10px;
}

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

.holding-battle-card.active {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.12);
}

.holding-battle-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.holding-battle-metrics div {
  border: 1px solid #e5eef8;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.holding-battle-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.holding-battle-metrics b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-top: 3px;
}

.holding-battle-track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.battle-avoid-pool summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.battle-avoid-pool div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.battle-avoid-pool button {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
}

.shortlist-panel {
  display: grid;
  gap: 12px;
}

.shortlist-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.shortlist-actions span {
  min-width: 0;
}

.shortlist-summary {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px 12px;
  color: #29415f;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

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

.short-card,
.shortlist-box,
.short-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.short-card {
  display: grid;
  position: relative;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
  border-left: 3px solid #dbeafe;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.short-card.attack {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, #fff7f7, #ffffff 58%, #f8fbff);
}

.short-card.observe {
  border-left-color: #f59e0b;
}

.short-card.avoid {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.short-card.wait {
  border-left-color: #94a3b8;
}

.short-rank {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: #e13d4f;
  font-size: 12px;
  font-weight: 800;
  background: #fff1f2;
}

.short-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.short-head b {
  font-size: 18px;
}

.short-head span {
  display: block;
  margin-top: 4px;
}

.short-head strong {
  color: #e13d4f;
  font-size: 22px;
}

.short-card span,
.short-card p,
.short-plan em,
.short-alert span,
.short-alert p,
.short-review-line p {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
  font-size: 13px;
}

.short-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.short-stat {
  min-height: 78px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.short-stat span,
.short-meta span,
.short-tags em {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.short-stat b {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
}

.short-meta {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px 14px;
}

.short-tags {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.short-tags em {
  border-radius: 999px;
  padding: 4px 9px;
  font-style: normal;
  color: #1e3a8a;
  background: #eff6ff;
}

.short-dashboard p {
  grid-column: 1 / -1;
  margin: 0;
  color: #29415f;
  line-height: 1.55;
}

.short-score-line,
.short-rail-track,
.short-factor-bars i {
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.short-score-line {
  height: 7px;
}

.short-score-line i,
.short-factor-bars em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.short-status-row,
.short-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.short-status-row span,
.short-status {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
}

.short-status {
  font-weight: 800;
}

.short-status.attack {
  color: #dc2626;
  background: #fee2e2;
}

.short-status.observe,
.short-status.wait {
  color: #b45309;
  background: #fffbeb;
}

.short-status.avoid {
  color: #047857;
  background: #dcfce7;
}

.short-status-row span {
  color: #475569;
  background: #f1f5f9;
}

.short-conclusion {
  min-height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
}

.short-conclusion b {
  color: var(--ink);
}

.short-price-rail {
  display: grid;
  gap: 7px;
}

.short-price-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.short-price-labels span {
  font-size: 12px;
}

.short-rail-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, #dcfce7, #fef3c7 45%, #fee2e2);
}

.short-rail-track i {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.short-rail-track .risk {
  background: #10b981;
}

.short-rail-track .entry {
  background: #f59e0b;
}

.short-rail-track .current {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.short-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.short-card-actions button {
  height: 36px;
  min-width: 0;
}

.short-card-actions button:nth-child(2) {
  color: #b45309;
  border-color: #fbbf24;
  background: #fffbeb;
}

.short-analysis {
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}

.short-analysis summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 800;
}

.short-analysis h4 {
  margin: 12px 0 8px;
}

.short-factor-bars {
  display: grid;
  gap: 8px;
}

.short-factor-bars div {
  display: grid;
  grid-template-columns: 72px 1fr 86px;
  gap: 8px;
  align-items: center;
}

.short-factor-bars i {
  height: 8px;
}

.short-factor-bars b {
  color: #475569;
  font-size: 12px;
  text-align: right;
}

.short-discipline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.short-discipline div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.short-discipline b,
.short-discipline span {
  display: block;
}

.short-discipline b {
  margin-bottom: 5px;
}

.short-discipline span {
  color: #52657a;
  font-size: 12px;
  line-height: 1.55;
}

.short-plan {
  display: grid;
  gap: 3px;
}

.short-plan b {
  color: var(--ink);
  font-size: 13px;
}

.short-card button {
  height: 34px;
  margin-top: 2px;
}

.short-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.short-evidence em,
.short-warn {
  font-style: normal;
  font-size: 12px;
}

.short-evidence em {
  padding: 3px 7px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
}

.short-warn {
  margin: 0;
  color: #9f1239;
}

.next-plan {
  margin: 0;
  padding-left: 18px;
  color: #52657a;
  font-size: 12px;
  line-height: 1.55;
}

.short-observed {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.short-observed-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.short-observed article {
  display: grid;
  grid-template-columns: 1.1fr 1.8fr 1.7fr auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}

.short-observed article button {
  min-height: 30px;
  white-space: nowrap;
}

.short-observed b {
  color: var(--ink);
}

.short-observed span {
  color: var(--muted);
  font-size: 13px;
}

.shortlist-subgrid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.shortlist-box {
  padding: 12px;
}

.shortlist-box h3 {
  margin: 0 0 10px;
}

.short-alert,
.short-review-line {
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid #d8e4f2;
}

.short-alert + .short-alert {
  margin-top: 8px;
}

.short-alert.good {
  border-color: rgba(225, 61, 79, 0.28);
  background: #fff7f7;
}

.short-alert.bad {
  border-color: rgba(16, 185, 129, 0.28);
  background: #f0fdf4;
}

.short-alert.warn {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffbeb;
}

.short-alert b,
.short-review-line b {
  display: block;
  margin-bottom: 4px;
}

.short-empty {
  grid-column: 1 / -1;
  padding: 16px;
  color: var(--muted);
}

.etf-storm-panel {
  display: grid;
  gap: 12px;
}

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

.etf-card {
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid #d9e6f5;
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0.86) 48%, rgba(16, 185, 129, 0.05)),
    #fff;
}

.etf-card-top,
.etf-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.etf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.etf-status i {
  font-style: normal;
  font-size: 14px;
  line-height: 1;
}

.etf-status.buy {
  color: #047857;
  background: rgba(0, 200, 83, 0.12);
}

.etf-status.hold {
  color: #92400e;
  background: rgba(255, 179, 0, 0.16);
}

.etf-status.trim {
  color: #be123c;
  background: rgba(255, 23, 68, 0.12);
}

.etf-status.risk {
  color: #991b1b;
  background: rgba(213, 0, 0, 0.15);
}

.etf-status.wait {
  color: #64748b;
  background: #eef2f7;
}

.status-buy .etf-status i,
.status-trim .etf-status i,
.status-risk .etf-status i {
  animation: etfPulse 1.4s ease-in-out 3;
}

@keyframes etfPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.etf-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #f59e0b);
}

.etf-card.satellite::before,
.etf-card.growth::before {
  background: linear-gradient(90deg, #e11d48, #f59e0b);
}

.etf-card.hedge::before,
.etf-card.defense::before {
  background: linear-gradient(90deg, #0f766e, #22c55e);
}

.etf-rank {
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  background: #eff6ff;
}

.etf-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.etf-card-head b {
  display: block;
  font-size: 18px;
  color: var(--ink);
}

.etf-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.etf-card-head strong {
  color: #e13d4f;
  font-size: 30px;
  line-height: 1;
}

.etf-score-box {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.etf-score-box small {
  color: var(--muted);
  font-size: 12px;
}

.etf-quick-row > span {
  color: var(--muted);
  font-size: 12px;
}

.etf-quick-row b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
}

.etf-spark {
  width: 86px;
  height: 36px;
  flex: 0 0 86px;
}

.etf-spark polyline,
.etf-spark path {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a-up-stroke polyline,
.a-up-stroke path,
.us-down-stroke polyline,
.us-down-stroke path {
  stroke: var(--red);
}

.a-down-stroke polyline,
.a-down-stroke path,
.us-up-stroke polyline,
.us-up-stroke path {
  stroke: var(--green);
}

.etf-price-band {
  display: grid;
  gap: 5px;
}

.etf-band-track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.etf-band-track .buy-zone,
.etf-band-track .trim-zone {
  position: absolute;
  inset: 0 auto 0 0;
}

.etf-band-track .buy-zone {
  width: 28%;
  background: linear-gradient(90deg, #e8f5e9, #c8e6c9);
}

.etf-band-track .trim-zone {
  left: 78%;
  width: 22%;
  background: linear-gradient(90deg, #ffdde1, #fda4af);
}

.etf-band-track i {
  position: absolute;
  left: var(--pos);
  top: 50%;
  width: 15px;
  height: 15px;
  border: 2px solid #2563eb;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.etf-band-track em {
  position: absolute;
  top: 50%;
  color: #111827;
  font-size: 13px;
  font-style: normal;
  transform: translate(-50%, -50%);
  text-shadow: 0 1px 0 #fff;
}

.etf-band-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.etf-decision {
  margin: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: #29415f;
  font-size: 13px;
  font-weight: 800;
  background: #f8fbff;
}

.status-buy .etf-decision {
  color: #047857;
  background: rgba(0, 200, 83, 0.09);
}

.status-trim .etf-decision,
.status-risk .etf-decision {
  color: #be123c;
  background: rgba(255, 23, 68, 0.08);
}

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

.etf-metrics span {
  border: 1px solid #e3edf8;
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.etf-metrics b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
}

.etf-metrics .hot b {
  color: #e13d4f;
}

.etf-metrics .calm b {
  color: #059669;
}

.etf-holding-note {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 9px;
  background: linear-gradient(135deg, #eef2ff, #fff);
}

.etf-holding-note b {
  color: #1d4ed8;
}

.etf-holding-note span,
.etf-holding-note p {
  display: block;
  margin: 3px 0 0;
  color: #52657a;
  font-size: 12px;
}

.etf-advice {
  margin: 0;
  color: #29415f;
  line-height: 1.55;
  font-weight: 700;
}

.etf-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.etf-plan p {
  margin: 0;
  border-radius: 8px;
  padding: 9px;
  color: #52657a;
  font-size: 12px;
  line-height: 1.5;
  background: #f8fbff;
}

.etf-plan b {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.etf-expand-btn {
  height: 32px;
  justify-self: start;
  padding-inline: 14px;
}

.etf-detail {
  display: none;
  gap: 10px;
}

.etf-card.expanded .etf-detail {
  display: grid;
}

.etf-factor-bars {
  display: grid;
  gap: 7px;
}

.etf-factor-bars div {
  position: relative;
  display: grid;
  grid-template-columns: 84px 38px 1fr;
  gap: 8px;
  align-items: center;
  color: #52657a;
  font-size: 12px;
}

.etf-factor-bars i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf7;
}

.etf-factor-bars i::before {
  content: "";
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.etf-logic {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.etf-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.etf-filter-bar button {
  height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fbff;
}

.etf-filter-bar button.active {
  color: #fff;
  border-color: #2563eb;
  background: #2563eb;
}

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

.coach-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 11px 12px;
}

.coach-row span {
  font-weight: 800;
}

.coach-row b {
  font-size: 20px;
}

.coach-row small {
  grid-column: 1 / -1;
}

.coach-row button {
  grid-column: 1 / -1;
  justify-self: start;
  height: 28px;
  padding: 0 10px;
}

.coach-row.good b {
  color: var(--red);
}

.coach-row.bad b {
  color: var(--green);
}

.detail h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.metric,
.summary-item,
.trade-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metric {
  padding: 10px;
}

.factor-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.factor-board div {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.factor-board b {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.factor-board span {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 850;
}

.factor-board em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.metric b,
.summary-item b,
.trade-cell b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.metric span,
.summary-item span {
  font-size: 18px;
  font-weight: 720;
}

.plan {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.plan div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plan span:first-child {
  color: var(--muted);
}

.briefing-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #354258;
}

.briefing-box b {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.briefing-box p {
  margin: 0 0 10px;
  line-height: 1.6;
}

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

.briefing-grid div {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.briefing-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.briefing-grid ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.reason,
.t-note,
.review-box {
  color: #354258;
  line-height: 1.6;
}

.rules {
  margin: 0;
  padding: 14px 18px 16px 34px;
  color: #354258;
  line-height: 1.7;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  color: #354258;
}

.check input {
  width: 16px;
  height: 16px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #354258;
  font-size: 13px;
}

.field input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fbfdff;
  box-shadow: inset 0 1px 2px rgba(17, 32, 51, 0.06);
}

#notifyStatus {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

#securityStatus {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.24), transparent 36%),
    linear-gradient(225deg, rgba(225, 61, 79, 0.16), transparent 34%),
    #edf4fb;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid rgba(219, 229, 238, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-card h1 {
  color: var(--text);
}

.login-card p {
  margin-top: 6px;
  color: var(--muted);
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f8fc;
}

.login-tabs button {
  height: 36px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.login-tabs button.active {
  background: #ffffff;
  border-color: #cfe0f2;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.password-meter {
  display: block;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf7;
}

.password-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ef4444;
  transition: width 0.18s ease, background 0.18s ease;
}

.password-meter i[data-level="2"] {
  background: #f59e0b;
}

.password-meter i[data-level="3"] {
  background: #16a34a;
}

.password-strength-text {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form.hidden {
  display: none;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #354258;
}

.login-form input,
.field select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 16px;
  background: #fff;
}

.login-code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.login-code-row button {
  min-width: 104px;
  padding: 0 12px;
  white-space: nowrap;
}

.login-link-btn {
  height: auto;
  min-height: 0;
  justify-self: center;
  border: 0;
  padding: 2px 4px;
  color: var(--blue);
  background: transparent;
  box-shadow: none;
}

.login-link-btn:hover {
  background: transparent;
  text-decoration: underline;
}

#loginMsg,
#registerMsg,
#resetMsg {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

.login-risk-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.trial-note,
.pay-note {
  display: grid;
  gap: 5px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.trial-note b,
.pay-note b {
  color: var(--ink);
}

.trial-note span,
.pay-note span,
.pay-note small {
  color: var(--muted);
  line-height: 1.5;
}

.position-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.summary-item {
  padding: 9px 10px;
  box-shadow: var(--shadow-soft);
}

.position-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.position-add-box {
  margin-top: 10px;
  border: 1px solid #dbe7f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.position-add-box summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 650;
  color: var(--ink);
}

.position-add-box summary::-webkit-details-marker {
  display: none;
}

.position-add-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 10px;
  padding: 0 12px 12px;
  align-items: end;
}

.position-add-grid select,
.position-add-grid input {
  width: 100%;
}

.position-add-actions {
  display: flex;
  align-items: end;
}

.position-add-hint {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
}

.positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.position-empty {
  padding: 14px 12px;
  border: 1px dashed #c9d8e6;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  color: var(--muted);
  line-height: 1.6;
}

.position-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.95));
  box-shadow: var(--shadow-soft);
}

.position-row b {
  display: block;
  font-size: 14px;
}

.pos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pos-title {
  min-width: 0;
}

.pos-title span {
  display: block;
  margin-top: 2px;
}

.pnl {
  text-align: right;
  font-weight: 720;
  white-space: nowrap;
}

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

.position-row input {
  width: 100%;
}

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

.trade-cell {
  padding: 8px;
}

.trade-cell span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.review-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

.review-card {
  border: 1px solid #dce8f0;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.95));
  overflow: auto;
  box-shadow: var(--shadow-soft);
}

.review-card.wide {
  grid-column: span 2;
}

.review-card.full {
  grid-column: 1 / -1;
}

.review-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text);
}

.review-card ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.review-card li {
  margin: 5px 0;
}

.review-verdict {
  display: grid;
  gap: 8px;
}

.verdict-main {
  font-size: 18px;
  font-weight: 760;
  color: var(--text);
}

.verdict-line {
  color: #354258;
}

.review-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.review-table th,
.review-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #edf1f3;
  font-size: 13px;
  text-align: left;
}

.review-table th {
  color: var(--muted);
  background: transparent;
}

.review-price {
  font-weight: 720;
}

.mobile-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 15;
  display: none;
  width: min(560px, calc(100% - 24px));
  transform: translateX(-50%);
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(219, 229, 238, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(17, 32, 51, 0.22);
  backdrop-filter: blur(10px);
}

.mobile-nav button {
  height: 40px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #354258;
  border-radius: 8px;
  font-weight: 650;
}

.mobile-nav button.active {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.14), rgba(8, 145, 178, 0.10));
  color: #1d4ed8;
}

.mobile-mine-sheet {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: flex-end;
  padding: 12px;
  background: rgba(15, 23, 42, 0.34);
}

.mobile-mine-sheet:not(.hidden) {
  display: flex;
}

.mine-panel {
  width: 100%;
  border: 1px solid rgba(219, 229, 238, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.mine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

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

.mine-head b {
  font-size: 18px;
}

.mine-head span {
  color: var(--muted);
  font-size: 12px;
}

.mine-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.mine-actions button {
  height: 40px;
}

.my-page {
  display: none;
  gap: 12px;
  margin-bottom: 16px;
  padding: 0 0 18px;
  background: #f8fafc;
}

body[data-mobile-section="mine"] .my-page {
  display: grid;
}

body[data-mobile-section="mine"] .market-app {
  display: none !important;
}

.my-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  background: #ffffff;
}

.my-header .back-btn {
  width: 34px;
  height: 34px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #0f172a;
  font-size: 28px;
}

.my-header .title {
  font-size: 19px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: #ffffff;
}

.user-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
  box-shadow: inset 0 0 0 1px #dbe4ee;
  font-size: 28px;
}

.user-info {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.user-name {
  justify-self: start;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.user-membership {
  color: #b7791f;
  font-size: 14px;
  font-weight: 800;
}

.user-days {
  color: #64748b;
  font-size: 12px;
}

.upgrade-btn {
  min-height: 32px;
  border-color: rgba(183, 121, 31, 0.55);
  border-radius: 999px;
  color: #b7791f;
  background: #fffbeb;
}

.my-section-title {
  padding: 0 16px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.mine-stats-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px;
}

.stat-card {
  min-height: 112px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 13px 8px;
  text-align: center;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.stat-title {
  color: #64748b;
  font-size: 12px;
}

.stat-value {
  margin-top: 8px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.stat-sub {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.membership-card {
  margin: 0 16px;
  border-radius: 16px;
  padding: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 215, 0, 0.22), transparent 28%),
    linear-gradient(135deg, #1a1a2e, #0f3460);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.membership-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
}

.membership-title span {
  border: 1px solid rgba(255, 215, 0, 0.65);
  border-radius: 999px;
  padding: 2px 9px;
  color: #ffd700;
  font-size: 12px;
}

.membership-desc,
.membership-current {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.membership-divider {
  height: 1px;
  margin: 12px 0;
  background: rgba(255, 255, 255, 0.18);
}

.membership-features {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.membership-features li {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.membership-features li::before {
  content: "✓";
  margin-right: 8px;
  color: #ffd700;
  font-weight: 900;
}

.function-list {
  display: grid;
  margin: 0 16px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.function-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  min-height: 56px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  text-align: left;
}

.function-item:last-child {
  border-bottom: 0;
}

.function-icon {
  text-align: center;
  font-size: 19px;
}

.function-name {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.function-arrow {
  color: #94a3b8;
  font-size: 22px;
}

.logout-section {
  padding: 0 16px;
}

.logout-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  color: #e13d4f;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  font-size: 16px;
  font-weight: 900;
}

.version-info {
  color: #94a3b8;
  text-align: center;
  font-size: 12px;
}

.market-indices-section {
  overflow: hidden;
}

.market-indices-section .market-index-grid {
  display: block;
  padding: 0 16px 12px;
}

.indices-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.market-indices-section .market-index-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  min-height: 138px;
  padding: 12px;
  text-align: left;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.market-indices-section .market-index-card strong {
  grid-column: auto;
  grid-row: auto;
  font-size: 22px;
}

.market-indices-section .market-index-card em,
.market-indices-section .market-index-card p,
.market-indices-section .market-index-card small {
  grid-column: auto;
  text-align: left;
}

.index-chart {
  height: 32px;
}

.index-spark {
  width: 100%;
  height: 32px;
}

.index-spark polyline {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 0.9s ease-out forwards;
}

.index-spark polygon {
  opacity: 0.12;
}

.index-spark.a-up polyline,
.index-spark.us-down polyline {
  stroke: var(--red);
}

.index-spark.a-up polygon,
.index-spark.us-down polygon {
  fill: var(--red);
}

.index-spark.a-down polyline,
.index-spark.us-up polyline {
  stroke: var(--green);
}

.index-spark.a-down polygon,
.index-spark.us-up polygon {
  fill: var(--green);
}

.market-sentiment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 10px;
  padding: 9px 0 0;
  border-top: 1px solid #edf2f7;
}

.sentiment-badge {
  border-radius: 999px;
  padding: 4px 10px;
  color: #b45309;
  background: #fffbeb;
  font-size: 13px;
  font-weight: 850;
}

.sentiment-detail {
  color: #64748b;
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(1120px, 100%);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid rgba(219, 229, 238, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.small-modal {
  width: min(520px, 94vw);
}

.guide-modal-card {
  width: min(980px, 94vw);
}

.feedback-modal-card {
  width: min(920px, 94vw);
}

.feedback-forum-panel {
  display: block;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.chart-toolbar button.active {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.install-guide,
.security-box,
.feedback-compose,
.risk-agreement {
  padding: 16px 18px 18px;
}

.feedback-compose {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.feedback-compose input,
.feedback-compose textarea {
  width: 100%;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  background: #fbfdff;
}

.feedback-compose div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-compose span {
  color: var(--muted);
  font-size: 13px;
}

.feedback-list {
  display: grid;
  gap: 10px;
  max-height: 48vh;
  overflow: auto;
  padding: 14px 18px 18px;
  background: #f7fbff;
}

.feedback-item {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(207, 224, 242, 0.95);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.feedback-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feedback-item b {
  font-size: 15px;
}

.feedback-item span,
.feedback-empty {
  color: var(--muted);
  font-size: 12px;
}

.feedback-item h3 {
  font-size: 16px;
}

.feedback-item p {
  color: #263248;
  line-height: 1.7;
  white-space: pre-wrap;
}

.mobile-feedback-panel {
  display: none;
}

.mobile-feedback-compose {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.mobile-feedback-compose input,
.mobile-feedback-compose textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.mobile-feedback-compose textarea {
  min-height: 72px;
  resize: vertical;
}

.mobile-feedback-compose div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-feedback-compose span {
  flex: 1;
  color: #64748b;
  font-size: 12px;
}

.mobile-feedback-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 10px 12px 12px;
}

.risk-modal-card {
  border-color: rgba(183, 121, 31, 0.32);
}

.risk-agreement {
  display: grid;
  gap: 12px;
  color: #263248;
  line-height: 1.65;
}

.risk-agreement p {
  padding: 10px 12px;
  border: 1px solid rgba(219, 229, 238, 0.95);
  border-radius: 8px;
  background: #f8fbff;
}

.risk-agreement button {
  width: 100%;
  height: 42px;
}

.install-guide {
  display: grid;
  gap: 10px;
}

.install-guide b {
  margin-top: 4px;
}

.install-guide p {
  color: #354258;
  line-height: 1.55;
}

.install-current,
.install-step {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.install-current {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 11px 12px;
}

.install-current b {
  grid-column: 1 / -1;
  margin: 0;
}

.install-current span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--blue);
  font-weight: 800;
}

.install-current button {
  height: 34px;
  padding: 0 10px;
}

.install-steps {
  display: grid;
  gap: 8px;
}

.install-step {
  padding: 10px 12px;
}

.install-step b {
  display: block;
  margin: 0 0 5px;
  color: var(--ink);
}

.install-step p {
  margin: 0;
  color: #354258;
}

.guide-content {
  display: grid;
  gap: 16px;
  max-height: min(74vh, 760px);
  overflow: auto;
  padding: 18px;
}

.guide-content section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.guide-content h3 {
  margin: 0;
  font-size: 17px;
}

.guide-content p,
.guide-content li {
  color: #354258;
  line-height: 1.7;
}

.guide-content ul {
  margin: 0;
  padding-left: 18px;
}

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

.guide-grid div,
.guide-levels div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

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

.guide-grid b,
.guide-levels b {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.guide-grid span,
.guide-levels span {
  color: #526071;
  font-size: 13px;
  line-height: 1.6;
}

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

.guide-levels .rush {
  border-color: rgba(225, 29, 72, 0.28);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.guide-levels .buy {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.guide-levels .wait,
.guide-levels .degraded {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

.guide-levels .risk {
  border-color: rgba(225, 61, 79, 0.28);
  background: linear-gradient(180deg, #fff1f2, #ffffff);
}

.chart-layout {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.chart-layout canvas {
  width: 100%;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.chart-decision-box {
  display: grid;
  gap: 10px;
  padding: 12px 18px 0;
}

.decision-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dce8f0;
  border-radius: 10px;
  background: linear-gradient(120deg, #ffffff, #f8fbff);
}

.decision-main.attack { border-color: rgba(225, 61, 79, 0.28); background: linear-gradient(120deg, #fff7f8, #ffffff); }
.decision-main.ambush { border-color: rgba(37, 99, 235, 0.24); background: linear-gradient(120deg, #f3f8ff, #ffffff); }
.decision-main.hold { border-color: rgba(11, 127, 89, 0.22); background: linear-gradient(120deg, #effdf5, #ffffff); }
.decision-main.avoid { border-color: rgba(183, 121, 31, 0.28); background: linear-gradient(120deg, #fff9ed, #ffffff); }

.decision-main b {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.decision-main h3 {
  margin: 5px 0;
  font-size: 22px;
}

.decision-main p {
  color: #354258;
  line-height: 1.55;
}

.decision-main > strong {
  align-self: center;
  font-size: 38px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.decision-grid div {
  padding: 10px 12px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  background: #fff;
}

.decision-grid span,
.decision-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.decision-grid b {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.chart-report {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 18px 18px;
}

.chart-report div {
  border: 1px solid #dce8f0;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: var(--shadow-soft);
}

.chart-report b {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.chart-report strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.chart-report p {
  color: #354258;
  font-size: 13px;
  line-height: 1.55;
}

.chart-action-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid #e5edf3;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.chart-action-bar button {
  min-height: 38px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #fff;
  color: #1d5fd1;
  font-weight: 800;
}

.chart-action-bar button.active {
  border-color: rgba(225, 61, 79, 0.24);
  background: #fff1f2;
  color: #e13d4f;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status {
    flex-wrap: wrap;
    white-space: normal;
  }

  .rule-strip,
  .starter-chips,
  .consumer-grid,
  .paper-table-wrap,
  .workbench-layout,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .paper-row,
  .paper-row.compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .paper-row button {
    justify-self: start;
  }

  .sector-stock {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .push-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .app-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .diagnose-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-nav {
    display: grid;
  }

  .modal {
    padding: 10px;
  }

  .chart-toolbar {
    flex-wrap: wrap;
  }

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

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

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

  .review-card.wide {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .market-switch {
    position: sticky;
    top: 0;
    z-index: 12;
    width: 100%;
    margin: 0 0 10px;
    border-radius: 8px;
  }

  body[data-market="us"] main {
    padding-bottom: 92px;
  }

  body[data-market="us"] .us-layout,
  body[data-market="us"] .us-workbench {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-market="us"] .us-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-market="us"] .consumer-card {
    min-height: 112px;
    padding: 11px;
  }

  body[data-market="us"] .consumer-card strong {
    font-size: 18px;
  }

  body[data-market="us"] .consumer-card p {
    font-size: 12px;
  }

  .us-pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 10px 10px;
    gap: 7px;
  }

  .us-pulse-conclusion {
    margin: 0 10px 10px;
    font-size: 12px;
  }

  .us-shortlist-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .us-battle-select {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 0 10px 10px;
  }

  .us-battle-select .watch-form {
    width: 100%;
  }

  .us-battle-head {
    padding: 11px;
  }

  .us-battle-head h3 {
    font-size: 19px;
  }

  .us-battle-head > strong {
    font-size: 30px;
  }

  .us-factor-grid,
  .us-plan-grid,
  .us-position-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .us-plan-grid > div:last-child,
  .us-position-form > label:first-child {
    grid-column: span 2;
  }

  .us-factor-grid div,
  .us-plan-grid div {
    padding: 8px;
  }

  .us-position-form {
    padding: 0 10px 10px;
  }

  .us-position-summary {
    margin: 0 10px 10px;
    font-size: 12px;
  }

  .app-install-actions {
    width: 100%;
    justify-content: stretch;
  }

  .app-install-actions button {
    flex: 1 1 0;
    min-width: 0;
  }

  .android-download-box {
    align-items: stretch;
    flex-direction: column;
  }

  .android-download-box button {
    width: 100%;
  }

  body:not([data-mobile-section]) .mobile-section:not([data-mobile-section="home"]),
  body[data-mobile-section="home"] .mobile-section:not([data-mobile-section="home"]),
  body[data-mobile-section="signal"] .mobile-section:not([data-mobile-section="signal"]),
  body[data-mobile-section="shortline"] .mobile-section:not([data-mobile-section="shortline"]),
  body[data-mobile-section="battle"] .mobile-section:not([data-mobile-section="battle"]),
  body[data-mobile-section="review"] .mobile-section:not([data-mobile-section="review"]) {
    display: none !important;
  }

  body[data-mobile-section="mine"] .mobile-section:not([data-mobile-section="mine"]) {
    display: none !important;
  }

  body[data-mobile-section="mine"] main {
    padding-bottom: 92px;
  }

  .my-page {
    margin: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .user-profile {
    padding: 16px 12px;
  }

  .mine-stats-grid,
  .stats-grid {
    gap: 7px;
    padding: 0 12px;
  }

  .stat-card {
    min-height: 92px;
    padding: 10px 6px;
  }

  .stat-value {
    font-size: 19px;
  }

  .membership-card,
  .function-list {
    margin: 0 12px;
  }

  .my-section-title,
  .logout-section {
    padding: 0 12px;
  }

  .shortlist-actions {
    width: 100%;
    justify-content: space-between;
  }

  .shortlist-grid,
  .shortlist-subgrid {
    grid-template-columns: 1fr;
  }

  .short-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .short-stat {
    min-height: 64px;
    padding: 9px;
  }

  .short-stat b {
    font-size: 18px;
  }

  .short-meta {
    gap: 5px;
  }

  .short-tags {
    gap: 6px;
  }

  .short-card {
    padding: 12px;
    gap: 9px;
  }

  .short-head b {
    font-size: 17px;
  }

  .short-head strong {
    font-size: 21px;
  }

  .short-card-actions {
    grid-template-columns: 1fr;
  }

  .short-price-labels span {
    font-size: 11px;
  }

  .short-factor-bars div {
    grid-template-columns: 64px 1fr 72px;
  }

  .short-discipline,
  .short-observed article {
    grid-template-columns: 1fr;
  }

  .short-observed article button {
    width: 100%;
  }

  .etf-storm-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .etf-card {
    padding: 11px;
    gap: 8px;
  }

  .etf-card-head b {
    font-size: 17px;
  }

  .etf-card-head strong {
    font-size: 26px;
  }

  .etf-metrics,
  .etf-plan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .etf-metrics span,
  .etf-plan p {
    padding: 7px;
  }

  .etf-advice {
    font-size: 13px;
  }

  .etf-logic {
    font-size: 12px;
  }

  .sentiment-grid,
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
  }

  .sentiment-grid div,
  .paper-grid div {
    min-height: 74px;
    padding: 8px;
  }

  .sentiment-grid strong,
  .paper-grid strong {
    font-size: 17px;
  }

  .sentiment-grid span,
  .paper-grid span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

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

  .model-strip {
    grid-template-columns: 1fr auto;
  }

  .model-strip span {
    grid-column: 1 / -1;
  }

  .short-card {
    padding: 10px;
  }

  .short-head b {
    font-size: 16px;
  }

  .short-head strong {
    font-size: 20px;
  }

  body {
    background: linear-gradient(180deg, #edf4fb, #f7fafc);
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px 8px;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
  }

  h1 {
    font-size: 17px;
  }

  h2 {
    font-size: 16px;
  }

  #subtitle {
    display: none;
  }

  .status {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 5px;
    align-items: center;
    font-size: 12px;
  }

  #accountState,
  #marketState {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #marketState {
    justify-self: end;
    color: #bfdbfe;
  }

  .status button {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  #adminBtn,
  #securityBtn,
  #guideBtn {
    display: none !important;
  }

  main {
    padding: 8px 8px 84px;
  }

  .app-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px 11px;
    box-shadow: 0 10px 24px rgba(17, 32, 51, 0.12);
  }

  .app-hero b {
    margin-bottom: 2px;
    font-size: 12px;
  }

  .app-hero h2 {
    margin-bottom: 0;
    font-size: 16px;
    line-height: 1.25;
  }

  .app-hero p {
    display: none;
  }

  .app-hero button {
    min-width: 84px;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .compact-risk {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px;
    margin-bottom: 8px;
    padding: 8px 9px;
    font-size: 12px;
    line-height: 1.45;
  }

  .compact-risk span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .command-panel {
    margin-bottom: 8px;
  }

  .command-list {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px;
  }

  .command-item {
    min-height: auto;
    gap: 4px;
    padding: 9px 10px 9px 13px;
  }

  .command-item b {
    font-size: 11px;
  }

  .command-item strong {
    font-size: 16px;
  }

  .command-item p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.45;
  }

  .home-secondary {
    display: none !important;
  }

  .rule-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    overflow: visible;
  }

  .rule-strip div {
    min-width: 0;
    min-height: 84px;
    padding: 8px 8px 7px;
    box-shadow: 0 6px 14px rgba(17, 32, 51, 0.06);
  }

  .rule-strip div::before {
    width: 24px;
    height: 2px;
    margin-bottom: 5px;
  }

  .rule-strip b {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .rule-note {
    display: none;
  }

  .rule-input {
    height: 26px;
    padding: 0 3px;
    font-size: 14px;
  }

  .paper-trade-box {
    grid-template-columns: minmax(0, 1fr) minmax(86px, 0.54fr) minmax(86px, 0.54fr);
    gap: 7px;
    padding: 9px;
  }

  .paper-size-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .paper-size-actions button {
    height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }

  .paper-trade-actions {
    grid-column: 1 / -1;
  }

  .paper-trade-actions button {
    flex: 1;
    height: 30px;
    min-width: 0;
    font-size: 12px;
  }

  .paper-panel .field span {
    font-size: 11px;
  }

  .paper-panel select,
  .paper-panel input {
    height: 30px;
    padding: 0 7px;
    font-size: 13px;
  }

  .paper-table-wrap {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 9px 10px;
  }

  .paper-list {
    max-height: 270px;
    gap: 6px;
  }

  .paper-table-wrap > div:nth-child(2) .paper-list {
    max-height: 190px;
  }

  .paper-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px 9px;
  }

  .paper-row > span:first-child {
    min-width: 0;
  }

  .paper-row > span:nth-child(2) {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 12px;
  }

  .paper-row strong {
    justify-self: end;
    font-size: 13px;
  }

  .paper-row button {
    grid-column: 1 / -1;
    width: fit-content;
    height: 26px;
    padding: 0 10px;
  }

  .paper-row.compact {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .paper-row.compact > span:nth-child(2) {
    grid-column: 1;
  }

  .panel {
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(17, 32, 51, 0.08);
  }

  .panel-head {
    gap: 8px;
    padding: 9px 10px;
  }

  .panel-actions {
    gap: 6px;
    justify-content: flex-end;
  }

  .panel-actions button {
    height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .panel-head span,
  #updatedAt,
  #reviewTime,
  #sectorUpdatedAt,
  #tCoachTime,
  #pushState {
    font-size: 11px;
  }

  .starter-panel,
  .index-panel,
  .ai-panel,
  .push-panel,
  .market-layout,
  .watch-panel,
  .review-layout {
    margin-bottom: 8px;
  }

  .starter-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
  }

  .market-index-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 0 9px 9px;
  }

  .market-index-card {
    min-height: 74px;
    padding: 8px;
    gap: 3px 5px;
  }

  .market-index-card b {
    font-size: 13px;
  }

  .market-index-card span,
  .market-index-card small {
    font-size: 10px;
  }

  .market-index-card strong {
    font-size: 15px;
  }

  .market-index-card em {
    font-size: 13px;
  }

  .market-index-card p {
    font-size: 11px;
  }

  .sector-head {
    min-height: 82px;
    grid-template-columns: 1fr auto;
    padding: 9px;
  }

  .sector-rank {
    grid-column: 1;
    width: fit-content;
    padding: 1px 6px;
    font-size: 10px;
  }

  .sector-head b {
    grid-column: 1 / -1;
    font-size: 15px;
  }

  .sector-head strong {
    grid-row: 1;
    grid-column: 2;
    font-size: 17px;
  }

  .sector-head small,
  .sector-head em {
    font-size: 11px;
    line-height: 1.3;
  }

  .sector-stock {
    gap: 5px;
    padding: 9px;
  }

  .consumer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .consumer-card {
    min-height: 104px;
    padding: 10px;
  }

  .consumer-card b {
    font-size: 11px;
  }

  .consumer-card strong {
    margin: 4px 0;
    font-size: 17px;
  }

  .consumer-card p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .push-panel {
    display: none;
  }

  .market-layout,
  .workbench-layout {
    display: grid;
    gap: 10px;
  }

  .watch-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px;
    gap: 7px;
    width: 100%;
    align-items: stretch;
    justify-content: initial;
  }

  .watch-search {
    min-width: 0;
  }

  .watch-form input {
    width: 100%;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
  }

  .watch-suggest {
    top: 34px;
    right: auto;
    left: 0;
    width: min(78vw, 260px);
    max-height: 210px;
  }

  .watch-form button {
    width: 86px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
  }

  .watch-form .premium-action-btn {
    min-width: 86px;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
  }

  .watch-form .add-watch-action span::before {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    font-size: 13px;
  }

  .shortlist-panel > .panel-head {
    align-items: flex-start;
    gap: 8px;
  }

  .shortlist-panel > .panel-head > div:first-child {
    min-width: 0;
  }

  .shortlist-panel > .panel-head > div:first-child p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .shortlist-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    max-width: 118px;
    text-align: right;
  }

  .shortlist-actions span {
    max-width: 118px;
    overflow: hidden;
    color: #7890aa;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .shortlist-actions .premium-action-btn {
    width: 104px;
    min-width: 104px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 12px;
    box-shadow: 0 10px 18px rgba(225, 61, 79, 0.16);
  }

.refresh-picks-action span::before {
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-width: 2px;
  }

  .watch-chips {
    gap: 6px;
    padding: 9px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .watch-chips-toggle {
    display: none !important;
  }

  .watch-chip {
    flex: 0 0 auto;
    min-height: 28px;
    font-size: 12px;
  }

  .source-bar {
    padding: 8px 10px;
    font-size: 12px;
  }

  .signal-buckets {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px 8px 0;
  }

  .signal-bucket {
    padding: 8px 9px;
  }

  .signal-bucket b {
    font-size: 12px;
  }

  .signal-bucket span {
    font-size: 11px;
    line-height: 1.4;
  }

  .ai-box {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 9px;
  }

  .ai-box textarea {
    grid-row: auto;
    min-height: 56px;
    padding: 8px 9px;
    font-size: 13px;
  }

  .ai-actions {
    justify-content: space-between;
  }

  .ai-actions button {
    min-width: 78px;
    height: 30px;
  }

  .ai-answer {
    min-height: 44px;
    padding: 9px;
    font-size: 12px;
    line-height: 1.55;
  }

  .t-coach {
    gap: 8px;
    padding: 9px;
  }

  .coach-picker {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .coach-picker label {
    font-size: 11px;
  }

  .coach-picker select,
  .coach-search input,
  .coach-search button {
    height: 32px;
    font-size: 12px;
  }

  .coach-search {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .coach-search button {
    min-width: 58px;
    padding: 0 8px;
  }

  .coach-hero {
    align-items: flex-start;
    padding: 10px;
  }

  .coach-hero h3 {
    font-size: 17px;
  }

  .coach-hero p {
    font-size: 12px;
  }

  .coach-hero strong {
    min-width: 48px;
    font-size: 24px;
  }

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

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

  .coach-grid div {
    padding: 9px;
  }

  .coach-grid span {
    font-size: 16px;
  }

  .coach-conflict {
    padding: 9px 10px;
    font-size: 12px;
  }

  .coach-factor-strip {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 10px;
  }

  .coach-factor-strip span,
  .coach-factor-strip em {
    font-size: 12px;
  }

  .coach-list {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .coach-row {
    padding: 9px;
  }

  .battle-orders,
  .battle-selected,
  .holding-battle-card,
  .holding-battle-empty,
  .battle-avoid-pool {
    padding: 10px;
    border-radius: 10px;
  }

  .battle-section-head b {
    font-size: 15px;
  }

  .battle-order {
    padding: 10px;
    gap: 6px;
  }

  .battle-order > div:first-child,
  .holding-battle-head {
    align-items: flex-start;
  }

  .battle-order b,
  .holding-battle-head b {
    font-size: 15px;
  }

  .battle-order strong,
  .battle-order p,
  .holding-battle-card p,
  .battle-discipline {
    font-size: 12px;
  }

  .battle-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .battle-actions button {
    width: 100%;
    min-height: 30px;
    padding: 0 5px;
    font-size: 11px;
  }

  .battle-selected {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .battle-selected h3 {
    font-size: 18px;
  }

  .battle-selected p {
    font-size: 12px;
  }

  .battle-selected > strong {
    justify-self: start;
    font-size: 28px;
  }

  .battle-price-line,
  .holding-battle-track {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .holding-battle-list {
    gap: 8px;
  }

  .holding-battle-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .holding-battle-metrics div {
    padding: 7px;
  }

  .holding-battle-metrics b {
    font-size: 15px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }

  .signal-pager {
    align-items: flex-start;
    flex-direction: column;
    padding: 9px 10px;
  }

  .signal-pager > div {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  /* Mobile keeps only decision fields. Fixed columns prevent header/data drift. */
  .signal-panel .table-wrap {
    max-height: min(58vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .signal-panel table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .signal-panel thead {
    display: table-header-group;
  }

  .signal-panel tbody {
    display: table-row-group;
    padding: 0;
  }

  .signal-panel tbody tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .signal-panel td {
    display: table-cell;
    padding: 10px 5px;
    border-bottom: 1px solid #edf1f3;
    text-align: right;
    font-size: 11px;
    vertical-align: middle;
  }

  .signal-panel th {
    padding: 9px 5px;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .signal-panel th:nth-child(1), .signal-panel td:nth-child(1) { width: 25%; text-align: left; }
  .signal-panel th:nth-child(2), .signal-panel td:nth-child(2) { width: 11%; }
  .signal-panel th:nth-child(3), .signal-panel td:nth-child(3) { width: 12%; }
  .signal-panel th:nth-child(7), .signal-panel td:nth-child(7) { width: 12%; }
  .signal-panel th:nth-child(9), .signal-panel td:nth-child(9) { width: 13%; }
  .signal-panel th:nth-child(10), .signal-panel td:nth-child(10) { width: 10%; }
  .signal-panel th:nth-child(11), .signal-panel td:nth-child(11) { width: 17%; }

  .signal-panel th:nth-child(4), .signal-panel td:nth-child(4),
  .signal-panel th:nth-child(5), .signal-panel td:nth-child(5),
  .signal-panel th:nth-child(6), .signal-panel td:nth-child(6),
  .signal-panel th:nth-child(8), .signal-panel td:nth-child(8) {
    display: none;
  }

  .signal-panel td:first-child {
    text-align: left;
  }

  .signal-panel td:first-child strong,
  .signal-panel td:first-child b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signal-panel td:first-child span,
  .signal-panel td:first-child small {
    display: block;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signal-panel td:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }

  .signal-panel .badge {
    width: auto;
    min-height: 24px;
    padding: 3px 4px;
    font-size: 10px;
    white-space: normal;
  }

  .signal-pager {
    position: relative;
    z-index: 1;
    margin-bottom: calc(78px + env(safe-area-inset-bottom));
    padding: 9px 10px 8px;
    background: #fff;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  tbody,
  tr,
  td {
    display: block;
  }

  tbody {
    padding: 6px 8px 8px;
  }

  tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 5px 10px;
    margin: 0 0 8px;
    padding: 10px 9px;
    border: 1px solid #e1ebf3;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: 0 5px 12px rgba(17, 32, 51, 0.06);
  }

  tbody tr:hover {
    transform: none;
  }

  td {
    padding: 0;
    border: 0;
    text-align: left;
    font-size: 12px;
  }

  td:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 15px;
    font-weight: 720;
  }

  td:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
    font-size: 15px;
    font-weight: 720;
  }

  td:nth-child(7) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    color: #354258;
  }

  td:nth-child(8) {
    grid-column: 3;
    grid-row: 2;
    text-align: right;
    color: #354258;
  }

  td:nth-child(9) {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 2px;
  }

  td:nth-child(4),
  td:nth-child(5),
  td:nth-child(6) {
    display: none;
  }

  .name b {
    font-size: 15px;
  }

  .name span {
    font-size: 11px;
  }

  .badge {
    width: 100%;
    min-height: 26px;
  }

  /* Must come after generic mobile table-card rules above. */
  .signal-panel td:nth-child(2),
  .signal-panel td:nth-child(3),
  .signal-panel td:nth-child(7),
  .signal-panel td:nth-child(9),
  .signal-panel td:nth-child(10),
  .signal-panel td:nth-child(11) {
    grid-column: auto;
    grid-row: auto;
    margin: 0;
    padding: 10px 5px;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
  }

  .signal-panel td:nth-child(11) {
    text-align: center;
  }

  .signal-panel .badge {
    width: auto;
    min-height: 24px;
  }

  .position-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .summary-item {
    min-height: 62px;
    padding: 7px 8px;
  }

  .summary-item span {
    font-size: 14px;
  }

  .positions {
    gap: 8px;
    padding: 8px;
  }

  .position-head-actions {
    gap: 6px;
  }

  .position-head-actions button {
    padding: 0 10px;
  }

  .position-add-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .position-add-actions {
    width: 100%;
  }

  .position-add-actions button {
    width: 100%;
  }

  .position-row {
    gap: 8px;
    padding: 9px;
  }

  .pos-inputs {
    gap: 6px;
  }

  .trade-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .trade-cell {
    padding: 7px 8px;
  }

  .capital-panel {
    padding: 9px;
  }

  .capital-head h3 {
    font-size: 15px;
  }

  .capital-head span {
    font-size: 11px;
  }

  .capital-bars {
    min-height: 42px;
    padding: 6px;
  }

  .capital-bar {
    flex-basis: 7px;
    min-width: 7px;
    height: 24px;
  }

  .capital-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    font-size: 11px;
  }

  .double-b-list {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .double-b-signal {
    padding: 8px 9px;
  }

  .side .panel:nth-child(2),
  .side .panel:nth-child(3) {
    display: none;
  }

  .detail,
  .notify-box,
  .security-box,
  .positions,
  .position-summary,
  .review-box {
    padding: 10px;
  }

  .detail h3 {
    margin-bottom: 8px;
    font-size: 17px;
  }

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

  .factor-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 9px 0;
  }

  .briefing-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .factor-board div {
    padding: 8px;
  }

  .factor-board span {
    font-size: 15px;
  }

  .metric {
    padding: 8px;
  }

  .metric span {
    font-size: 15px;
  }

  .plan {
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    font-size: 13px;
  }

  .review-grid {
    gap: 8px;
  }

  .review-card {
    max-height: none;
    padding: 10px;
  }

  .review-card h3 {
    font-size: 15px;
  }

  .review-card ul {
    padding-left: 18px;
  }

  .review-card li,
  .review-verdict,
  .review-table th,
  .review-table td {
    font-size: 12px;
  }

  .review-table {
    min-width: 560px;
  }

  .modal {
    padding: 0;
    align-items: stretch;
  }

  .modal-card {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .guide-modal-card {
    width: 100%;
  }

  .feedback-modal-card {
    width: 100%;
  }

  .modal-head {
    padding: 12px;
  }

  .guide-content {
    max-height: calc(100vh - 72px);
    gap: 10px;
    padding: 10px;
  }

  .feedback-compose {
    padding: 10px;
  }

  .feedback-compose div {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-list {
    max-height: calc(100vh - 280px);
    padding: 10px;
  }

  .feedback-item {
    padding: 10px;
  }

  .feedback-forum-panel {
    display: none;
  }

  .mobile-feedback-panel {
    display: block;
    max-height: 50vh;
    overflow: hidden;
  }

  .mobile-feedback-panel .panel-head {
    padding: 10px 12px;
  }

  .mobile-feedback-compose {
    padding: 9px 10px;
  }

  .mobile-feedback-compose textarea {
    min-height: 64px;
  }

  .mobile-feedback-list {
    max-height: 22vh;
    padding: 9px 10px 10px;
  }

  .guide-content section {
    padding: 10px;
  }

  .guide-content h3 {
    font-size: 15px;
  }

  .guide-content p,
  .guide-content li {
    font-size: 12px;
    line-height: 1.6;
  }

  .guide-grid,
  .guide-grid.compact,
  .guide-levels {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .guide-grid div,
  .guide-levels div {
    padding: 9px;
  }

  .guide-grid b,
  .guide-levels b {
    font-size: 13px;
  }

  .guide-grid span,
  .guide-levels span {
    font-size: 12px;
  }

  .chart-toolbar {
    gap: 7px;
    padding: 9px 12px;
  }

  .chart-toolbar button {
    height: 30px;
    padding: 0 10px;
  }

  .chart-layout {
    gap: 8px;
    padding: 10px;
  }

  .chart-layout canvas:first-child {
    height: 220px;
  }

  .chart-layout canvas:nth-child(2) {
    height: 120px;
  }

  .chart-report {
    gap: 8px;
    padding: 0 10px 10px;
  }

  .chart-report div {
    padding: 10px;
  }

  .diagnose-box {
    padding: 10px;
  }

  .diagnose-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .diagnose-card {
    padding: 9px;
  }

  .diagnose-card strong {
    font-size: 16px;
  }

  .mobile-nav {
    width: calc(100% - 16px);
    height: 60px;
    bottom: 8px;
    padding: 6px 6px env(safe-area-inset-bottom);
    border-radius: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mobile-nav button {
    height: 46px;
    font-size: 11px;
    line-height: 1;
  }
}

@media (min-width: 1280px) {
  .workbench-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .positions {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}

@media (min-width: 641px) {
  .ai-box {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 10px 14px;
    padding: 14px 16px;
  }

  .ai-box textarea {
    grid-row: 1 / span 2;
    min-height: 104px;
  }
}

@media (max-width: 640px) {
  .signal-alert-bar {
    margin: 0;
    padding: 8px 10px;
  }

  .signal-alert-bar summary {
    min-height: 34px;
  }

  .signal-alert-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .signal-type-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .signal-buckets {
    display: none;
  }

  .signal-tabs {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 10px;
    border-bottom: 1px solid #e5edf3;
    background: rgba(248, 251, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .signal-tabs button {
    min-width: 68px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

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

  .signal-panel .table-wrap,
  .signal-panel table,
  .signal-panel thead,
  .signal-panel tbody,
  .signal-panel tr,
  .signal-panel td,
  .signal-panel th {
    display: none !important;
  }

  .signal-pager {
    display: none !important;
  }

  .signal-load-more {
    display: block;
    margin-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .signal-card-head {
    align-items: flex-start;
  }

  .signal-card-name b {
    white-space: normal;
    word-break: break-word;
  }

  .signal-card-actions button {
    min-height: 34px;
    font-size: 12px;
  }

  .chart-decision-box {
    padding: 10px;
  }

  .decision-main {
    padding: 11px;
  }

  .decision-main h3 {
    font-size: 18px;
  }

  .decision-main > strong {
    font-size: 28px;
  }

  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .decision-grid div {
    padding: 9px;
  }

  .decision-grid b {
    font-size: 17px;
  }

  .chart-action-bar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  }

  .chart-action-bar button {
    min-height: 34px;
    padding: 0 4px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .market-indices-section .market-index-grid {
    display: block;
    padding: 0 9px 9px;
  }

  .market-indices-section .indices-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .market-indices-section .market-index-card {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 126px;
    padding: 8px;
    gap: 3px;
    text-align: left;
  }

  .market-indices-section .market-index-card strong,
  .market-indices-section .market-index-card em,
  .market-indices-section .market-index-card p,
  .market-indices-section .market-index-card small {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
  }

  .market-indices-section .market-index-card strong {
    font-size: 16px;
  }

  .market-indices-section .market-index-card em {
    font-size: 12px;
  }

  .market-indices-section .market-index-card p,
  .market-indices-section .market-index-card small {
    font-size: 10px;
  }

  .market-indices-section .market-sentiment {
    margin-top: 8px;
  }

  .index-chart,
  .index-spark {
    height: 28px;
  }
}

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

@media (max-width: 640px) {
  .mobile-nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(52px + env(safe-area-inset-bottom));
    padding: 6px 6px env(safe-area-inset-bottom);
    transform: none;
    border-radius: 0;
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .mobile-nav button {
    position: relative;
    height: 42px;
    border-radius: 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav button.active {
    background: transparent;
    color: #2563eb;
  }

  .mobile-nav button.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: #2563eb;
    transform: translateX(-50%);
  }
}

/* Final override for review command refresh and compact mine page */
.refresh-icon-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 999px !important;
  padding: 0 !important;
}

#reviewSection .mobile-feedback-panel,
.my-page .my-header,
.my-page .membership-section-title,
.my-page .membership-card {
  display: none !important;
}

.review-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.review-command-core,
.review-battle-grid,
.review-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

@media (max-width: 640px) {
  .review-command-core,
  .review-battle-grid,
  .review-rank-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  .app-shell-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .desktop-main-nav {
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
  }

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

@media (max-width: 640px) {
  .app-shell-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px 32px;
    grid-template-areas:
      "title notify avatar"
      "tabs tabs tabs";
    gap: 0 12px;
    min-height: auto;
    padding: env(safe-area-inset-top) 16px 0;
    border-bottom: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  }

  .mobile-header-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    font-size: 16px;
    font-weight: 900;
    box-shadow: none;
  }

  .mobile-menu-btn {
    display: none;
  }

  .mobile-notify-btn {
    grid-area: notify;
    align-self: center;
    background: transparent;
    font-size: 20px;
  }

  .mobile-avatar-btn {
    grid-area: avatar;
    align-self: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 13px;
  }

  .mobile-title {
    display: flex;
    grid-area: title;
    height: 48px;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .header-brand {
    display: none;
  }

  .desktop-main-nav,
  .quick-anchor-nav {
    display: none;
  }

  .header-actions {
    display: contents;
  }

  .header-actions .live-status-pill,
  .header-actions .header-tool-btn,
  .header-actions .header-user-menu {
    display: none !important;
  }

  .mobile-status-line {
    display: flex;
    min-width: 0;
    height: 24px;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }

  .status-dot-small {
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
  }

  .mobile-market-tabs {
    display: flex;
    grid-area: tabs;
    height: 36px;
    align-items: center;
    gap: 8px;
    margin: 0 -16px;
    padding: 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    background: rgba(15, 23, 42, 0.95);
  }

  .mobile-market-tabs button {
    flex: 0 0 auto;
    height: 24px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
    font-size: 13px;
    font-weight: 900;
  }

  .mobile-market-tabs button.active {
    border-color: #38bdf8;
    background: #38bdf8;
    color: #fff;
    box-shadow: none;
  }

  .mobile-notify-btn.refreshing {
    animation: spin 0.8s linear infinite;
  }

  .mobile-drawer-mask:not(.hidden) {
    position: fixed;
    inset: 0;
    z-index: 1290;
    display: block;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
  }

  .mobile-top-drawer:not(.hidden) {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1300;
    display: grid;
    width: min(82vw, 320px);
    grid-template-rows: auto auto 1fr auto;
    gap: 12px;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #0f172a, #17233a 58%, #eef3f8 58%);
    box-shadow: 18px 0 46px rgba(15, 23, 42, 0.26);
  }

  .mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
  }

  .mobile-drawer-head button {
    height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
  }

  .mobile-drawer-account {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
  }

  .mobile-drawer-account span {
    font-size: 16px;
    font-weight: 900;
  }

  .mobile-drawer-account small {
    color: #cbd5e1;
  }

  .mobile-top-drawer nav,
  .drawer-service {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(219, 229, 238, 0.86);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
  }

  .drawer-service b {
    color: #64748b;
    font-size: 12px;
  }

  .mobile-top-drawer nav button,
  .drawer-service button {
    height: 38px;
    justify-content: flex-start;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    box-shadow: none;
    font-size: 14px;
    font-weight: 800;
  }

  .market-switch {
    display: none;
  }

  .app-hero {
    grid-template-columns: 1fr;
    padding: 12px;
    border-radius: 14px;
  }

  .app-install-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-hero button {
    height: 34px;
    min-width: 0;
    border-radius: 10px;
    font-size: 12px;
  }

  .shortlist-actions .refresh-picks-action {
    width: 108px;
    min-width: 108px;
    height: 36px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.34), transparent 34%),
      linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.20);
  }
}

@media (max-width: 640px) {
  .mobile-nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(52px + env(safe-area-inset-bottom));
    padding: 6px 6px env(safe-area-inset-bottom);
    transform: none;
    border-radius: 0;
    border-top: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  .mobile-nav button {
    position: relative;
    height: 42px;
    border-radius: 0;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
  }

  .mobile-nav button.active {
    background: transparent;
    color: #2563eb;
  }

  .mobile-nav button.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 20px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: #2563eb;
    transform: translateX(-50%);
  }
}
/* Australia market standalone entry */
.au-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #eef6ff 0%, #f7fbff 48%, #edf7f2 100%);
  color: #0f172a;
  font-family: Arial, "Helvetica Neue", sans-serif;
}
.au-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: rgba(10, 25, 47, 0.94);
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.au-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.au-logo {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00a3ff, #00b894);
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px rgba(0, 163, 255, 0.28);
}
.au-brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}
.au-brand p {
  margin: 6px 0 0;
  color: #b9c7d8;
  font-size: 14px;
}
.au-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.au-actions span {
  max-width: 360px;
  color: #cbd5e1;
  font-size: 14px;
}
.au-actions button,
.au-actions a,
.au-search button,
.signal-action {
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
}
.au-shell {
  width: min(1480px, calc(100% - 36px));
  margin: 20px auto 44px;
  display: grid;
  gap: 18px;
}
.au-quick-nav {
  position: sticky;
  top: 88px;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.au-quick-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  color: #334155;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
  border: 1px solid rgba(191, 219, 254, 0.72);
}
.au-quick-nav a:hover {
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 10px 22px rgba(14, 165, 233, 0.12);
}
.au-risk {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #7c2d12;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}
.au-panel {
  border-radius: 16px;
  overflow: hidden;
}
.au-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.au-feature-grid h2,
.au-feature-grid p {
  margin: 0;
}
.au-feature-grid p {
  margin-top: 8px;
  color: #526176;
  line-height: 1.6;
}
.au-feature-grid > button,
.au-install-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}
.au-mini-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.au-mini-cards > div,
.au-mini-cards > span {
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f5faff);
}
.au-mini-cards b,
.au-mini-cards strong {
  display: block;
}
.au-mini-cards b {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
}
.au-mini-cards strong {
  margin-top: 6px;
  color: #0f172a;
  font-size: 18px;
}
.au-search {
  display: flex;
  gap: 10px;
}
.au-search input {
  min-width: 240px;
  height: 42px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
}
.au-chip span {
  color: #64748b;
  font-size: 12px;
}
.au-table-wrap table th {
  cursor: pointer;
  user-select: none;
}
.au-table-wrap td strong,
.au-table-wrap td span,
.au-table-wrap td small {
  display: block;
}
.au-table-wrap td small {
  margin-top: 4px;
  color: #64748b;
}
.signal-action.buy {
  background: #dcfce7;
  color: #166534;
}
.signal-action.risk {
  background: #fee2e2;
  color: #991b1b;
}
.signal-action.watch {
  background: #eff6ff;
  color: #1d4ed8;
}
@media (max-width: 760px) {
  .au-topbar {
    align-items: flex-start;
    padding: 14px 16px;
  }
  .au-brand h1 {
    font-size: 21px;
  }
  .au-brand p,
  .au-actions span {
    font-size: 12px;
  }
  .au-logo {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }
  .au-shell {
    width: calc(100% - 20px);
    margin-top: 12px;
  }
  .au-quick-nav {
    top: 96px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 8px;
  }
  .au-risk,
  .panel-title-row,
  .au-actions,
  .au-feature-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .au-search {
    width: 100%;
  }
  .au-search input {
    min-width: 0;
    width: 100%;
  }
  .au-table-wrap {
    overflow-x: auto;
  }
  .au-table-wrap table {
    min-width: 900px;
  }
  .au-mini-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
