@font-face {
  font-family: "Aeonik Pro";
  src: url("assets/fonts/aeonik_pro_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aeonik Pro";
  src: url("assets/fonts/aeonik_pro_bold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-strong: #eef1f4;
  --dock-bg: #f3f5f8;
  --ink: #151515;
  --muted: #686c73;
  --line: #d8dee6;
  --line-soft: #e7ebf0;
  --primary: #ff5933;
  --primary-dark: #d94828;
  --green: #198f36;
  --red: #d7263d;
  --teal: #008c77;
  --magenta: #c22655;
  --icon-inactive: #767b84;
  --header-action-bg: #e9edf2;
  --feedback-lime: rgba(255, 89, 51, 0.15);
  --feedback-lime-soft: rgba(255, 89, 51, 0.09);
  --shadow: 0 14px 34px rgba(21, 21, 21, 0.07);
  --radius-card: 18px;
  --radius-field: 12px;
  --field-bg: #eef1f4;
  --field-bg-focus: #e9edf2;
  --field-padding-x: 12px;
  --field-height: 44px;
  --form-page-padding: 16px;
  --form-card-padding: 12px;
  --form-gap: 8px;
  --rail-width: 96px;
}

html[data-theme="dark"] {
  --bg: #0f0f0f;
  --surface: #121212;
  --surface-strong: #191919;
  --dock-bg: #121212;
  --ink: #f4f4f4;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --line-soft: #222222;
  --icon-inactive: #858585;
  --header-action-bg: #1b1b1b;
  --field-bg: #191919;
  --field-bg-focus: #202020;
  --feedback-lime: rgba(255, 89, 51, 0.15);
  --feedback-lime-soft: rgba(255, 89, 51, 0.09);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Aeonik Pro", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

html.has-open-sheet,
html.has-bet-slip-loading,
html.has-open-sheet body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.has-bet-slip-loading body {
  overflow: hidden;
  overscroll-behavior: none;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  background-color: var(--field-bg-focus);
  box-shadow: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 400;
}

h3 {
  margin-bottom: 7px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 400;
}

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

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

.neutral,
.muted,
.table-meta {
  color: var(--muted);
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: var(--rail-width);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  border-right: 1px solid var(--line-soft);
  background: var(--dock-bg);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.brand-wordmark {
  width: 64px;
  height: 34px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.nav {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.nav-item,
.ghost-button,
.primary-button,
.secondary-button,
.icon-button,
.header-icon-button,
.header-new-bet,
.wallet-action,
.wallet-edit-button,
.wallet-add-card,
.bank-chip {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.nav-item {
  position: relative;
  width: 56px;
  min-height: 56px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--icon-inactive);
  white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
  background: transparent;
  color: var(--primary);
}

.nav-item.active {
  box-shadow: none;
}

.nav-item > span:last-child {
  display: none;
}

.nav-item .button-icon,
.nav-item .app-icon-svg {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  transform: translateX(-50%);
}

.nav-add-item {
  display: none;
}

.dock-active-indicator {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-balance-slot {
  display: grid;
  margin-top: 4px;
  width: 100%;
}

.sidebar-balance-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 16px;
  background: var(--bg);
}

.sidebar-balance-card .sidebar-wallet-select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  justify-content: center;
  padding: 0;
  font-size: 0;
}

.sidebar-balance-label {
  display: none;
}

.sidebar-balance-value {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

.sidebar-balance-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.sidebar-wallet-action {
  min-height: 28px;
  gap: 0;
  padding: 0;
  border-radius: 10px;
  font-size: 0;
}

.sidebar-wallet-action .wallet-action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.ghost-button {
  width: 56px;
  min-height: 56px;
  justify-content: center;
  padding: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 0;
  white-space: nowrap;
}

.ghost-button:hover {
  background: transparent;
  color: var(--ink);
}

.ghost-button .button-icon,
.ghost-button .app-icon-svg {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.main {
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding: 20px 28px 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 22;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -20px -28px 18px;
  padding: 20px 28px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
}

.page-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-shell:not([data-view="home"]) .account-avatar {
  display: none;
}

.account-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 20px;
}

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

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

.wallet-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-new-bet {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(255, 89, 51, 0.18);
}

.header-new-bet:hover,
.header-new-bet.active {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-search-field {
  width: min(360px, 32vw);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--header-action-bg);
  color: var(--icon-inactive);
}

.header-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.header-search-field input::placeholder {
  color: var(--icon-inactive);
}

.header-search-field input:focus-visible {
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.header-search-close {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--icon-inactive);
  padding: 0;
}

.header-search-close:hover,
.header-search-close:focus-visible {
  outline: 0;
  color: var(--primary);
}

.header-icon-button,
.icon-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 14px;
  background: var(--header-action-bg);
  color: var(--icon-inactive);
  --app-icon-color: var(--icon-inactive);
}

.header-icon-button:hover,
.icon-button:hover {
  color: var(--primary);
  --app-icon-color: var(--primary);
  background: #fff0ec;
}

.header-icon-button.filter-active {
  position: relative;
  color: var(--primary);
  --app-icon-color: var(--primary);
  background: #fff0ec;
}

.header-icon-button.filter-active::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--primary);
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-field);
  font-weight: 800;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  background: var(--surface-strong);
  color: var(--ink);
}

.button-icon,
.app-icon-svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-icon svg,
.app-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.button-icon path,
.app-icon-svg path {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.view {
  display: grid;
  gap: 18px;
}

.view.page-reveal-enter {
  opacity: 0;
  will-change: opacity, transform;
}

.view.page-reveal-enter.page-reveal-slide {
  transform: translateX(var(--page-reveal-distance, 28px));
}

.view.page-reveal-enter.page-reveal-soft {
  transform: translateY(8px) scale(0.985);
}

.view.page-reveal-enter.page-reveal-active {
  opacity: 1;
  transform: translateX(0) translateY(0) scale(1);
  transition:
    opacity 220ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.view.page-reveal-enter.page-reveal-soft.page-reveal-active {
  transition-duration: 180ms;
}

.view.page-home-entrance > * {
  opacity: 0;
  transform: translateY(14px);
  will-change: opacity, transform;
}

.view.page-home-entrance.page-reveal-active > * {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(180ms + (var(--home-entrance-index, 0) * 110ms));
}

.view.page-home-entrance > :nth-child(1) { --home-entrance-index: 0; }
.view.page-home-entrance > :nth-child(2) { --home-entrance-index: 1; }
.view.page-home-entrance > :nth-child(3) { --home-entrance-index: 2; }
.view.page-home-entrance > :nth-child(4) { --home-entrance-index: 3; }
.view.page-home-entrance > :nth-child(5) { --home-entrance-index: 4; }
.view.page-home-entrance > :nth-child(6) { --home-entrance-index: 5; }

.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.balance-card,
.desktop-status-panel,
.panel,
.bets-page,
.wallets-page,
.analysis-focus-card,
.metric,
.bet-row,
.wallet-card {
  border-radius: var(--radius-card);
  background: var(--surface);
}

.balance-card {
  min-height: 218px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  padding: 24px;
}

.app-shell[data-view="home"] .balance-card {
  background: transparent;
}

.bank-chip {
  min-height: 40px;
  min-width: min(320px, 100%);
  padding: 0 22px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 16px;
}

.bank-chip-button,
.bank-chip-select {
  width: min(320px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  text-align: center;
  background-color: var(--surface-strong);
  cursor: pointer;
}

.bank-chip-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.bank-chip-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-chip .app-icon-svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--ink);
}

.balance-label {
  color: var(--muted);
  font-size: 15px;
}

.balance-value {
  font-size: clamp(38px, 3.6vw, 50px);
  line-height: 0.95;
  letter-spacing: 0;
}

.balance-actions {
  width: 100%;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wallet-action {
  min-height: 46px;
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 15px;
}

.wallet-action-primary {
  background: var(--primary);
  color: #ffffff;
}

.wallet-action-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
}

.wallet-action:not(.wallet-action-primary) .wallet-action-icon {
  background: var(--bg);
}

.desktop-status-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

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

.integration-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg);
}

.integration-pill p,
.summary-mini span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.integration-dot,
.analysis-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: var(--primary);
}

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

.summary-mini {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 13px;
  background: var(--surface-strong);
}

.summary-mini strong {
  font-size: 19px;
}

.profit-chart-section {
  display: grid;
  gap: 12px;
  padding: 6px 0 0;
  background: transparent;
}

.profit-chart-canvas,
.profit-chart-viewport,
.profit-chart-svg {
  height: 240px;
}

.profit-chart-canvas {
  overflow: visible;
}

.profit-chart-viewport {
  position: relative;
  overflow: visible;
}

.profit-chart-svg {
  display: block;
  width: 100%;
  overflow: visible;
  cursor: crosshair;
  touch-action: none;
}

.profit-chart-fill {
  fill: url("#profit-chart-fill");
}

.profit-chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.profit-chart-viewport.is-revealing .profit-chart-selection {
  opacity: 0;
  animation: profit-chart-selection-reveal 180ms cubic-bezier(0.22, 1, 0.36, 1) 620ms both;
}

@keyframes profit-chart-selection-reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profit-chart-selection {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.profit-chart-marker {
  position: absolute;
  left: var(--point-x);
  top: 20px;
  bottom: 14px;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 89, 51, 0.35);
  transform: translateX(-50%);
}

