:root {
  color-scheme: dark;

  /* Color */
  --bg: #121418;
  --bg-deep: #08090b;
  --surface: #1c1f24;
  --surface-raised: #2c2c2e;
  --surface-soft: #24272d;
  --stroke: rgba(255, 255, 255, 0.06);
  --text: #f5f7fb;
  --muted: #8e8e93;
  --muted-readable: #98989d;
  --cashflow-label: #c7c7cc;
  --positive: #32d74b;
  --emerald: #10b981;
  --mint: #7cffb0;
  --negative: #ff453a;
  --orange: #ff8a3d;
  --pink: #ff5fa2;
  --accent: #0a84ff;
  --purple: #8b5cf6;
  --warning: #ffd60a;

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Roboto", Arial, sans-serif;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 22px;
  --text-balance: 40px;

  /* Shape and layout */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --space-screen: 16px;
  --screen-max: 600px;
  --tab-height: 82px;
  --tab-icon-stroke: 2.4px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bottom-action-space: calc(var(--tab-height) + var(--safe-bottom) + 34px);
  --feed-fab-clearance: 34px;
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.36);
  --shadow-cta: 0 18px 34px rgba(10, 132, 255, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  height: 100dvh;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-deep);
  font-family: var(--font-system);
}

.language-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(29, 146, 255, 0.18), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(127, 86, 255, 0.28), transparent 32%),
    linear-gradient(180deg, #15171e 0%, #080a0f 100%);
}

.language-screen.is-open {
  display: flex;
}

.language-card {
  width: min(100%, 520px);
  padding: 30px 24px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(30, 32, 40, 0.88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
  backdrop-filter: blur(22px);
}

.language-card h1 {
  margin: 8px 0 10px;
  color: var(--text);
  font-size: 36px;
  line-height: 1.02;
}

.language-card p {
  margin: 0;
  color: var(--muted-readable);
  font-size: 16px;
  line-height: 1.45;
}

.language-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

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

.currency-button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.currency-button.active {
  border-color: rgba(42, 149, 255, 0.72);
  background: rgba(42, 149, 255, 0.18);
}

.language-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
}

.language-button-primary {
  border-color: rgba(42, 149, 255, 0.6);
  background: linear-gradient(135deg, rgba(26, 144, 255, 0.92), rgba(127, 86, 255, 0.92));
  box-shadow: 0 18px 46px rgba(39, 136, 255, 0.28);
}

.language-button strong {
  font-size: 18px;
}

.language-button span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

button {
  font: inherit;
}

button,
a,
[role="button"],
input,
textarea,
select,
label,
.turn-button,
.tab-link,
.profile-button,
.stock-row,
.stats-row-clickable,
.expense-choice,
.business-action,
.sheet-action,
.bank-amount-chip,
.bank-action,
.broker-action {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

.app-loading .finance-card h1,
.app-loading .capital-chip strong,
.app-loading .cashflow-item strong,
.app-loading .date-pill span:last-child,
.app-loading .stats-segment strong,
.app-loading .stats-summary-card strong,
.app-loading .stats-ring strong,
.app-loading .stats-row-amount,
.app-loading .debt-caption,
.app-loading .bank-hero-card h1,
.app-loading .bank-hero-subtitle,
.app-loading .bank-card-footer strong,
.app-loading .bank-goal-topline strong,
.app-loading .bank-goal-topline small,
.app-loading .bank-kpi-card strong,
.app-loading .bank-forecast-card strong,
.app-loading .bank-forecast-card .detail-kicker,
.app-loading .bank-feed .event-amount,
.app-loading .bank-feed p,
.app-loading .investor-card h1,
.app-loading .investor-split strong,
.app-loading [data-stock-count] {
  color: transparent !important;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.22) 48%, rgba(255, 255, 255, 0.08) 100%);
  background-size: 240% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.app-loading .finance-card h1,
.app-loading .bank-hero-card h1,
.app-loading .investor-card h1 {
  min-width: 156px;
}

.app-loading .cashflow-item strong,
.app-loading .investor-split strong,
.app-loading .stats-summary-card strong,
.app-loading .stats-row-amount,
.app-loading .bank-card-footer strong,
.app-loading .bank-kpi-card strong,
.app-loading .bank-forecast-card strong {
  display: inline-block;
  min-width: 88px;
}

.app-loading .event-feed,
.app-loading .stats-list,
.app-loading .stock-list {
  opacity: 0.72;
}

.tour-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}

.tour-scrim {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  pointer-events: auto;
}

.tour-highlight {
  position: fixed;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.65), 0 0 28px rgba(10, 132, 255, 0.46);
  pointer-events: none;
}

.tour-popover {
  position: fixed;
  margin: 0;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(28, 31, 36, 0.96);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.48);
  color: var(--text);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.tour-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tour-popover h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.16;
  letter-spacing: 0;
}

.tour-popover p {
  margin: 0;
  color: var(--muted-readable);
  font-size: 14px;
  line-height: 1.42;
}

.tour-actions {
  position: sticky;
  bottom: -16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  padding-bottom: 2px;
  background: linear-gradient(180deg, rgba(28, 31, 36, 0), rgba(28, 31, 36, 0.98) 34%);
}

.tour-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.tour-skip {
  background: rgba(255, 255, 255, 0.1);
}

