/* PawFolio Web shell and page layouts. Component primitives live in nvwa-web.css. */

:root {
  --paw-content: 760px;
  --paw-gutter: 16px;
  --paw-topbar: 64px;
  --paw-tabbar: 68px;
  --paw-safe-top: env(safe-area-inset-top, 0px);
  --paw-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  min-width: 0;
  min-height: 100%;
  background: var(--nvwa-bg-main, #fff);
  overscroll-behavior: none;
}

body {
  margin: 0;
  color: var(--nvwa-text-primary, #000);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 1000;
  translate: 0 -160%;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--nvwa-on-accent, #fff);
  background: var(--nvwa-accent, #0051fe);
}

.skip-link:focus {
  translate: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] { display: none !important; }

.paw-app {
  min-height: 100dvh;
  background: var(--nvwa-bg-main, #fff);
}

.app-frame {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, var(--paw-content));
  min-height: 100dvh;
  margin-inline: auto;
  overflow: hidden;
  background: var(--nvwa-bg-main, #fff);
}

.app-loading-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  width: min(100%, var(--paw-content));
  margin-inline: auto;
}

.app-loading-center {
  display: grid;
  place-items: center;
}

.native-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--nvwa-line, #dededd);
  border-block-start-color: var(--nvwa-text-primary, #000);
  border-radius: 50%;
  animation: paw-spin 0.72s linear infinite;
}

@keyframes paw-spin { to { rotate: 1turn; } }

.app-loading-center .native-spinner {
  width: 16px;
  height: 16px;
  padding: 14px;
  background-clip: content-box;
  box-shadow: inset 0 0 0 1px var(--nvwa-line, #dededd);
}

.glass-topbar {
  position: relative;
  z-index: 20;
  padding-block-start: var(--paw-safe-top);
  background: color-mix(in srgb, var(--nvwa-bg-main, #fff) 78%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(22px);
  backdrop-filter: saturate(140%) blur(22px);
}

.page-scroller {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  background: var(--nvwa-bg-main, #fff);
}

.page-scroller::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar { display: none; }

.page-content {
  padding: 12px var(--paw-gutter) 110px;
}

.page-content.page-content-spacious {
  display: grid;
  gap: 32px;
}

.bottom-tabs {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  min-height: calc(var(--paw-tabbar) + var(--paw-safe-bottom));
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) var(--paw-safe-bottom) max(8px, env(safe-area-inset-left, 0px));
  border-block-start: 0.5px solid color-mix(in srgb, var(--nvwa-line, #dededd) 72%, transparent);
  background: color-mix(in srgb, var(--nvwa-bg-container, #fff) 68%, transparent);
  -webkit-backdrop-filter: saturate(165%) blur(28px);
  backdrop-filter: saturate(165%) blur(28px);
}

.bottom-tabs button,
.bottom-tabs > span {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  min-height: 56px;
  padding: 4px 8px;
  border: 0;
  border-radius: 28px;
  color: var(--nvwa-text-secondary, #868685);
  background: transparent;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
  cursor: pointer;
}

.bottom-tabs i {
  font-size: 22px;
  line-height: 22px;
}

.bottom-tabs button[aria-selected="true"] {
  color: var(--nvwa-text-primary, #000);
  background: color-mix(in srgb, var(--nvwa-bg-container, #fff) 78%, transparent);
  box-shadow: 0 3px 12px rgb(0 0 0 / .08), inset 0 0 0 .5px rgb(255 255 255 / .55);
}

html[data-theme="dark"] .bottom-tabs button[aria-selected="true"] {
  box-shadow: 0 3px 16px rgb(0 0 0 / .5), inset 0 0 0 .5px rgb(255 255 255 / .16);
}

.page-stack {
  min-height: 0;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: 100%;
}

.page-stack > * { grid-area: 1 / 1; }

.screen-route {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, var(--paw-content));
  margin-inline: auto;
  color: var(--nvwa-text-primary, #000);
  background: var(--nvwa-bg-main, #fff);
  box-shadow: 0 0 42px rgb(0 0 0 / .09);
}

.route-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scrollbar-width: none;
}

.route-body::-webkit-scrollbar { display: none; }

.route-footer {
  display: grid;
  gap: 15px;
  padding: 12px 16px max(12px, var(--paw-safe-bottom));
  background: var(--nvwa-bg-main, #fff);
}

/* Portfolio */
.portfolio-grid {
  display: grid;
  gap: 32px;
}

.balance-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
}

.balance-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.balance-label {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.balance-label button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -7px;
  border: 0;
  color: inherit;
  background: transparent;
}

.balance-label i { font-size: 14px; }

.balance-value {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--nvwa-text-primary, #000);
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -.39px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.balance-pnl {
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
  font-variant-numeric: tabular-nums;
}

.tone-buy { color: var(--nvwa-market-buy, #1d7353) !important; }
.tone-sell { color: var(--nvwa-market-sell, #ce2632) !important; }
.tone-flat { color: var(--nvwa-text-secondary, #868685) !important; }

.sparkline-button {
  width: 124px;
  height: 70.5px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sparkline-button canvas,
.chart-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-panel {
  display: grid;
  gap: 8px;
}

.chart-main {
  position: relative;
  display: grid;
  gap: 12px;
}

.chart-stage {
  position: relative;
  height: 160px;
  touch-action: pan-y;
}

.chart-cursor-label {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .1px;
  pointer-events: none;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  min-height: 16px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .1px;
  font-variant-numeric: tabular-nums;
}

.chart-collapse {
  display: grid;
  place-items: center;
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  color: var(--nvwa-text-secondary, #868685);
  background: transparent;
}

.chart-collapse i { rotate: 180deg; font-size: 24px; }

.action-strip,
.horizontal-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.action-strip { padding-block: 1px; }

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

.spot-card,
.empty-ledger-card,
.outline-card {
  border: 1px solid var(--nvwa-line, #dededd);
  border-radius: 16px;
}

.spot-card {
  display: grid;
  gap: 36px;
  padding: 16px;
}

.spot-chip-list { padding-block: 2px; }

.spot-balance {
  display: grid;
  gap: 12px;
}

.account-locations {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.account-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.account-location.is-primary { color: var(--nvwa-text-primary, #000); }

.account-location + .account-location::before {
  content: "";
  width: 1px;
  height: 10px;
  margin-inline-end: 6px;
  background: var(--nvwa-line, #dededd);
}

.spot-amount {
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -.39px;
  font-variant-numeric: tabular-nums;
}

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

.portfolio-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.portfolio-section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -.18px;
}

.portfolio-section-summary {
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: .175px;
  font-variant-numeric: tabular-nums;
}

.holding-list { display: grid; }

.holding-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding-block: 16px;
  border: 0;
  color: var(--nvwa-text-primary, #000);
  background: transparent;
  text-align: start;
  cursor: pointer;
  touch-action: pan-y;
}

.holding-row + .holding-row { border-block-start: .5px solid var(--nvwa-line, #dededd); }

.nvwa-reorderable[data-reorder-axis="vertical"],
.nvwa-reorderable[data-reorder-axis="horizontal"] { touch-action: pan-y; }

.nvwa-reorderable input { user-select: text; }

.paw-app.is-reordering .page-scroller,
.paw-app.is-reordering .route-body {
  overflow-y: hidden;
  overscroll-behavior: none;
}

.paw-app.is-reordering .horizontal-scroll { overflow-x: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .nvwa-reorderable:not(.is-reordering) {
    transition: scale 160ms ease-out, box-shadow 160ms ease-out, translate 160ms ease-out;
  }
}

.asset-logo,
.currency-flag,
.avatar-photo {
  display: block;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  outline: .5px solid var(--nvwa-line, #dededd);
}

.asset-logo-fallback {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: var(--nvwa-accent, #0051fe);
  font-weight: 600;
}

.earn-logo {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: var(--nvwa-sentiment-positive, #2f5711);
}

.earn-logo.structured { background: var(--nvwa-sentiment-negative, #a8200d); }

.holding-main,
.holding-value {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.holding-value { text-align: end; }

.holding-primary {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: .08px;
  white-space: nowrap;
}

.holding-secondary {
  overflow: hidden;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 14px;
  line-height: 22px;
  letter-spacing: .14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.empty-ledger-card {
  display: grid;
  justify-items: center;
  gap: 24px;
  padding: 16px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--nvwa-bg-vessel, #efefef);
}

.empty-icon i { font-size: 36px; }

.state-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  padding-block: 12px 24px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
  text-align: center;
}

.state-empty img { width: 120px; height: 120px; object-fit: contain; }

/* Forms and detail screens */
.form-stack,
.detail-stack,
.earn-card-list {
  display: grid;
  gap: 16px;
}

.field-stack { display: grid; gap: 4px; }
.field-stack.roomy { gap: 8px; }

.earn-payout-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.earn-payout-row.is-hourly { grid-template-columns: minmax(0, 1fr); }

.earn-time-point-popover {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 100%;
  display: flex;
  justify-content: center;
}

.earn-time-point-trigger[aria-expanded="true"] {
  outline: 2px solid var(--nvwa-text-primary, #000);
  outline-offset: -2px;
}

.maturity-calendar-shell {
  display: flex;
  justify-content: center;
  min-inline-size: 0;
  inline-size: 100%;
}

.inline-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.input-meta-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0;
  border: 0;
  color: var(--nvwa-text-primary, #000);
  background: transparent;
}

.input-meta-action img { width: 12px; height: 12px; border-radius: 50%; }

.summary-row,
.detail-row {
  display: flex;
  align-items: first baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: .14px;
}

.summary-row > :first-child,
.detail-row > :first-child { color: var(--nvwa-text-secondary, #868685); }

.summary-row > :last-child,
.detail-row > :last-child {
  max-width: 66%;
  color: var(--nvwa-text-primary, #000);
  text-align: end;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

.detail-divider {
  height: .5px;
  border: 0;
  margin: 0;
  background: var(--nvwa-line, #dededd);
}

.detail-profit {
  display: grid;
  gap: 2px;
}

.detail-profit-label {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -.08px;
}

.detail-profit-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -.39px;
  font-variant-numeric: tabular-nums;
}

.price-card,
.earn-summary-card {
  border-radius: 15px;
  background: var(--nvwa-bg-card, #f6f6f6);
}

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

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

.price-card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: .08px;
  font-variant-numeric: tabular-nums;
}

.price-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 10px;
  height: 100px;
}

.price-axis {
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: space-between;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 10px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.price-card-foot {
  display: flex;
  justify-content: space-between;
  padding-block-start: 12px;
  border-block-start: .5px solid var(--nvwa-line, #dededd);
  color: var(--nvwa-text-secondary, #868685);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .1px;
}

/* Earn */
.earn-summary-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
}

.earn-summary-block {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 0;
  color: inherit;
  background: transparent;
}

.earn-summary-block span:first-child {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.earn-summary-block strong {
  color: var(--nvwa-market-buy, #1d7353);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -.18px;
  font-variant-numeric: tabular-nums;
}

.earn-product-card {
  display: grid;
  gap: 24px;
  padding: 16px;
  border: 1px solid var(--nvwa-line, #dededd);
  border-radius: 16px;
}

.earn-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.earn-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--nvwa-text-primary, #000);
  background: transparent;
  text-align: start;
}

.earn-card-title strong {
  overflow: hidden;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -.18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.earn-card-more {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  padding: 0;
  border: 0;
  color: var(--nvwa-text-primary, #000);
  background: transparent;
}

.earn-card-more i { font-size: 24px; }

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

.daily-item {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 68px;
}

.daily-item-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.daily-item-head span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-total {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.daily-total strong {
  color: var(--nvwa-market-buy, #1d7353);
  font-size: 26px;
  line-height: 32px;
  letter-spacing: -.39px;
}

.end-marker {
  padding-block: 12px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
  text-align: center;
}

/* Transactions */
.filter-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}

.transaction-list { display: grid; }

.transaction-row {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.transaction-row + .transaction-row::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 16px;
  height: .5px;
  background: var(--nvwa-line, #dededd);
}

.transaction-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: .175px;
}

.transaction-reverse {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  color: var(--nvwa-sentiment-negative, #a8200d);
  background: transparent;
  opacity: 0;
}

@media (hover: hover) {
  .transaction-row:hover .transaction-reverse { opacity: 1; }
}

.transaction-reverse:focus-visible { opacity: 1; }

/* Calculator */
.calculator-stack { display: grid; gap: 32px; padding-block-start: 4px; }
.calculator-form { display: grid; gap: 16px; }

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

.results-block { display: grid; gap: 16px; }

.results-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: .08px;
}

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

.result-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.result-metric span {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.result-metric strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Currency */
.currency-list { display: grid; padding-block: 16px; }

.currency-row {
  position: relative;
  height: 106px;
  overflow: hidden;
  touch-action: pan-y;
}

.currency-row-surface {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 106px;
  padding: 24px 16px;
  background: var(--nvwa-bg-main, #fff);
  transition: translate 220ms cubic-bezier(.2, 0, 0, 1);
}

.currency-row::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset-inline: 16px;
  inset-block-end: 0;
  height: .5px;
  background: var(--nvwa-line, #dededd);
}

.currency-row.is-revealed .currency-row-surface { translate: -88px 0; }
.currency-row.is-swiping .currency-row-surface { transition: none; }
.currency-row.is-reordering { overflow: visible; }

.currency-flag { width: 42px; height: 42px; }

.currency-copy {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 0;
}

.currency-amount-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  height: 34px;
}

.currency-amount {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--nvwa-text-primary, #000);
  background: transparent;
  font-size: 30px;
  font-weight: 600;
  line-height: 34px;
  letter-spacing: -.75px;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.currency-amount:focus { color: var(--nvwa-accent, #0051fe); }

.currency-code {
  flex: none;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 30px;
  font-weight: 600;
  line-height: 34px;
  letter-spacing: -.75px;
}

.currency-subtitle {
  overflow: hidden;
  width: 100%;
  height: 20px;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
  text-align: end;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-delete {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: grid;
  place-items: center;
  width: 88px;
  border: 0;
  color: #fff;
  background: var(--nvwa-sentiment-negative, #a8200d);
}

.currency-delete i { font-size: 20px; }

.currency-row:has(> .currency-delete:focus-visible) .currency-row-surface { translate: -88px 0; }

.currency-delete:focus-visible {
  z-index: 3;
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

.updated-caption {
  padding-block: 12px;
  color: var(--nvwa-line, #dededd);
  font-size: 10px;
  line-height: 16px;
  letter-spacing: .1px;
  text-align: center;
}

/* Account and login */
.auth-center {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 16px;
}

.account-body {
  display: grid;
  gap: 32px;
}

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

.profile-preview {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--nvwa-bg-vessel, #efefef);
  font-size: 30px;
  font-weight: 600;
  line-height: 34px;
  letter-spacing: -.75px;
}

.profile-preview img { width: 100%; height: 100%; object-fit: cover; }

.masked-account {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.avatar-picker { display: grid; gap: 12px; }

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

.avatar-option {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  color: var(--nvwa-text-primary, #000);
  background: var(--nvwa-bg-vessel, #efefef);
  overflow: hidden;
}

.avatar-option[aria-pressed="true"] { border-color: var(--nvwa-text-primary, #000); }
.avatar-option img { width: 100%; height: 100%; object-fit: cover; }

.account-footer { gap: 16px; }

.logout-link {
  justify-self: center;
  min-height: 24px;
  padding: 0 8px;
  border: 0;
  color: var(--nvwa-sentiment-negative, #a8200d);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: .21px;
}

.login-waiting {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  min-height: 100%;
}

.welcome-copy { display: grid; justify-items: center; gap: 8px; }

.welcome-copy strong {
  color: var(--nvwa-accent, #0051fe);
  font-size: 30px;
  line-height: 34px;
  letter-spacing: -.75px;
}

.welcome-copy span {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 14px;
  line-height: 22px;
  letter-spacing: .14px;
}

/* Sheets and alerts */
.overlay-layer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  align-items: end;
  width: min(100%, var(--paw-content));
  margin-inline: auto;
}

.overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .42);
}

.paw-sheet {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  max-height: calc(100dvh - 80px);
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  color: var(--nvwa-text-primary, #000);
  background: var(--nvwa-bg-dialogue, #fff);
  box-shadow: 0 -16px 44px rgb(0 0 0 / .14);
  transform-origin: bottom center;
  animation: paw-sheet-in 220ms cubic-bezier(.2, 0, 0, 1);
}

.sheet-grabber {
  justify-self: center;
  width: 40px;
  height: 4px;
  margin-block: 6px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--nvwa-text-primary, #000) 10%, transparent);
}

.sheet-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  scrollbar-width: none;
}

.sheet-content::-webkit-scrollbar { display: none; }

.sheet-content.flush { padding: 0; }

.sheet-footer {
  padding: 12px 16px max(12px, var(--paw-safe-bottom));
  background: var(--nvwa-bg-dialogue, #fff);
}

.sheet-titleless-content { display: grid; gap: 16px; padding: 16px; }

.warning-art { width: 48px; height: 48px; justify-self: center; }

.warning-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -.18px;
  text-align: center;
}

.warning-copy {
  margin: 0;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 14px;
  line-height: 22px;
  letter-spacing: .14px;
  text-wrap: pretty;
}

.alert-dialog {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(calc(100% - 32px), 320px);
  padding: 20px;
  border-radius: 16px;
  color: var(--nvwa-text-primary, #000);
  background: var(--nvwa-bg-dialogue, #fff);
  box-shadow: 0 20px 80px rgb(0 0 0 / .28);
}

.alert-dialog h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 24px;
}

.alert-dialog p {
  margin: 0;
  color: var(--nvwa-text-secondary, #868685);
  font-size: 14px;
  line-height: 22px;
}

.alert-actions { display: flex; justify-content: end; gap: 10px; margin-block-start: 20px; }

.success-sheet {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 20px 16px 40px;
}

.success-art { width: 88px; height: 88px; object-fit: contain; }

.success-sheet strong {
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -.18px;
}

@keyframes paw-sheet-in {
  from { translate: 0 16px; opacity: 0; }
  to { translate: 0; opacity: 1; }
}

/* Pickers */
.picker-stack { display: grid; gap: 16px; min-height: 0; }

.picker-list {
  position: relative;
  display: grid;
  min-height: 0;
}

.picker-group-title {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 28px;
  color: var(--nvwa-text-secondary, #868685);
  background: var(--nvwa-bg-dialogue, #fff);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .12px;
}

.picker-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 16px 20px 16px 0;
  border: 0;
  border-block-end: .5px solid var(--nvwa-line, #dededd);
  color: var(--nvwa-text-primary, #000);
  background: transparent;
  text-align: start;
}

.picker-row-copy { display: grid; gap: 4px; min-width: 0; }
.picker-row-copy strong { font-size: 16px; line-height: 24px; letter-spacing: .08px; }
.picker-row-copy small { overflow: hidden; color: var(--nvwa-text-secondary, #868685); font-size: 12px; line-height: 20px; letter-spacing: .12px; text-overflow: ellipsis; white-space: nowrap; }
.picker-row > i { font-size: 20px; }

.alphabet-index {
  position: sticky;
  inset-inline-end: 0;
  inset-block-start: 0;
  float: inline-end;
  display: grid;
  justify-items: center;
  gap: 0;
  width: 18px;
  margin-inline-start: auto;
  margin-block-start: -100%;
  color: var(--nvwa-text-blue, #0051fe);
  font-size: 10px;
  line-height: 14px;
  user-select: none;
}

.asset-search-results { display: grid; }

.asset-result {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-block-end: .5px solid var(--nvwa-line, #dededd);
  color: var(--nvwa-text-primary, #000);
  background: transparent;
  text-align: start;
}

.asset-result-copy { display: grid; min-width: 0; }
.asset-result-copy strong { font-size: 16px; line-height: 24px; }
.asset-result-copy span { overflow: hidden; color: var(--nvwa-text-secondary, #868685); font-size: 12px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.asset-result-quote { display: grid; justify-items: end; font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }

/* Miscellaneous */
.field-help,
.caption-copy {
  color: var(--nvwa-text-secondary, #868685);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: .12px;
}

.field-help.error { color: var(--nvwa-sentiment-negative, #a8200d); }

.text-action {
  min-height: 28px;
  padding: 0;
  border: 0;
  color: var(--nvwa-text-blue, #0051fe);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .12px;
}

.visually-muted { color: var(--nvwa-text-secondary, #868685); }
.tabular { font-variant-numeric: tabular-nums; }
.center { text-align: center; }

.toast-stack {
  position: fixed;
  z-index: 400;
  inset-inline: 16px;
  inset-block-end: calc(var(--paw-tabbar) + var(--paw-safe-bottom) + 16px);
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.toast-stack .nvwa-toast {
  max-width: min(100%, 420px);
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0; }
}

@media (min-width: 761px) {
  body {
    background: color-mix(in srgb, var(--nvwa-bg-vessel, #efefef) 55%, var(--nvwa-bg-main, #fff));
  }

  .app-frame,
  .app-loading-shell {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--nvwa-line, #dededd) 65%, transparent), 0 24px 80px rgb(0 0 0 / .08);
  }
}

@media (max-width: 380px) {
  .quick-grid { gap: 2px; }
  .quick-grid .nvwa-section { padding-inline: 6px; }
  .balance-header { grid-template-columns: minmax(0, 1fr) 104px; }
  .sparkline-button { width: 104px; }
  .avatar-grid { gap: 10px 16px; }
}

@media (max-width: 340px) {
  .holding-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; }
  .holding-primary { font-size: 14px; }
  .holding-secondary { font-size: 12px; }
  .results-grid { gap-inline: 6px; }
  .bottom-tabs button { padding-inline: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .bottom-tabs,
  .paw-sheet,
  .alert-dialog,
  .spot-card,
  .empty-ledger-card,
  .earn-product-card { border: 1px solid CanvasText; }
}
