:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: #151b2b;
  --panel-2: #1a2332;
  --panel-3: #222d3d;
  --modal: #101628;
  --line: rgba(255, 255, 255, 0.075);
  --text: #f7f8ff;
  --muted: #8d95aa;
  --faint: #5f687e;
  --purple: #4e43b7;
  --purple-2: #6d63e8;
  --red: #ff6379;
  --blue: #6f8bff;
  --surface-hover: rgba(255, 255, 255, 0.045);
  --border-soft: rgba(255, 255, 255, 0.06);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Noto Sans KR",
    "Segoe UI",
    ui-sans-serif,
    system-ui,
    sans-serif;
  font-synthesis-weight: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(72, 61, 198, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(255, 99, 121, 0.045), transparent 25rem),
    var(--bg);
  color: var(--text);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.vr5-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  width: 100%;
  height: var(--vr5-loader-height, 100svh);
  min-height: var(--vr5-loader-height, 100svh);
  box-sizing: border-box;
  padding:
    max(env(safe-area-inset-top), env(safe-area-inset-bottom))
    max(env(safe-area-inset-left), env(safe-area-inset-right));
  background:
    radial-gradient(circle at 50% 40%, rgba(109, 99, 232, 0.22), transparent 18rem),
    radial-gradient(circle at 52% 54%, rgba(76, 66, 191, 0.16), transparent 12rem),
    linear-gradient(180deg, #080d1c 0%, #040714 100%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  overflow: hidden;
  contain: layout paint;
  will-change: opacity;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.vr5-splash-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  inline-size: 180px;
  block-size: 164px;
  min-block-size: 164px;
  opacity: 1;
  transform: none !important;
  animation: none !important;
  will-change: auto;
}

.vr5-splash-logo {
  width: 92px;
  height: 92px;
  display: block;
  flex: 0 0 auto;
  border-radius: 26px;
  transform: none !important;
  animation: none !important;
  will-change: auto;
  box-shadow:
    0 26px 70px rgba(63, 54, 190, 0.36),
    0 0 0 1px rgba(154, 146, 255, 0.22),
    0 0 34px rgba(109, 99, 232, 0.2);
}

.vr5-splash-card strong {
  margin-top: 8px;
  display: block;
  inline-size: 180px;
  block-size: 27px;
  color: #eaf1ff;
  font-size: 24px;
  line-height: 27px;
  font-weight: 780;
  letter-spacing: 0;
  text-align: center;
  transform: none !important;
  animation: none !important;
}

.vr5-splash-card span {
  display: block;
  inline-size: 180px;
  block-size: 17px;
  color: #9da7c4;
  font-size: 13px;
  line-height: 17px;
  font-weight: 650;
  text-align: center;
  transform: none !important;
  animation: none !important;
}

.vr5-splash.is-dismissing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vr5-splash.is-dismissing .vr5-splash-card {
  animation: none;
  opacity: 1;
  transform: none !important;
  transition: none;
}

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

button {
  border: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    color 160ms var(--ease),
    filter 160ms var(--ease),
    opacity 160ms var(--ease),
    transform 160ms var(--ease);
}

button:not(:disabled) {
  cursor: pointer;
}

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

button:not(:disabled):active {
  transform: translateY(1px) scale(0.992);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

input[type="number"] {
  appearance: textfield;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid rgba(109, 99, 232, 0.8);
  outline-offset: 2px;
}

::selection {
  background: rgba(109, 99, 232, 0.42);
  color: #ffffff;
}

.lupe-app,
.vr-card,
.value-hero strong,
.value-hero small,
.summary-card strong,
.order-row,
.auto-detect-row,
.recorded-ladder-row,
.manual-grid button,
.manual-form,
.manual-form input,
.manual-trade-row,
.history-card,
.modal-panel,
.trade-edit-panel input,
.toast {
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover,
  .vr-card:hover,
  .history-card:hover,
  .manual-grid button:not(:disabled):hover,
  .order-row:hover,
  .recorded-ladder-row:hover,
  .auto-detect-row:hover {
    filter: brightness(1.055);
  }
}

.lupe-app {
  min-height: 100vh;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) clamp(14px, 2vw, 32px) calc(32px + env(safe-area-inset-bottom));
  background: var(--bg);
  isolation: isolate;
}

.lupe-app.has-project-nav {
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
}

.lupe-app.app-entering {
  animation: appEnter 280ms var(--ease);
}

.offline-banner {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 36;
  margin: 0 calc(clamp(14px, 2vw, 32px) * -1);
  padding: 9px 14px;
  background: rgba(47, 41, 130, 0.92);
  color: #d6e1ff;
  text-align: center;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
}

.brand-row {
  height: 50px;
  display: flex;
  align-items: end;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.lupe-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8fa2ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
}

.logo-mark {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f7f8ff;
  color: #7185ff;
}

.vr5-logo-mark {
  overflow: hidden;
  background: #11182a;
  box-shadow:
    inset 0 0 0 1px rgba(129, 118, 255, 0.25),
    0 5px 16px rgba(70, 61, 198, 0.18);
}

.logo-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-mark svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.home-page {
  min-height: calc(100vh - 78px);
  padding-top: 24px;
}

.home-page,
.detail-page,
.settings-page,
.completed-page {
  will-change: opacity, transform;
}

.home-toolbar,
.sort-row,
.detail-header,
.value-hero,
.section-heading,
.modal-titlebar,
.pool-limit,
.pager,
.manual-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-toolbar-compact {
  justify-content: end;
}