.profit-chart-tooltip-box {
  position: absolute;
  left: clamp(88px, var(--point-x), calc(100% - 88px));
  top: var(--tooltip-top);
  min-width: 150px;
  padding: 15px 28px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.profit-chart-tooltip-box strong,
.profit-chart-tooltip-box span {
  display: block;
}

.profit-chart-tooltip-box span {
  margin-top: 8px;
  font-size: 12px;
}

.profit-chart-point-glow,
.profit-chart-point {
  position: absolute;
  left: var(--point-x);
  top: var(--point-y);
  border-radius: 999px;
  background: var(--primary);
  transform: translate(-50%, -50%);
}

.profit-chart-point-glow {
  width: 30px;
  height: 30px;
  opacity: 0.25;
}

.profit-chart-point {
  width: 14px;
  height: 14px;
}

.profit-chart-header {
  display: flex;
  justify-content: center;
}

.chart-filters {
  width: min(560px, 100%);
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
}

.chart-filter {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.chart-filter.active {
  background: var(--primary);
  color: #ffffff;
}

.home-stats-section {
  display: grid;
  gap: 12px;
}

.home-stats-header,
.home-insights-header,
.panel-header,
.bets-toolbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-stats-title,
.home-insights-title {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 22px;
}

.home-stats-more,
.home-insights-more,
.home-section-add-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
}

.home-stats-icon,
.home-insights-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0ec;
  color: var(--ink);
}

.home-section-add-button {
  width: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
}

.home-section-add-button:hover,
.home-section-add-button:focus-visible {
  outline: 0;
  background: transparent;
}

.home-stats-more,
.home-insights-more {
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.metric {
  position: relative;
  min-height: 106px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  text-align: left;
}

.metric-help {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--icon-inactive);
  border-radius: 50%;
  background: transparent;
  color: var(--icon-inactive);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.metric-help:hover,
.metric-help:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
  outline: 0;
  background: var(--header-action-bg);
}

.metric span {
  color: var(--muted);
  font-size: 14px;
}

.metric strong {
  text-align: left;
  font-size: 25px;
  line-height: 1;
  padding-right: 34px;
}

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

.home-pro-locked-card {
  width: 100%;
  min-height: 88px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.home-pro-locked-card strong {
  font-size: 15px;
}

.home-pro-locked-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

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

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

@media (min-width: 1181px) {
  .app-shell[data-view="home"] .view {
    gap: 18px;
  }

  .home-desktop-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .home-desktop-board .home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
  }

  .app-shell[data-view="home"] .balance-card {
    min-height: 388px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "bank"
      "label"
      "value"
      "actions";
    grid-template-rows: repeat(4, auto);
    justify-items: stretch;
    align-content: start;
    gap: 0;
    padding: 22px 0;
    text-align: left;
  }

  .app-shell[data-view="home"] .bank-chip-select {
    display: block;
    text-align-last: left;
  }

  .app-shell[data-view="home"] .bank-chip-button,
  .app-shell[data-view="home"] .bank-chip-select {
    grid-area: bank;
    width: min(320px, 100%);
    justify-content: flex-start;
    text-align: left;
    padding-inline: 18px 40px;
    background-color: var(--surface-strong);
  }

  .app-shell[data-view="home"] .balance-label {
    grid-area: label;
    margin-top: 14px;
  }

  .app-shell[data-view="home"] .balance-value {
    grid-area: value;
    margin-top: 8px;
    font-size: clamp(42px, 3.5vw, 58px);
  }

  .app-shell[data-view="home"] .balance-actions {
    grid-area: actions;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: start;
    gap: 10px;
    margin-top: 28px;
  }

  .app-shell[data-view="home"] .wallet-action {
    min-height: 54px;
    justify-content: center;
    padding: 0 16px;
  }

  .app-shell[data-view="home"] .profit-chart-section {
    min-width: 0;
    align-self: stretch;
    align-content: center;
    gap: 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .app-shell[data-view="home"] .profit-chart-canvas,
  .app-shell[data-view="home"] .profit-chart-viewport,
  .app-shell[data-view="home"] .profit-chart-svg {
    height: 320px;
  }

  .app-shell[data-view="home"] .chart-filters {
    width: min(560px, 100%);
    background: var(--bg);
  }

  .home-desktop-board .home-stats-section,
  .home-desktop-board .home-insights-panel {
    width: 100%;
    min-width: 0;
  }

  .home-desktop-board .home-stats-section {
    gap: 14px;
  }

  .home-desktop-board .home-insights-list {
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }

  .home-desktop-board .insight-card {
    min-height: 106px;
    padding: 16px;
    border-radius: var(--radius-card);
  }

  .app-shell[data-view="home"] .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell[data-view="home"] .workspace .bets-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

.app-shell[data-view="home"] .sidebar-balance-card .sidebar-wallet-select {
  grid-area: auto;
  width: 100%;
  justify-content: center;
  padding: 0;
  text-align: center;
}

.app-shell[data-view="home"] .sidebar-balance-card .sidebar-wallet-action {
  min-height: 28px;
  justify-content: center;
  padding: 0;
}

.app-shell[data-view="home"] .sidebar-balance-card .sidebar-balance-actions {
  grid-area: auto;
  margin-top: 0;
}

@media (min-width: 1500px) {
  .home-desktop-board .home-insights-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.panel,
.wallets-page {
  padding: 18px;
}

.app-shell[data-view="home"] .workspace > .panel,
.app-shell[data-view="home"] .home-insights-panel,
.app-shell[data-view="home"] .home-secondary-stack .desktop-status-panel,
.app-shell[data-view="home"] .home-secondary-stack .home-stats-section,
.app-shell[data-view="home"] .home-secondary-stack .home-insights-panel {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.app-shell[data-view="home"] .workspace > .panel,
.app-shell[data-view="home"] .home-insights-panel,
.app-shell[data-view="home"] .home-stats-section,
.app-shell[data-view="home"] .desktop-status-panel {
  box-shadow: none;
}

.app-shell[data-view="home"] .insight-card,
.app-shell[data-view="home"] .metric,
.app-shell[data-view="home"] .bet-row,
.app-shell[data-view="home"] .integration-pill,
.app-shell[data-view="home"] .summary-mini {
  background: var(--surface);
}

html[data-theme="dark"] .app-shell[data-view="home"] .insight-card,
html[data-theme="dark"] .app-shell[data-view="home"] .metric,
html[data-theme="dark"] .app-shell[data-view="home"] .bet-row,
html[data-theme="dark"] .app-shell[data-view="home"] .integration-pill,
html[data-theme="dark"] .app-shell[data-view="home"] .summary-mini {
  background: var(--surface-strong);
}

.bets-page {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

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

.panel-header p,
.bets-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.bets-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.bets-month-list {
  display: grid;
  gap: 16px;
}

.bets-month-group {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.bets-month-header {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 20px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.bets-month-header::-webkit-details-marker {
  display: none;
}

.bets-month-title {
  min-width: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bets-month-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.bets-month-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--icon-inactive);
  transition: transform 180ms ease;
}

.bets-month-group[open] .bets-month-chevron {
  transform: rotate(90deg);
}

.bets-month-content {
  display: grid;
  gap: 14px;
}

.bets-week-group {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.bets-week-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.bets-week-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.bets-week-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bets-week-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: start;
  align-items: start;
}

.bets-week-list > .bet-row {
  flex: 0 0 min(360px, 100%);
  align-self: flex-start;
  height: auto;
}

.week-profit,
.bets-profit-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(25, 143, 54, 0.10);
  color: var(--green);
  font-size: 15px;
}

.bets-profit-pill {
  min-height: 30px;
  font-size: 12px;
}

.week-profit.negative,
.bets-profit-pill.negative {
  background: rgba(215, 38, 61, 0.10);
  color: var(--red);
}

.week-profit.neutral,
.bets-profit-pill.neutral {
  background: var(--header-action-bg);
  color: var(--muted);
}

.bet-row {
  display: grid;
  gap: 12px;
  min-height: 248px;
  padding: 12px;
  border-radius: 8px;
  transition: border-radius 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bet-row.ticket-expanded {
  border-radius: 20px;
}

.bet-row[data-ticket-collapsible="true"] {
  cursor: pointer;
}

.ticket-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 148px;
  align-items: center;
  gap: 8px;
}

.ticket-head > div,
.ticket-selection > div {
  min-width: 0;
}

.ticket-head h3,
.ticket-head p,
.ticket-selection strong,
.ticket-selection p,
.ticket-footer span,
.ticket-footer strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-head h3,
.ticket-head p,
.ticket-footer span,
.ticket-footer strong {
  white-space: nowrap;
}

.ticket-selection strong,
.ticket-selection p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.ticket-selection strong {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.ticket-selection p {
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.ticket-selection p:first-of-type {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ticket-selection-create-builder .ticket-selection-copy strong {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.ticket-head p,
.ticket-selection p,
.ticket-extra {
  margin-bottom: 0;
  color: var(--muted);
}

.ticket-dots {
  width: 24px;
  height: 36px;
  display: inline-grid;
  place-items: start center;
  align-self: start;
  margin: 0;
  padding: 7px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--icon-inactive);
  cursor: pointer;
}

.ticket-dots::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 10px 0 currentColor, 0 20px 0 currentColor;
}

.ticket-dots:hover,
.ticket-dots:focus-visible,
.ticket-dots[aria-expanded="true"] {
  outline: 0;
  background: var(--feedback-lime-soft);
  color: var(--ink);
}

.ticket-actions-menu {
  position: fixed;
  z-index: 38;
  width: 148px;
  display: grid;
  overflow: hidden;
  border-radius: 8px;
  background: var(--field-bg);
  box-shadow: 0 16px 36px rgba(21, 21, 21, 0.16);
}

.ticket-actions-menu button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 12px;
  text-align: left;
  font-size: 14px;
}

.ticket-actions-menu button:hover,
.ticket-actions-menu button:focus-visible {
  outline: 0;
  background: var(--bg);
}

.ticket-actions-menu button.is-danger {
  color: var(--red);
}

.ticket-actions-menu .app-icon-svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.ticket-head-actions {
  width: 148px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ticket-mobile-chevron {
  width: 12px;
  height: 36px;
  flex: 0 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-inactive);
  transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.ticket-mobile-chevron .app-icon-svg {
  width: 18px;
  height: 24px;
  flex-basis: 18px;
}

.bet-row.ticket-expanded .ticket-mobile-chevron {
  transform: rotate(180deg);
}

.ticket-selections {
  display: grid;
  gap: 0;
}

.ticket-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.ticket-selection-copy {
  min-width: 0;
}

.ticket-selection-copy strong {
  font-size: 15px;
  font-weight: 400;
}

.ticket-selection-copy p {
  margin-top: 6px;
  font-size: 12px;
}

.ticket-selection-copy .ticket-selection-event {
  font-size: 13px;
}

.ticket-selection-canceled .ticket-selection-copy strong,
.ticket-selection-canceled .ticket-selection-copy p {
  text-decoration: line-through;
}

.ticket-selection-side {
  width: 148px;
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 6px;
  font-size: 13px;
  text-align: right;
}

.ticket-selection-odd {
  color: var(--green);
  font-size: 16px;
  font-weight: 400;
}

.ticket-selection-schedule {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-selection-result {
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: right;
  -webkit-tap-highlight-color: transparent;
}

.ticket-selection-result.won,
.ticket-selection-result.open {
  color: var(--green);
}

.ticket-selection-result.lost {
  color: var(--red);
}

.ticket-selection-result.cashout {
  color: var(--teal);
}

.ticket-selection-result.canceled {
  color: var(--muted);
}

.ticket-extra-selections {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition:
    grid-template-rows 180ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 120ms ease;
}

.ticket-extra-selections-inner {
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.bet-row.ticket-expanded .ticket-extra-selections {
  grid-template-rows: 1fr;
  opacity: 1;
}

.ticket-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.ticket-footer span {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-size: 14px;
}

.ticket-footer small {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

button.badge {
  border: 0;
  cursor: pointer;
}

button.badge:hover,
button.badge:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 999px var(--feedback-lime-soft);
}

.ticket-selection-result:hover,
.ticket-selection-result:focus-visible,
.ticket-selection-result:active {
  outline: 0;
  background: transparent;
}

.ticket-selection-result:active {
  opacity: 0.62;
}

.badge.won {
  background: rgba(25, 143, 54, 0.10);
  color: var(--green);
}

.badge.lost {
  background: rgba(215, 38, 61, 0.10);
  color: var(--red);
}

.badge.cashout {
  background: rgba(0, 140, 119, 0.10);
  color: var(--teal);
}

.badge.neutral,
.badge.open {
  background: var(--surface-strong);
  color: var(--muted);
}

.home-insights-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.insights-full-page {
  display: grid;
  gap: 12px;
}

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

.insights-category-row::-webkit-scrollbar {
  display: none;
}

.insights-category-button {
  min-height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 14px;
}

.insights-category-button.active {
  background: var(--primary);
  color: #ffffff;
}

.insight-card {
  min-height: 82px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
}

.insight-card-top {
  display: grid;
  justify-items: start;
  gap: 4px;
  text-align: left;
}

.insight-card h3 {
  margin-bottom: 0;
  font-size: 14px;
}

.insight-card strong {
  flex: 0 0 auto;
  text-align: left;
}

.insight-card p,
.insight-card span {
  margin-bottom: 0;
  display: block;
  color: var(--muted);
  text-align: left;
}

.add-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.bet-form {
  display: grid;
  gap: var(--form-gap);
}

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

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

.panel.bet-form {
  padding: var(--form-page-padding);
}

.bet-form label > span {
  display: none;
}

.bet-form label > .number-input-shell {
  display: flex;
}

.bet-form-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0;
}

.bet-form-summary-item {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.bet-form-summary-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
}

.bet-form-summary-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cashout-field,
.market-detail-label {
  min-width: 0;
}

.cashout-field[hidden],
.market-detail-label[hidden] {
  display: none;
}

.market-detail-label.is-create-bet-builder {
  position: relative;
}

.market-detail-label.is-create-bet-builder input {
  padding-right: 42px;
  cursor: pointer;
}

.market-detail-label.is-create-bet-builder::after {
  content: "+";
  position: absolute;
  right: 15px;
  bottom: calc((var(--field-height) - 20px) / 2);
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  pointer-events: none;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.15;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--field-height);
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--ink);
  padding: 0 var(--field-padding-x);
  font-size: 14px;
  line-height: 1.2;
  box-shadow: none;
  transition: background-color 140ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--icon-inactive);
  opacity: 1;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-color: var(--field-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6%2C9 L12%2C15 L18%2C9' stroke='%23151515' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--field-padding-x) center;
  background-size: 18px 18px;
}

select::-ms-expand {
  display: none;
}

input[type="date"],
input[type="time"] {
  color-scheme: light;
}

html[data-theme="dark"] select {
  color-scheme: dark;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6%2C9 L12%2C15 L18%2C9' stroke='%23F4F4F4' stroke-width='1.55' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"] {
  color-scheme: dark;
}

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

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

textarea {
  min-height: 80px;
  padding: 12px var(--field-padding-x);
  line-height: 1.35;
  resize: vertical;
}

.picker-label {
  min-width: 0;
}

.picker-field {
  width: 100%;
  min-height: var(--field-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--ink);
  padding: 0 var(--field-padding-x);
  text-align: left;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 140ms ease;
}

.picker-field:hover,
.picker-field:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
}

.picker-field-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-field.is-empty .picker-field-value {
  color: var(--icon-inactive);
}

.picker-field-icons {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.picker-clear-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--icon-inactive);
}

.picker-clear-icon[hidden] {
  display: none;
}

.picker-clear-icon:hover {
  background: var(--bg);
  color: var(--ink);
}

.picker-field .app-icon-svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  color: var(--ink);
}

.picker-clear-icon .app-icon-svg {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  color: currentColor;
}

.date-time-label {
  min-width: 0;
}

.date-time-field {
  width: 100%;
  min-height: var(--field-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--ink);
  padding: 0 var(--field-padding-x);
  text-align: left;
  font-size: 14px;
}

.date-time-field:hover,
.date-time-field:focus-visible {
  outline: 0;
  background: var(--field-bg-focus);
}

.date-time-field-value {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-time-field.is-empty .date-time-field-value {
  color: var(--icon-inactive);
}

.date-time-field-icons {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.date-time-clear-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--icon-inactive);
}

.date-time-clear-icon[hidden] {
  display: none;
}

.date-time-clear-icon:hover {
  background: var(--bg);
  color: var(--ink);
}

.date-time-field .app-icon-svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.date-time-clear-icon .app-icon-svg {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.number-field {
  min-width: 0;
}

.number-input-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: var(--field-height);
  align-items: stretch;
}

.number-input-shell input {
  min-width: 0;
  padding-right: 42px;
}

.amount-input-shell input {
  padding-left: 54px;
}

.amount-mode-button {
  position: absolute;
  z-index: 2;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--green);
  --app-icon-color: var(--green);
}

.amount-mode-button:hover,
.amount-mode-button:focus-visible {
  outline: 0;
  background: var(--bg);
  color: var(--green);
  --app-icon-color: var(--green);
}

.amount-mode-button .app-icon-svg {
  width: 21px;
  height: 21px;
  flex-basis: 21px;
}

.number-stepper {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 4px;
  bottom: 3px;
  width: 30px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  touch-action: none;
  user-select: none;
}

.number-stepper button {
  width: 30px;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--icon-inactive);
  --app-icon-color: var(--icon-inactive);
  padding: 0;
}

.number-stepper button:hover,
.number-stepper button:focus-visible {
  outline: 0;
  background: var(--bg);
  color: var(--ink);
  --app-icon-color: var(--ink);
}

.number-stepper .app-icon-svg {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.selection-card {
  overflow: hidden;
  border-radius: var(--radius-field);
  background: var(--surface);
}

.selection-card + .selection-card,
.extra-selections .selection-card {
  margin-top: var(--form-gap);
}

.selection-header {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 6px 0 16px;
  text-align: left;
}

.selection-header:hover,
.selection-header:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
}

.selection-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.selection-remove,
.selection-chevron {
  width: 32px;
  height: 36px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--icon-inactive);
}

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