.tour-ok {
  background: linear-gradient(135deg, #0a84ff, #6d5dfc);
  box-shadow: 0 12px 26px rgba(10, 132, 255, 0.26);
}

.app-shell {
  height: 100dvh;
  min-height: 0;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(circle at 50% -20%, rgba(10, 132, 255, 0.15), transparent 34%),
    var(--bg);
}

.game-screen {
  position: relative;
  width: 100%;
  max-width: var(--screen-max);
  height: 100dvh;
  min-height: 0;
  padding: 14px var(--space-screen) var(--bottom-action-space);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.screen-label {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
}

.date-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 12px;
}

.profile-button,
.icon-button {
  border: 1px solid var(--stroke);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.profile-button:active,
.icon-button:active,
.tab-item:active {
  transform: scale(0.97);
}

.turn-button:active {
  transform: translateY(-20px) scale(0.96);
}

.profile-button {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: linear-gradient(145deg, #343840, #202329);
  font-size: 13px;
  font-weight: 800;
}

.profile-initials {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: linear-gradient(145deg, #343840, #202329);
  box-shadow:
    inset 0 0 0 1px var(--stroke),
    0 8px 18px rgba(0, 0, 0, 0.32);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  width: min(var(--screen-max), 100vw);
  height: 100vh;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  border-left: 1px solid var(--stroke);
  border-right: 1px solid var(--stroke);
  background:
    radial-gradient(circle at 78% 4%, rgba(139, 92, 246, 0.24), transparent 34%),
    #1c1c1e;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.48);
  transform: translateX(50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.18s ease, visibility 0s linear 0.24s;
}

.side-menu.is-open {
  transform: translateX(-50%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.side-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.side-menu-header p,
.side-menu-header h2 {
  margin: 0;
}

.side-menu-header p {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 700;
}

.side-menu-header h2 {
  margin-top: 6px;
  color: var(--text);
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.menu-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.menu-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.menu-action {
  min-height: 62px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  cursor: pointer;
}

.menu-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(10, 132, 255, 0.13);
  font-size: 21px;
  font-weight: 900;
}

.menu-action span:last-child {
  font-size: var(--text-md);
  font-weight: 900;
}

.menu-action-danger .menu-action-icon {
  color: var(--negative);
  background: rgba(255, 69, 58, 0.13);
}

.menu-status {
  position: absolute;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.menu-status span {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 750;
}

.menu-status strong {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 900;
}

.menu-info-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 70;
  width: min(var(--screen-max), 100vw);
  padding: 10px 16px calc(18px + var(--safe-bottom));
  border: 1px solid var(--stroke);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #1c1c1e;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.52);
  transform: translate(-50%, 105%);
  transition: transform 0.22s ease;
}

.menu-info-sheet.is-open {
  transform: translate(-50%, 0);
}

.save-sheet {
  max-height: calc(100svh - 18px);
  overflow-y: auto;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.save-actions {
  display: grid;
  gap: 10px;
}

.save-json-field {
  align-items: stretch;
}

.save-json-field textarea {
  width: 100%;
  min-height: 220px;
  max-height: 38vh;
  resize: vertical;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 12px;
  color: var(--text);
  background: rgba(8, 9, 11, 0.64);
  box-shadow: inset 0 0 0 1px var(--stroke);
  font: 600 16px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.save-json-field textarea::placeholder {
  color: var(--muted);
}

.save-status {
  min-height: 20px;
  margin: 4px 2px 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 700;
}

.onboarding-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: min(var(--screen-max), 100vw);
  height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 18px calc(18px + var(--safe-bottom));
  color: var(--text);
  background:
    radial-gradient(circle at 50% 22%, rgba(139, 92, 246, 0.26), transparent 32%),
    radial-gradient(circle at 18% 70%, rgba(10, 132, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #17191f 0%, #0f1115 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.24s ease, visibility 0s linear 0.24s;
}

.onboarding-screen.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.24s ease;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding-right: 58px;
}

.onboarding-progress span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.onboarding-progress span.active {
  background: linear-gradient(90deg, var(--accent), var(--purple));
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.42);
}

.onboarding-close {
  position: absolute;
  right: 18px;
  top: calc(30px + env(safe-area-inset-top, 0px));
  width: 40px;
  height: 40px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.onboarding-content {
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
  text-align: center;
}

.onboarding-visual {
  position: relative;
  width: min(260px, 68vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.wallet-orbit {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(139, 92, 246, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 20%),
    radial-gradient(circle at 72% 76%, rgba(50, 215, 75, 0.22), transparent 18%),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 0 60px rgba(139, 92, 246, 0.24),
    inset 0 0 34px rgba(10, 132, 255, 0.08);
}

.wallet-icon {
  position: relative;
  width: 132px;
  height: 106px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.92), rgba(139, 92, 246, 0.92)),
    #24272d;
  box-shadow:
    0 28px 60px rgba(10, 132, 255, 0.28),
    0 0 42px rgba(139, 92, 246, 0.34);
  transform: rotate(-7deg);
}

.wallet-icon::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 27px;
  width: 68px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.wallet-icon::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 24px;
  width: 34px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
}

.wallet-icon span {
  position: absolute;
  right: 30px;
  bottom: 36px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
}

.onboarding-visual-passive {
  width: min(270px, 72vw);
}

.passive-ring-demo {
  position: relative;
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
}

.passive-ring-demo svg {
  position: absolute;
  inset: 0;
  overflow: visible;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 24px rgba(50, 215, 75, 0.32));
}

.passive-ring-track,
.passive-ring-fill {
  fill: none;
  stroke-linecap: round;
}

.passive-ring-track {
  stroke: rgba(50, 215, 75, 0.16);
  stroke-width: 12;
}

.passive-ring-fill {
  stroke: var(--positive);
  stroke-width: 12;
  stroke-dasharray: 100 100;
}

.passive-ring-demo div {
  position: relative;
  z-index: 1;
  width: 136px;
  height: 136px;
  border: 1px solid rgba(50, 215, 75, 0.2);
  border-radius: 50%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background:
    radial-gradient(circle at 50% 0%, rgba(50, 215, 75, 0.18), transparent 54%),
    rgba(255, 255, 255, 0.055);
}

.passive-ring-demo span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.passive-ring-demo strong {
  color: var(--text);
  font-size: 44px;
  line-height: 1;
  font-weight: 950;
}

.onboarding-visual-tools {
  width: min(310px, 78vw);
  height: 260px;
}

.tools-bento-card {
  position: absolute;
  display: grid;
  gap: 6px;
  min-width: 150px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    #202329;
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.tools-bento-card span {
  font-size: 32px;
  line-height: 1;
}

.tools-bento-card strong {
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.05;
  font-weight: 950;
}

.tools-bento-card small {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  font-weight: 800;
}

.tools-bento-stocks {
  left: 0;
  top: 28px;
  z-index: 2;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.24), rgba(255, 255, 255, 0.04)),
    #202329;
  transform: rotate(-7deg);
}

.tools-bento-bank {
  right: 0;
  top: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(50, 215, 75, 0.18), rgba(255, 255, 255, 0.04)),
    #202329;
  transform: rotate(6deg);
}

.tools-bento-business {
  left: 54px;
  bottom: 16px;
  z-index: 3;
  min-width: 184px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(255, 255, 255, 0.05)),
    #202329;
}

.onboarding-visual-risk {
  width: min(360px, 88vw);
  height: auto;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
}

.risk-card-demo {
  position: relative;
  width: 100%;
  min-height: 158px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(255, 69, 58, 0.36);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 69, 58, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(255, 69, 58, 0.16), rgba(255, 255, 255, 0.035)),
    #24272d;
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.42),
    0 0 42px rgba(255, 69, 58, 0.18);
  text-align: left;
}

.risk-card-demo::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 4px;
  border-radius: 999px;
  background: var(--negative);
}

.risk-card-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: var(--negative);
  background: rgba(255, 69, 58, 0.15);
  font-size: 30px;
  font-weight: 950;
}

.risk-card-demo span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.risk-card-demo strong {
  display: block;
  margin-top: 6px;
  color: var(--negative);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.risk-card-demo small {
  display: block;
  margin-top: 8px;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 750;
}

.risk-progress {
  height: 7px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.risk-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--negative), var(--orange));
}

.onboarding-visual-card {
  width: min(380px, 88vw);
  height: auto;
  aspect-ratio: auto;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.player-card-preview {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  clip-path: inset(0 round 28px);
  width: min(340px, 84vw);
  aspect-ratio: 1.62;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  background:
    radial-gradient(circle at 88% 14%, rgba(139, 92, 246, 0.52), transparent 30%),
    linear-gradient(135deg, #3a3f4b, #1d222b 62%, #101216);
  box-shadow:
    0 30px 76px rgba(0, 0, 0, 0.48),
    0 0 58px rgba(139, 92, 246, 0.28);
  text-align: left;
}

.player-card-glow {
  position: absolute;
  z-index: 0;
  right: -44px;
  top: -54px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.32);
  filter: blur(18px);
}

.player-card-chip {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 32px;
  border-radius: 9px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0, 0, 0, 0.22) 48% 52%, transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 214, 10, 0.46));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.player-card-bank {
  position: absolute;
  z-index: 1;
  right: 20px;
  top: 21px;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.player-card-preview strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.player-card-preview small {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-xs);
  font-weight: 850;
}

.card-issue-form {
  width: 100%;
  display: grid;
  gap: 0;
}

.card-name-field {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  text-align: left;
}

.card-name-field span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-name-field input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: var(--text-lg);
  font-weight: 900;
}