.product-tabs,
.modal-tabs,
.mode-tabs,
.ladder-tabs,
.trade-tabs,
.mini-segment {
  display: grid;
  gap: 4px;
  padding: 5px;
  border-radius: 13px;
  background: #111827;
  background-image: linear-gradient(#111827, #111827);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.product-tabs {
  width: 212px;
  height: 44px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-tabs button,
.modal-tabs button,
.mode-tabs button,
.ladder-tabs button,
.trade-tabs button,
.mini-segment button {
  min-width: 0;
  border-radius: 9px;
  background: transparent;
  color: #9aa2b7;
  font-size: 12px;
  font-weight: 850;
}

.product-tabs button,
.ladder-tabs button,
.modal-tabs button,
.mode-tabs button {
  min-height: 34px;
}

.product-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.product-tabs svg {
  width: 15px;
  height: 15px;
  color: currentColor;
  stroke-width: 2.3;
}

.product-tabs button.active,
.modal-tabs button.active,
.mode-tabs button.active,
.trade-tabs button.active {
  background: #4c5568;
  background-image: linear-gradient(#4c5568, #4c5568);
  color: white;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.ladder-tabs button.active {
  background: #ffffff !important;
  background-image: linear-gradient(#ffffff, #ffffff) !important;
  color: #171b26 !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
}

.new-vr-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--purple);
  background-image: linear-gradient(var(--purple), var(--purple));
  color: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(78, 67, 183, 0.24);
}

.new-vr-pill svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.sort-row {
  justify-content: end;
  height: 32px;
  margin-top: 15px;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #929aaa;
  font-size: 12px;
  font-weight: 800;
}

.sort-button svg {
  width: 15px;
  height: 15px;
}

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

.vr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  min-height: 94px;
  padding: 16px 14px 14px;
  border-radius: 13px;
  background: var(--panel);
  background-image: linear-gradient(180deg, rgba(24, 31, 48, 0.98), rgba(18, 25, 40, 0.98));
  color: var(--text);
  text-align: left;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 7px 22px rgba(0, 0, 0, 0.16);
  transition:
    filter 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.vr-card:active,
.new-vr-pill:active,
.bare-icon:active,
.cycle-banner:active,
.order-row:active,
.manual-grid button:active {
  transform: translateY(1px);
}

.vr-card-left,
.vr-card-right {
  display: grid;
  align-content: start;
}

.vr-card-left > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.vr-card-left strong {
  font-size: 14px;
  line-height: 1.15;
}

.vr-card-left span,
.vr-card-left small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.vr-card-left small {
  margin-top: 5px;
}

.card-reminder {
  color: #ffb900;
  font-style: normal;
  font-weight: 850;
}

.vr-card-right {
  justify-items: end;
  gap: 2px;
}

.vr-card-right strong {
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
}

.vr-card-right span {
  font-size: 11px;
  font-weight: 850;
}

.vr-card-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1fr 0.8fr;
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: #737c91;
  font-size: 11px;
  font-weight: 800;
}

.vr-card-metrics span:last-child {
  text-align: right;
}

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

.loss {
  color: #62d58b;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  transform: translateX(-50%);
  width: min(calc(100vw - 24px), 760px);
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px 25px 0 0;
  background: rgba(18, 25, 41, 0.88);
  background-image: linear-gradient(180deg, rgba(23, 31, 49, 0.92), rgba(13, 20, 34, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 16px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-sizing: border-box;
  overflow: hidden;
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 1px;
  border-radius: 18px;
  background: transparent;
  color: #929aaa;
  font-size: 9px;
  font-weight: 800;
  min-height: 50px;
}

.bottom-nav button.active {
  background: rgba(98, 91, 211, 0.82);
  background-image: linear-gradient(180deg, rgba(104, 96, 222, 0.9), rgba(71, 64, 176, 0.88));
  color: white;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(64, 58, 170, 0.24);
}

.bottom-nav svg {
  width: 17px;
  height: 17px;
}

.analytics-page,
.history-db-page {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  min-width: 0;
  max-width: 100%;
}

.history-db-page {
  overflow: hidden;
}

.analytics-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.analytics-header span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.analytics-header h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
  letter-spacing: 0;
}

.analytics-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.analytics-summary-grid,
.analytics-grid,
.analytics-price-summary {
  display: grid;
  gap: 10px;
}

.analytics-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.analytics-card,
.analytics-stat,
.analytics-empty,
.history-db-card {
  border-radius: 18px;
  background: rgba(18, 25, 41, 0.94);
  background-image: linear-gradient(180deg, rgba(21, 29, 47, 0.97), rgba(13, 20, 34, 0.97));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 54px rgba(0, 0, 0, 0.22);
}

.analytics-card {
  min-width: 0;
  padding: 16px;
}

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

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

.analytics-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
}

.analytics-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.analytics-stat {
  display: grid;
  gap: 6px;
  min-height: 82px;
  padding: 16px;
  align-content: center;
}

.analytics-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.analytics-stat strong {
  color: var(--value);
  font-size: 21px;
  line-height: 1;
  font-weight: 850;
}

.analytics-stat.positive strong,
.history-db-table .positive {
  color: #63e6a2;
}

.analytics-stat.negative strong,
.history-db-table .negative {
  color: var(--red);
}

.analytics-stat.accent strong {
  color: var(--accent);
}

.analytics-chart-wrap {
  position: relative;
  min-height: 238px;
  overflow: hidden;
}

.analytics-chart {
  width: 100%;
  height: auto;
  min-height: 228px;
  display: block;
  overflow: visible;
  font-family: var(--font);
}

.analytics-grid-line {
  stroke: rgba(219, 229, 248, 0.18);
  stroke-width: 1;
  stroke-dasharray: 4 7;
}

.analytics-zero-line {
  stroke: rgba(219, 229, 248, 0.28);
  stroke-width: 1.3;
}

.analytics-y-label,
.analytics-x-label {
  fill: rgba(219, 229, 248, 0.72);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
}

.analytics-x-label.is-active {
  fill: var(--text);
}

.analytics-line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--series-color), transparent 72%));
}

.analytics-line.dashed {
  stroke-dasharray: 9 8;
}

.analytics-area {
  fill: var(--series-color);
  opacity: 0.14;
}

.analytics-point {
  fill: var(--series-color);
  stroke: var(--bg);
  stroke-width: 2;
  opacity: 0.88;
  transition: r 160ms var(--ease), opacity 160ms var(--ease);
}

.analytics-point.is-active {
  r: 6;
  opacity: 1;
}

.analytics-bar {
  fill: #60a5fa;
  opacity: 0.9;
  transition: opacity 160ms var(--ease), filter 160ms var(--ease);
}

.analytics-bar.positive {
  fill: #10b981;
}

.analytics-bar.negative {
  fill: #ef4444;
}

.analytics-bar.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.analytics-guide {
  stroke: rgba(221, 231, 255, 0.62);
  stroke-width: 1.4;
  opacity: 0;
  pointer-events: none;
}

.analytics-chart-wrap.active .analytics-guide {
  opacity: 1;
}

.analytics-tip {
  position: absolute;
  z-index: 2;
  min-width: 174px;
  max-width: min(230px, calc(100% - 16px));
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(152, 130, 255, 0.3);
  background: rgba(16, 23, 38, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}

.analytics-tip[aria-hidden="false"] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.analytics-tip div,
.analytics-tip span {
  display: grid;
  gap: 5px;
}

.analytics-tip strong {
  font-size: 14px;
  font-weight: 850;
}

.analytics-tip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.analytics-tip span {
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.analytics-tip span strong {
  color: var(--value);
  font-size: 12px;
  text-align: right;
}

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

.analytics-empty {
  gap: 6px;
  padding: 22px;
  text-align: center;
}

.analytics-empty strong {
  color: var(--text);
}

.analytics-empty span {
  font-size: 12px;
}

.analytics-price-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 8px;
}

.analytics-period-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.analytics-period-tabs button {
  min-width: 40px;
  min-height: 34px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 850;
}

.analytics-period-tabs button.active {
  background: rgba(98, 91, 211, 0.86);
  color: white;
}

.history-db-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
}

.history-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  background: rgba(9, 14, 26, 0.28);
  -webkit-overflow-scrolling: touch;
}

.history-db-table {
  width: max(1060px, 100%);
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  table-layout: auto;
}

.history-db-table th,
.history-db-table td {
  padding: 12px 13px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 12px;
  font-weight: 760;
}

.history-db-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: rgba(18, 25, 41, 0.99);
  font-weight: 850;
}

.history-db-table td {
  color: rgba(220, 230, 247, 0.86);
}

