:root {
  color-scheme: light;
  --bg: #fff8f1;
  --bg-2: #f7efe7;
  --surface: rgba(255, 252, 247, 0.86);
  --surface-2: rgba(255, 252, 247, 0.96);
  --surface-3: rgba(255, 246, 238, 0.92);
  --border: rgba(108, 76, 64, 0.1);
  --border-strong: rgba(108, 76, 64, 0.18);
  --text: #3c3030;
  --muted: rgba(79, 61, 58, 0.78);
  --muted-2: rgba(79, 61, 58, 0.56);
  --good: #4f9f7a;
  --warn: #c9963c;
  --bad: #c8747d;
  --accent: #df806f;
  --ink: #3c3030;
  --coral: #eca08f;
  --coral-strong: #df806f;
  --mint: #bdebd8;
  --lavender: #d8ccff;
  --sun: #f8e39a;
  --rose: #f3c3c8;
  --shadow: 0 24px 60px rgba(151, 102, 82, 0.14);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --app-height: 100vh;
  --pointer-x: 50%;
  --pointer-y: 20%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: var(--app-height);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.95), transparent 21%),
    radial-gradient(circle at 84% 4%, rgba(216, 204, 255, 0.64), transparent 23%),
    radial-gradient(circle at 72% 88%, rgba(248, 227, 154, 0.35), transparent 26%),
    radial-gradient(circle at 4% 72%, rgba(189, 235, 216, 0.36), transparent 21%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 42%, var(--bg-2) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  overflow-x: hidden;
}

body.is-telegram-mini-app {
  min-height: var(--tg-viewport-stable-height, var(--app-height));
  overscroll-behavior-y: contain;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(236, 160, 143, 0.13), transparent 18%),
    radial-gradient(circle at calc(var(--pointer-x) + 12%) calc(var(--pointer-y) + 10%), rgba(255, 255, 255, 0.55), transparent 16%);
  opacity: 0.5;
  mix-blend-mode: multiply;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(252, 243, 235, 0.96)),
    rgba(255, 252, 247, 0.92);
  color: var(--text);
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
  box-shadow: var(--inner);
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(223, 128, 111, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 1), rgba(255, 240, 232, 0.98)),
    rgba(255, 252, 247, 0.98);
}

button:active {
  transform: translateY(0);
}

button.primary {
  border-color: rgba(223, 128, 111, 0.24);
  background:
    linear-gradient(180deg, rgba(236, 160, 143, 0.98), rgba(223, 128, 111, 0.98)),
    var(--coral);
  color: #fff;
  box-shadow:
    0 12px 24px rgba(223, 128, 111, 0.22),
    var(--inner);
}

input,
select {
  width: 100%;
  margin-top: 0.38rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 0.92rem 1rem;
  box-shadow: var(--inner);
  outline: none;
}

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

input:focus,
select:focus {
  border-color: rgba(223, 128, 111, 0.28);
  box-shadow:
    var(--inner),
    0 0 0 4px rgba(236, 160, 143, 0.14);
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 38rem;
  height: 38rem;
  filter: blur(100px);
  opacity: 0.34;
  pointer-events: none;
  border-radius: 999px;
}

.aurora-a {
  top: -11rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
}

.aurora-b {
  bottom: -14rem;
  right: -14rem;
  background: radial-gradient(circle, rgba(236, 160, 143, 0.22), transparent 70%);
}

.shell {
  width: min(1180px, calc(100% - 20px));
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(18px + env(safe-area-inset-bottom, 0px));
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  padding: 0.18rem 0.08rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.06em;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.46), transparent 22%),
    linear-gradient(145deg, var(--sun), var(--coral) 58%, var(--lavender));
  box-shadow:
    0 16px 32px rgba(223, 128, 111, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-kicker,
.brand-title {
  margin: 0;
}

.brand-kicker {
  color: var(--muted-2);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.icon-button {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 16px;
}

.icon-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(236, 160, 143, 0.045)),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(130%);
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  animation: card-rise 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%);
}