.onboarding-copy {
  display: grid;
  gap: 10px;
  max-width: 430px;
}

.onboarding-kicker {
  margin: 0;
  color: var(--positive);
  font-size: var(--text-xs);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.onboarding-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 9vw, 48px);
  line-height: 0.98;
  font-weight: 950;
}

.onboarding-copy p:last-child {
  margin: 0;
  color: var(--muted-readable);
  font-size: var(--text-lg);
  line-height: 1.35;
  font-weight: 650;
}

.onboarding-next {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: 0 18px 38px rgba(10, 132, 255, 0.28);
  font-size: var(--text-lg);
  font-weight: 950;
  cursor: pointer;
}

.finance-card {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  clip-path: inset(0 round var(--radius-xl));
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 10%, rgba(139, 92, 246, 0.24), transparent 30%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.23), transparent 44%),
    linear-gradient(155deg, #303035 0%, #202329 58%, #171a1f 100%);
  box-shadow: var(--shadow-card);
}

.card-glow {
  position: absolute;
  right: -60px;
  top: -80px;
  z-index: 0;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.23);
  filter: blur(18px);
}

.finance-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  z-index: 0;
  border-radius: calc(var(--radius-xl) - 1px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(315deg, rgba(10, 132, 255, 0.08), transparent 36%);
  opacity: 0.7;
}

.finance-card-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
  align-items: start;
  gap: 16px;
}

.finance-card-top > div:first-child {
  min-width: 0;
}

.finance-label {
  position: relative;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
}

.finance-card h1 {
  max-width: 100%;
  margin: 0;
  color: var(--text);
  font-size: var(--text-balance);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.finance-card h1.balance-long {
  font-size: 34px;
}

.finance-card h1.balance-xl {
  font-size: 30px;
}

.finance-card h1.balance-xxl {
  font-size: 26px;
}

.capital-chip,
.event-tag,
.metric-row span {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.capital-chip {
  position: relative;
  min-width: 92px;
  padding: 8px 10px;
  text-align: right;
}

.capital-chip span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.capital-chip strong {
  display: block;
  margin-top: 3px;
  color: var(--positive);
  font-size: 13px;
  line-height: 1;
  font-weight: 850;
}

.cashflow-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.cashflow-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
}

.cashflow-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.cashflow-positive .cashflow-icon {
  color: var(--positive);
  background: rgba(50, 215, 75, 0.12);
}

.cashflow-negative .cashflow-icon {
  color: var(--negative);
  background: rgba(255, 69, 58, 0.12);
}

.cashflow-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--cashflow-label);
  font-size: 10px;
  font-weight: 800;
}

.cashflow-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
}

.cashflow-positive strong,
.positive {
  color: var(--positive);
}

.cashflow-negative strong,
.negative {
  color: var(--negative);
}

.market-positive {
  color: var(--accent);
}

.display-none {
  display: none !important;
}

.goal-list {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.16);
}

.goal-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.goal-summary strong {
  color: var(--accent);
}

.goal-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
}

.goal-heading strong {
  color: var(--text);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress-safety {
  width: 45%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

.progress-passive {
  width: 12%;
  background: linear-gradient(90deg, var(--positive), #7cffb0 55%, rgba(10, 132, 255, 0.9));
}

.feed-section {
  margin-top: 22px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: var(--text-xl);
  line-height: 1.15;
  font-weight: 800;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
}

.event-feed {
  display: grid;
  gap: 10px;
  padding-bottom: 0;
}

.event-feed-spacer {
  height: var(--feed-fab-clearance);
  pointer-events: none;
}

.event-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-divider::before,
.event-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--stroke);
}

.event-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.event-icon {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 19px;
  font-weight: 900;
}

.event-income::before,
.event-bank::before {
  background: var(--positive);
}

.event-expense::before,
.event-critical::before {
  background: var(--negative);
}

.event-work::before,
.event-market::before {
  background: var(--accent);
}

.event-business::before,
.event-charity::before {
  background: var(--purple);
}

.event-credit::before {
  background: var(--warning);
}

.event-income .event-icon,
.event-bank .event-icon {
  background: rgba(50, 215, 75, 0.13);
  color: var(--positive);
}

.event-expense .event-icon,
.event-critical .event-icon {
  background: rgba(255, 69, 58, 0.14);
  color: var(--negative);
}

.event-work .event-icon {
  background: rgba(10, 132, 255, 0.16);
  color: var(--accent);
}

.event-icon-briefcase::before,
.event-icon-briefcase::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.event-icon-briefcase::before {
  width: 20px;
  height: 15px;
  top: 16px;
  left: 11px;
  border: 2.3px solid currentColor;
  border-radius: 4px;
}

.event-icon-briefcase::after {
  width: 10px;
  height: 6px;
  top: 11px;
  left: 16px;
  border: 2.3px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.event-business .event-icon,
.event-charity .event-icon {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.event-credit .event-icon {
  background: rgba(255, 214, 10, 0.13);
  color: var(--warning);
}

.event-market {
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.14), transparent 60%),
    var(--surface);
}

.event-market .event-icon {
  background: rgba(255, 214, 10, 0.13);
  color: var(--warning);
}

.event-critical {
  background:
    linear-gradient(135deg, rgba(255, 69, 58, 0.13), transparent 62%),
    var(--surface);
}

.event-content {
  min-width: 0;
}

.event-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.event-main h3 {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.25;
  font-weight: 800;
}

.event-content p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 550;
}

.event-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.event-metric:nth-child(3):last-child {
  grid-column: 1 / -1;
}

.event-metric {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.event-metric span,
.event-metric strong {
  display: block;
  min-width: 0;
}

.event-metric span {
  margin-bottom: 4px;
  color: var(--muted-readable);
  font-size: 12px;
  line-height: 1.15;
  font-weight: 750;
}

.event-metric strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  line-height: 1.18;
  font-weight: 850;
}

.event-amount {
  flex: 0 0 auto;
  font-size: var(--text-md);
  line-height: 1.2;
  font-weight: 850;
}

.event-tag {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--text);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 800;
}

.event-business .event-tag,
.event-business .metric-row span,
.event-charity .event-tag,
.event-charity .metric-row span {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.13);
  color: #cdbdff;
}

.event-market .event-tag,
.event-market .metric-row span,
.event-work .event-tag,
.event-work .metric-row span {
  border-color: rgba(10, 132, 255, 0.3);
  background: rgba(10, 132, 255, 0.13);
  color: #9dccff;
}

.event-credit .event-tag,
.event-credit .metric-row span {
  border-color: rgba(255, 214, 10, 0.3);
  background: rgba(255, 214, 10, 0.12);
  color: var(--warning);
}

.event-critical .event-tag,
.event-critical .metric-row span {
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.13);
  color: #ffaaa5;
}

.event-income .event-tag,
.event-income .metric-row span,
.event-bank .event-tag,
.event-bank .metric-row span {
  border-color: rgba(50, 215, 75, 0.3);
  background: rgba(50, 215, 75, 0.12);
  color: #9dffad;
}

.event-expense .event-tag,
.event-expense .metric-row span {
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.12);
  color: #ffaaa5;
}

.market-tag {
  color: #9dccff;
}

.credit-tag {
  color: var(--warning);
}

