:root {
  --bg: #f8f6fb;
  --surface: #ffffff;
  --surface-soft: #f2edfa;
  --primary: #7c63a9;
  --primary-dark: #594275;
  --primary-light: #e9def7;
  --peach: #f7dfd4;
  --blue: #dfeaf6;
  --text: #292432;
  --muted: #81798b;
  --line: #e9e4ed;
  --success: #55b985;
  --shadow: 0 18px 45px rgba(62, 45, 79, 0.09);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --nav-height: 76px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: #eeeaf2; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(26px, env(safe-area-inset-top)) 20px calc(var(--nav-height) + 36px);
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.topbar h1 { margin-top: 4px; font-size: 29px; letter-spacing: -0.04em; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; }

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary-dark);
  background: rgba(255,255,255,.82);
  font-size: 20px;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #bda8dc, #74578f);
  box-shadow: 0 8px 22px rgba(95, 69, 125, .22);
  font-family: Georgia, serif;
}
.avatar--large { width: 78px; height: 78px; font-size: 26px; }
.avatar--small { width: 44px; height: 44px; font-size: 16px; }
.avatar--tiny { width: 30px; height: 30px; border-width: 2px; font-size: 11px; }

.status-line { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(85,185,133,.12); }

.section-block { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.section-heading h2 { margin-top: 4px; font-size: 20px; letter-spacing: -.02em; }
.soft-label { padding: 6px 10px; border-radius: 99px; color: var(--primary); background: var(--primary-light); font-size: 11px; }

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 520px);
  min-height: var(--nav-height);
  margin: auto;
  padding: 9px 34px max(9px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(226, 219, 231, .85);
  background: rgba(255,255,255,.94);
  box-shadow: 0 -10px 30px rgba(58,43,70,.05);
  backdrop-filter: blur(18px);
}

.bottom-nav a { display: flex; align-items: center; justify-content: center; gap: 4px; flex-direction: column; color: #9a92a1; font-size: 10px; font-weight: 600; }
.bottom-nav a span { font-size: 20px; line-height: 1; }
.bottom-nav a.is-active { color: var(--primary); }

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

@media (min-width: 521px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100vh - 44px); border-radius: 34px; box-shadow: var(--shadow); }
  .bottom-nav { bottom: 22px; border-radius: 0 0 34px 34px; }
}