.selection-remove[hidden] {
  display: none;
}

.selection-chevron {
  transition: opacity 160ms ease;
}

.selection-card.expanded .selection-chevron {
  opacity: 1;
}

.selection-chevron .app-icon-svg {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.selection-content {
  display: none;
  padding: var(--form-card-padding);
}

.selection-card.expanded .selection-content {
  display: block;
}

.selection-content .form-grid {
  gap: var(--form-gap);
}

.extra-selections {
  display: contents;
}

.extra-selections .selection-card {
  margin-top: 0;
}

.add-selection-button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.add-selection-button:hover,
.add-selection-button:focus-visible {
  outline: 0;
  background: var(--field-bg);
  color: var(--primary);
}

.scan-box {
  display: grid;
  align-content: start;
  gap: 12px;
}

.bet-scan-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.file-drop {
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface-strong);
  text-align: center;
}

.file-drop input {
  display: none;
}

.selection-preview {
  display: grid;
  gap: 8px;
}

.selection-chip {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
}

.selection-chip strong,
.selection-chip span {
  display: block;
}

.selection-chip span {
  color: var(--muted);
  margin-top: 4px;
}

.wallets-page {
  width: 100%;
  padding: 0;
  background: transparent;
}

.wallet-list-panel {
  min-width: 0;
  padding: 0;
}

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

.wallet-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border-radius: var(--radius-field);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.wallet-card:hover,
.wallet-card:focus-within {
  background: var(--feedback-lime-soft);
}

.wallet-card.active {
  background: var(--header-action-bg);
}

.wallet-card-main {
  min-width: 0;
  width: 100%;
  display: grid;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.wallet-card-main:focus-visible {
  outline: 0;
}

.wallet-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.wallet-card-copy strong,
.wallet-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-card-copy strong {
  font-size: 15px;
  line-height: 1.15;
  font-weight: 400;
}

.wallet-card-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.wallet-edit-button {
  position: static;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  background: var(--header-action-bg);
  color: var(--icon-inactive);
  --app-icon-color: var(--icon-inactive);
  transform: none;
}

.wallet-card.active .wallet-edit-button {
  background: var(--surface);
  color: var(--ink);
  --app-icon-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--icon-inactive);
}