.critical-tag {
  color: var(--negative);
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.metric-row span {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.turn-button {
  position: relative;
  z-index: 2;
  align-self: start;
  justify-self: center;
  width: 72px;
  height: 72px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: transparent;
  transform: translateY(-20px);
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
  text-decoration: none;
}

.turn-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.turn-pulse {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow:
    0 18px 34px rgba(10, 132, 255, 0.36),
    0 0 0 8px rgba(10, 132, 255, 0.1);
}

.turn-pulse::before,
.turn-pulse::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.turn-pulse::before {
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border: 2.4px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  transform: rotate(-7deg);
}

.turn-pulse::after {
  left: 27px;
  top: 27px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  box-shadow:
    -6px -6px 0 white,
    6px 6px 0 white;
}

.turn-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.turn-copy strong {
  display: block;
  font-size: var(--text-lg);
  line-height: 1.1;
  font-weight: 850;
}

.turn-copy small {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 850;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.turn-arrow {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: 900;
}

@keyframes turnPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.72);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

.tab-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 15;
  width: min(var(--screen-max), 100vw);
  min-height: calc(var(--tab-height) + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 9px 12px calc(8px + var(--safe-bottom));
  border-top: 1px solid var(--stroke);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 44%),
    rgba(18, 20, 24, 0.94);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.tab-item {
  min-width: 0;
  border: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.tab-icon {
  position: relative;
  width: 24px;
  height: 24px;
  display: block;
  color: currentColor;
}

.tab-icon::before,
.tab-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.tab-icon-home::before {
  left: 4px;
  top: 5px;
  width: 16px;
  height: 16px;
  border: var(--tab-icon-stroke) solid currentColor;
  border-radius: 6px;
  transform: rotate(45deg);
}

.tab-icon-home::after {
  left: 8px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}

.tab-icon-stats::before {
  left: 4px;
  bottom: 4px;
  width: 5px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 8px -5px 0 currentColor, 16px -9px 0 currentColor;
}

.tab-icon-stats::after {
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border: var(--tab-icon-stroke) solid currentColor;
  border-radius: 6px;
  opacity: 0.35;
}

.tab-icon-market::before {
  left: 3px;
  top: 5px;
  width: 18px;
  height: 14px;
  border-left: var(--tab-icon-stroke) solid currentColor;
  border-bottom: var(--tab-icon-stroke) solid currentColor;
  border-radius: 2px;
}

.tab-icon-market::after {
  left: 6px;
  top: 12px;
  width: 15px;
  height: 8px;
  border-top: var(--tab-icon-stroke) solid currentColor;
  border-right: var(--tab-icon-stroke) solid currentColor;
  transform: skewY(-28deg);
}

.tab-icon-bank::before {
  left: 3px;
  top: 7px;
  width: 18px;
  height: 12px;
  border: var(--tab-icon-stroke) solid currentColor;
  border-radius: 4px;
}

.tab-icon-bank::after {
  left: 6px;
  top: 11px;
  width: 5px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 9px 0 0 currentColor;
}

.tab-item.active {
  color: var(--accent);
  background: rgba(10, 132, 255, 0.11);
}

.tab-item.active .tab-icon {
  filter: drop-shadow(0 0 10px rgba(10, 132, 255, 0.45));
}

.tab-item:not(.active):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.bank-screen {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 28px);
}

.bank-hero-card {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  clip-path: inset(0 round var(--radius-xl));
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 0%, rgba(50, 215, 75, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.2), transparent 42%),
    linear-gradient(155deg, #2b2e34 0%, #202329 58%, #15191f 100%);
  box-shadow: var(--shadow-card);
}

.bank-hero-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  z-index: 0;
  border-radius: calc(var(--radius-xl) - 1px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(50, 215, 75, 0.08), transparent 38%);
}

.bank-card-top {
  position: relative;
  padding-right: 132px;
}

.bank-card-top h1 {
  margin: 0;
  color: var(--text);
  font-size: 36px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}

.bank-hero-subtitle {
  position: relative;
  margin: 8px 0 0;
  color: var(--positive);
  font-size: var(--text-md);
  line-height: 1.25;
  font-weight: 850;
  white-space: nowrap;
}

.bank-rate-chip {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 112px;
  padding: 7px 9px;
  text-align: right;
}

.bank-card-footer {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.bank-card-footer div,
.bank-kpi-card,
.bank-actions-panel,
.bank-forecast-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
}

.bank-card-footer div {
  min-width: 0;
  padding: 10px;
}

.bank-goals-card {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 0%, rgba(139, 92, 246, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(10, 132, 255, 0.08), rgba(50, 215, 75, 0.045)),
    rgba(255, 255, 255, 0.052);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.bank-goals-card .section-heading {
  margin-bottom: 12px;
}

.bank-goal-list {
  display: grid;
  gap: 12px;
}

.bank-goal-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.16);
}

.bank-goal-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-goal-topline div {
  min-width: 0;
}

.bank-goal-topline strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
}

.bank-goal-topline small {
  max-width: 52%;
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1.25;
  font-weight: 800;
  text-align: right;
}

.bank-goal-track {
  position: relative;
  height: 11px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.095);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.32);
}

.bank-goal-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  min-width: 0;
  border-radius: inherit;
  transition: width 0.24s ease;
}

.bank-goal-safety .bank-goal-track span {
  background: linear-gradient(90deg, #8b5cf6, #0a84ff);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.34);
}

.bank-goal-passive .bank-goal-track span {
  background: linear-gradient(90deg, #32d74b, #30d5c8);
  box-shadow: 0 0 16px rgba(50, 215, 75, 0.3);
}

.bank-card-footer span,
.detail-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 750;
}

.bank-card-footer strong,
.bank-kpi-card strong,
.bank-amount-control strong,
.bank-forecast-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.2;
  font-weight: 850;
}

.bank-actions-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding: 12px;
}

.bank-actions-panel .section-heading,
.bank-actions-panel .bank-amount-control,
.bank-actions-panel .bank-quick-amounts {
  grid-column: 1 / -1;
}

.bank-actions-panel .section-heading {
  margin-bottom: 0;
}

.bank-amount-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.16);
}

.bank-amount-control span {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 750;
}

.bank-amount-control strong {
  margin-top: 0;
}

.bank-amount-input {
  width: min(180px, 58%);
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: var(--text-lg);
  font-weight: 900;
  text-align: right;
}

.bank-amount-input::placeholder {
  color: var(--muted);
}

.bank-quick-amounts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bank-amount-chip {
  min-height: 42px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  font-size: var(--text-sm);
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.bank-amount-chip:active {
  transform: scale(0.97);
}

.bank-amount-chip.active {
  border-color: rgba(10, 132, 255, 0.86);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.96), rgba(0, 101, 220, 0.92));
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bank-amount-chip-max {
  border-color: rgba(50, 215, 75, 0.34);
  color: var(--positive);
  background: rgba(50, 215, 75, 0.11);
}

.bank-amount-chip-max.active {
  border-color: rgba(50, 215, 75, 0.86);
  color: #06140a;
  background: linear-gradient(180deg, rgba(90, 245, 115, 0.96), rgba(50, 215, 75, 0.9));
  box-shadow: 0 10px 22px rgba(50, 215, 75, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.bank-action {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  font-size: var(--text-lg);
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.bank-action:active {
  transform: scale(0.98);
}

.bank-action-primary {
  border-color: rgba(10, 132, 255, 0.42);
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.24), transparent 18%),
    linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: 0 16px 30px rgba(10, 132, 255, 0.26);
}

.bank-action-withdraw {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    var(--surface-soft);
}

.bank-action-withdraw .bank-action-icon {
  color: var(--text);
  background: rgba(255, 255, 255, 0.13);
}

.bank-action-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
  font-weight: 900;
}

