:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111820;
  --panel-strong: #151e28;
  --field: #0c1219;
  --line: #273241;
  --text: #eef4f8;
  --soft: #c1ccd7;
  --muted: #8c9aaa;
  --green: #2bd99f;
  --green-strong: #18b985;
  --red: #ff6b6b;
  --blue: #7bdff2;
  --yellow: #f6c453;
  --purple: #b28dff;
  --danger-bg: #35191d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  --floating-panel-width: 420px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(43, 217, 159, 0.08), transparent 280px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

.app-layout {
  min-height: 100vh;
  --sidebar-space: 252px;
  --floating-safe-space: 0px;
  --shell-gap-left: calc(var(--sidebar-space) + 24px);
  --shell-gap-right: 24px;
  --available-content-width: calc(100vw - var(--shell-gap-left) - var(--shell-gap-right));
  --content-width: min(1280px, var(--available-content-width));
  --content-extra-space: max(0px, calc((var(--available-content-width) - var(--content-width)) / 2));
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid var(--line);
  background: rgba(12, 18, 25, 0.98);
  padding: 20px 14px;
  transition:
    width 180ms ease,
    transform 180ms ease;
}

.sidebar-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-title {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1rem;
}

.sidebar-toggle {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid #314052;
  border-radius: 8px;
  background: #0f151d;
  color: var(--soft);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.nav-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  padding: 0 10px;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  border-color: rgba(43, 217, 159, 0.38);
  background: rgba(43, 217, 159, 0.1);
  color: var(--text);
}

.nav-button.is-unreleased {
  border-color: rgba(140, 154, 170, 0.14);
  background: rgba(140, 154, 170, 0.04);
  color: rgba(193, 204, 215, 0.48);
  cursor: not-allowed;
  filter: grayscale(1);
}

.nav-button.is-unreleased:hover,
.nav-button.is-unreleased.is-active {
  border-color: rgba(140, 154, 170, 0.2);
  background: rgba(140, 154, 170, 0.07);
  color: rgba(193, 204, 215, 0.62);
}

.nav-button.is-unreleased .nav-mark {
  background: rgba(140, 154, 170, 0.12);
  color: rgba(193, 204, 215, 0.58);
}

.nav-mark {
  display: inline-flex;
  width: 34px;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: #17222d;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
}

.nav-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.pro-service-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pro-badge {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 196, 83, 0.48);
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
}

.nav-label .pro-badge,
.sidebar .pro-badge {
  width: 24px;
  height: 24px;
  font-size: 0.5rem;
}

.section-heading .pro-badge,
.view-heading .pro-badge,
.orderbook-head .pro-badge {
  border-color: rgba(246, 196, 83, 0.48);
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
  font-size: 0.58rem;
  font-weight: 950;
  text-align: center;
  transform: translateY(-1px);
}

.sidebar-note {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.sidebar-contact-button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  align-items: center;
  border: 1px solid rgba(123, 223, 242, 0.22);
  border-radius: 8px;
  background: rgba(123, 223, 242, 0.07);
  color: var(--text);
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.sidebar-contact-button span {
  grid-row: span 2;
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(43, 217, 159, 0.14);
  color: var(--green);
  font-weight: 900;
}

.sidebar-contact-button strong {
  font-size: 0.92rem;
}

.sidebar-contact-button small {
  color: var(--muted);
  font-size: 0.76rem;
}

.sidebar-contact-button:hover {
  border-color: rgba(43, 217, 159, 0.42);
  background: rgba(43, 217, 159, 0.1);
}

.app-layout.sidebar-collapsed .sidebar {
  width: 0;
  overflow: visible;
  border-right: 0;
  background: transparent;
  padding: 0;
  pointer-events: none;
}

.app-layout.sidebar-collapsed {
  --sidebar-space: 0px;
}

.app-layout.floating-panel-open {
  --floating-safe-space: calc(var(--floating-panel-width) + 96px);
  --shell-gap-right: var(--floating-safe-space);
}

@media (max-width: 1440px) and (min-width: 1121px) {
  :root {
    --floating-panel-width: 360px;
  }

  .app-layout.floating-panel-open {
    --floating-safe-space: calc(var(--floating-panel-width) + 96px);
  }

  .floating-metrics {
    grid-template-columns: 1fr;
  }
}

.app-layout.sidebar-collapsed .sidebar-head {
  position: fixed;
  top: 20px;
  left: 8px;
  z-index: 90;
  min-height: 0;
  justify-content: center;
}

.app-layout.sidebar-collapsed .sidebar-head > div,
.app-layout.sidebar-collapsed .sidebar-kicker,
.app-layout.sidebar-collapsed .sidebar-title,
.app-layout.sidebar-collapsed .nav-label,
.app-layout.sidebar-collapsed .sidebar-nav,
.app-layout.sidebar-collapsed .sidebar-note,
.app-layout.sidebar-collapsed .sidebar-contact-button {
  display: none;
}

.app-layout.sidebar-collapsed .nav-button {
  justify-content: center;
  padding: 0;
}

.app-layout.sidebar-collapsed .sidebar-toggle {
  pointer-events: auto;
  transform: rotate(180deg);
  background: rgba(15, 21, 29, 0.98);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

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

.app-shell {
  width: var(--content-width);
  max-width: none;
  margin-left: calc(var(--shell-gap-left) + var(--content-extra-space));
  margin-right: calc(var(--shell-gap-right) + var(--content-extra-space));
  padding: 38px 24px 64px;
  transition:
    margin-left 180ms ease,
    margin-right 180ms ease,
    width 180ms ease;
}

.app-layout.sidebar-collapsed .app-shell {
  padding-top: 74px;
}

.floating-position-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  width: min(var(--floating-panel-width, 300px), calc(100vw - 44px));
  max-width: var(--floating-panel-width, 300px);
  overflow: hidden;
  border: 1px solid rgba(123, 223, 242, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 25, 0.96);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(12px);
}

.floating-position-panel.positive {
  border-color: rgba(43, 217, 159, 0.38);
}

.floating-position-panel.warn {
  border-color: rgba(246, 196, 83, 0.44);
}

.floating-position-panel.negative {
  border-color: rgba(255, 107, 107, 0.48);
}

.floating-panel-bar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 24, 33, 0.96);
}