.empty-lupe,
.settings-list {
  margin-top: 18px;
}

.empty-lupe,
.settings-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 13px;
  background: var(--panel);
  background-image: linear-gradient(180deg, rgba(24, 31, 48, 0.98), rgba(18, 25, 40, 0.98));
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.empty-lupe span,
.settings-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.settings-card.action,
.settings-card.danger {
  width: 100%;
}

.settings-card.danger strong,
.history-section .section-heading button,
.delete-vr,
.danger-button {
  color: var(--red);
}

.settings-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: #111827;
  background-image: linear-gradient(180deg, rgba(20, 28, 45, 0.98), rgba(14, 21, 35, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 42px rgba(0, 0, 0, 0.16);
}

.settings-section-title,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-section-title {
  padding: 3px 4px 7px;
}

.settings-section-title strong {
  font-size: 16px;
  font-weight: 780;
}

.settings-section-title span,
.settings-row small {
  color: var(--muted);
}

.settings-row {
  min-height: 58px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 13px;
  background: #1a2332;
  background-image: linear-gradient(180deg, #1c2636, #182131);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.settings-row.passive {
  pointer-events: none;
}

.settings-row span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-row b {
  font-size: 13px;
  font-weight: 760;
}

.settings-row small {
  font-size: 11px;
  line-height: 1.35;
}

.settings-row em {
  color: #9aa5ba;
  font-style: normal;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.settings-row svg {
  color: #848da0;
  width: 17px;
  height: 17px;
}

.settings-row-column {
  display: grid;
  align-items: stretch;
}

.settings-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.settings-row-split label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-row-split span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.settings-row-split input,
.notification-presets input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: right;
  font-size: 16px;
  font-weight: 780;
}

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

.notification-presets button,
.notification-presets label {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 12px;
  background: #222c3c;
  color: #a7afbf;
  font-size: 12px;
  font-weight: 780;
}

.notification-presets .active,
.notification-presets button.active {
  background: rgba(102, 92, 225, 0.32);
  color: #f6f7ff;
  box-shadow: inset 0 0 0 1px rgba(119, 112, 255, 0.34);
}

.notification-presets label input {
  width: 46px;
  font-size: 12px;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.settings-actions button {
  min-height: 48px;
  border-radius: 13px;
  background: #1a2332;
  color: #c7d8ff;
  font-size: 12px;
  font-weight: 760;
}

.settings-actions button:first-child {
  background: rgba(78, 67, 183, 0.86);
  color: white;
}

.status-good {
  color: #64dd98 !important;
}

.status-warn {
  color: #ffc857 !important;
}

.detail-page {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  min-width: 0;
}

.detail-header {
  align-items: flex-start;
}

.bare-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: #8e96aa;
}

.bare-icon:not(:disabled):hover {
  color: #c7d0e3;
  background: rgba(255, 255, 255, 0.035);
}

.bare-icon.edit {
  margin-top: 7px;
}

.bare-icon svg {
  width: 21px;
  height: 21px;
}

.detail-title {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 5px;
}

.detail-title h1 {
  margin: 0;
  display: inline;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 930;
}

.detail-title > span {
  display: inline;
  color: #8b94a8;
  font-size: 12px;
  font-weight: 760;
}

.detail-title small {
  color: #788195;
  font-size: 12px;
  font-weight: 800;
}

.detail-title small b {
  color: #746cff;
}

.cycle-banner {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  border-radius: 11px;
  background: #222c3b;
  background-image: linear-gradient(180deg, #253142, #202a39);
  color: #8c95a8;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.cycle-banner.active {
  background: #2d2579;
  background-image: linear-gradient(180deg, #342b8b, #29216f);
  color: #bfc5ff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.028),
    0 10px 28px rgba(55, 44, 150, 0.18);
}

.value-hero {
  align-items: end;
  min-width: 0;
}

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

.value-hero > div:last-child {
  justify-items: end;
}

.value-hero span {
  color: #848da1;
  font-size: 12px;
  font-weight: 850;
}

.evaluation-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.value-hero .live-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #46e889;
  box-shadow: 0 0 0 3px rgba(70, 232, 137, 0.13), 0 0 12px rgba(70, 232, 137, 0.42);
  animation: liveDotPulse 1.8s var(--ease) infinite;
}

.value-hero strong {
  font-size: clamp(32px, 4.4vw, 38px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.value-hero > div:last-child strong {
  font-size: clamp(20px, 3.1vw, 24px);
}

.value-hero small {
  color: #747d90;
  font-size: 11px;
  font-weight: 800;
}

.chart-section {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.chart-caption {
  color: #8a93a6;
  font-size: 12px;
  font-weight: 850;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 222px;
  min-width: 0;
  contain: layout paint;
}

.lupe-chart {
  width: 100%;
  height: 214px;
  display: block;
  touch-action: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  shape-rendering: auto;
}

.lupe-chart text {
  font-family: "Apple SD Gothic Neo", "Pretendard", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans KR", "Segoe UI", sans-serif;
  fill: #c8d2e4;
  font-size: 11.75px;
  font-weight: 680;
  letter-spacing: 0;
  paint-order: normal;
  stroke: none;
  stroke-width: 0;
  stroke-linejoin: initial;
  pointer-events: none;
  text-shadow: none;
  user-select: none;
}

.x-axis text {
  fill: #d5deef;
  font-size: 12px;
  font-weight: 720;
  text-anchor: middle;
  transition: fill 0.16s ease, font-weight 0.16s ease;
}

.x-axis text.is-active {
  fill: #eef5ff;
  font-weight: 760;
}

.x-axis text.is-muted {
  opacity: 0;
}

.grid-lines line {
  stroke: rgba(255, 255, 255, 0.08);
  shape-rendering: crispEdges;
  vector-effect: non-scaling-stroke;
}

.grid-lines text {
  fill: #cbd5e6;
  font-size: 11.75px;
  font-weight: 690;
}

.chart-line {
  fill: none;
  stroke-width: 2.35;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 180ms var(--ease);
}

.chart-line.value {
  stroke: var(--red);
}

.chart-line.max,
.chart-line.min {
  stroke: rgba(141, 84, 232, 0.9);
  stroke-dasharray: 7 6;
}

.chart-line.target {
  stroke: rgba(157, 163, 179, 0.75);
  stroke-dasharray: 3 5;
}

.point {
  stroke: transparent;
  transition:
    stroke-width 0.16s ease,
    opacity 0.16s ease,
    stroke 0.16s ease,
    r 0.16s ease;
  vector-effect: non-scaling-stroke;
}

.point.value {
  fill: var(--red);
}

.point.max,
.point.min {
  fill: #8f58ff;
}

.point.target {
  fill: #8d94a5;
}

.point.value.is-current {
  stroke: rgba(255, 99, 121, 0.34);
  stroke-width: 6;
}

.live-pulse .detail-page.is-live-current .valuation-amount {
  animation: liveNumberPulse 720ms var(--ease);
}

.live-pulse .detail-page.is-live-current .chart-line.value {
  animation: liveLinePulse 720ms var(--ease);
}

.detail-page.is-live-current .point.value.is-live-point {
  animation: livePointPulse 1.8s var(--ease) infinite;
}

.chart-wrap.active .point.value.is-active {
  stroke: rgba(255, 99, 121, 0.46);
  stroke-width: 6;
}

.chart-wrap.active .point.max.is-active,
.chart-wrap.active .point.min.is-active {
  stroke: rgba(165, 92, 255, 0.46);
  stroke-width: 5;
}

.chart-wrap.active .point.target.is-active {
  stroke: rgba(168, 176, 196, 0.45);
  stroke-width: 5;
}

.chart-guide {
  stroke: rgba(148, 163, 184, 0.42);
  stroke-width: 1;
  stroke-dasharray: 5 6;
  opacity: 0;
  transition: opacity 0.14s ease;
  vector-effect: non-scaling-stroke;
}

.chart-hotzone {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0;
  pointer-events: all;
  cursor: crosshair;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  width: 168px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  background: rgba(18, 25, 41, 0.985);
  color: white;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  will-change: left, top, opacity;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease,
    left 0.1s linear,
    top 0.1s linear;
}

.chart-wrap.active .chart-tip,
.chart-wrap.active .chart-guide {
  opacity: 1;
  visibility: visible;
}

.chart-tip strong {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 760;
}

.chart-tip span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
}

.chart-tip b {
  color: #d7dcec;
}

.legend {
  position: absolute;
  right: 8px;
  bottom: 0;
  display: inline-flex;
  gap: 14px;
  color: #868fa4;
  font-size: 11px;
  font-weight: 800;
  user-select: none;
}

.legend span::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  background: currentColor;
}

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

.violet {
  color: #8f58ff;
}

.gray {
  color: #8d94a5;
}

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

.summary-card {
  min-height: 60px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 9px;
  border-radius: 10px;
  background: var(--panel-2);
  background-image: linear-gradient(180deg, rgba(29, 39, 57, 0.98), rgba(24, 33, 49, 0.98));
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.summary-card span {
  color: #707a90;
  font-size: 10px;
  font-weight: 850;
}

.summary-card strong {
  font-size: 15px;
  line-height: 1.05;
  font-weight: 930;
}

.summary-card small {
  color: #716cff;
  font-size: 9px;
  font-weight: 850;
}

.ladder-section {
  display: grid;
  gap: 10px;
}

.ladder-tabs {
  height: 38px;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border-radius: 9px;
  background: var(--panel-2);
  background-image: linear-gradient(var(--panel-2), var(--panel-2));
}

.ladder-tabs button {
  min-height: 32px;
  border-radius: 7px;
}

.pool-limit {
  color: #8790a3;
  font-size: 12px;
  font-weight: 850;
}

.pool-limit strong {
  color: #908bff;
}

.auto-detect-banner {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #111033;
  background-image: linear-gradient(180deg, #171442, #111033);
  box-shadow: inset 0 0 0 1px rgba(123, 113, 255, 0.08);
}

.auto-detect-banner strong {
  display: block;
  color: #bfcaff;
  font-size: 13px;
  font-weight: 780;
}

.auto-detect-banner span {
  color: #6e85ff;
  font-size: 11px;
  font-weight: 680;
}

.auto-detect-banner button {
  min-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  background: #6048ff;
  background-image: linear-gradient(#6048ff, #6048ff);
  color: white;
  font-size: 13px;
  font-weight: 760;
}

.auto-day-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #969fb1;
  font-size: 12px;
  font-weight: 740;
}

.auto-day-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auto-day-heading span {
  color: #ffc400;
}

.auto-detect-list {
  display: grid;
  gap: 7px;
}

.auto-detect-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px auto auto 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  background: #1b0d11;
  background-image: linear-gradient(180deg, rgba(32, 14, 18, 0.98), rgba(25, 10, 14, 0.98));
  transition:
    filter 160ms var(--ease),
    opacity 160ms var(--ease),
    transform 160ms var(--ease);
}

.auto-detect-row.editing {
  grid-template-columns: 24px minmax(96px, 150px) auto 28px 28px;
  min-height: 54px;
  border: 1px solid rgba(98, 73, 255, 0.92);
  background: rgba(42, 14, 27, 0.96);
  background-image: linear-gradient(180deg, rgba(48, 17, 31, 0.98), rgba(31, 10, 20, 0.98));
  box-shadow: inset 0 0 0 1px rgba(98, 73, 255, 0.18);
}

.auto-detect-row.excluded {
  opacity: 0.48;
}

.auto-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #9182ff;
  background-image: linear-gradient(#9182ff, #9182ff);
  color: white;
}

.auto-check svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.auto-detect-row.excluded .auto-check {
  background: #31394c;
  background-image: linear-gradient(#31394c, #31394c);
}

.auto-detect-row strong {
  color: #ffd21f;
  font-size: 15px;
  font-weight: 820;
}

.auto-detect-row del {
  color: #8f96a8;
  font-size: 12px;
  font-weight: 720;
}

.auto-detect-row span {
  color: #f4f6ff;
  font-size: 13px;
  font-weight: 740;
}

.auto-edit {
  display: grid;
  place-items: center;
  background: transparent;
  color: #7e879b;
}

.auto-edit svg {
  width: 17px;
  height: 17px;
}

.auto-price-edit {
  height: 34px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(35, 46, 66, 0.96);
  box-shadow: inset 0 0 0 1px rgba(109, 91, 255, 0.72);
}

.auto-price-edit b {
  color: #909aae;
  font-size: 13px;
  font-weight: 780;
}

.auto-price-edit input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #c8d8ff;
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.auto-inline-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #8790a4;
}

.auto-inline-action.confirm {
  color: #8177ff;
}

.auto-inline-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.recorded-ladder-row {
  position: relative;
  min-height: 48px;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 12px;
  background: #061d18;
  background-image: linear-gradient(180deg, rgba(7, 32, 26, 0.98), rgba(5, 25, 21, 0.98));
  transition:
    filter 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.recorded-ladder-row > span {
  color: #1ff28a;
  font-size: 13px;
  font-weight: 900;
}

.recorded-ladder-row strong {
  color: #68f2a9;
  font-size: 15px;
  font-weight: 820;
}

.recorded-ladder-row del {
  color: #8f96a8;
  font-size: 12px;
  font-weight: 720;
}

.trade-menu-cell {
  position: relative;
  display: grid;
  place-items: center;
}

.trade-menu-cell > button {
  width: 26px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #7e879b;
  font-size: 21px;
  line-height: 1;
}

.trade-menu {
  position: absolute;
  right: 0;
  top: 30px;
  z-index: 12;
  min-width: 92px;
  overflow: hidden;
  border: 1px solid rgba(114, 124, 148, 0.24);
  border-radius: 10px;
  background: #151b2e;
  background-image: linear-gradient(#151b2e, #151b2e);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}

.trade-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: #dbe3f2;
  text-align: left;
  font-size: 12px;
  font-weight: 780;
}

.trade-menu button + button {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

.order-row {
  min-height: 39px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 10px;
  background: var(--panel-2);
  background-image: linear-gradient(180deg, rgba(29, 39, 57, 0.98), rgba(24, 33, 49, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.014);
  transition:
    filter 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.order-row span {
  color: var(--red);
  font-size: 12px;
  font-weight: 950;
}

.order-row.sell span {
  color: #6c91ff;
}

.order-row strong {
  font-size: 13px;
  font-weight: 930;
}

.order-row em {
  color: #677187;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.pager {
  height: 36px;
  color: #8992a5;
  font-size: 12px;
  font-weight: 850;
}

.pager button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: #9aa3b5;
}

.pager button:disabled {
  color: #4d5669;
}

.manual-section,
.history-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.section-heading h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.section-heading span,
.section-heading button {
  background: transparent;
  color: #8b94a8;
  font-size: 11px;
  font-weight: 850;
}

.weekday-row,
.manual-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.weekday-row span {
  text-align: center;
  color: #777f92;
  font-size: 11px;
  font-weight: 850;
}

.manual-grid button {
  min-height: 58px;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 9px;
  border-radius: 10px;
  background: #111927;
  background-image: linear-gradient(180deg, rgba(18, 27, 42, 0.98), rgba(14, 21, 34, 0.98));
  color: #747d91;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012);
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background 160ms var(--ease),
    filter 160ms var(--ease);
}

.manual-grid button.selected {
  background: #11132b;
  background-image: linear-gradient(180deg, #151641, #11132b);
  box-shadow:
    inset 0 0 0 1px rgba(118, 112, 255, 0.86),
    0 0 0 1px rgba(118, 112, 255, 0.08),
    0 8px 24px rgba(67, 58, 174, 0.12);
}

.manual-grid button.live {
  color: #dfe7f8;
  box-shadow:
    inset 0 0 0 1px rgba(109, 99, 232, 0.4),
    0 0 18px rgba(91, 77, 232, 0.08);
}

.manual-grid button.disabled {
  opacity: 0.38;
  filter: grayscale(0.24);
}

.manual-grid b {
  font-size: 12px;
  line-height: 1;
}

.manual-grid span,
.manual-grid small {
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.manual-grid span {
  align-self: end;
  color: #f1f4fb;
  font-size: 14px;
  font-weight: 760;
}

.manual-form {
  width: min(100%, 960px);
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(88, 75, 218, 0.38);
  border-radius: 16px;
  background: #0d1122;
  background-image: linear-gradient(180deg, rgba(16, 21, 37, 0.98), rgba(13, 17, 34, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(109, 99, 232, 0.06),
    0 14px 36px rgba(0, 0, 0, 0.2);
  animation: revealPanel 220ms var(--ease);
}

.manual-form .trade-tabs button.active {
  background: #f7f7f7;
  background-image: linear-gradient(#f7f7f7, #f7f7f7);
  color: #111827;
}

.manual-form h3 {
  margin: 0;
  color: #f4f7ff;
  font-size: 17px;
  font-weight: 790;
}

.manual-stats {
  min-height: 52px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #151f30;
  background-image: linear-gradient(180deg, #172236, #131d2e);
}

.manual-stats div {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.manual-stats span {
  color: #818b9f;
  font-size: 11px;
  font-weight: 760;
}

.manual-stats strong {
  color: #eef2fb;
  font-size: 13px;
  font-weight: 760;
}

.trade-tabs {
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border-radius: 9px;
  background: var(--panel-2);
  background-image: linear-gradient(180deg, rgba(29, 39, 57, 0.98), rgba(23, 32, 48, 0.98));
}

.trade-tabs button {
  min-height: 32px;
}

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

.manual-form label {
  display: grid;
  gap: 6px;
  min-height: 58px;
  padding: 9px 12px 10px;
  border-radius: 12px;
  background: #151e2f;
  background-image: linear-gradient(180deg, #172236, #131d2e);
  transition:
    box-shadow 160ms var(--ease),
    background-color 160ms var(--ease);
}

.manual-form label span {
  color: #838da1;
  font-size: 11px;
  font-weight: 760;
}

.manual-form input {
  width: 100%;
  min-height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: white;
  padding: 0;
  font-size: 18px;
  font-weight: 760;
  caret-color: #f7f8ff;
  pointer-events: auto;
}

.manual-form input:focus {
  outline: 0;
}

.manual-form label:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(118, 112, 255, 0.46),
    0 0 0 3px rgba(109, 99, 232, 0.08);
}

.manual-actions {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}

.manual-actions .muted-button,
.manual-actions .primary-dark {
  min-height: 44px;
  border-radius: 12px;
}

.manual-trades {
  display: grid;
  gap: 9px;
  padding-top: 12px;
}

.manual-trades h3 {
  margin: 0;
  color: #848ea3;
  font-size: 14px;
  font-weight: 760;
}

.manual-trade-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 24px;
  align-items: center;
  gap: 10px;
  color: #dfe6f4;
  padding: 8px 0;
  border-radius: 10px;
  transition: background-color 160ms var(--ease);
}

.manual-trade-row:hover {
  background: rgba(255, 255, 255, 0.015);
}

.manual-trade-row div {
  display: grid;
  gap: 5px;
}

.manual-trade-row small {
  color: #6c7487;
  font-size: 12px;
  font-weight: 700;
}

.manual-trade-row strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 780;
}

.manual-trade-row em {
  color: #7d8799;
  font-size: 13px;
  font-style: normal;
  font-weight: 720;
}

.manual-trade-row button {
  background: transparent;
  color: #737d91;
  font-size: 22px;
  line-height: 1;
}

.buy-badge,
.sell-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  color: #ff6b74;
  background: rgba(122, 19, 18, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.sell-badge {
  color: #78a2ff;
  background: rgba(36, 61, 130, 0.72);
}

.muted-button,
.primary-dark,
.danger-button {
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
}

.muted-button {
  background: #202a3a;
  color: #b6bdca;
}

.primary-dark {
  background: var(--purple);
  color: white;
}

.primary-dark:disabled {
  background: #202a3a;
  color: #667085;
}

.history-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 35px) / 6);
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 1px;
  padding: 1px 0 5px;
  scrollbar-width: none;
}

.history-cards::-webkit-scrollbar {
  display: none;
}

.history-card {
  min-height: 86px;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 11px;
  border-radius: 10px;
  background: var(--panel);
  background-image: linear-gradient(180deg, rgba(24, 31, 48, 0.98), rgba(18, 25, 40, 0.98));
  color: white;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
  transition:
    filter 160ms var(--ease),
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease);
  scroll-snap-align: start;
}

.history-card:active,
.manual-grid button:not(:disabled):active,
.order-row:active,
.recorded-ladder-row:active,
.auto-detect-row:active {
  transform: translateY(1px) scale(0.996);
}

.history-card.active {
  background: #171d31;
  background-image: linear-gradient(180deg, #1a2140, #171d31);
  box-shadow:
    inset 0 0 0 1px rgba(118, 112, 255, 0.5),
    0 9px 28px rgba(67, 58, 174, 0.12);
}

.history-card strong {
  color: #8d88ff;
  font-size: 12px;
}

.history-card span,
.history-card small {
  color: #a0a8b7;
  font-size: 11px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.66);
  background-image: linear-gradient(rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.66));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 180ms var(--ease);
}

.modal-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 55;
  width: min(calc(100vw - 40px), 590px);
  min-width: 0;
  max-height: min(80vh, 690px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 16px 14px;
  border: 1px solid rgba(104, 106, 182, 0.22);
  border-radius: 18px;
  background: var(--modal);
  background-image: linear-gradient(180deg, #11182b, #0f1526);
  box-shadow: var(--shadow);
  animation: modalIn 240ms var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 151, 170, 0.36) transparent;
}

.modal-panel::-webkit-scrollbar {
  width: 8px;
}

.modal-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(142, 151, 170, 0.28);
}

.modal-panel.small {
  max-height: min(70vh, 560px);
}

.cycle-update-panel {
  max-height: min(74vh, 560px);
}

.trade-edit-panel {
  width: min(58vw, 760px);
  min-width: min(calc(100vw - 32px), 520px);
  padding: 18px 16px;
  border-radius: 20px;
}

.trade-edit-panel .modal-titlebar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  height: 40px;
  align-items: center;
}

.trade-edit-panel .modal-titlebar h2 {
  text-align: center;
  font-size: 20px;
  line-height: 1.1;
}

.trade-edit-panel .modal-titlebar button {
  font-size: 16px;
  color: #7f8cff;
}

.trade-edit-panel .modal-titlebar button:last-child {
  text-align: right;
}

.trade-edit-panel .modal-stack {
  gap: 14px;
  padding-top: 14px;
}

.trade-edit-panel .form-card {
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #141b2d;
  background-image: linear-gradient(180deg, #151d31, #12192b);
}

.trade-edit-panel .form-card > * + * {
  border-top: 0;
}

.trade-edit-panel .modal-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(74px, 1fr) minmax(130px, 0.8fr);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: 13px;
  background: #222c3c;
  background-image: linear-gradient(180deg, #243043, #202a3b);
  transition: box-shadow 160ms var(--ease), background 160ms var(--ease);
}

.trade-edit-panel .modal-row:focus-within {
  background: #253044;
  background-image: linear-gradient(180deg, #273448, #222e42);
  box-shadow:
    inset 0 0 0 1px rgba(118, 112, 255, 0.42),
    0 0 0 3px rgba(109, 99, 232, 0.08);
}

.trade-edit-panel .modal-row span {
  color: #8d96aa;
  font-size: 15px;
  font-weight: 720;
}

.trade-edit-panel .modal-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #f2f5ff;
  text-align: right;
  font-size: 18px;
  font-weight: 760;
  caret-color: #f7f8ff;
  pointer-events: auto;
}

.trade-edit-panel .modal-row input:focus {
  outline: 0;
}

.trade-edit-panel .unit-input {
  width: 100%;
  grid-template-columns: min-content minmax(0, 1fr) min-content;
  min-width: 0;
  justify-items: stretch;
}

.trade-edit-panel .unit-input.money {
  grid-template-columns: min-content minmax(0, 1fr);
}

.trade-edit-panel .unit-input.quantity {
  grid-template-columns: minmax(96px, 1fr) min-content;
  justify-self: end;
  max-width: 190px;
}

.trade-edit-panel .unit-input.quantity input {
  min-width: 96px;
  padding-right: 5px;
}

.trade-edit-panel .unit-input b {
  color: #8f98ab;
  font-size: 15px;
  pointer-events: none;
}

.trade-edit-panel .delete-vr {
  min-height: 60px;
  border-radius: 13px;
  background: #151e31;
  background-image: linear-gradient(180deg, #172237, #131b2e);
  color: var(--red);
  font-size: 17px;
  font-weight: 780;
}

.modal-titlebar {
  height: 32px;
}

.modal-titlebar h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
}

.modal-titlebar button {
  background: transparent;
  color: #8780ff;
  font-size: 13px;
  font-weight: 900;
}

.modal-tabs {
  grid-template-columns: repeat(2, 1fr);
  margin: 9px 0 12px;
  background: var(--panel-2);
  background-image: linear-gradient(var(--panel-2), var(--panel-2));
}

.modal-tabs button.active {
  background: white;
  color: #121826;
}

.modal-stack {
  display: grid;
  gap: 10px;
}

.form-card,
.advanced-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #151b2e;
  background-image: linear-gradient(#151b2e, #151b2e);
}

.form-card > * + * {
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.continue-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(7, 12, 24, 0.16);
}

.continue-preview > span {
  color: #7e8bff;
  font-size: 12px;
  font-weight: 780;
}

.continue-preview p {
  margin: 0;
  color: #8b94a8;
  font-size: 12px;
  line-height: 1.45;
}

.continue-preview dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.continue-preview div {
  min-height: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.continue-preview dt,
.continue-preview dd {
  margin: 0;
  font-size: 12px;
  font-weight: 760;
}

.continue-preview dt {
  color: #9099ab;
}

.continue-preview dd {
  color: #d8e8ff;
  font-variant-numeric: tabular-nums;
}

.modal-row,
.money-row,
.advanced-row,
.toggle-line {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.modal-row span,
.money-row span,
.advanced-row span,
.toggle-line span,
.card-label {
  color: #d7dcea;
  font-size: 13px;
  font-weight: 850;
}

.card-label {
  padding: 10px 12px 0;
  color: #697286;
  font-size: 11px;
}

.modal-row input,
.money-row input,
.advanced-row input,
.advanced-box input,
.advanced-full input,
.cycle-inline input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #dfe4f2;
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}

.modal-row input::placeholder {
  color: #626c80;
}

.ticker-buttons {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  align-items: center;
}

.ticker-buttons button,
.broker-row button,
.select-like {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  background: #222c3c;
  background-image: linear-gradient(#222c3c, #222c3c);
  color: #9da5b6;
  font-size: 12px;
  font-weight: 900;
}

.ticker-buttons button.active {
  background: #455062;
  background-image: linear-gradient(#455062, #455062);
  color: white;
}

.ticker-buttons button:disabled,
.select-like:disabled {
  opacity: 0.35;
}

.select-like.active {
  background: #3f4a5c;
  background-image: linear-gradient(#3f4a5c, #3f4a5c);
  color: #eef3ff;
}

.identity-card {
  position: relative;
  overflow: visible;
  z-index: 5;
}

.start-date-popover {
  position: absolute;
  right: 10px;
  top: 132px;
  z-index: 10;
  width: min(420px, calc(100vw - 44px));
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(105, 113, 133, 0.34);
  border-radius: 0;
  background: #070b15;
  background-image: linear-gradient(#070b15, #070b15);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(105, 113, 133, 0.34) !important;
}

.calendar-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.calendar-header > button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #101726;
  background-image: linear-gradient(#101726, #101726);
  color: #b9c1d1;
}

.calendar-header > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #f4f7ff;
  font-size: 22px;
  font-weight: 720;
}

.calendar-header svg {
  width: 17px;
  height: 17px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays span {
  color: #9aa2b4;
  text-align: center;
  font-size: 14px;
  font-weight: 680;
}

.calendar-grid button {
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 10px;
  background: transparent;
  color: #f1f4fb;
  font-size: 18px;
  font-weight: 700;
}

.calendar-grid button.outside {
  color: rgba(154, 162, 180, 0.45);
}

.calendar-grid button.today {
  box-shadow: inset 0 0 0 1px rgba(122, 133, 155, 0.5);
}

.calendar-grid button.selected {
  background: #302c83;
  background-image: linear-gradient(#302c83, #302c83);
  color: #6f6aea;
}

.broker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px 6px;
}

.helper {
  margin: 0;
  padding: 0 12px 12px;
  color: #666f83;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.mode-tabs {
  grid-template-columns: repeat(3, 1fr);
  margin: 8px 12px 10px;
  background: var(--panel-2);
  background-image: linear-gradient(var(--panel-2), var(--panel-2));
}

.mode-tabs button.active {
  background: white;
  background-image: linear-gradient(#ffffff, #ffffff);
  color: #141a27;
}

.modal-panel .mode-tabs button.active,
.modal-panel .modal-tabs button.active,
.modal-panel .trade-tabs button.active {
  background: #ffffff !important;
  background-image: linear-gradient(#ffffff, #ffffff) !important;
  color: #141a27 !important;
}

.money-row b {
  color: #8791a5;
}

.cycle-preview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin: 8px 12px 10px;
  padding: 12px;
  border-radius: 10px;
  background: #222d3d;
  background-image: linear-gradient(#222d3d, #222d3d);
}

.cycle-preview span,
.cycle-preview small {
  color: #cbd3df;
  font-size: 12px;
  font-weight: 850;
}

.cycle-preview b {
  color: #a7a4ff;
  font-size: 13px;
}

.cycle-preview small {
  grid-column: 1 / -1;
  color: #727c91;
  font-size: 11px;
}

.advanced-toggle,
.delete-vr {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-radius: 12px;
  background: #151b2e;
  background-image: linear-gradient(#151b2e, #151b2e);
  color: #938cff;
  font-size: 13px;
  font-weight: 900;
}

.advanced-toggle svg {
  width: 16px;
  height: 16px;
  color: #6c7486;
}

.advanced-card.compact {
  gap: 10px;
  padding: 12px;
  overflow: visible;
}

.advanced-card.compact > * + * {
  border-top: 0;
}

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

.advanced-box,
.advanced-full,
.cycle-inline {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 10px;
  background: #222c3c;
  background-image: linear-gradient(#222c3c, #222c3c);
}

.advanced-full {
  min-height: 44px;
}

.advanced-box span,
.advanced-full span,
.cycle-inline span {
  min-width: 0;
  color: #838da1;
  font-size: 12px;
  font-weight: 850;
}

.advanced-full small,
.modal-row small {
  display: block;
  color: #647087;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.advanced-box.readonly,
.advanced-full.readonly {
  color: #6b7487;
}

.advanced-box.readonly strong,
.advanced-full.readonly strong {
  color: #70798c;
  font-size: 13px;
  font-weight: 900;
}

.unit-input {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(38px, 72px) auto;
  align-items: center;
  gap: 5px;
}

.unit-input.money {
  grid-template-columns: auto minmax(72px, 94px);
}

.unit-input em,
.unit-input b {
  color: #939cad;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.unit-input b {
  color: #939cad;
  font-size: 12px;
}

.mini-segment {
  grid-template-columns: repeat(2, minmax(56px, 1fr));
  padding: 3px;
  background: #222c3c;
  background-image: linear-gradient(#222c3c, #222c3c);
}

.mini-segment button {
  min-height: 27px;
  font-size: 11px;
}

.mini-segment button.active {
  background: #465064;
  background-image: linear-gradient(#465064, #465064);
  color: white;
}

.toggle {
  width: 42px;
  height: 24px;
  position: relative;
  border-radius: 999px;
  background: #30394b;
}

.toggle::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #aeb6c5;
  transition: transform 0.14s ease;
}

.toggle.on {
  background: var(--purple);
}

.toggle.on::after {
  transform: translateX(18px);
  background: white;
}

.delete-vr {
  justify-content: center;
  background: #151b2e;
}

.modal-row.tall {
  min-height: 58px;
}

.cycle-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 10px 12px 0;
}

.cycle-mode {
  padding: 12px;
}

.cycle-mode > span {
  display: block;
  margin-bottom: 8px;
  color: #8790a3;
  font-size: 12px;
  font-weight: 850;
}

.cycle-mode .mode-tabs {
  margin: 0;
}

.update-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #151b2e;
  background-image: linear-gradient(180deg, #151d31, #12192b);
}

.update-summary > span {
  color: #858fa3;
  font-size: 12px;
  font-weight: 850;
}

.update-summary dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.update-summary dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.update-summary dt,
.update-summary dd {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.update-summary dt {
  color: #a7afbf;
}

.update-summary dd {
  color: #dfe5f5;
}

.update-summary .yellow {
  color: #ffc400;
}

.confirm-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  width: min(calc(100vw - 32px), 370px);
  display: grid;
  gap: 12px;
  transform: translate(-50%, -50%);
  padding: 18px;
  border-radius: 18px;
  background: var(--modal);
  background-image: linear-gradient(180deg, #11182b, #0f1526);
  box-shadow: var(--shadow);
  animation: modalIn 220ms var(--ease);
}

.confirm-modal h2 {
  margin: 0;
  font-size: 17px;
}

.confirm-modal p {
  margin: 0;
  color: #9ca5b7;
  font-size: 13px;
  line-height: 1.5;
}

.confirm-modal div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.danger-button {
  background: rgba(255, 99, 121, 0.14);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 80;
  transform: translateX(-50%);
  max-width: min(88vw, 360px);
  padding: 11px 14px;
  border-radius: 999px;
  background: white;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--shadow);
  animation: toastIn 180ms var(--ease);
}

@keyframes appEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes revealPanel {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes liveNumberPulse {
  0% {
    filter: brightness(1);
    transform: translateY(0);
  }
  35% {
    filter: brightness(1.18);
    transform: translateY(-1px);
  }
  100% {
    filter: brightness(1);
    transform: translateY(0);
  }
}

@keyframes liveDotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(70, 232, 137, 0.13), 0 0 10px rgba(70, 232, 137, 0.34);
    opacity: 0.88;
  }
  50% {
    box-shadow: 0 0 0 5px rgba(70, 232, 137, 0.07), 0 0 16px rgba(70, 232, 137, 0.58);
    opacity: 1;
  }
}

@keyframes liveLinePulse {
  0% {
    filter: drop-shadow(0 0 0 rgba(255, 99, 121, 0));
  }
  45% {
    filter: drop-shadow(0 0 7px rgba(255, 99, 121, 0.45));
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 99, 121, 0));
  }
}

@keyframes livePointPulse {
  0%,
  100% {
    stroke-width: 6;
    stroke: rgba(255, 99, 121, 0.34);
  }
  50% {
    stroke-width: 10;
    stroke: rgba(255, 99, 121, 0.11);
  }
}

@keyframes valueRise {
  0% {
    color: inherit;
    text-shadow: 0 0 0 rgba(98, 213, 139, 0);
  }
  35% {
    color: #75e6a3;
    text-shadow: 0 0 18px rgba(98, 213, 139, 0.28);
  }
  100% {
    color: inherit;
    text-shadow: 0 0 0 rgba(98, 213, 139, 0);
  }
}

@keyframes valueFall {
  0% {
    color: inherit;
    text-shadow: 0 0 0 rgba(255, 99, 121, 0);
  }
  35% {
    color: #ff7488;
    text-shadow: 0 0 18px rgba(255, 99, 121, 0.28);
  }
  100% {
    color: inherit;
    text-shadow: 0 0 0 rgba(255, 99, 121, 0);
  }
}

.value-up {
  animation: valueRise 780ms var(--ease);
}

.value-down {
  animation: valueFall 780ms var(--ease);
}

.value-hero strong,
.vr-card-right strong,
.summary-card strong {
  min-width: 8ch;
  font-variant-numeric: tabular-nums lining-nums;
}

.lupe-app {
  font-weight: 620;
}

.home-page > *,
.detail-page > *,
.summary-strip,
.manual-input-grid,
.manual-stats,
.history-cards,
.order-list,
.auto-detect-list {
  min-width: 0;
}

.lupe-logo,
.new-vr-pill,
.sort-button,
.bottom-nav button,
.vr-card-left span,
.vr-card-left small,
.vr-card-metrics,
.detail-title span,
.detail-title small,
.chart-caption,
.legend,
.pool-limit,
.pager,
.helper,
.modal-row small {
  font-weight: 650;
}

.vr-card-left strong,
.detail-title h1,
.section-heading h2,
.modal-titlebar h2,
.settings-card strong,
.empty-lupe strong {
  font-weight: 740;
}

.value-hero strong,
.vr-card-right strong,
.summary-card strong,
.order-row strong,
.manual-grid span,
.history-card strong {
  font-weight: 790;
}

.value-hero > div:last-child strong,
.vr-card-right span,
.profit,
.loss {
  font-weight: 720;
}

.modal-titlebar button,
.modal-tabs button,
.mode-tabs button,
.ladder-tabs button,
.trade-tabs button,
.mini-segment button,
.modal-row span,
.money-row span,
.advanced-row span,
.toggle-line span,
.card-label,
.ticker-buttons button,
.broker-row button,
.select-like,
.modal-row input,
.money-row input,
.advanced-row input,
.advanced-box input,
.advanced-full input,
.cycle-inline input,
.advanced-box b,
.advanced-full b,
.money-row b {
  font-weight: 720;
}

.toast {
  font-weight: 760;
}

@media (max-width: 560px) {
  .lupe-app {
    padding-inline: 14px;
  }

  .analytics-summary-grid,
  .analytics-grid,
  .analytics-price-summary {
    grid-template-columns: 1fr;
  }

  .analytics-card,
  .history-db-card {
    padding: 12px;
    border-radius: 16px;
  }

  .analytics-card-head {
    display: grid;
  }

  .analytics-period-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .analytics-period-tabs button {
    flex: 1;
  }

  .analytics-stat {
    min-height: 68px;
    padding: 13px;
  }

  .analytics-chart-wrap {
    min-height: 218px;
  }

  .analytics-y-label,
  .analytics-x-label {
    font-size: 11px;
  }

  .history-db-card {
    padding: 8px;
  }

  .history-db-table {
    width: max(930px, 100%);
  }

  .history-db-table th,
  .history-db-table td {
    padding: 10px 11px;
    font-size: 11px;
  }

  .brand-row {
    height: 50px;
  }

  .home-toolbar {
    align-items: start;
  }

  .product-tabs {
    width: min(198px, calc(100vw - 126px));
  }

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

  .history-cards {
    grid-auto-columns: calc((100% - 14px) / 3);
  }

  .chart-wrap {
    min-height: 210px;
  }

  .lupe-chart {
    height: 204px;
  }

  .legend {
    right: 0;
    gap: 10px;
    font-size: 10px;
  }

  .value-hero strong {
    font-size: 34px;
  }

  .value-hero > div:last-child strong {
    font-size: 22px;
  }

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

  .vr-card-metrics {
    grid-template-columns: 1fr 1.25fr 0.8fr 0.8fr;
  }

  .manual-grid button {
    min-height: 50px;
    padding: 7px;
  }

  .modal-row input,
  .money-row input,
  .advanced-row input,
  .advanced-box input,
  .advanced-full input,
  .cycle-inline input,
  .manual-form input,
  .trade-edit-panel .modal-row input {
    font-size: 16px;
  }
}

@media (min-width: 700px) {
  .lupe-app.has-project-nav {
    padding-bottom: calc(126px + env(safe-area-inset-bottom));
  }

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

  .chart-wrap {
    min-height: 270px;
  }

  .lupe-chart {
    height: 252px;
  }

  .manual-grid {
    gap: 8px;
  }

  .manual-grid button {
    min-height: 74px;
  }

  .history-cards {
    grid-auto-columns: minmax(190px, calc((100% - 40px) / 4));
  }
}

@media (min-width: 1100px) {
  .lupe-app {
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: calc(100vh - 20px);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 0 0 28px 28px;
    box-shadow:
      0 30px 90px rgba(0, 0, 0, 0.38),
      inset 0 0 0 1px rgba(255, 255, 255, 0.018);
  }

  .home-page,
  .detail-page {
    padding-inline: 4px;
  }

  .vr-card {
    min-height: 76px;
  }

  .chart-wrap {
    min-height: 292px;
  }

  .lupe-chart {
    height: 272px;
  }

  .modal-panel {
    max-height: min(82vh, 760px);
  }
}

@media (max-width: 390px) {
  .home-toolbar,
  .value-hero {
    align-items: stretch;
  }

  .new-vr-pill {
    padding-inline: 11px;
  }

  .order-row {
    grid-template-columns: 22px 1fr;
  }

  .order-row em {
    grid-column: 2;
  }

  .manual-grid {
    gap: 4px;
  }

  .modal-panel {
    width: min(calc(100vw - 18px), 466px);
    padding-inline: 12px;
  }

  .trade-edit-panel {
    width: min(calc(100vw - 18px), 466px);
    min-width: 0;
  }

  .trade-edit-panel .modal-titlebar {
    grid-template-columns: 56px minmax(0, 1fr) 56px;
  }

  .trade-edit-panel .modal-titlebar h2 {
    font-size: 17px;
  }

  .trade-edit-panel .modal-titlebar button {
    font-size: 14px;
  }

  .trade-edit-panel .modal-row {
    min-height: 58px;
    padding-inline: 14px;
  }

  .manual-grid span {
    font-size: 12px;
  }

  .manual-grid small {
    font-size: 11px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .vr5-splash,
  .vr5-splash-card,
  .vr5-splash.is-dismissing .vr5-splash-card {
    animation: none !important;
    transition: opacity 180ms ease !important;
    transform: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