.bank-action-primary .bank-action-icon {
  color: white;
  background: rgba(255, 255, 255, 0.18);
}

.bank-kpi-section,
.bank-planner,
.bank-activity {
  margin-top: 26px;
}

.bank-screen .section-heading {
  margin-bottom: 10px;
}

.bank-screen .section-heading h2 {
  font-size: 20px;
}

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

.bank-kpi-card {
  position: relative;
  min-height: 92px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 58%),
    var(--surface);
}

.bank-kpi-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(10, 132, 255, 0.13);
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
}

.bank-kpi-icon.positive {
  color: var(--positive);
  background: rgba(50, 215, 75, 0.13);
}

.bank-forecast-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.11), transparent 62%),
    var(--surface);
}

.bank-forecast-card div {
  min-width: 0;
}

.bank-feed {
  gap: 8px;
  padding-bottom: 0;
}

.bank-feed .event-card {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.bank-feed .event-icon {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  font-size: 16px;
}

.bank-feed .event-main {
  align-items: center;
}

.bank-feed .event-main h3,
.bank-feed .event-amount {
  font-size: var(--text-sm);
  line-height: 1.2;
}

.bank-feed .event-content p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.bank-message {
  grid-column: 1 / -1;
  display: none;
  padding: 10px 12px;
  border: 1px solid rgba(255, 69, 58, 0.28);
  border-radius: var(--radius-md);
  color: var(--text);
  background: rgba(255, 69, 58, 0.12);
  font-size: var(--text-sm);
  font-weight: 750;
}

.bank-message.is-open {
  display: block;
}

.stats-screen {
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 28px);
}

.stats-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.stats-segment {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted-readable);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.stats-segment span {
  font-size: var(--text-sm);
  font-weight: 850;
}

.stats-segment strong {
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 900;
}

.stats-segment.active {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.2), rgba(139, 92, 246, 0.14)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.18);
}

.stats-segment.expense-active {
  background:
    linear-gradient(135deg, rgba(255, 69, 58, 0.18), rgba(255, 214, 10, 0.1)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.18);
}

.stats-summary-card,
.stats-chart-card,
.stats-row {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stats-summary-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
}

.stats-summary-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.15;
  font-weight: 900;
}

.stats-content {
  margin-top: 26px;
}

.stats-chart-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.11), transparent 58%),
    var(--surface);
}

.stats-ring {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 3px;
  text-align: center;
  background:
    radial-gradient(circle, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--positive) 0 57%, var(--emerald) 57% 91%, var(--mint) 91% 100%);
}

.stats-expense-ring {
  background:
    radial-gradient(circle, var(--surface) 0 54%, transparent 55%),
    conic-gradient(var(--negative) 0 62%, var(--orange) 62% 84%, var(--warning) 84% 94%, var(--pink) 94% 100%);
}

.stats-ring span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 850;
  text-transform: uppercase;
}

.stats-ring strong {
  max-width: 74px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.08;
  font-weight: 900;
}

.stats-legend {
  display: grid;
  gap: 10px;
}

.stats-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 750;
}

.stats-legend strong {
  color: var(--text);
  font-weight: 900;
  padding: 4px 7px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.income-main {
  background: var(--positive);
}

.income-business {
  background: var(--emerald);
}

.income-bank {
  background: var(--mint);
}

.expense-food {
  background: var(--negative);
}

.expense-mortgage {
  background: var(--orange);
}

.expense-tax {
  background: var(--warning);
}

.expense-other {
  background: var(--pink);
}

.stats-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stats-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(50, 215, 75, 0.08), transparent 58%),
    #1e293b;
}

.stocks-screen {
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 28px);
}

.stocks-page {
  height: 100dvh;
  overflow: hidden;
}

.stocks-page .app-shell {
  height: 100dvh;
  min-height: 0;
}

.investor-card {
  position: relative;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  clip-path: inset(0 round var(--radius-xl));
  padding: 22px 18px 18px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(10, 132, 255, 0.18), transparent 45%),
    linear-gradient(315deg, rgba(50, 215, 75, 0.11), transparent 44%),
    #161b22;
  box-shadow: var(--shadow-card);
}

.investor-card .finance-label {
  position: relative;
  margin-bottom: 8px;
  text-align: center;
}

.investor-card h1 {
  position: relative;
  margin: 0;
  color: var(--text);
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.02;
  font-weight: 950;
  text-align: center;
  letter-spacing: 0;
}

.investor-split {
  position: relative;
  display: flex;
  gap: 10px;
  margin-top: 18px;
  margin-right: -16px;
  padding-right: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.investor-split::-webkit-scrollbar {
  display: none;
}

.investor-split div {
  flex: 0 0 auto;
  min-width: min(190px, 72vw);
  padding: 13px 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
  scroll-snap-align: start;
}

.investor-split span {
  display: block;
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1.15;
  font-weight: 850;
  text-transform: uppercase;
}

.investor-split strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(13px, 3.2vw, var(--text-md));
  line-height: 1.15;
  font-weight: 950;
  white-space: nowrap;
}

.broker-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.broker-actions button {
  min-height: 46px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  font-size: var(--text-sm);
  font-weight: 900;
}

.broker-actions button:first-child {
  border-color: rgba(50, 215, 75, 0.28);
  color: var(--positive);
  background: rgba(50, 215, 75, 0.1);
}

.stock-broker-input input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: var(--text-xl);
  line-height: 1.15;
  font-weight: 950;
}

.stocks-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.stocks-segment {
  min-width: 0;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-readable);
  background: transparent;
  cursor: pointer;
}

.stocks-segment span {
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 900;
  white-space: nowrap;
}

.stocks-segment.active {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.22), rgba(50, 215, 75, 0.12)),
    rgba(255, 255, 255, 0.085);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.18);
}

.stocks-content {
  margin-top: 24px;
}

.stock-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.stock-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.08), transparent 58%),
    #1e293b;
}

.stock-row-empty {
  grid-template-columns: 48px minmax(0, 1fr);
}

.stock-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.stock-logo-blue {
  background: linear-gradient(135deg, #0a84ff, #174ea6);
}

.stock-logo-orange {
  background: linear-gradient(135deg, #ff9f0a, #ff453a);
  font-size: 21px;
}

.stock-logo-violet {
  background: linear-gradient(135deg, #8b5cf6, #0a84ff);
}

.stock-row-content {
  min-width: 0;
}

.stock-row-content h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.16;
  font-weight: 900;
}

.stock-row-content p {
  margin: 5px 0 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.2;
  font-weight: 750;
}

.stock-sparkline {
  width: min(132px, 100%);
  height: 34px;
  margin-top: 6px;
  opacity: 0.95;
}

.stock-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.stock-sparkline polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.28));
}

.stock-sparkline-positive {
  color: var(--positive);
}

.stock-sparkline-negative {
  color: var(--negative);
}

.stock-row-price {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 86px;
}

.stock-row-price strong {
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.05;
  font-weight: 950;
  white-space: nowrap;
}

.stock-row-price span {
  font-size: var(--text-sm);
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}

.stock-price-gauge {
  grid-column: 2 / 4;
  display: grid;
  gap: 6px;
  margin-top: -2px;
  --gauge-position: 50%;
}