.wallet-edit-button:hover,
.wallet-edit-button:focus-visible {
  outline: 0;
  background: #fff0ec;
  color: var(--primary);
  --app-icon-color: var(--primary);
}

.wallet-edit-button .app-icon-svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.wallet-add-card {
  min-height: 54px;
  border-radius: var(--radius-field);
  background: var(--surface);
  color: var(--primary);
  --app-icon-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.wallet-add-card:hover,
.wallet-add-card:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
}

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

.calendar-day,
.calendar-weekday {
  min-height: 68px;
  border-radius: 13px;
}

.calendar-weekday {
  min-height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.calendar-day {
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 10px;
  background: var(--bg);
}

.calendar-day.is-empty {
  background: transparent;
}

.calendar-day span {
  color: var(--muted);
}

.calendar-day.is-profit {
  background: rgba(25, 143, 54, 0.10);
}

.calendar-day.is-loss {
  background: rgba(215, 38, 61, 0.10);
}

.analysis-page {
  width: min(720px, 100%);
  justify-self: center;
  display: grid;
  gap: 0;
  padding-bottom: 24px;
  background: var(--bg);
}

.analysis-profit-donut {
  min-height: 292px;
  display: grid;
  justify-items: center;
  align-content: start;
  padding-top: 16px;
  background: var(--bg);
}

.analysis-donut-ring {
  width: 134px;
  height: 134px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--bg) 0 55%, transparent 56%),
    var(--analysis-donut),
    conic-gradient(var(--line) 0 360deg);
}

.analysis-donut-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--bg);
}

.analysis-donut-ring strong {
  position: relative;
  z-index: 1;
  max-width: 110px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  text-align: center;
}

.analysis-summary-list {
  width: 100%;
  margin-top: 28px;
  display: grid;
  gap: 0;
}

.analysis-summary-row {
  display: grid;
  grid-template-columns: 24px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  min-height: 48px;
  padding: 0 8px;
  font-size: 12px;
}

.analysis-summary-row .analysis-dot {
  width: 10px;
  height: 10px;
  align-self: center;
}

.analysis-summary-row strong,
.analysis-summary-row b {
  color: var(--ink);
  font-weight: 800;
}

.analysis-summary-row strong {
  font-size: 16px;
}

.analysis-summary-row span:not(.analysis-dot) {
  color: var(--muted);
}

.analysis-summary-row b {
  justify-self: end;
  font-size: 15px;
}

.analysis-summary-row.positive .analysis-dot {
  background: var(--green);
}

.analysis-summary-row.negative .analysis-dot {
  background: var(--red);
}

.analysis-summary-row.open .analysis-dot {
  background: var(--primary);
}

.analysis-summary-row.cashout-positive .analysis-dot {
  background: var(--teal);
}

.analysis-summary-row.cashout-negative .analysis-dot {
  background: var(--magenta);
}

.analysis-kpi-grid {
  height: 148px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.analysis-kpi-card {
  min-width: 0;
  height: 140px;
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 8px;
  margin: 4px 0;
  padding: 18px 8px 8px;
  border-radius: 12px;
  background: var(--surface);
}

.analysis-kpi-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  text-align: center;
}

.analysis-kpi-card > strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1;
}

.analysis-kpi-detail {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  background: var(--header-action-bg);
}

.analysis-kpi-detail span {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.analysis-kpi-detail small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.analysis-kpi-detail b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-kpi-detail b.positive {
  color: var(--green);
}

.analysis-kpi-detail b.negative {
  color: var(--red);
}

.analysis-status-breakdown {
  min-height: 310px;
  display: grid;
  align-content: start;
  padding-top: 12px;
  background: var(--bg);
}

.analysis-status-rings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.analysis-status-ring {
  display: grid;
  justify-items: center;
  gap: 12px;
  --ring-color: var(--green);
}

.analysis-status-ring.negative {
  --ring-color: var(--red);
}

.analysis-status-ring.cashout-positive {
  --ring-color: var(--teal);
}

.analysis-status-ring.cashout-negative {
  --ring-color: var(--magenta);
}

.analysis-status-ring span {
  width: min(74px, 22vw);
  height: min(74px, 22vw);
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--bg) 0 56%, transparent 57%),
    conic-gradient(from -176deg, var(--ring-color) 0 var(--ring-sweep), var(--line) var(--ring-sweep) 360deg);
}

.analysis-status-ring p {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.analysis-status-list {
  margin-top: 20px;
  display: grid;
  gap: 0;
}

.analysis-breakdown-section {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.analysis-breakdown-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}

.analysis-breakdown-list {
  display: grid;
  gap: 0;
}

.analysis-breakdown-row {
  min-height: 48px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 2px;
}

.analysis-breakdown-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-breakdown-track {
  height: 18px;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
}

.analysis-breakdown-fill {
  width: var(--analysis-bar-width);
  min-width: 8%;
  max-width: 100%;
  height: 100%;
  display: block;
  position: relative;
  border-radius: inherit;
  background: var(--primary);
}

.analysis-breakdown-fill-1,
.analysis-breakdown-fill-4 {
  background: var(--primary-dark);
}

.analysis-breakdown-fill-2 {
  background: var(--primary);
}

.analysis-breakdown-fill b {
  position: absolute;
  top: 50%;
  right: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-50%);
}

.analysis-breakdown-toggle {
  min-height: 34px;
  display: grid;
  grid-template-columns: 1fr 28px;
  align-items: center;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.analysis-breakdown-toggle .app-icon-svg {
  justify-self: end;
  width: 20px;
  height: 20px;
}

.analysis-empty {
  margin: 0;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 11px;
}

.analysis-metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.empty p {
  margin-bottom: 0;
}

.modal,
.side-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.modal[aria-hidden="false"],
.side-sheet[aria-hidden="false"] {
  visibility: visible;
  pointer-events: auto;
}

.bet-slip-loading-overlay {
  position: fixed;
  top: var(--bet-slip-loading-top, 0);
  right: var(--bet-slip-loading-right, 0);
  bottom: var(--bet-slip-loading-bottom, 0);
  left: var(--bet-slip-loading-left, 0);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 0;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.bet-slip-loading-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.bet-slip-loading-overlay:focus {
  outline: 0;
}

.bet-slip-loading-message {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.63);
  will-change: opacity, transform;
}

.bet-slip-loading-message.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.bet-slip-loading-message.is-entering {
  animation: betSlipLoadingMessageIn 220ms ease forwards;
}

[data-scan-ticket-trigger].is-bet-slip-reading,
[data-header-action="scan"].is-bet-slip-reading,
#scan-button.is-bet-slip-reading {
  opacity: 0.55;
}

@keyframes betSlipLoadingMessageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-backdrop,
.side-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(21, 21, 21, 0.48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 180ms ease, backdrop-filter 180ms ease, -webkit-backdrop-filter 180ms ease;
}

.modal[aria-hidden="false"] .modal-backdrop,
.side-sheet[aria-hidden="false"] .side-sheet-backdrop {
  opacity: 1;
}

.modal-panel,
.side-sheet-panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(560px, calc(100vw - 72px));
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  padding: 0;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--bg);
  box-shadow: -22px 0 44px rgba(21, 21, 21, 0.14);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.modal-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-bottom: 22px;
}

.side-sheet-panel {
  grid-template-rows: auto 1fr auto;
}

.modal[aria-hidden="false"] .modal-panel,
.side-sheet[aria-hidden="false"] .side-sheet-panel {
  transform: translateX(0);
}

.modal-header,
.side-sheet-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.side-sheet-header > div:first-child {
  min-width: 0;
}

.side-sheet-header-actions,
.side-sheet-extra-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.side-sheet-header-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.side-sheet-extra-actions:empty {
  display: none;
}

.modal-panel > label,
.modal-panel > .primary-button {
  margin-inline: 22px;
}

.modal-panel > label:first-of-type {
  margin-top: 22px;
}

.modal-panel > .primary-button {
  margin-top: 16px;
}

.side-sheet-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
  padding: var(--form-page-padding);
}

.side-sheet-body > form,
.picker-sheet-body > form {
  min-height: 100%;
  align-content: start;
}

.picker-sheet-body > form > .side-sheet-footer,
.picker-sheet-body > form > .filter-actions,
.picker-sheet-body > form > .settings-editor-actions,
.picker-sheet-body > form > .primary-button:last-child {
  position: sticky;
  bottom: calc(-1 * var(--form-page-padding));
  z-index: 4;
  margin-top: auto;
  margin-right: calc(-1 * var(--form-page-padding));
  margin-bottom: calc(-1 * var(--form-page-padding));
  margin-left: calc(-1 * var(--form-page-padding));
  padding: 12px var(--form-page-padding) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  box-shadow: 0 -12px 24px rgba(21, 21, 21, 0.08);
}

.picker-sheet {
  z-index: 36;
}

.picker-sheet-panel {
  inset: 0 0 0 auto;
  width: min(560px, calc(100vw - 72px));
  height: 100%;
  max-height: none;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-top: 0;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--bg);
  box-shadow: -22px 0 44px rgba(21, 21, 21, 0.14);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.picker-sheet[aria-hidden="false"] .picker-sheet-panel {
  transform: translateX(0);
}