.hero {
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  gap: 0.75rem;
  align-items: stretch;
  padding: 0.82rem;
  margin-bottom: 0.6rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(0.9rem, 2.5vw, 1.65rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 1rem;
}

.hero-stack {
  display: flex;
  align-items: stretch;
}

.portfolio-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.72rem;
  padding: 0.88rem;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.45), transparent 22%),
    radial-gradient(circle at 88% 12%, rgba(248, 227, 154, 0.58), transparent 26%),
    radial-gradient(circle at 10% 95%, rgba(216, 204, 255, 0.28), transparent 27%),
    linear-gradient(145deg, #f6b19f 0%, #eca08f 46%, #f4c0ad 100%);
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow:
    0 24px 50px rgba(223, 128, 111, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  color: #4b332f;
  min-height: 342px;
  position: relative;
  overflow: hidden;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: -22% -16% auto auto;
  width: 13rem;
  height: 13rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.portfolio-card::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent),
    rgba(255, 255, 255, 0.12);
}

.wallet-card-glow {
  position: absolute;
  left: -3rem;
  bottom: -4rem;
  width: 12rem;
  height: 12rem;
  border-radius: 999px;
  background: rgba(216, 204, 255, 0.36);
  filter: blur(26px);
  pointer-events: none;
}

.portfolio-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.portfolio-value {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 820;
  letter-spacing: -0.04em;
  margin-top: 0.18rem;
  color: #4b332f;
  text-shadow: 0 14px 28px rgba(255, 255, 255, 0.34);
}

.portfolio-chip {
  align-self: flex-start;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.28);
  color: rgba(75, 51, 47, 0.82);
  font-size: 0.7rem;
  backdrop-filter: blur(16px);
}

.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  position: relative;
  z-index: 1;
}

.sparkline-strip {
  margin-top: -0.15rem;
  border-radius: 20px;
  padding: 0.32rem 0.16rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent);
  position: relative;
  z-index: 1;
}

.sparkline-strip svg {
  display: block;
  width: 100%;
  height: 40px;
  opacity: 0.95;
}

.sparkline-strip.is-empty svg {
  opacity: 0.5;
}

.sparkline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.22rem;
  position: relative;
  z-index: 1;
}

.sparkline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.26rem 0.46rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: rgba(75, 51, 47, 0.72);
  box-shadow: var(--inner);
  font-size: 0.7rem;
}

.sparkline-legend-key {
  color: rgba(75, 51, 47, 0.52);
}

.sparkline-legend-value {
  color: #4b332f;
  font-weight: 600;
}

.metric {
  padding: 0.64rem;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px);
}

.metric-label {
  display: block;
  color: rgba(75, 51, 47, 0.56);
  font-size: 0.66rem;
  margin-bottom: 0.18rem;
}

.metric strong {
  font-size: 0.84rem;
  font-weight: 680;
  color: #4b332f;
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  position: relative;
  z-index: 1;
}

.wallet-actions button {
  display: grid;
  gap: 0.12rem;
  justify-items: start;
  padding: 0.62rem;
  border-radius: 17px;
  color: #4b332f;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.wallet-actions button:nth-child(1) {
  background: linear-gradient(180deg, rgba(189, 235, 216, 0.92), rgba(177, 226, 205, 0.88));
}

.wallet-actions button:nth-child(2) {
  background: linear-gradient(180deg, rgba(216, 204, 255, 0.92), rgba(205, 191, 252, 0.88));
}

.wallet-actions button:nth-child(3) {
  background: linear-gradient(180deg, rgba(248, 227, 154, 0.94), rgba(245, 218, 130, 0.9));
}

.wallet-actions button:hover {
  border-color: rgba(255, 255, 255, 0.62);
  filter: saturate(1.04);
}

.wallet-actions span {
  color: rgba(75, 51, 47, 0.58);
  font-size: 0.64rem;
}

.wallet-actions strong {
  font-size: 0.78rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.48rem;
  margin-bottom: 0.6rem;
}