.stock-gauge-track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--positive), var(--warning) 52%, var(--negative));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.stock-gauge-thumb {
  position: absolute;
  top: 50%;
  left: var(--gauge-position);
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 0 3px rgba(245, 247, 251, 0.16), 0 4px 10px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
}

.stock-gauge-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 850;
}

.stock-trade-sheet {
  max-height: calc(100svh - 12px);
  overflow-y: auto;
  padding-top: 8px;
  padding-bottom: calc(96px + var(--safe-bottom));
  animation: stock-sheet-up 0.2s ease-out;
}

.stock-trade-root .sheet-overlay {
  animation: stock-sheet-fade 0.18s ease-out;
}

@keyframes stock-sheet-up {
  from {
    transform: translate(-50%, 28px);
    opacity: 0.86;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes stock-sheet-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.stock-trade-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.stock-trade-header h2,
.stock-trade-header p {
  margin: 0;
}

.stock-trade-header h2 {
  margin-top: 4px;
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.1;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.stock-trade-header p {
  margin-top: 4px;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.2;
  font-weight: 750;
}

.stock-trade-header > strong {
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.05;
  font-weight: 950;
  white-space: nowrap;
}

.stock-detail-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.09), rgba(50, 215, 75, 0.045)),
    rgba(255, 255, 255, 0.052);
}

.stock-detail-heading {
  margin: 0;
}

.stock-detail-heading h2 {
  font-size: var(--text-md);
}

.stock-detail-about {
  margin: 0;
  color: var(--cashflow-label);
  font-size: var(--text-sm);
  line-height: 1.32;
  font-weight: 650;
}

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

.stock-fundamentals div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.stock-fundamentals span {
  display: block;
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1.1;
  font-weight: 850;
  text-transform: uppercase;
}

.stock-fundamentals strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.15;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.stock-price-gauge-sheet {
  grid-column: auto;
  margin-top: 12px;
}

.stock-trade-chart {
  position: relative;
  height: 124px;
  margin-top: 12px;
  padding: 10px 10px 24px;
  overflow: hidden;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    #141922;
}

.stock-trade-chart::before {
  content: "";
  position: absolute;
  inset: 10px 10px 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 33%, 25% 100%;
  opacity: 0.55;
}

.stock-trade-chart svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 92px;
  display: block;
  overflow: visible;
}

.stock-trade-chart polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.32));
}

.stock-trade-chart polygon {
  fill: currentColor;
  opacity: 0.12;
}

.stock-trade-chart-positive {
  color: var(--positive);
}

.stock-trade-chart-negative {
  color: var(--negative);
  border-color: rgba(255, 69, 58, 0.18);
}

.stock-chart-scale {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 850;
}

.stock-timeframes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.stock-timeframes button {
  min-height: 34px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted-readable);
  background: rgba(255, 255, 255, 0.055);
  font-size: var(--text-sm);
  font-weight: 950;
  cursor: pointer;
}

.stock-timeframes button.active {
  border-color: rgba(10, 132, 255, 0.4);
  color: #bfdbff;
  background: rgba(10, 132, 255, 0.18);
}

.stock-action-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.stock-action-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted-readable);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 950;
  cursor: pointer;
}

.stock-action-switch button.active[data-trade-action="buy"] {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(50, 215, 75, 0.28), rgba(10, 132, 255, 0.12)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(50, 215, 75, 0.22);
}

.stock-action-switch button.active[data-trade-action="sell"] {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 69, 58, 0.28), rgba(255, 159, 10, 0.1)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.22);
}

.stock-quantity-input input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  text-align: center;
}

.stock-trade-sheet .sheet-input-large {
  min-height: 74px;
  margin-top: 10px;
  padding: 12px;
}

.stock-trade-sheet .sheet-chips {
  gap: 7px;
  margin-top: 4px;
}

.stock-trade-sheet .sheet-chips button {
  min-height: 38px;
}

.stock-trade-sheet .sheet-submit {
  min-height: 52px;
  margin-top: 10px;
}

.stock-trade-sheet .sheet-cancel {
  min-height: 40px;
  margin-top: 6px;
}

.stock-trade-total {
  display: grid;
  gap: 6px;
  margin: 9px 2px 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 750;
}

.stock-trade-total strong {
  color: var(--text);
  font-weight: 950;
}

.stock-trade-message {
  display: none;
  color: var(--negative);
}

.stock-trade-message.is-open {
  display: block;
}

.stock-trade-submit-sell {
  background: linear-gradient(135deg, var(--negative), var(--orange));
  box-shadow: 0 14px 34px rgba(255, 69, 58, 0.2);
}

.stats-row-clickable {
  cursor: pointer;
}

.stats-row-clickable:active {
  transform: translateY(1px);
}

.stats-expense-row {
  background:
    linear-gradient(135deg, rgba(255, 69, 58, 0.09), transparent 58%),
    #1e293b;
}

.stats-row-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: var(--positive);
  background: rgba(50, 215, 75, 0.14);
}

.stats-expense-row .stats-row-icon {
  color: #ffb199;
  background: rgba(255, 69, 58, 0.14);
}

.stats-row-icon-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stats-row-icon-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  line-height: 1;
  font-weight: 950;
}

.stats-row-icon::before,
.stats-row-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.stats-row-icon-briefcase::before {
  left: 11px;
  top: 17px;
  width: 22px;
  height: 16px;
  border: 2.4px solid currentColor;
  border-radius: 5px;
}

.stats-row-icon-briefcase::after {
  left: 17px;
  top: 11px;
  width: 10px;
  height: 7px;
  border: 2.4px solid currentColor;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.stats-row-content {
  min-width: 0;
}

.stats-row h3 {
  margin: 0;
}

.stats-row h3 {
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.25;
  font-weight: 850;
}

.stats-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.stats-row-tags span {
  padding: 5px 7px;
  border: 1px solid rgba(50, 215, 75, 0.26);
  border-radius: 999px;
  color: #9dffad;
  background: rgba(50, 215, 75, 0.1);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 800;
}

.stats-expense-row .stats-row-tags span {
  border-color: rgba(255, 69, 58, 0.28);
  color: #ffb3ae;
  background: rgba(255, 69, 58, 0.11);
}

.stats-row-amount {
  flex: 0 0 auto;
  font-size: var(--text-lg);
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.stats-row-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stats-row-title .stats-row-amount {
  font-size: var(--text-md);
}

.stats-debt-row {
  grid-template-columns: 44px minmax(0, 1fr);
}

.debt-caption {
  margin: 7px 0 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: 650;
}

.debt-progress {
  height: 8px;
  overflow: hidden;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.debt-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warning), var(--negative));
}

.sheet-demo-screen {
  min-height: 100vh;
  overflow: hidden;
}

.sheet-demo-card {
  opacity: 0.72;
}

.sheet-demo-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sheet-demo-switch {
  flex: 0 0 auto;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(10, 132, 255, 0.1);
  font-size: var(--text-sm);
  font-weight: 850;
  text-decoration: none;
}

.story-sheet {
  padding-top: 10px;
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.64);
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  width: min(var(--screen-max), 100vw);
  padding: 10px 16px calc(18px + var(--safe-bottom));
  border: 1px solid var(--stroke);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #1c1c1e;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.52);
  transform: translateX(-50%);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: rgba(142, 142, 147, 0.7);
}

.story-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 14px;
  border: 1px solid rgba(139, 92, 246, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    rgba(139, 92, 246, 0.2);
  box-shadow: 0 16px 42px rgba(139, 92, 246, 0.22);
  font-size: 34px;
}