.picker-sheet-handle {
  height: 24px;
  display: none;
  place-items: end center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.picker-sheet-handle:active {
  cursor: grabbing;
}

.picker-sheet-handle span {
  width: 48px;
  height: 4px;
  display: block;
  border-radius: 999px;
  background: #cbd1d9;
}

.bottom-sheet-handle:not(.picker-sheet-handle) {
  display: none;
}

.picker-sheet-panel .side-sheet-header {
  min-height: 74px;
  padding-top: 20px;
}

.picker-sheet-body {
  min-height: 0;
  gap: 12px;
  overflow: auto;
  padding: var(--form-page-padding);
}

.picker-content {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.picker-content.has-search {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.picker-content.has-actions {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.picker-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.picker-search-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: var(--field-bg);
  padding: 0 12px;
  color: var(--icon-inactive);
}

.picker-search-field input {
  min-height: 44px;
  padding: 0;
  background: transparent;
}

.picker-search-field input:focus-visible {
  background: transparent;
  box-shadow: none;
}

.picker-list {
  display: grid;
  gap: 0;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-color: #a7abb1 transparent;
  scrollbar-width: thin;
}

.picker-option-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  text-align: left;
  font-size: 15px;
}

.picker-option-row:hover,
.picker-option-row:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
  color: var(--ink);
}

.picker-option-row.active {
  background: transparent;
  color: var(--muted);
}

.picker-option-row.active:hover,
.picker-option-row.active:focus-visible {
  background: var(--feedback-lime-soft);
  color: var(--ink);
}

.picker-option-row.custom {
  color: var(--primary);
}

.wallet-picker-row {
  min-height: 60px;
}

.wallet-picker-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.wallet-picker-copy strong,
.wallet-picker-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-picker-copy strong {
  color: var(--ink);
  font-size: 15px;
}

.wallet-picker-copy small {
  color: var(--muted);
  font-size: 12px;
}

.picker-option-trailing {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  color: currentColor;
}

.picker-option-marker {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #aeb4bd;
  border-radius: 5px;
  color: #ffffff;
}

.picker-option-row.active .picker-option-marker {
  border-color: var(--primary);
  background: var(--primary);
}

.picker-option-marker .app-icon-svg {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.picker-empty {
  margin: 0;
  padding: 16px;
  color: var(--muted);
}

.create-bet-builder-form {
  min-height: 0;
  display: grid;
  gap: 12px;
}

.create-bet-builder-list {
  display: grid;
  gap: 8px;
  max-height: calc((var(--field-height) * 5) + 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.create-bet-builder-row {
  position: relative;
  display: block;
}

.create-bet-builder-row > span {
  display: none;
}

.create-bet-builder-row input {
  padding-right: 46px;
}

.create-bet-builder-remove {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--red);
  transform: translateY(-50%);
}

.create-bet-builder-remove:hover,
.create-bet-builder-remove:focus-visible {
  outline: 0;
  background: rgba(215, 38, 61, 0.10);
}

.create-bet-builder-add {
  width: 100%;
  min-height: var(--field-height);
  color: #ffffff;
  background: var(--primary);
}

.create-bet-builder-add:hover {
  background: var(--primary-dark);
}

.create-bet-builder-add:disabled {
  background: var(--surface-strong);
  color: var(--icon-inactive);
  opacity: 0.48;
}

.date-picker-content,
.time-picker-content {
  display: grid;
  gap: 16px;
}

.date-picker-month-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.date-picker-month-header strong {
  text-align: center;
  font-size: 18px;
  font-weight: 400;
}

.date-picker-nav {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--header-action-bg);
  color: var(--icon-inactive);
}

.date-picker-nav:hover,
.date-picker-nav:focus-visible {
  outline: 0;
  background: var(--field-bg-focus);
  color: var(--ink);
}

.date-picker-nav[data-calendar-previous] {
  transform: rotate(180deg);
}

.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 38px;
  gap: 4px;
}

.date-picker-weekday,
.date-picker-blank,
.date-picker-day {
  min-width: 0;
  display: grid;
  place-items: center;
}

.date-picker-weekday {
  color: var(--muted);
  font-size: 12px;
}

.date-picker-day {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.date-picker-day:hover,
.date-picker-day:focus-visible {
  outline: 0;
  background: var(--field-bg);
}

.date-picker-day.today {
  background: var(--header-action-bg);
}

.date-picker-day.selected {
  background: var(--header-action-bg);
  color: var(--ink);
  font-weight: 800;
}

.time-picker-selected {
  min-height: 44px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 400;
}

.time-picker-desktop-content {
  min-height: 0;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.time-picker-desktop-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.time-picker-column {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.time-picker-column > span {
  color: var(--muted);
  font-size: 12px;
}

.time-picker-choice-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.time-picker-choice {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--muted);
  font-size: 15px;
}

.time-picker-choice:hover,
.time-picker-choice:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
  color: var(--ink);
}

.time-picker-choice.active {
  background: var(--primary);
  color: #ffffff;
}

.time-picker-card {
  position: relative;
  --time-wheel-item-width: 56px;
  height: 144px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}

.time-wheel {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding-inline: calc(50% - (var(--time-wheel-item-width) / 2));
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: ew-resize;
  touch-action: pan-x;
}

.time-wheel:focus-visible {
  outline: 0;
}

.time-wheel::-webkit-scrollbar {
  display: none;
}

.time-wheel-item {
  width: var(--time-wheel-item-width);
  height: 64px;
  flex: 0 0 var(--time-wheel-item-width);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  opacity: 0.18;
  scroll-snap-align: center;
  transform: scale(0.72);
  transition: opacity 120ms ease, transform 120ms ease;
}

.time-wheel-item.active {
  opacity: 0;
}

.time-wheel-item:hover {
  opacity: 0.75;
}

.time-picker-focus {
  position: absolute;
  inset: 0;
  width: calc(var(--time-wheel-item-width) + 8px);
  margin: auto;
  display: grid;
  grid-template-rows: 1fr 18px 1fr;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  pointer-events: none;
}

.time-picker-focus span {
  font-size: 21px;
}

.time-picker-focus i {
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.time-picker-hint {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.filter-picker-actions,
.filter-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--form-gap);
}

.filter-form {
  display: grid;
  gap: var(--form-gap);
}

.filter-subtitle {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.filter-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--form-gap);
}

.filter-field {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--muted);
  padding: 0 var(--field-padding-x);
  text-align: left;
  font-size: 13px;
}

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

.filter-field:hover,
.filter-field:focus-visible {
  outline: 0;
  background: var(--feedback-lime-soft);
}

.filter-field > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-field.active {
  color: var(--ink);
}

.filter-field-icons {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--icon-inactive);
}

.filter-field-icons .app-icon-svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.filter-field-clear {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
}

.filter-field-clear[hidden] {
  display: none;
}

.filter-field-clear:hover {
  background: var(--bg);
  color: var(--ink);
}