.summary-card {
  padding: 0.72rem 0.78rem;
  min-height: 126px;
}

.summary-icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin-bottom: 0.36rem;
  color: var(--accent);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.08));
}

.summary-card:nth-child(1) { --reveal-delay: 80ms; }
.summary-card:nth-child(2) { --reveal-delay: 140ms; }
.summary-card:nth-child(3) { --reveal-delay: 200ms; }
.summary-card:nth-child(4) { --reveal-delay: 260ms; }

.summary-label {
  color: var(--muted-2);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.22rem;
}

.summary-value {
  font-size: 0.84rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.summary-caption {
  margin-top: 0.18rem;
  color: var(--muted);
  line-height: 1.32;
  font-size: 0.8rem;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.24rem;
  padding: 0.24rem;
  margin: 0 0 0.6rem;
  position: sticky;
  top: 8px;
  z-index: 5;
}

.segmented-item {
  border-radius: 16px;
  padding: 0.54rem 0.7rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.segmented-item.is-active {
  color: #4b332f;
  background:
    linear-gradient(145deg, rgba(248, 227, 154, 0.9), rgba(236, 160, 143, 0.72)),
    rgba(236, 160, 143, 0.14);
  border-color: rgba(223, 128, 111, 0.24);
  box-shadow: 0 12px 22px rgba(223, 128, 111, 0.16);
}

.view-pane {
  display: grid;
  opacity: 0;
  transform: translateY(14px) scale(0.995);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  margin-bottom: 0;
  transition:
    opacity 260ms ease,
    transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
    max-height 420ms ease,
    margin-bottom 260ms ease;
}

.view-pane.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 5000px;
  pointer-events: auto;
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 600;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 3.2vw, 3.1rem);
  line-height: 0.98;
  margin-bottom: 0.38rem;
  letter-spacing: -0.05em;
}

h2 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.34;
  font-size: 0.86rem;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.52rem 0.68rem;
  min-width: 150px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(16px);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 8px rgba(201, 150, 60, 0.1);
}

.status-dot.ok {
  background: var(--good);
  box-shadow: 0 0 0 8px rgba(79, 159, 122, 0.1);
}

.status-dot.bad {
  background: var(--bad);
  box-shadow: 0 0 0 8px rgba(200, 116, 125, 0.12);
}

.status-label {
  color: var(--muted-2);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
}

.status-value {
  font-weight: 600;
  font-size: 0.82rem;
}

.portfolio-card .status-label,
.portfolio-card .status-value {
  color: rgba(75, 51, 47, 0.62);
}

.portfolio-card .status-value {
  color: #4b332f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.span-7 {
  grid-column: span 7;
}

.span-6 {
  grid-column: span 6;
}

.span-5 {
  grid-column: span 5;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.grid > .card {
  padding: 1rem;
}

.section-head p {
  color: var(--muted);
  line-height: 1.45;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.7rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.55rem;
}

.chip {
  border-radius: 999px;
  padding: 0.34rem 0.56rem;
  border: 1px solid rgba(108, 76, 64, 0.09);
  background: rgba(255, 252, 247, 0.86);
  color: var(--text);
  font-size: 0.72rem;
  box-shadow: var(--inner);
}

.chip.good {
  border-color: rgba(79, 159, 122, 0.16);
  color: var(--good);
  background: rgba(189, 235, 216, 0.42);
}

.chip.warn {
  border-color: rgba(201, 150, 60, 0.14);
  color: var(--warn);
  background: rgba(248, 227, 154, 0.4);
}

.signal-box,
.report-box {
  min-height: 15rem;
  max-height: 28rem;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.42;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 246, 238, 0.92)),
    rgba(255, 252, 247, 0.88);
  border-radius: 22px;
  padding: 0.7rem;
  border: 1px solid rgba(108, 76, 64, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stack {
  display: grid;
  gap: 0.8rem;
}

.trade-card,
.signal-card {
  border-radius: 22px;
  padding: 0.7rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.95), rgba(255, 247, 240, 0.92)),
    rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(108, 76, 64, 0.09);
  box-shadow: var(--inner);
  animation: card-rise 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--reveal-delay, 0ms);
}