.story-icon-reset {
  border-color: rgba(10, 132, 255, 0.36);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    rgba(10, 132, 255, 0.18);
  box-shadow: 0 16px 42px rgba(10, 132, 255, 0.2);
  color: var(--accent);
}

.final-sheet {
  padding-bottom: calc(20px + var(--safe-bottom));
}

.final-overlay {
  background:
    radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.72);
}

.final-icon-win {
  border-color: rgba(50, 215, 75, 0.38);
  color: var(--positive);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.22), transparent 30%),
    rgba(50, 215, 75, 0.16);
  box-shadow: 0 16px 42px rgba(50, 215, 75, 0.2);
}

.final-icon-loss {
  border-color: rgba(255, 69, 58, 0.38);
  color: var(--negative);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.18), transparent 30%),
    rgba(255, 69, 58, 0.16);
  box-shadow: 0 16px 42px rgba(255, 69, 58, 0.18);
}

.final-stats-card {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.04);
}

.sheet-header {
  display: grid;
  gap: 5px;
}

.story-header {
  text-align: center;
}

.sheet-kicker {
  color: var(--negative);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sheet-kicker-positive {
  color: var(--positive);
}

.sheet-header h2,
.sheet-header p {
  margin: 0;
}

.sheet-header h2 {
  color: var(--text);
  font-size: var(--text-xl);
  line-height: 1.15;
  font-weight: 900;
}

.sheet-header p {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 650;
}

.story-header p {
  max-width: 390px;
  margin: 0 auto;
  font-weight: 500;
}

.impact-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(10, 132, 255, 0.06)),
    rgba(255, 255, 255, 0.055);
}

.business-sheet {
  --business-rgb: 139, 92, 246;
  --business-color: rgb(var(--business-rgb));
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(var(--business-rgb), 0.18), transparent 34%),
    linear-gradient(180deg, rgba(var(--business-rgb), 0.08), rgba(28, 28, 30, 0) 42%),
    #1c1c1e;
}

.business-tone-health {
  --business-rgb: 50, 215, 75;
}

.business-tone-food {
  --business-rgb: 255, 159, 10;
}

.business-tone-tech {
  --business-rgb: 10, 132, 255;
}

.business-tone-retail {
  --business-rgb: 255, 214, 10;
}

.business-tone-creative {
  --business-rgb: 191, 90, 242;
}

.business-tone-service {
  --business-rgb: 255, 69, 58;
}

.business-watermark {
  position: absolute;
  right: -8px;
  top: 24px;
  z-index: 0;
  color: rgba(var(--business-rgb), 0.08);
  font-size: 118px;
  line-height: 1;
  font-weight: 950;
  transform: rotate(-10deg);
  pointer-events: none;
}

.business-sheet > :not(.business-watermark) {
  position: relative;
  z-index: 1;
}

.business-sheet-top {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.business-avatar {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--business-rgb), 0.52);
  border-radius: 20px;
  color: var(--business-color);
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.2), transparent 32%),
    rgba(var(--business-rgb), 0.16);
  box-shadow: 0 16px 34px rgba(var(--business-rgb), 0.16);
  font-size: 23px;
  line-height: 1;
  font-weight: 950;
}

.business-title-group {
  min-width: 0;
}

.business-title-group .sheet-kicker {
  color: var(--business-color);
}

.business-title-group h2,
.business-title-group p {
  margin: 0;
}

.business-title-group h2 {
  margin-top: 6px;
  color: var(--text);
  font-size: var(--text-xl);
  line-height: 1.1;
  font-weight: 950;
}

.business-title-group p {
  margin-top: 5px;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.32;
  font-weight: 650;
}

.business-category {
  padding: 7px 9px;
  border: 1px solid rgba(var(--business-rgb), 0.34);
  border-radius: 999px;
  color: var(--business-color);
  background: rgba(var(--business-rgb), 0.12);
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
}

.business-story {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--business-rgb), 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
}

.business-story strong {
  color: var(--business-color);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.business-story span {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 650;
}

.business-price {
  border-color: rgba(var(--business-rgb), 0.24);
  background:
    linear-gradient(135deg, rgba(var(--business-rgb), 0.12), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
}

.business-price strong {
  color: var(--business-color);
}

.business-metrics-card {
  border-color: rgba(var(--business-rgb), 0.22);
  background:
    linear-gradient(135deg, rgba(var(--business-rgb), 0.11), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.05);
}

.business-sheet .sheet-action-primary {
  border-color: rgba(var(--business-rgb), 0.88);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(var(--business-rgb), 0.98), rgba(var(--business-rgb), 0.7));
  box-shadow: 0 16px 32px rgba(var(--business-rgb), 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.business-sheet .sheet-action-primary span,
.business-sheet .sheet-action-primary strong {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.business-sheet .sheet-action-primary strong {
  opacity: 0.86;
}

.business-sheet .sheet-action {
  align-items: center;
}

.business-sheet .sheet-action strong {
  max-width: 58%;
  line-height: 1.2;
  text-align: right;
  overflow-wrap: normal;
}

.business-action-disabled,
.business-sheet .sheet-action:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  color: rgba(245, 247, 251, 0.52);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  cursor: not-allowed;
}

.business-action-disabled span,
.business-action-disabled strong,
.business-sheet .sheet-action:disabled span,
.business-sheet .sheet-action:disabled strong {
  color: rgba(245, 247, 251, 0.52);
  text-shadow: none;
}

.business-action-disabled strong,
.business-sheet .sheet-action:disabled strong {
  color: rgba(255, 118, 118, 0.68);
}

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

.impact-row span {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 800;
}

.impact-row strong {
  font-size: var(--text-md);
  font-weight: 900;
  text-align: right;
}

.karma-positive {
  color: #cdbdff;
}

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

.story-actions-single {
  grid-template-columns: 1fr;
}

.story-button {
  min-height: 58px;
  border: 0;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.story-button-secondary {
  background: rgba(255, 255, 255, 0.1);
}

.story-button-primary {
  background: linear-gradient(135deg, var(--purple), #b673ff);
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.24);
}

.sheet-debt-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.sheet-debt-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 159, 10, 0.14);
  font-size: 22px;
}

.sheet-debt-card strong {
  min-width: 0;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 900;
}

.sheet-debt-card span:last-child {
  color: var(--negative);
  font-size: var(--text-sm);
  font-weight: 900;
  text-align: right;
}

.sheet-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.055);
}

.sheet-amount span {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 800;
}

.sheet-amount strong {
  color: var(--negative);
  font-size: var(--text-lg);
  font-weight: 900;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.sheet-action {
  min-height: 58px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  cursor: pointer;
}

.sheet-action span {
  font-size: var(--text-md);
  font-weight: 900;
}

.sheet-action strong {
  color: var(--muted-readable);
  font-size: var(--text-sm);
  font-weight: 800;
}

.sheet-action-primary {
  border-color: rgba(10, 132, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.24), rgba(139, 92, 246, 0.15)),
    rgba(255, 255, 255, 0.06);
}

.sheet-action-primary strong {
  color: #bfdbff;
}

.expense-sheet {
  --expense-rgb: 255, 69, 92;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--expense-rgb), 0.17), transparent 30%),
    linear-gradient(180deg, rgba(var(--expense-rgb), 0.08), rgba(28, 28, 30, 0) 44%),
    #1c1c1e;
}