.filter-field-clear .app-icon-svg {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.filter-range {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.filter-range-title {
  color: var(--muted);
  font-size: 13px;
}

.filter-range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.filter-range-control {
  position: relative;
  height: 26px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.filter-range-track {
  position: absolute;
  inset: 11px 8px auto;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.filter-range-track span {
  position: absolute;
  inset-block: 0;
  border-radius: inherit;
  background: var(--primary);
}

.filter-range-thumb {
  position: absolute;
  top: 4px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 1px 4px rgba(21, 21, 21, 0.2);
  cursor: ew-resize;
}

.filter-range-thumb:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.filter-actions {
  margin-top: 8px;
}

.filter-period-grid .date-picker-day.in-range {
  border-radius: 0;
  background: #fff0ec;
}

.filter-period-grid .date-picker-day.range-start,
.filter-period-grid .date-picker-day.range-end {
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.filter-multi-list {
  min-height: 48px;
}

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

.sheet-section,
.sheet-callout,
.sheet-metric {
  border-radius: var(--radius-card);
  background: var(--surface);
}

.sheet-section {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.wallet-movement-form {
  gap: 12px;
}

.wallet-movement-form .wallet-movement-input {
  min-height: 48px;
  color: var(--muted);
}

.wallet-movement-form .wallet-movement-input::placeholder {
  color: var(--muted);
}

.sheet-action-list {
  gap: 8px;
}

.sheet-subtitle {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.side-sheet-body > .sheet-section,
.side-sheet-body > .sheet-callout {
  padding-inline: 12px;
}

.sheet-section h3,
.sheet-callout strong {
  margin: 0;
  font-size: 16px;
}

.sheet-callout {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
}

.sheet-callout p {
  margin-bottom: 0;
}

.sheet-option,
.sheet-toggle {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
}

.sheet-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.sheet-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sheet-option small {
  color: var(--muted);
  font-size: 12px;
}

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

.copy-bank-list {
  display: grid;
  gap: 8px;
  max-height: min(420px, 50vh);
  overflow: auto;
}

.copy-bank-row {
  grid-template-columns: 22px minmax(0, 1fr) 18px;
}

.copy-bank-row.is-selected .picker-option-marker {
  border-color: var(--primary);
  background: var(--primary);
}

.copy-bank-empty {
  margin: 0;
  padding: 14px 4px;
  color: var(--muted);
  font-size: 14px;
}

.delete-bet-sheet {
  color: var(--muted);
}

.sheet-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
}

.sheet-toggle input {
  width: 38px;
  min-height: 22px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--primary);
}

.ordered-selection {
  display: grid;
  gap: 10px;
}

.ordered-selection-search {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 0 14px;
}

.ordered-selection-list {
  max-height: min(456px, 55vh);
  overflow: auto;
  border-radius: 16px;
  background: var(--surface);
}

@media (min-width: 901px) {
  .side-sheet-body > .ordered-selection {
    min-height: 100%;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .side-sheet-body > .ordered-selection .ordered-selection-list {
    min-height: 0;
    max-height: none;
  }
}

.ordered-selection-row,
.ordered-selection-empty {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  text-align: left;
}

.ordered-selection-row:hover {
  background: var(--feedback-lime-soft);
}

.ordered-selection-marker {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  border: 2px solid var(--primary);
  border-radius: 2px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.ordered-selection-marker.is-selected {
  background: var(--primary);
}

.ordered-selection-empty {
  justify-content: flex-start;
  font-size: 14px;
}

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

.insights-sheet-group .home-insights-list {
  gap: 8px;
}

.import-choice-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  justify-content: stretch;
  padding: 12px;
}

.import-choice-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.import-choice-row small {
  color: var(--muted);
  font-size: 12px;
}

.import-choice-row.is-disabled {
  opacity: 0.46;
}

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

.sheet-metric {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

.sheet-metric strong {
  font-size: 18px;
}

.side-sheet-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  padding: 12px var(--form-page-padding) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-soft);
  background: var(--bg);
  box-shadow: 0 -12px 24px rgba(21, 21, 21, 0.08);
}

.side-sheet-footer[hidden] {
  display: none;
}

.side-sheet-footer .primary-button,
.side-sheet-footer .secondary-button,
.side-sheet-footer .danger-button {
  width: 100%;
  min-width: 0;
}

.sheet-calendar-grid {
  background: var(--bg);
  border-radius: 14px;
  padding: 10px;
}

.profit-calendar-side {
  min-width: 0;
  display: grid;
  gap: 0;
}

.profit-calendar-subtitle {
  min-height: 18px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.profit-calendar-month-header {
  min-height: 48px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.profit-calendar-month-header > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 400;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-calendar-month-header [data-profit-calendar-previous] {
  transform: rotate(180deg);
}

.profit-calendar-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 24px;
  grid-auto-rows: 56px;
  gap: 2px 0;
  margin-top: 8px;
}

.profit-calendar-weekday,
.profit-calendar-blank,
.profit-calendar-day {
  min-width: 0;
  height: 56px;
}

.profit-calendar-weekday {
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.profit-calendar-blank {
  display: block;
}

.profit-calendar-day {
  width: calc(100% - 4px);
  justify-self: center;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  place-items: center;
  gap: 0;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.profit-calendar-day strong {
  font-size: 15px;
  font-weight: 400;
  line-height: 18px;
}

.profit-calendar-day span {
  width: 100%;
  height: 16px;
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 16px;
  padding-top: 1px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-calendar-day.is-profit {
  background: rgba(25, 143, 54, 0.1);
}

.profit-calendar-day.is-profit span {
  color: var(--green);
}

.profit-calendar-day.is-loss {
  background: rgba(215, 38, 61, 0.1);
}

.profit-calendar-day.is-loss span {
  color: var(--red);
}

.profit-calendar-day.is-today:not(.is-profit, .is-loss, .in-range) {
  background: var(--header-action-bg);
}

.profit-calendar-day.in-range {
  border-color: var(--green);
  background: var(--surface);
}

.profit-calendar-day.range-start,
.profit-calendar-day.range-end {
  border-color: transparent;
  background: var(--header-action-bg);
}

.profit-calendar-day.range-start span,
.profit-calendar-day.range-end span {
  color: var(--ink);
}

.profit-calendar-day:hover,
.profit-calendar-day:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}

.profit-calendar-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.profit-calendar-stat {
  min-width: 0;
  display: grid;
  justify-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.profit-calendar-stat span,
.profit-calendar-stat small,
.profit-calendar-stat strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-calendar-stat span {
  color: var(--muted);
  font-size: 11px;
}

.profit-calendar-stat strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 400;
}

.profit-calendar-stat strong.positive {
  color: var(--green);
}

.profit-calendar-stat strong.negative {
  color: var(--red);
}

.profit-calendar-stat strong.neutral,
.profit-calendar-stat small {
  color: var(--muted);
}

.profit-calendar-stat small {
  margin-top: 6px;
  font-size: 10px;
}

.settings-page {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.settings-account-card,
.settings-pro-card,
.settings-row,
.settings-add-card,
.settings-help-topic {
  width: 100%;
  border: 0;
  color: var(--ink);
  text-align: left;
}

.settings-account-card,
.settings-pro-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.settings-account-card:hover,
.settings-pro-card:hover,
.settings-row:hover,
.settings-help-topic:hover {
  background: var(--header-action-bg);
}

.settings-account-avatar,
.settings-profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 400;
}

.settings-account-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}

.settings-account-copy,
.settings-pro-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  flex: 1;
}

.settings-account-copy strong,
.settings-account-copy small,
.settings-pro-copy strong,
.settings-pro-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-account-copy strong,
.settings-pro-copy strong {
  font-size: 15px;
  font-weight: 400;
}

.settings-account-copy small,
.settings-pro-copy small {
  color: var(--muted);
  font-size: 11px;
}

.settings-pro-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  border-radius: 50%;
  background: rgba(25, 143, 54, 0.1);
  color: var(--green);
  font-size: 12px;
}

.settings-group {
  min-width: 0;
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.settings-row {
  min-height: 48px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background: transparent;
  text-decoration: none;
}

.settings-row-icon,
.settings-row-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--icon-inactive);
}

.settings-row-icon .app-icon-svg,
.settings-row-chevron .app-icon-svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.settings-row-label {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row.is-danger .settings-row-icon,
.settings-row.is-danger .settings-row-label {
  color: var(--red);
}

.settings-pill-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: block;
  border-radius: 999px;
  background: var(--header-action-bg);
  transition: background 180ms ease;
}

.settings-pill-switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(21, 21, 21, 0.18);
  transition: transform 180ms ease;
}

.settings-pill-switch.is-checked {
  background: var(--primary);
}

.settings-pill-switch.is-checked span {
  transform: translateX(20px);
}

.settings-back-button {
  transform: rotate(180deg);
}

.settings-profile-summary,
.settings-support-intro,
.settings-confirmation {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 12px;
  text-align: center;
}

.settings-profile-avatar {
  width: 88px;
  height: 88px;
  font-size: 30px;
}

.settings-profile-summary strong {
  font-size: 16px;
  font-weight: 400;
}

.settings-subscription-page {
  gap: 14px;
  background: transparent;
}

.subscription-comparison-card,
.subscription-plan-section {
  min-width: 0;
  display: grid;
  border-radius: var(--radius-card);
  background: var(--surface);
}

.subscription-comparison-card {
  gap: 0;
  padding: 14px 16px 16px;
}

.subscription-comparison-header,
.subscription-comparison-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px 68px;
  align-items: center;
}

.subscription-comparison-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subscription-comparison-header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-comparison-header span,
.subscription-comparison-value {
  text-align: center;
}

.subscription-comparison-header .is-pro,
.subscription-comparison-value.is-pro {
  color: var(--primary);
}

.subscription-comparison-rows {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.subscription-comparison-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-comparison-value {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.subscription-comparison-value.is-strong,
.subscription-comparison-value.is-text {
  font-weight: 800;
}

.subscription-comparison-value.is-text {
  font-size: 11px;
}

.subscription-comparison-value .app-icon-svg {
  width: 18px;
  height: 18px;
  margin-inline: auto;
}

.subscription-progress {
  height: 8px;
  display: block;
  overflow: hidden;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--line);
}

.subscription-progress span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
}

.subscription-comparison-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.subscription-plan-section {
  gap: 6px;
  margin-top: 0;
  padding: 16px;
}

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

.subscription-plan-header h3 {
  min-width: 0;
  flex: 1;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-plan-header span,
.subscription-plan-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--header-action-bg);
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.subscription-plan-header span {
  padding: 6px 10px;
}

.subscription-plan-section > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.subscription-plan-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.subscription-plan-row {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--ink);
  text-align: left;
}

.subscription-plan-row:hover,
.subscription-plan-row:focus-visible {
  background: var(--feedback-lime-soft);
}

.subscription-plan-row.is-selected {
  background: var(--field-bg-focus);
}

.subscription-plan-radio {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  border: 1.5px solid #aeb4bd;
  border-radius: 5px;
  color: #ffffff;
}

.subscription-plan-row.is-selected .subscription-plan-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.subscription-plan-radio .app-icon-svg {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
}

.subscription-plan-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.subscription-plan-copy strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-plan-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.subscription-plan-badge {
  padding: 5px 8px;
  font-size: 9px;
}

.settings-subscription-cta {
  width: 100%;
  margin-top: 0;
}

.settings-subscription-free-link {
  justify-self: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-field);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-subscription-free-link:hover,
.settings-subscription-free-link:focus-visible {
  background: var(--header-action-bg);
  color: var(--ink);
}

.settings-support-intro h3,
.settings-confirmation h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
}

.settings-support-intro p,
.settings-confirmation p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-add-card {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--primary);
}

.settings-add-card:hover {
  background: var(--header-action-bg);
}

.settings-empty {
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.settings-editor-form {
  display: grid;
  gap: 12px;
}

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

.settings-editor-actions > :only-child {
  grid-column: 1 / -1;
}

.secondary-button.is-danger {
  color: var(--red);
}

.danger-button {
  background: var(--red);
}

.danger-button:hover {
  background: #b71f33;
}

.settings-help-search {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 22px;
  background: var(--field-bg);
  color: var(--icon-inactive);
}

.settings-help-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.settings-help-topic {
  min-height: 56px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.settings-help-topic .settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--header-action-bg);
}

.settings-help-topic[aria-expanded="true"] .settings-row-chevron {
  transform: rotate(90deg);
}

.settings-help-answer {
  margin: 0;
  padding: 0 12px 14px 58px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
}

.settings-support-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--header-action-bg);
  color: var(--icon-inactive);
}