.timeline-card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
  width: 20px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: var(--coral-strong);
  box-shadow: 0 0 0 6px rgba(236, 160, 143, 0.14);
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: -1rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(223, 128, 111, 0.18), transparent);
}

.timeline-body {
  min-width: 0;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: start;
}

.timeline-time {
  color: var(--muted-2);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.timeline-title {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.timeline-copy {
  margin-top: 0.42rem;
  color: var(--text);
  line-height: 1.34;
  font-size: 0.86rem;
}

.timeline-note {
  margin-top: 0.34rem;
  color: var(--muted);
  white-space: pre-wrap;
  font-size: 0.8rem;
}

.timeline-foot {
  margin-top: 0.28rem;
  color: var(--muted-2);
  font-size: 0.76rem;
}

.trade-meta,
.signal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.38rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.44rem;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.88);
  color: var(--muted);
  font-size: 0.66rem;
  border: 1px solid rgba(108, 76, 64, 0.09);
}

.badge.good {
  color: var(--good);
  background: rgba(189, 235, 216, 0.42);
  border-color: rgba(79, 159, 122, 0.16);
}

.badge.warn {
  color: var(--warn);
  background: rgba(248, 227, 154, 0.38);
  border-color: rgba(201, 150, 60, 0.16);
}

.badge.bad {
  color: var(--bad);
  background: rgba(243, 195, 200, 0.42);
  border-color: rgba(200, 116, 125, 0.16);
}

.trade-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.trade-form .wide {
  grid-column: span 3;
}

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

.settings-stack {
  display: grid;
  gap: 0.42rem;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.56rem 0.72rem;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.88);
  border: 1px solid rgba(108, 76, 64, 0.09);
  box-shadow: var(--inner);
}

.settings-label {
  color: var(--muted-2);
}

.settings-value {
  text-align: right;
  font-weight: 600;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.64rem;
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(108, 76, 64, 0.09);
  box-shadow: var(--inner);
}

.account-avatar {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(216, 204, 255, 0.88), rgba(248, 227, 154, 0.78)),
    rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(108, 76, 64, 0.09);
}

.account-copy {
  min-width: 0;
  flex: 1;
}

.account-name {
  font-size: 0.84rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.account-meta {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .controls,
  .trade-form {
    grid-template-columns: 1fr;
  }

  .trade-form .wide {
    grid-column: auto;
  }

  .span-7,
  .span-6,
  .span-5 {
    grid-column: span 12;
  }

  .timeline-card {
    grid-template-columns: 16px minmax(0, 1fr);
  }

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

@media (max-width: 640px) {
  .shell {
    width: min(100% - 16px, 1180px);
    padding-top: 8px;
  }

  .app-bar {
    margin-bottom: 0.48rem;
  }

  .brand-mark,
  .icon-button {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 15px;
  }

  .brand-title {
    font-size: 0.94rem;
  }

  .hero {
    padding: 0.56rem;
    border-radius: 24px;
  }

  .hero-copy {
    padding: 0.78rem 0.72rem;
  }

  .hero-actions,
  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions button,
  .button-row button {
    width: 100%;
    padding-inline: 0.72rem;
  }

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

  .timeline-head {
    flex-direction: column;
  }

  .segmented {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: 20px;
  }

  .segmented-item {
    padding: 0.48rem 0.3rem;
    font-size: 0.76rem;
  }

  .portfolio-card {
    min-height: 330px;
  }

  .portfolio-metrics,
  .wallet-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric,
  .wallet-actions button {
    padding: 0.54rem 0.48rem;
  }

  .portfolio-value {
    font-size: clamp(2.15rem, 12vw, 3rem);
  }

  .settings-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-value {
    text-align: left;
  }

  .account-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 390px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-metrics,
  .wallet-actions,
  .hero-actions,
  .button-row {
    grid-template-columns: 1fr;
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