.expense-sheet-header {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.expense-avatar {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--expense-rgb), 0.46);
  border-radius: 18px;
  color: rgb(var(--expense-rgb));
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.2), transparent 32%),
    rgba(var(--expense-rgb), 0.16);
  box-shadow: 0 14px 30px rgba(var(--expense-rgb), 0.16);
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.expense-sheet .sheet-kicker {
  color: rgb(var(--expense-rgb));
}

.expense-sheet-header h2,
.expense-sheet-header p {
  margin: 0;
}

.expense-sheet-header h2 {
  margin-top: 6px;
  color: var(--text);
  font-size: var(--text-xl);
  line-height: 1.12;
  font-weight: 950;
}

.expense-sheet-header p {
  margin-top: 5px;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 650;
}

.expense-math-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.expense-math-grid-single {
  grid-template-columns: 1fr;
}

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

.expense-math-grid div {
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid rgba(var(--expense-rgb), 0.2);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(var(--expense-rgb), 0.1), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
}

.expense-math-grid span,
.expense-math-grid strong {
  display: block;
  min-width: 0;
}

.expense-math-grid span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1.1;
  font-weight: 850;
  text-transform: uppercase;
}

.expense-math-grid strong {
  margin-top: 6px;
  color: rgb(var(--expense-rgb));
  font-size: clamp(13px, 3.2vw, var(--text-md));
  line-height: 1.14;
  font-weight: 950;
  white-space: nowrap;
}

.expense-balance-line {
  margin-top: 12px;
}

.expense-choice {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.expense-choice strong {
  color: var(--muted-readable);
}

.expense-choice.active {
  border-color: rgba(var(--expense-rgb), 0.86);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(135deg, rgba(var(--expense-rgb), 0.96), rgba(var(--expense-rgb), 0.7));
  box-shadow: 0 16px 32px rgba(var(--expense-rgb), 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.expense-choice.active span,
.expense-choice.active strong {
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.expense-choice.active strong {
  opacity: 0.84;
}

.expense-confirm {
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(135deg, rgba(var(--expense-rgb), 0.96), rgba(var(--expense-rgb), 0.7));
  box-shadow: 0 16px 32px rgba(var(--expense-rgb), 0.24);
}

.expense-confirm:disabled {
  color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  cursor: not-allowed;
}

.sheet-inline-alert {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: min(520px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 69, 58, 0.28);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 69, 58, 0.14), rgba(255, 159, 10, 0.07)),
    #242428;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 18px));
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sheet-inline-alert.is-open {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.sheet-inline-alert-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--negative);
  background: rgba(255, 69, 58, 0.15);
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.sheet-inline-alert-copy {
  min-width: 0;
}

.sheet-inline-alert-copy strong {
  display: block;
  color: var(--text);
  font-size: var(--text-md);
  line-height: 1.15;
  font-weight: 900;
}

.sheet-inline-alert p {
  margin: 5px 0 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 650;
}

.sheet-inline-alert button {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text);
  background: rgba(255, 255, 255, 0.11);
  font-size: var(--text-md);
  font-weight: 900;
  cursor: pointer;
}

.sheet-input {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(10, 132, 255, 0.32);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(10, 132, 255, 0.12), rgba(50, 215, 75, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.sheet-input span {
  color: var(--muted-readable);
  font-size: var(--text-xs);
  line-height: 1;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sheet-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-size: var(--text-lg);
  line-height: 1.2;
  font-weight: 900;
}

.sheet-input input::placeholder {
  color: var(--muted);
}

.sheet-input strong {
  color: var(--text);
  font-size: var(--text-2xl);
  line-height: 1.1;
  font-weight: 900;
}

.sheet-input-large {
  min-height: 88px;
  align-items: center;
  justify-items: center;
  padding: 18px;
}

.sheet-input-large strong {
  font-size: clamp(40px, 11vw, 58px);
  letter-spacing: 0;
}

.sheet-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.sheet-chips-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sheet-chips-two-by-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-chips button {
  min-height: 42px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  font-size: var(--text-sm);
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.sheet-chips button:active {
  transform: scale(0.97);
}

.sheet-chips button.active {
  border-color: rgba(10, 132, 255, 0.86);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.96), rgba(0, 101, 220, 0.92));
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sheet-chips .sheet-chip-max {
  border-color: rgba(50, 215, 75, 0.38);
  color: var(--positive);
  background: rgba(50, 215, 75, 0.12);
}

.sheet-chips .sheet-chip-max.active {
  border-color: rgba(50, 215, 75, 0.86);
  color: #06140a;
  background: linear-gradient(180deg, rgba(90, 245, 115, 0.96), rgba(50, 215, 75, 0.9));
  box-shadow: 0 10px 22px rgba(50, 215, 75, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.sheet-limit {
  margin: 10px 2px 0;
  color: var(--muted-readable);
  font-size: var(--text-sm);
  line-height: 1.35;
  font-weight: 700;
}

.sheet-submit {
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  border: 0;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: 0 14px 34px rgba(10, 132, 255, 0.22);
  font-size: var(--text-md);
  font-weight: 900;
  cursor: pointer;
}

.sheet-submit-positive {
  background: linear-gradient(135deg, var(--accent), var(--positive));
  box-shadow: 0 14px 34px rgba(50, 215, 75, 0.2);
}

.sheet-cancel {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--muted-readable);
  background: transparent;
  font-size: var(--text-md);
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 420px) {
  .sheet-debt-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .sheet-debt-card span:last-child {
    grid-column: 2;
    text-align: left;
  }

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

  .story-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 640px) {
  .game-screen {
    border-left: 1px solid var(--stroke);
    border-right: 1px solid var(--stroke);
  }

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

@media (max-height: 740px) {
  :root {
    --bottom-action-space: calc(var(--tab-height) + var(--safe-bottom) + 34px);
  }

  .game-screen {
    padding-top: 12px;
  }

  .finance-card {
    padding: 18px;
  }

  .finance-card h1:not(.balance-long):not(.balance-xl):not(.balance-xxl) {
    font-size: 34px;
  }

  .goal-list {
    gap: 9px;
    margin-top: 14px;
  }

  .turn-button {
    width: 68px;
    height: 68px;
  }

  .turn-pulse {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 430px) {
  .event-main {
    flex-wrap: wrap;
  }

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

  .event-amount,
  .event-tag {
    flex: 0 1 auto;
  }

  .stats-chart-card {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .stats-legend {
    width: 100%;
  }

  .stats-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .stats-row-amount {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 380px) {
  :root {
    --space-screen: 12px;
  }

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

  .finance-card h1:not(.balance-long):not(.balance-xl):not(.balance-xxl) {
    font-size: 36px;
  }

  .finance-card h1.balance-long {
    font-size: 32px;
  }

  .finance-card h1.balance-xl {
    font-size: 28px;
  }

  .finance-card h1.balance-xxl {
    font-size: 24px;
  }

  .capital-chip {
    width: max-content;
    text-align: left;
  }

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

  .date-pill {
    max-width: 100%;
    font-size: 13px;
  }

  .turn-copy small {
    font-size: 12px;
  }

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

  .bank-card-top,
  .bank-card-footer,
  .bank-actions-panel,
  .bank-forecast-card {
    grid-template-columns: 1fr;
  }

  .bank-card-top {
    padding-right: 0;
  }

  .bank-rate-chip {
    position: static;
    width: max-content;
    margin-top: 12px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
}