.settings-support-icon .app-icon-svg {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.settings-support-icon.is-danger {
  color: var(--red);
}

.settings-legal-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.settings-legal-links a {
  color: var(--primary);
  text-decoration: none;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .side-sheet-panel,
html[data-theme="dark"] .modal-panel {
  background: var(--bg);
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active,
html[data-theme="dark"] .ghost-button:hover,
html[data-theme="dark"] .integration-pill,
html[data-theme="dark"] .insight-card,
html[data-theme="dark"] .selection-chip,
html[data-theme="dark"] .calendar-day,
html[data-theme="dark"] .sheet-option,
html[data-theme="dark"] .sheet-toggle,
html[data-theme="dark"] .ordered-selection-list,
html[data-theme="dark"] .ticket-actions-menu,
html[data-theme="dark"] .insights-category-button,
html[data-theme="dark"] .sheet-calendar-grid {
  background: var(--surface-strong);
}

html[data-theme="dark"] .ticket-actions-menu button:hover,
html[data-theme="dark"] .ticket-actions-menu button:focus-visible {
  background: var(--bg);
}

html[data-theme="dark"] .calendar-day.is-empty {
  background: transparent;
}

.modal-panel input:focus-visible,
.modal-panel select:focus-visible,
.modal-panel textarea:focus-visible,
.side-sheet input:focus-visible,
.side-sheet select:focus-visible,
.side-sheet textarea:focus-visible {
  outline: 0;
  box-shadow: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: min(430px, calc(100vw - 44px));
  padding: 14px 16px;
  border-radius: 16px;
  background: #111111;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--bg);
}

.auth-screen[hidden],
.app-shell[hidden],
[data-auth-panel][hidden] {
  display: none;
}

.auth-layout {
  width: min(430px, 100%);
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.auth-brand-panel {
  min-height: 100%;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 36px;
  background: #151515;
  color: #ffffff;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.auth-brand strong {
  font-size: 18px;
}

.auth-brand small {
  color: #a7a7a7;
}

.auth-brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #000000;
}

.auth-brand-mark svg {
  width: 27px;
  fill: var(--primary);
}

.auth-brand-copy {
  max-width: 420px;
}

.auth-brand-copy .eyebrow {
  color: var(--primary);
}

.auth-brand-copy h1 {
  margin-bottom: 18px;
  font-size: 42px;
  line-height: 1.05;
}

.auth-brand-copy > p:last-child {
  margin-bottom: 0;
  color: #b8b8b8;
  font-size: 16px;
  line-height: 1.55;
}

.auth-panel {
  width: 100%;
  align-self: center;
  justify-self: center;
  padding: 12px 4px 28px;
}

.auth-app-brand {
  min-height: 64px;
  display: flex;
  align-items: center;
}

.auth-app-wordmark {
  width: 210px;
  height: 56px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.auth-panel-heading {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}

.auth-panel-heading h2 {
  font-size: 28px;
  line-height: 1.12;
  font-weight: 400;
}

.auth-panel-heading > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.auth-form label {
  display: grid;
  color: var(--muted);
}

.auth-form label > span:first-child:not(:only-child) {
  display: none;
}

.auth-form input:not([type="checkbox"]) {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--field-bg);
  color: var(--ink);
  font-size: 14px;
}

.auth-form input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.auth-form input:not([type="checkbox"]):focus-visible {
  background: var(--field-bg);
  box-shadow: none;
}

.auth-password-field {
  position: relative;
  display: block;
}

.auth-form .auth-password-field input {
  padding-right: 48px;
}

.auth-password-toggle {
  position: absolute;
  top: 0;
  right: 4px;
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.auth-password-toggle .app-icon-svg {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.auth-form .primary-button {
  min-height: 48px;
  margin-top: 16px;
}

.auth-text-action {
  justify-self: end;
  margin-top: -4px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 13px;
}

.auth-icon-button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 800;
}

.auth-google-mark {
  width: 22px;
  height: 22px;
  display: block;
  flex: 0 0 22px;
}

.auth-google-mark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.auth-inline-row {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.auth-inline-row strong {
  color: var(--primary-dark);
}

.auth-back-action {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
}

.auth-back-action {
  justify-self: center;
}

.auth-code-copy {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.auth-terms-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.auth-terms-row input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--primary);
}

.auth-status {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(215, 38, 61, 0.24);
  border-radius: var(--radius-field);
  background: rgba(215, 38, 61, 0.08);
  color: var(--red);
  line-height: 1.4;
}

.auth-status.is-success {
  border-color: rgba(25, 143, 54, 0.24);
  background: rgba(25, 143, 54, 0.08);
  color: var(--green);
}

.auth-note {
  color: var(--muted);
  line-height: 1.45;
  margin: 18px 0 0;
}

.auth-note a {
  color: inherit;
}

@media (max-width: 1180px) {
  :root {
    --rail-width: 96px;
  }

  .home-hero-grid,
  .workspace,
  .add-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 900px) {
  .auth-screen {
    padding: 0;
  }

  .auth-layout {
    min-height: 100vh;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: 24px;
  }

  .auth-brand-copy {
    display: none;
  }

  .auth-panel {
    padding: 32px 24px 40px;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: 86px;
    flex-direction: row;
    align-items: center;
    padding: 8px 14px 12px;
    border-top: 1px solid var(--line-soft);
    border-right: 0;
    border-radius: 24px 24px 0 0;
  }

  .sidebar .brand-row,
  .sidebar-footer,
  .sidebar-balance-slot {
    display: none;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-item {
    min-height: 64px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    padding: 0 4px;
    border-radius: 18px;
    font-size: 12px;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px 0 var(--primary);
  }

  .main {
    margin-left: 0;
    padding: 18px 18px 116px;
  }

  .topbar {
    align-items: flex-start;
    display: grid;
  }

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

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-grid {
    min-width: 0;
  }

  .desktop-status-panel {
    display: none;
  }

  .balance-actions,
  .ticket-footer {
    grid-template-columns: 1fr;
  }

  .bets-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .picker-sheet-panel {
    width: 100%;
    max-height: calc(100dvh - 12px);
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 30px;
  }

  html,
  body,
  .app-shell {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main,
  .view,
  .home-hero-grid,
  .balance-card {
    min-width: 0;
    max-width: 100%;
  }

  .account-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
  }

  .wallet-actions,
  .topbar-actions,
  .header-actions,
  .form-grid,
  .metric-grid,
  .analysis-ring-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar-actions,
  .header-actions {
    display: grid;
  }

  .header-actions {
    grid-template-columns: repeat(3, 48px);
  }

  .app-shell[data-view="bets"] .header-actions {
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  .header-search-field {
    width: 100%;
  }

  .bank-chip-button,
  .bank-chip-select,
  .bank-chip,
  .chart-filters {
    width: 100%;
  }

  .bank-chip {
    min-width: 0;
  }

  .profit-chart-canvas,
  .profit-chart-viewport {
    overflow: hidden;
  }

  .balance-card {
    justify-items: stretch;
    text-align: center;
  }

  .balance-value {
    font-size: 44px;
  }

  .modal-panel,
  .side-sheet-panel {
    width: 100vw;
  }

  .side-sheet-body {
    padding: var(--form-page-padding);
  }

  .sheet-stat-grid {
    grid-template-columns: 1fr;
  }

  .side-sheet-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 76px;
    padding: 10px;
  }

  .bets-week-list {
    grid-template-columns: 1fr;
  }

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

  .wallet-card-copy strong {
    font-size: 16px;
  }

  .wallet-add-card {
    min-height: 68px;
  }

}

@media (max-width: 900px) {
  html.has-open-sheet,
  html.has-open-sheet body {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .modal,
  .side-sheet {
    transition: visibility 0s linear 220ms;
  }

  .modal[aria-hidden="false"],
  .side-sheet[aria-hidden="false"] {
    transition-delay: 0s;
  }

  .modal-backdrop,
  .side-sheet-backdrop {
    background: rgba(0, 0, 0, 0.33);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .modal-panel,
  .side-sheet-panel,
  .picker-sheet-panel {
    inset: auto 0 0;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 12px);
    border-top: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
    background: var(--bg);
    box-shadow: 0 -18px 44px rgba(21, 21, 21, 0.14);
    transform: translateY(100%);
    transition: transform 220ms ease;
  }

  .modal-panel::before,
  .side-sheet-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-soft), transparent);
    pointer-events: none;
  }

  .side-sheet-panel {
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
  }

  .modal[aria-hidden="false"] .modal-panel,
  .side-sheet[aria-hidden="false"] .side-sheet-panel {
    transform: translateY(0);
  }

  .bottom-sheet-handle,
  .bottom-sheet-handle:not(.picker-sheet-handle),
  .picker-sheet-handle {
    box-sizing: border-box;
    width: 100%;
    height: 26px;
    display: grid;
    place-items: start center;
    padding-top: 12px;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .bottom-sheet-handle:active,
  .picker-sheet-handle:active {
    cursor: grabbing;
  }

  .bottom-sheet-handle span,
  .picker-sheet-handle span {
    width: 48px;
    height: 2px;
    display: block;
    border-radius: 999px;
    background: var(--icon-inactive);
  }

  .modal-header,
  .side-sheet-header,
  .picker-sheet-panel .side-sheet-header {
    min-height: 0;
    padding: 0 16px 12px;
    border-bottom: 0;
  }

  .modal-header > div:first-child,
  .side-sheet-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .modal-header h2,
  .side-sheet-header h2 {
    order: 1;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 400;
  }

  .modal-header .eyebrow,
  .side-sheet-header .eyebrow {
    order: 2;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 400;
    text-transform: none;
  }

  .modal-header [data-close-modal],
  .side-sheet-header [data-close-sheet] {
    display: none;
  }

  .side-sheet-header-actions {
    align-self: flex-start;
  }

  .side-sheet-body {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }

  .modal-panel {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .modal-panel > label:first-of-type {
    margin-top: 12px;
  }

  .picker-sheet-body {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell {
    background: var(--bg);
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: calc(70px + env(safe-area-inset-top, 0px)) 16px calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    min-height: calc(54px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
    padding: calc(3px + env(safe-area-inset-top, 0px)) 16px 3px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--bg);
  }

  .page-heading {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-actions {
    flex: 0 0 auto;
  }

  .account-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    font-size: 18px;
  }

  .page-heading .eyebrow {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 400;
    text-transform: none;
  }

  #page-title {
    font-size: 14px;
    line-height: 1.15;
    font-weight: 400;
  }

  .wallet-actions {
    display: none;
  }

  .topbar-actions {
    width: auto;
    display: flex;
    justify-content: flex-end;
  }

  .header-actions {
    width: 136px;
    display: grid;
    grid-template-columns: repeat(3, 44px);
    gap: 2px;
  }

  .header-icon-button,
  .icon-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 0;
    background: transparent;
    color: var(--icon-inactive);
    box-shadow: none;
  }

  .header-icon-button .app-icon-svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .header-search-field .app-icon-svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .header-icon-button:hover,
  .icon-button:hover,
  .header-icon-button.filter-active {
    background: transparent;
    color: var(--primary);
  }

  .view {
    gap: 0;
  }

  .home-hero-grid {
    width: 100%;
    max-width: 100%;
    display: block;
  }

  .balance-card {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    gap: 0;
    padding: 12px;
    border-radius: 24px;
    overflow: hidden;
  }

  .bank-chip {
    width: auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }

  .bank-chip-button,
  .bank-chip-select {
    width: auto;
    max-width: 230px;
    height: 44px;
    justify-content: flex-start;
    padding: 0 32px 0 14px;
    border-radius: 999px;
    background-color: var(--field-bg);
  }

  .balance-label {
    margin-top: 8px;
    font-size: 13px;
  }

  .balance-value {
    margin-top: 4px;
    font-size: 40px;
    line-height: 1;
  }

  .balance-actions {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .wallet-action {
    min-width: 0;
    min-height: 52px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 14px;
  }

  .wallet-action span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wallet-action-icon,
  .wallet-action:not(.wallet-action-primary) .wallet-action-icon {
    width: 24px;
    height: 24px;
    background: transparent;
  }

  .profit-chart-section {
    width: 100%;
    max-width: 100%;
    gap: 10px;
    margin-top: 4px;
    padding-top: 0;
  }

  .profit-chart-canvas,
  .profit-chart-viewport,
  .profit-chart-svg {
    height: 270px;
  }

  .profit-chart-header {
    display: block;
  }

  .chart-filters {
    width: 100%;
    min-height: 40px;
    padding: 2px;
    gap: 0;
  }

  .chart-filter {
    min-height: 36px;
    font-size: 12px;
  }

  .home-stats-section {
    width: 100%;
    max-width: 100%;
    gap: 6px;
    margin-top: 14px;
  }

  .home-stats-header,
  .home-insights-header {
    min-height: 44px;
  }

  .home-stats-title,
  .home-insights-title {
    gap: 8px;
    font-size: 18px;
  }

  .home-stats-icon,
  .home-insights-icon {
    width: 34px;
    height: 34px;
  }

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

  .metric {
    min-height: 96px;
    align-content: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
  }

  .metric strong {
    order: 1;
    font-size: 18px;
    padding-right: 34px;
  }

  .metric .metric-label {
    order: 2;
    font-size: 14px;
    color: var(--muted);
  }

  .metric .metric-detail {
    display: none;
  }

  .metric .metric-help {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid var(--icon-inactive);
    border-radius: 50%;
    color: var(--icon-inactive);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
  }

  .workspace {
    width: 100%;
    max-width: 100%;
    display: block;
    margin-top: 18px;
  }

  .workspace .panel:first-child {
    display: none;
  }

  .app-shell[data-view="home"] .home-latest-workspace {
    display: none;
  }

  .home-insights-panel {
    padding: 0;
    background: transparent;
  }

  .home-insights-list {
    gap: 8px;
  }

  .sidebar {
    inset: auto 0 0 0;
    width: auto;
    height: calc(74px + env(safe-area-inset-bottom, 0px));
    padding: 1px 8px calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line-soft);
    border-right: 0;
    border-radius: 24px 24px 0 0;
    background: var(--dock-bg);
  }

  .sidebar::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    width: 132px;
    height: 5px;
    border-radius: 999px;
    background: rgba(21, 21, 21, 0.28);
    transform: translateX(-50%);
  }

  .nav {
    position: relative;
    height: 52px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  .dock-active-indicator {
    display: block;
    position: absolute;
    left: var(--dock-indicator-x, 0px);
    bottom: 5px;
    z-index: 3;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    opacity: 0;
    transform: translateX(-50%);
    transition: left 220ms cubic-bezier(0.2, 0.85, 0.2, 1), opacity 140ms ease;
    pointer-events: none;
  }

  .dock-active-indicator.is-visible {
    opacity: 1;
  }

  .nav-item {
    position: relative;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--icon-inactive);
  }

  .nav-item:hover,
  .nav-item.active {
    background: transparent;
    color: var(--primary);
    box-shadow: none;
  }

  .nav-item > span:last-child {
    display: none;
  }

  .nav-item .button-icon,
  .nav-item .app-icon-svg {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .nav-item.active::after {
    display: none;
  }

  .nav-add-item {
    display: grid;
    place-items: center;
    color: #ffffff;
  }

  .nav-add-pill,
  .nav-add-item .button-icon {
    grid-area: 1 / 1;
  }

  .nav-add-pill {
    width: 62px;
    height: 42px;
    border-radius: 999px;
    background: var(--primary);
  }

  .nav-add-item .button-icon {
    position: relative;
    z-index: 1;
  }

  .nav-add-item.active::after {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell:not([data-view="home"]) .topbar {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    min-height: calc(54px + env(safe-area-inset-top, 0px));
  }

  .app-shell:not([data-view="home"]) .page-heading {
    display: contents;
  }

  .app-shell:not([data-view="home"]) .account-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  .app-shell:not([data-view="home"]) .account-avatar.page-back-button {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--ink);
    --app-icon-color: var(--ink);
    padding: 0;
    box-shadow: none;
  }

  .app-shell:not([data-view="home"]) .account-avatar.page-back-button .app-icon-svg {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .app-shell:not([data-view="home"]) .page-heading > div {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    text-align: center;
  }

  .app-shell:not([data-view="home"]) .page-heading .eyebrow {
    display: none;
  }

  .app-shell:not([data-view="home"]) #page-title {
    font-size: 18px;
    line-height: 1.2;
  }

  .app-shell:not([data-view="home"]) .topbar-actions {
    grid-column: 3;
    grid-row: 1;
    width: auto;
  }

  .app-shell:not([data-view="home"]):not([data-view="bets"]) .topbar {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .app-shell:not([data-view="home"]):not([data-view="bets"]) .header-actions {
    width: 44px;
    grid-template-columns: 44px;
  }

  .app-shell[data-view="bets"] .header-actions {
    width: 90px;
    grid-template-columns: repeat(2, 44px);
  }

  .app-shell[data-view="bets"]:not([data-search-open="true"]) .topbar {
    grid-template-columns: 90px minmax(0, 1fr) 90px;
  }

  .app-shell[data-view="bets"][data-search-open="true"] .topbar {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .app-shell[data-view="bets"][data-search-open="true"] .page-heading > div {
    display: none;
  }

  .app-shell[data-view="bets"][data-search-open="true"] .topbar-actions {
    grid-column: 2;
    width: 100%;
  }

  .app-shell[data-view="bets"][data-search-open="true"] .header-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 2px;
  }

  .app-shell[data-view="bets"][data-search-open="true"] .header-search-field {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 12px 0 10px;
    background: var(--header-action-bg);
  }

  .app-shell[data-view="bets"][data-search-open="true"] .header-search-field input {
    min-height: 44px;
    font-size: 14px;
  }

  .app-shell[data-view="add"] .main {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell[data-view="add"] .sidebar,
  .app-shell[data-view="homeStats"] .sidebar,
  .app-shell[data-view="insights"] .sidebar {
    display: none;
  }

  .app-shell[data-view="homeStats"] .main,
  .app-shell[data-view="insights"] .main {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .app-shell[data-view="add"] .view,
  .app-shell[data-view="add"] .add-layout {
    display: block;
    width: 100%;
  }

  .app-shell[data-view="add"] .panel.bet-form.add-bet-form {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .app-shell[data-view="add"] .add-bet-form {
    gap: 8px;
  }

  .app-shell[data-view="add"] .add-bet-form .form-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .app-shell[data-view="add"] .add-bet-form .wide {
    grid-column: 1 / -1;
  }

  .app-shell[data-view="add"] .add-bet-form input,
  .app-shell[data-view="add"] .add-bet-form .picker-field,
  .app-shell[data-view="add"] .add-bet-form .date-time-field,
  .app-shell[data-view="add"] .add-bet-form .number-input-shell,
  .app-shell[data-view="add"] .add-selection-button {
    min-height: 48px;
    border-radius: 12px;
    font-size: 14px;
  }

  .app-shell[data-view="add"] .add-bet-form .selection-card,
  .app-shell[data-view="add"] .add-selection-button {
    background: var(--surface);
  }

  .app-shell[data-view="add"] .add-bet-form .selection-header {
    min-height: 48px;
    padding: 0 6px 0 16px;
  }

  .app-shell[data-view="add"] .add-bet-form .selection-content {
    padding: 12px;
  }

  .app-shell[data-view="add"] .bet-form-summary {
    margin: 12px 0 72px;
  }

  .app-shell[data-view="add"] .add-bet-form .amount-mode-button {
    top: 4px;
    bottom: 4px;
    left: 6px;
    width: 42px;
    border-radius: 8px;
  }

  .app-shell[data-view="add"] .add-bet-form .amount-input-shell input {
    padding-left: 58px;
  }

  .app-shell[data-view="add"] .add-bet-form .save-bet-button {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 18;
    min-height: 48px;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(255, 89, 51, 0.24);
  }

  .home-stats-full-page,
  .insights-full-page {
    width: 100%;
  }

  .home-stats-full-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .full-insights-list {
    gap: 8px;
  }

  .bet-row {
    min-height: 0;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
  }

  .bet-row.ticket-expanded {
    border-radius: 20px;
  }

  .ticket-head {
    grid-template-columns: 24px minmax(0, 1fr) 148px;
    align-items: center;
    gap: 8px;
  }

  .ticket-dots {
    width: 24px;
    height: 36px;
    margin-top: 0;
  }

  .ticket-head-actions {
    width: 148px;
  }

  .ticket-mobile-chevron {
    width: 12px;
    height: 36px;
    flex: 0 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--icon-inactive);
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ticket-mobile-chevron .app-icon-svg {
    width: 18px;
    height: 24px;
    flex-basis: 18px;
  }

  .bet-row.ticket-expanded .ticket-mobile-chevron {
    transform: rotate(180deg);
  }

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