.floating-panel-toggle {
  display: flex;
  min-width: 0;
  flex: 1;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.floating-pip-button {
  display: inline-flex;
  min-width: 58px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(123, 223, 242, 0.08);
  color: var(--blue);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 0 10px;
}

.floating-pip-button::after {
  content: "Pro";
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 196, 83, 0.48);
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
  font-size: 0.48rem;
  font-weight: 950;
  line-height: 1;
}

.floating-pip-button:hover:not(:disabled) {
  background: rgba(123, 223, 242, 0.15);
  color: var(--text);
}

.floating-pip-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.floating-pip-button.is-pro-locked {
  border-left-color: rgba(246, 196, 83, 0.22);
  background: rgba(246, 196, 83, 0.08);
  color: var(--yellow);
}

.floating-panel-toggle strong,
.floating-panel-head > span {
  border-radius: 999px;
  background: #17222d;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 4px 8px;
}

.floating-position-panel.positive .floating-panel-toggle strong,
.floating-position-panel.positive .floating-panel-head > span {
  background: rgba(43, 217, 159, 0.12);
  color: var(--green);
}

.floating-position-panel.warn .floating-panel-toggle strong,
.floating-position-panel.warn .floating-panel-head > span {
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
}

.floating-position-panel.negative .floating-panel-toggle strong,
.floating-position-panel.negative .floating-panel-head > span {
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
}

.floating-panel-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.floating-position-panel.is-collapsed .floating-panel-body {
  display: none;
}

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

.floating-panel-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.floating-panel-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floating-panel-head div span {
  color: var(--muted);
  font-size: 0.78rem;
}

.floating-mini-chart {
  display: grid;
  gap: 4px;
  border: 1px solid #253142;
  border-radius: 7px;
  background: #0a1017;
  padding: 7px 8px 6px;
}

.mini-chart-svg {
  display: block;
  width: 100%;
  height: 34px;
  overflow: visible;
}

.mini-chart-baseline {
  stroke: rgba(140, 154, 170, 0.22);
  stroke-dasharray: 3 4;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.mini-chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.mini-chart-dot {
  fill: var(--blue);
}

.floating-mini-chart.positive .mini-chart-line,
.floating-mini-chart.positive .mini-chart-dot {
  stroke: var(--green);
  fill: var(--green);
}

.floating-mini-chart.negative .mini-chart-line,
.floating-mini-chart.negative .mini-chart-dot {
  stroke: var(--red);
  fill: var(--red);
}

.floating-mini-chart.neutral .mini-chart-line,
.floating-mini-chart.neutral .mini-chart-dot {
  stroke: var(--muted);
  fill: var(--muted);
}

.mini-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
}

.mini-chart-meta strong {
  color: var(--soft);
  font-size: 0.72rem;
}

.floating-mini-chart.positive .mini-chart-meta strong {
  color: var(--green);
}

.floating-mini-chart.negative .mini-chart-meta strong {
  color: var(--red);
}

.mini-chart-empty {
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.floating-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.floating-metrics div {
  display: grid;
  grid-template-columns: minmax(0, 86px) minmax(0, 1fr);
  min-height: 38px;
  align-items: start;
  gap: 6px;
  border: 1px solid #253142;
  border-radius: 7px;
  background: #0c1219;
  padding: 7px 8px;
}

.floating-metrics div > span {
  display: block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.floating-metrics strong {
  display: grid;
  min-width: 0;
  justify-items: end;
  gap: 2px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.18;
  text-align: right;
}

.floating-value-main,
.floating-value-sub {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.floating-value-main {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.floating-value-sub {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.floating-metrics div.positive .floating-value-main {
  color: var(--green);
}

.floating-metrics div.warn .floating-value-main {
  color: var(--yellow);
}

.floating-metrics div.negative .floating-value-main {
  color: var(--red);
}

.page-header {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
  font-size: 1.24rem;
}

h3 {
  font-size: 1rem;
}

h4 {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.lead {
  max-width: 840px;
  margin: 0;
  color: var(--soft);
  font-size: 1.04rem;
}

.disclaimer {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(246, 196, 83, 0.42);
  border-radius: 8px;
  background: rgba(246, 196, 83, 0.08);
  color: #ffe3a1;
  font-size: 0.92rem;
  font-weight: 700;
}

.account-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.4fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.account-copy {
  display: grid;
  gap: 6px;
}

.account-copy span,
.account-user {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.auth-box input {
  width: min(230px, 100%);
}

.account-user {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid #263545;
  border-radius: 8px;
  background: #0c1219;
  padding: 0 12px;
}

.account-user span {
  color: var(--text);
  font-weight: 800;
}

.account-user strong {
  border-radius: 999px;
  background: rgba(43, 217, 159, 0.12);
  color: var(--green);
  padding: 3px 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.account-user strong.is-pro {
  background: rgba(246, 196, 83, 0.14);
  color: var(--yellow);
}

.account-card > .field-meta {
  grid-column: 1 / -1;
}

.input-layout {
  margin-bottom: 22px;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.analysis-pro-scope {
  position: relative;
}

.analysis-pro-scope.is-locked > .input-layout,
.analysis-pro-scope.is-locked > #analysisView {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}

.pro-analysis-gate {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-radius: 8px;
  background: rgba(8, 11, 16, 0.5);
  padding: 86px 20px 40px;
}

.pro-gate-card {
  display: grid;
  width: min(540px, 100%);
  gap: 10px;
  border: 1px solid rgba(246, 196, 83, 0.45);
  border-radius: 8px;
  background: rgba(17, 24, 32, 0.96);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.pro-gate-card span {
  justify-self: center;
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.14);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 10px;
}

.pro-gate-card h2 {
  margin: 0;
  font-size: 1.35rem;
}

.pro-gate-card p,
.pro-gate-card small {
  margin: 0;
  color: var(--soft);
}

.pro-gate-card small {
  color: var(--muted);
}

.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.view-heading > span {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.app-layout.view-live .analysis-only {
  display: none !important;
}

.app-layout.view-alerts .analysis-pro-scope {
  display: none;
}

.app-layout.view-alerts #saveServerInputButton,
.app-layout.view-alerts #loadServerInputButton {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
  gap: 18px;
}

.panel,
.chart-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 32, 0.96);
  box-shadow: var(--shadow);
}

.panel,
.result-card {
  padding: 22px;
}

.analysis-form {
  display: grid;
  gap: 18px;
}

.section-heading,
.result-header,
.chart-card-head,
.orderbook-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.section-heading {
  margin-bottom: 18px;
}

.common-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -10px;
}

.fx-rate-pill {
  display: grid;
  min-width: min(360px, 100%);
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(123, 223, 242, 0.2);
  border-radius: 999px;
  background: rgba(12, 18, 25, 0.7);
  padding: 7px 12px;
}

.fx-rate-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.fx-rate-pill strong {
  color: var(--green);
  font-size: 0.88rem;
}

.fx-rate-pill small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading span,
.chart-card-head span,
.orderbook-head span {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

label {
  display: grid;
  gap: 7px;
}

.form-grid > label:not(.wide) {
  grid-template-rows: 22px 44px minmax(18px, auto);
  align-content: start;
}

.form-grid > label:not(.wide) > span {
  align-self: end;
}

label > span,
.switch-label span {
  color: var(--soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-meta {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.field-meta.live {
  color: var(--green);
}

.field-meta.warn {
  color: var(--yellow);
}

.field-meta.danger {
  color: var(--red);
}

.krw-meta {
  min-height: 16px;
  color: #9fb5c8;
}

.krw-meta.live {
  color: var(--blue);
}

.krw-meta.warn {
  color: var(--yellow);
}

.wide {
  grid-column: 1 / -1;
}

.api-credential-field,
.api-model-field {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #303c4c;
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

input[readonly] {
  color: var(--muted);
}

.symbol-picker {
  position: relative;
  min-width: 0;
}

.symbol-dropdown {
  position: absolute;
  z-index: 110;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid rgba(123, 223, 242, 0.28);
  border-radius: 8px;
  background: #0b1118;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

.symbol-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  scroll-behavior: smooth;
}

.symbol-option {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  padding: 7px 9px;
  text-align: left;
}

.symbol-option strong {
  color: var(--text);
  font-size: 0.88rem;
}

.symbol-option small {
  color: var(--muted);
  font-size: 0.74rem;
}

.symbol-option:hover,
.symbol-option.is-active {
  background: rgba(43, 217, 159, 0.12);
}

.symbol-option.is-active {
  outline: 1px solid rgba(43, 217, 159, 0.46);
}

.symbol-option.is-active strong {
  color: var(--green);
}

.symbol-empty {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

textarea {
  min-height: 110px;
  resize: vertical;
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(123, 223, 242, 0.16);
  background: #101821;
}

.leverage-input-wrap {
  position: relative;
}

.leverage-input-wrap input {
  padding-right: 34px;
}

.leverage-suffix {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--soft);
  font-weight: 900;
  pointer-events: none;
  transform: translateY(-50%);
}

.leverage-input-wrap.invalid input {
  border-color: rgba(255, 107, 107, 0.78);
  background: rgba(53, 25, 29, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

::placeholder {
  color: #687586;
}

.switch-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 22px 44px minmax(18px, auto);
  gap: 7px 10px;
  align-content: start;
}

.switch-row::before {
  content: "";
  grid-column: 1 / -1;
  height: 22px;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #303c4c;
  border-radius: 8px;
  background: var(--field);
  white-space: nowrap;
}

.switch-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.analysis-duration {
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.analysis-progress {
  max-width: min(420px, 100%);
  border: 1px solid rgba(123, 223, 242, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 25, 0.76);
  color: var(--soft);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
  padding: 8px 10px;
}

.analysis-progress::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(123, 223, 242, 0.12);
  vertical-align: 1px;
}

.analysis-progress.done {
  border-color: rgba(43, 217, 159, 0.28);
  color: var(--green);
}

.analysis-progress.done::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(43, 217, 159, 0.12);
}

.analysis-progress.error {
  border-color: rgba(255, 107, 107, 0.32);
  color: var(--red);
}

.analysis-progress.error::before {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.12);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 160ms ease,
    filter 160ms ease;
}

.primary-button {
  padding: 0 22px;
  background: var(--green);
  color: #03120d;
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid #384557;
  background: #0d131b;
  color: var(--text);
}

.subtle-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.5) brightness(0.75);
  transform: none;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

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

.error-box {
  border: 1px solid rgba(255, 107, 107, 0.55);
  border-radius: 8px;
  background: var(--danger-bg);
  color: #ffd6d6;
  padding: 14px 16px;
  font-weight: 750;
}

.market-panel {
  align-self: start;
}

#liveView .market-panel {
  max-width: none;
}

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

.stat {
  min-height: 78px;
  padding: 13px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
}

.stat > span,
.metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.stat strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.04rem;
}

.positioning-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.positioning-metric,
.positioning-lock {
  min-height: 92px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 13px;
}

.positioning-metric span,
.positioning-lock p,
.positioning-insight span {
  color: var(--muted);
  font-size: 0.82rem;
}

.positioning-metric > .metric-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  overflow: visible;
}

.positioning-metric strong,
.positioning-lock strong,
.positioning-insight strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.positioning-metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.positioning-metric em {
  display: block;
  margin-top: 9px;
  color: var(--soft);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.5;
}

.positioning-metric.positive strong,
.positioning-panel.positive .orderbook-head span {
  color: var(--green);
}

.positioning-metric.negative strong,
.positioning-panel.negative .orderbook-head span {
  color: var(--red);
}

.positioning-metric.warn strong,
.positioning-panel.warn .orderbook-head span {
  color: var(--yellow);
}

.positioning-lock {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(246, 196, 83, 0.12), transparent 48%),
    #0c1219;
}

.positioning-lock p {
  margin: 7px 0 0;
}

.positioning-insight {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(123, 223, 242, 0.18);
  border-radius: 8px;
  background: rgba(123, 223, 242, 0.06);
  color: var(--soft);
  padding: 12px 13px;
  font-size: 0.86rem;
}

.positioning-insight p {
  margin: 0;
  color: var(--soft);
}

.positioning-synthesis {
  display: grid;
  gap: 7px;
  margin-top: 4px;
}

.positioning-synthesis span {
  color: var(--soft);
}

.positioning-synthesis b {
  display: inline-flex;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(123, 223, 242, 0.1);
  color: var(--blue);
  font-size: 0.76rem;
  padding: 2px 8px;
}

.positioning-panel.is-locked .positioning-insight {
  border-color: rgba(246, 196, 83, 0.24);
  background: rgba(246, 196, 83, 0.06);
}

.alert-center-panel {
  position: relative;
  display: grid;
  gap: 16px;
}

.alert-center-panel.is-locked .alert-center-content {
  filter: blur(1.5px);
  opacity: 0.42;
  pointer-events: none;
}

.alert-gate-card {
  border-color: rgba(246, 196, 83, 0.28);
  background: rgba(20, 23, 20, 0.94);
}

.alert-center-content {
  display: grid;
  gap: 16px;
}

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

.alert-center-head h3,
.alert-history-head h3 {
  margin: 0;
}

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

.alert-summary-card {
  min-height: 78px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 13px;
}

.alert-summary-card span,
.alert-settings label > span,
.alert-history-item small {
  color: var(--muted);
  font-size: 0.8rem;
}

.alert-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1rem;
}

.alert-settings {
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 12px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
}

.alert-settings small {
  min-height: 34px;
  align-content: center;
  margin-left: auto;
}

.alert-settings label,
.alert-switch,
.alert-type-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alert-settings select {
  min-height: 34px;
  border: 1px solid #303c4c;
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  padding: 0 10px;
}

.alert-settings input,
.alert-type-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.alert-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.alert-type-grid label {
  min-height: 42px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #101821;
  color: var(--soft);
  font-weight: 800;
  padding: 0 12px;
}

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

.alert-empty,
.alert-history-item {
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 13px;
}

.alert-empty {
  color: var(--muted);
}

.alert-history-item {
  display: grid;
  gap: 8px;
}

.alert-history-item.warn {
  border-color: rgba(246, 196, 83, 0.35);
}

.alert-history-item.danger,
.alert-history-item.critical {
  border-color: rgba(255, 107, 107, 0.38);
}

.alert-history-item.info {
  border-color: rgba(123, 223, 242, 0.28);
}

.alert-history-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.alert-history-top strong {
  color: var(--text);
}

.alert-history-top time {
  color: var(--muted);
  font-size: 0.78rem;
}

.alert-history-item p {
  margin: 0;
  color: var(--soft);
}

.alert-badge {
  display: inline-flex;
  min-width: 44px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.alert-badge.info,
.alert-toast.info span {
  background: rgba(123, 223, 242, 0.14);
  color: var(--blue);
}

.alert-badge.warn,
.alert-toast.warn span {
  background: rgba(246, 196, 83, 0.14);
  color: var(--yellow);
}

.alert-badge.danger,
.alert-badge.critical,
.alert-toast.danger span,
.alert-toast.critical span {
  background: rgba(255, 107, 107, 0.16);
  color: var(--red);
}

.alert-toast-stack {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 95;
  display: grid;
  width: min(360px, calc(100vw - 44px));
  gap: 10px;
  pointer-events: none;
}

.alert-toast {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(123, 223, 242, 0.22);
  border-radius: 8px;
  background: rgba(12, 18, 25, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  padding: 12px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.alert-toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.alert-toast span {
  justify-self: start;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 8px;
}

.alert-toast strong {
  color: var(--text);
}

.alert-toast small {
  color: var(--muted);
  font-size: 0.78rem;
}

.alert-toast p {
  margin: 0;
  color: var(--soft);
  font-size: 0.84rem;
}

.app-update-banner {
  position: fixed;
  right: max(18px, calc((100vw - min(560px, calc(100vw - 36px))) / 2));
  bottom: 18px;
  z-index: 80;
  display: flex;
  width: min(560px, calc(100vw - 36px));
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(43, 217, 159, 0.42);
  border-radius: 12px;
  background: rgba(15, 22, 30, 0.96);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
  padding: 14px 16px;
}

.app-update-banner div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.app-update-banner strong {
  color: var(--text);
  font-size: 0.95rem;
}

.app-update-banner span {
  color: var(--soft);
  font-size: 0.84rem;
}

.app-update-banner .primary-button,
.app-update-banner .secondary-button {
  min-height: 38px;
  white-space: nowrap;
}

.position-slots-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.position-slots-panel.is-locked {
  border-color: rgba(246, 196, 83, 0.26);
}

.position-slots-panel .section-heading {
  margin-bottom: 0;
}

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

.slot-actions > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.slot-actions > span.warn {
  color: var(--yellow);
}

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

.position-slot-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(140, 154, 170, 0.28);
  border-radius: 8px;
  background: rgba(12, 18, 25, 0.48);
  color: var(--muted);
  padding: 18px;
}

.position-slot-lock {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(246, 196, 83, 0.26);
  border-radius: 8px;
  background: rgba(246, 196, 83, 0.06);
  color: var(--soft);
  padding: 18px;
}

.position-slot-lock strong {
  color: var(--yellow);
  font-size: 1rem;
}

.position-slot-lock p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.position-slot-card {
  display: grid;
  min-height: 188px;
  gap: 10px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 13px;
  text-align: left;
}

.position-slot-card.positive {
  border-color: rgba(43, 217, 159, 0.34);
  background: rgba(43, 217, 159, 0.055);
}

.position-slot-card.warn {
  border-color: rgba(246, 196, 83, 0.34);
  background: rgba(246, 196, 83, 0.055);
}

.position-slot-card.negative {
  border-color: rgba(255, 107, 107, 0.34);
  background: rgba(255, 107, 107, 0.06);
}

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

.position-slot-title {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.position-slot-title:hover {
  color: var(--green);
}

.position-slot-head > div > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.position-slot-badge {
  justify-self: start;
  border-radius: 999px;
  background: rgba(123, 223, 242, 0.12);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 3px 8px;
}

.position-slot-card.positive .position-slot-badge {
  background: rgba(43, 217, 159, 0.14);
  color: var(--green);
}

.position-slot-card.warn .position-slot-badge {
  background: rgba(246, 196, 83, 0.14);
  color: var(--yellow);
}

.position-slot-card.negative .position-slot-badge {
  background: rgba(255, 107, 107, 0.16);
  color: var(--red);
}

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

.position-slot-metrics div {
  display: grid;
  gap: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  padding: 8px;
}

.position-slot-metrics span {
  color: var(--muted);
  font-size: 0.72rem;
}

.position-slot-metrics strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.9rem;
}

.position-slot-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.position-slot-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.live-position {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.live-metric {
  min-height: 74px;
  padding: 12px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
}

.live-metric > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: visible;
}

.live-metric > .metric-label {
  font-size: 0.78rem;
}

.term-help {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.term-help-button {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(140, 154, 170, 0.58);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: help;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.term-help-button:hover,
.term-help-button:focus-visible {
  border-color: rgba(43, 217, 159, 0.7);
  color: var(--green);
  outline: none;
}

.term-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: min(300px, calc(100vw - 48px));
  border: 1px solid #314052;
  border-radius: 8px;
  background: #0b1118;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.44);
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.55;
  opacity: 0;
  padding: 10px 11px;
  pointer-events: none;
  transform: translateY(-3px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  visibility: hidden;
  white-space: normal;
}

.term-help:hover .term-tooltip,
.term-help:focus-within .term-tooltip {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.live-metric strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.98rem;
}

.live-metric.positive strong,
.live-alerts.positive {
  color: var(--green);
}

.live-metric.negative strong,
.live-alerts.danger {
  color: var(--red);
}

.live-metric.warn strong,
.live-alerts.warn {
  color: var(--yellow);
}

.live-metric-states {
  min-height: 94px;
}

.live-alerts {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  color: var(--muted);
  font-size: 0.84rem;
}

.pnl-simulator {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.pnl-scenario-card {
  display: grid;
  gap: 7px;
  min-height: 128px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 12px;
}

.pnl-scenario-card span,
.pnl-scenario-card em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.pnl-scenario-card strong {
  color: var(--text);
  font-size: 1rem;
}

.pnl-scenario-card small {
  color: var(--soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.pnl-scenario-card.positive strong,
.pnl-scenario-card.positive em {
  color: var(--green);
}

.pnl-scenario-card.negative strong,
.pnl-scenario-card.negative em {
  color: var(--red);
}

.pnl-scenario-card.warn strong,
.pnl-scenario-card.warn em {
  color: var(--yellow);
}

.pnl-risk-note {
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  padding: 11px 12px;
}

.beginner-guard {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.entry-ban-box {
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 13px;
}

.entry-ban-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.entry-ban-box ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-ban-box li {
  color: var(--muted);
  font-size: 0.84rem;
}

.entry-ban-box.danger {
  border-color: rgba(255, 107, 107, 0.48);
  background: rgba(255, 107, 107, 0.08);
}

.entry-ban-box.warn {
  border-color: rgba(246, 196, 83, 0.42);
  background: rgba(246, 196, 83, 0.08);
}

.entry-ban-box.positive {
  border-color: rgba(43, 217, 159, 0.36);
  background: rgba(43, 217, 159, 0.07);
}

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

.guard-card {
  display: grid;
  align-content: start;
  gap: 11px;
  min-height: 210px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 14px;
}

.candidate-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 210px;
  height: var(--candidate-card-height, 210px);
  max-height: var(--candidate-card-height, 210px);
  overflow: hidden;
}

.candidate-card .guard-card-head {
  flex: 0 0 auto;
}

.guard-card-wide {
  grid-column: span 4;
  min-height: 0;
}

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

.guard-card-head span {
  border-radius: 999px;
  background: #17222d;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  padding: 4px 8px;
  white-space: nowrap;
}

.guard-card-head span.positive {
  background: rgba(43, 217, 159, 0.12);
  color: var(--green);
}

.guard-card-head span.negative {
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
}

.guard-card-head span.warn {
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
}

.guard-list,
.candidate-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.candidate-list {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 3px;
  align-content: start;
}

.guard-list li,
.candidate-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.72fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #202b3a;
  border-radius: 7px;
  background: #101821;
  padding: 8px;
}

.guard-list span,
.candidate-row span,
.candidate-row em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.guard-list strong,
.candidate-row strong {
  color: var(--text);
  font-size: 0.84rem;
  text-align: right;
}

.guard-list li.pass strong,
.candidate-row.positive strong {
  color: var(--green);
}

.guard-list li.warn strong,
.candidate-row.warn strong {
  color: var(--yellow);
}

.guard-list li.block strong,
.candidate-row.negative strong {
  color: var(--red);
}

.state-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.state-chip-row .state-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid #253142;
  border-radius: 999px;
  background: rgba(23, 34, 45, 0.52);
  color: rgba(140, 154, 170, 0.58);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  margin: 0;
  padding: 4px 8px;
  white-space: nowrap;
}

.state-chip-row .state-chip.is-active {
  border-color: rgba(238, 244, 248, 0.34);
  background: rgba(238, 244, 248, 0.09);
  color: var(--text);
}

.state-chip-row .state-chip.is-active.positive {
  border-color: rgba(43, 217, 159, 0.42);
  background: rgba(43, 217, 159, 0.1);
  color: var(--green);
}

.state-chip-row .state-chip.is-active.negative {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.1);
  color: var(--red);
}

.state-chip-row .state-chip.is-active.warn {
  border-color: rgba(246, 196, 83, 0.42);
  background: rgba(246, 196, 83, 0.1);
  color: var(--yellow);
}

.guard-list li {
  align-items: start;
}

.guard-state-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.guard-state-stack em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.candidate-row {
  grid-template-columns: 1fr;
  align-items: start;
}

.candidate-row strong {
  text-align: left;
  font-size: 0.92rem;
}

.liquidation-gauge {
  display: grid;
  gap: 10px;
}

.liquidation-gauge p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.gauge-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #101821;
}

.gauge-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--muted);
}

.gauge-track.positive span {
  background: var(--green);
}

.gauge-track.warn span {
  background: var(--yellow);
}

.gauge-track.danger span {
  background: var(--red);
}

.gauge-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.gauge-labels strong {
  color: var(--text);
}

.timeframe-conflict {
  display: grid;
  gap: 10px;
}

.timeframe-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timeframe-chips span {
  display: inline-grid;
  gap: 2px;
  min-width: 112px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #101821;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.timeframe-chips strong {
  color: var(--text);
  font-size: 0.86rem;
}

.timeframe-chips span.positive strong,
.timeframe-conflict p.positive {
  color: var(--green);
}

.timeframe-chips span.negative strong,
.timeframe-conflict p.negative {
  color: var(--red);
}

.timeframe-chips span.warn strong,
.timeframe-conflict p.warn {
  color: var(--yellow);
}

.timeframe-conflict p {
  margin: 0;
  color: var(--soft);
  font-size: 0.86rem;
}

.indicator-analysis {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.indicator-card {
  min-height: 220px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 14px;
}

.indicator-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.indicator-card-head strong {
  color: var(--text);
  font-size: 1rem;
}

.indicator-card-head span {
  border-radius: 999px;
  background: #17222d;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  padding: 4px 8px;
  white-space: nowrap;
}

.indicator-card.positive .indicator-card-head span {
  background: rgba(43, 217, 159, 0.12);
  color: var(--green);
}

.indicator-card.negative .indicator-card-head span {
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
}

.indicator-card.warn .indicator-card-head span {
  background: rgba(246, 196, 83, 0.12);
  color: var(--yellow);
}

.indicator-card p {
  margin: 0 0 10px;
  color: var(--soft);
  font-size: 0.86rem;
}

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

.indicator-card li {
  color: var(--muted);
  font-size: 0.82rem;
}

.orderbook {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

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

.book-tables > div {
  display: grid;
  gap: 8px;
}

.book-table {
  display: grid;
  gap: 4px;
}

.book-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 30px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 6px;
  background: #0c1219;
  font-size: 0.88rem;
}

.book-row span {
  color: var(--soft);
}

.book-row strong {
  color: var(--muted);
  text-align: right;
}

.book-row.ask span {
  color: #ffb0b0;
}

.book-row.bid span {
  color: #aaf0d4;
}

.chart-section,
.result-card {
  margin-top: 22px;
}

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

.chart-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.chart-box {
  width: 100%;
  height: 320px;
}

.chart-workspace {
  display: grid;
  gap: 16px;
}

.live-chart-workspace {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chart-toolbar > div:first-child {
  display: grid;
  gap: 6px;
}

.chart-toolbar span,
#overlayInsightStatus {
  color: var(--muted);
  font-size: 0.86rem;
}

.chart-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.candle-limit-control {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  border: 1px solid #303c4c;
  border-radius: 8px;
  background: #0c1219;
  padding: 5px 8px 5px 11px;
}

.candle-limit-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.candle-limit-control select {
  min-height: 34px;
  border: 1px solid #303c4c;
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  font-weight: 850;
  padding: 0 28px 0 10px;
}

.timeframe-tabs {
  display: inline-flex;
  gap: 6px;
  border: 1px solid #303c4c;
  border-radius: 8px;
  background: #0c1219;
  padding: 5px;
}

.timeframe-button {
  min-width: 54px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-weight: 850;
}

.timeframe-button:hover,
.timeframe-button.is-active {
  border-color: rgba(123, 223, 242, 0.34);
  background: rgba(123, 223, 242, 0.12);
  color: var(--text);
}

.overlay-controls {
  display: grid;
  gap: 10px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 12px;
}

.overlay-control-actions,
.overlay-toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-button {
  min-height: 34px;
  border: 1px solid #334155;
  border-radius: 7px;
  background: #101821;
  color: var(--soft);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0 11px;
}

.mini-button:hover {
  border-color: rgba(43, 217, 159, 0.42);
  background: rgba(43, 217, 159, 0.1);
  color: var(--text);
}

.mini-button.danger:hover {
  border-color: rgba(255, 107, 107, 0.48);
  background: rgba(255, 107, 107, 0.1);
}

.overlay-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid #253142;
  border-radius: 7px;
  background: #101821;
  padding: 0 10px;
}

.overlay-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.overlay-toggle span {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.overlay-chart-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1118;
}

.overlay-chart-box {
  position: relative;
  width: 100%;
  min-height: 680px;
}

.overlay-chart-box.is-dragging-price-line,
.overlay-chart-box.is-dragging-price-line * {
  cursor: ns-resize !important;
}

.overlay-drag-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.overlay-hover-label-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.overlay-hover-label {
  position: absolute;
  right: 10px;
  display: inline-flex;
  max-width: min(220px, calc(100% - 24px));
  min-height: 28px;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--label-color) 70%, transparent);
  border-radius: 7px;
  background: rgba(8, 13, 20, 0.9);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
  padding: 5px 8px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.overlay-hover-label::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--label-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--label-color) 17%, transparent);
}

.overlay-hover-label span {
  color: var(--soft);
}

.overlay-hover-label strong {
  color: var(--text);
}

.overlay-ohlc-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 7;
  display: grid;
  gap: 6px;
  max-width: min(520px, calc(100% - 24px));
  border: 1px solid rgba(123, 223, 242, 0.22);
  border-radius: 8px;
  background: rgba(8, 13, 20, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  color: var(--text);
  padding: 8px 10px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.overlay-ohlc-panel.positive {
  border-color: rgba(43, 217, 159, 0.38);
}

.overlay-ohlc-panel.negative {
  border-color: rgba(255, 107, 107, 0.42);
}

.overlay-ohlc-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.overlay-ohlc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.overlay-ohlc-grid span {
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.overlay-ohlc-grid strong {
  margin-left: 4px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 950;
}

.overlay-ohlc-panel.positive .overlay-ohlc-grid strong {
  color: var(--green);
}

.overlay-ohlc-panel.negative .overlay-ohlc-grid strong {
  color: var(--red);
}

.overlay-drag-handle {
  position: absolute;
  left: 12px;
  display: inline-flex;
  min-width: 106px;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(10, 17, 24, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  color: var(--text);
  cursor: ns-resize;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 5px 8px;
  pointer-events: auto;
  touch-action: none;
  transform: translateY(-50%);
  user-select: none;
}

.overlay-drag-handle::before {
  content: "";
  width: 6px;
  height: 16px;
  border-inline: 2px solid currentColor;
  opacity: 0.65;
}

.overlay-drag-handle span {
  color: var(--soft);
  white-space: nowrap;
}

.overlay-drag-handle strong {
  color: var(--text);
  font-size: 0.78rem;
  white-space: nowrap;
}

.overlay-drag-handle.stop {
  border-color: rgba(255, 107, 107, 0.65);
  color: var(--red);
}

.overlay-drag-handle.take {
  border-color: rgba(43, 217, 159, 0.65);
  color: var(--green);
}

.overlay-drag-handle:hover,
.overlay-drag-handle:focus-visible,
.overlay-drag-handle.is-dragging {
  background: rgba(16, 24, 33, 0.98);
  outline: 2px solid rgba(123, 223, 242, 0.28);
  outline-offset: 2px;
}

.chart-empty {
  display: grid;
  min-height: 680px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.overlay-legend {
  position: absolute;
  top: 58px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: none;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(12, 18, 25, 0.78);
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 8px;
}

.legend-item i,
.overlay-price-row i {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.chart-panels {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 14px;
}

.chart-panel {
  display: grid;
  gap: 12px;
  border: 1px solid #253142;
  border-radius: 8px;
  background: #0c1219;
  padding: 14px;
}

.overlay-price-list,
.overlay-insight-grid {
  display: grid;
  gap: 8px;
}

.overlay-price-row {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #202b3a;
  border-radius: 7px;
  background: #101821;
  padding: 8px 10px;
}

.overlay-price-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}

.overlay-price-row strong {
  color: var(--text);
  font-size: 0.9rem;
  text-align: right;
}

.overlay-price-row.live strong {
  color: var(--blue);
}

.overlay-price-row.risk strong {
  color: var(--yellow);
}

.overlay-price-row.level strong {
  color: var(--soft);
}

.overlay-insight {
  border: 1px solid #202b3a;
  border-radius: 7px;
  background: #101821;
  padding: 12px;
}

.overlay-insight strong {
  color: var(--text);
}

.overlay-insight.positive strong {
  color: var(--green);
}

.overlay-insight.negative strong {
  color: var(--red);
}

.overlay-insight.warn strong {
  color: var(--yellow);
}

.overlay-insight p {
  margin: 7px 0 0;
  color: var(--soft);
  font-size: 0.86rem;
}

.overlay-insight ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.overlay-insight li {
  color: var(--muted);
  font-size: 0.82rem;
}

.result-card {
  display: grid;
  gap: 18px;
}

.result-header {
  margin-bottom: 0;
}

.markdown-body {
  overflow-x: auto;
  color: var(--soft);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin: 24px 0 10px;
  color: var(--text);
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body p {
  margin: 10px 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 10px 0 14px 22px;
  padding: 0;
}

.markdown-body li {
  margin: 6px 0;
}

.markdown-body table {
  width: 100%;
  min-width: 640px;
  margin: 14px 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: #1a2430;
  color: var(--text);
}

.markdown-body td {
  background: #0f151d;
}

.markdown-body code {
  border-radius: 6px;
  background: #202a36;
  color: #d6f8e9;
  padding: 2px 6px;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(8px);
}

.contact-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow-y: auto;
  gap: 16px;
  border: 1px solid rgba(123, 223, 242, 0.24);
  border-radius: 8px;
  background: #101720;
  box-shadow: var(--shadow);
  padding: 22px;
}

.feature-dialog {
  width: min(460px, 100%);
  text-align: left;
}

.feature-copy {
  border: 1px solid rgba(246, 196, 83, 0.26);
  border-radius: 8px;
  background: rgba(246, 196, 83, 0.08);
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 800;
  padding: 16px;
}

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

.contact-close-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid #334154;
  border-radius: 8px;
  background: #0c1219;
  color: var(--soft);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
}

.contact-copy {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
}

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

.contact-grid .wide {
  grid-column: 1 / -1;
}

.contact-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.contact-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 1120px) {
  .app-layout,
  .app-layout.floating-panel-open {
    --floating-safe-space: 0px;
    --shell-gap-right: 24px;
  }

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

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

  .account-card {
    grid-template-columns: 1fr;
  }

  .auth-box {
    justify-content: flex-start;
  }

  .live-calc-grid,
  .pnl-scenario-grid,
  .indicator-grid,
  .position-slots-grid,
  .positioning-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .overlay-chart-box,
  .chart-empty {
    min-height: 580px;
  }

  .app-shell {
    padding-bottom: 260px;
  }

  .app-update-banner {
    right: 18px;
    bottom: 18px;
  }

  .floating-position-panel {
    right: 16px;
    bottom: 16px;
    width: min(300px, calc(100vw - var(--sidebar-space) - 48px));
    max-height: 58vh;
  }

  .floating-position-panel:not(.is-collapsed) {
    overflow-y: auto;
  }

  .floating-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --floating-panel-width: 320px;
  }

  .app-layout {
    --sidebar-space: 76px;
    --content-width: calc(100vw - 88px);
  }

  .app-layout.sidebar-collapsed {
    --sidebar-space: 0px;
    --content-width: calc(100vw - 24px);
  }

  .sidebar {
    width: 76px;
    padding: 14px 10px;
  }

  .app-layout.sidebar-collapsed .sidebar {
    width: 0;
    border-right: 0;
    background: transparent;
    padding: 0;
  }

  .app-layout.sidebar-collapsed .sidebar-head {
    top: 14px;
    right: 10px;
    left: auto;
  }

  .sidebar-head {
    justify-content: center;
  }

  .sidebar-kicker,
  .sidebar-title,
  .nav-label,
  .sidebar-note,
  .sidebar-contact-button {
    display: none;
  }

  .nav-button {
    justify-content: center;
    padding: 0;
  }

  .app-shell {
    width: var(--content-width);
    margin-left: var(--sidebar-space);
    margin-right: 0;
    padding: 24px 12px 118px;
  }

  .app-layout.sidebar-collapsed .app-shell {
    padding-top: 68px;
  }

  .floating-position-panel {
    right: 10px;
    bottom: 10px;
    width: min(var(--floating-panel-width, 300px), calc(100vw - 20px));
    max-width: var(--floating-panel-width, 300px);
    max-height: min(420px, 48vh);
  }

  .floating-position-panel:not(.is-collapsed) {
    overflow-y: auto;
  }

  .floating-metrics {
    grid-template-columns: 1fr;
  }

  .panel,
  .result-card {
    padding: 16px;
  }

  .pro-analysis-gate {
    padding: 48px 12px 28px;
  }

  .pro-gate-card {
    padding: 18px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .section-heading,
  .view-heading,
  .result-header,
  .submit-bar,
  .chart-card-head,
  .chart-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .auth-box input,
  .account-user {
    width: 100%;
  }

  .section-heading span,
  .view-heading > span,
  .chart-card-head span {
    text-align: left;
  }

  .analysis-progress {
    width: 100%;
    max-width: none;
  }

  .form-grid,
  .stats-grid,
  .live-calc-grid,
  .pnl-scenario-grid,
  .indicator-grid,
  .position-slots-grid,
  .positioning-grid,
  .alert-summary-grid,
  .alert-type-grid,
  .beginner-grid {
    grid-template-columns: 1fr;
  }

  .alert-center-head,
  .alert-history-head,
  .alert-settings,
  .alert-history-top,
  .slot-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .guard-card-wide {
    grid-column: auto;
  }

  .api-credential-field,
  .api-model-field {
    grid-column: auto;
  }

  .guard-list li,
  .candidate-row {
    grid-template-columns: 1fr;
  }

  .guard-list strong,
  .candidate-row strong {
    text-align: left;
  }

  .switch-row {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .switch-row::before {
    display: none;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .app-update-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .contact-modal {
    padding: 12px;
  }

  .contact-dialog {
    padding: 18px;
  }

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

  .contact-actions {
    flex-direction: column-reverse;
  }

  .analysis-duration {
    width: 100%;
    text-align: center;
  }

  .result-actions {
    width: 100%;
    flex-direction: column;
  }

  .common-input-actions {
    margin-top: -6px;
    flex-direction: column;
    align-items: stretch;
  }

  .fx-rate-pill {
    min-width: 0;
    grid-template-columns: auto auto;
    border-radius: 8px;
  }

  .fx-rate-pill small {
    grid-column: 1 / -1;
  }

  .common-input-actions .secondary-button {
    width: 100%;
  }

  .book-tables {
    grid-template-columns: 1fr;
  }

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

  .timeframe-tabs {
    width: 100%;
  }

  .chart-toolbar-controls,
  .candle-limit-control {
    width: 100%;
  }

  .candle-limit-control {
    justify-content: space-between;
  }

  .candle-limit-control select {
    min-width: 140px;
  }

  .timeframe-button {
    flex: 1;
  }

  .overlay-control-actions,
  .overlay-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-button,
  .overlay-toggle {
    width: 100%;
    justify-content: center;
  }

  .overlay-chart-box,
  .chart-empty {
    min-height: 460px;
  }

  .overlay-drag-handle {
    left: 8px;
    min-width: 92px;
    min-height: 28px;
    gap: 6px;
    font-size: 0.68rem;
    padding: 4px 7px;
  }

  .overlay-drag-handle strong {
    font-size: 0.72rem;
  }
}
