:root {
  --bg: #f7f8fa;
  --bg-deep: #eef1f6;
  --ink: #121826;
  --muted: #6b7289;
  --line: #e4e7ee;
  --brand: #e11d48;
  --brand-2: #fb7185;
  --brand-soft: #fff1f3;
  --accent: #0ea5a4;
  --accent-deep: #0f766e;
  --card: #ffffff;
  --vip: #d97706;
  --shadow: 0 8px 28px rgba(18, 24, 38, .07);
  --shadow-lg: 0 24px 60px rgba(18, 24, 38, .12);
  --radius: 20px;
  --nav-h: 64px;
  --side-w: 240px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Outfit", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(225,29,72,.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(14,165,164,.08), transparent 50%),
    linear-gradient(180deg, #fbfcfe 0%, var(--bg) 40%, var(--bg-deep) 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
::selection { background: #fecdd3; }

/* ========== Shell ========== */
.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.shell-body {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}

.app-stage {
  position: relative;
  min-height: 100vh;
  width: 100%;
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  animation: pageIn .28s ease;
}
.page.active { display: block; }
.page.no-nav { padding-bottom: 32px; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========== Desktop side nav ========== */
.side-nav {
  display: none;
}
.top-desktop {
  display: none;
}

/* ========== Mobile bottom tab ========== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 560px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 0 8px var(--safe-bottom);
  background: rgba(255,255,255,.92);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 40;
  backdrop-filter: blur(16px);
}
.tabbar button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: color .2s;
}
.tabbar button .ico {
  width: 28px; height: 28px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 15px;
  transition: .2s;
}
.tabbar button .ico svg {
  display: block;
  width: 22px;
  height: 22px;
}
.tabbar button.on { color: var(--brand); }
.tabbar button.on .ico {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ========== Welcome (responsive) ========== */
.welcome {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
.welcome-visual {
  position: relative;
  min-height: 38vh;
  padding: 36px 28px 48px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(15,23,42,.55), rgba(225,29,72,.45)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%230f172a'/%3E%3Cstop offset='.55' stop-color='%23be123c'/%3E%3Cstop offset='1' stop-color='%230ea5a4'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1200' height='800' fill='url(%23a)'/%3E%3Ccircle cx='980' cy='140' r='220' fill='%23fff' fill-opacity='.08'/%3E%3Ccircle cx='180' cy='620' r='280' fill='%23fff' fill-opacity='.06'/%3E%3C/svg%3E") center/cover;
}
.welcome-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 80px;
  background: linear-gradient(transparent, var(--bg));
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  animation: pageIn .6s ease both;
}
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  display: grid; place-items: center;
  font-weight: 800;
  letter-spacing: .04em;
}
.brand-name {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1.1;
  animation: pageIn .7s .05s ease both;
}
.brand-slogan {
  margin-top: 12px;
  font-size: 15px;
  opacity: .92;
  max-width: 18em;
  animation: pageIn .7s .12s ease both;
}
.welcome-points {
  margin-top: 28px;
  display: none;
  gap: 14px;
  animation: pageIn .8s .2s ease both;
}
.welcome-points li {
  list-style: none;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  font-size: 14px;
}
.welcome-points strong { display: block; margin-bottom: 4px; font-size: 15px; }

.welcome-panel {
  position: relative;
  z-index: 2;
  margin: -36px 16px 24px;
  background: var(--card);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  padding: 24px 20px 22px;
  animation: pageIn .55s .1s ease both;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 20px;
}
.auth-tabs button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 11px;
  color: var(--muted);
  font-weight: 600;
}
.auth-tabs button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(18,24,38,.08);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: .02em;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #fda4af;
  box-shadow: 0 0 0 4px rgba(225,29,72,.1);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gender {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gender label {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  transition: .2s;
}
.gender input { display: none; }
.gender label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  width: 100%;
  margin-top: 4px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #fb7185);
  box-shadow: 0 10px 24px rgba(225,29,72,.28);
}
.btn-primary:hover { box-shadow: 0 14px 30px rgba(225,29,72,.35); }
.btn-accent {
  background: var(--accent-deep);
  color: #fff;
}
.btn-ghost {
  background: var(--bg-deep);
  color: var(--ink);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-sm { padding: 8px 12px; border-radius: 11px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ========== Top bar ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(251,252,254,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228,231,238,.8);
}
.topbar h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .02em;
}
.topbar .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.filters {
  display: flex;
  gap: 8px;
  padding: 14px 20px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  transition: .2s;
}
.chip:hover { border-color: #fecdd3; }
.chip.on {
  background: var(--brand-soft);
  border-color: #fecdd3;
  color: var(--brand);
}

/* ========== Discover grid ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 12px 16px 24px;
}
.card-user {
  background: var(--card);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.8);
  transition: transform .2s, box-shadow .2s;
}
.card-user:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-user .cover {
  aspect-ratio: 3/4;
  background: #d6dbe6 center/cover no-repeat;
  position: relative;
}
.card-user .cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(18,24,38,.55));
}
.card-user .badge {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 1;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.card-user .vip-badge {
  position: absolute;
  right: 10px; top: 10px;
  z-index: 1;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.card-user .online-dot {
  position: absolute;
  left: 10px; top: 10px;
  z-index: 1;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}
.card-user .meta { padding: 12px 12px 14px; }
.card-user .name { font-weight: 800; font-size: 15px; }
.card-user .info {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Profile ========== */
.profile-layout {
  max-width: 920px;
  margin: 0 auto;
}
.profile-hero {
  height: min(58vh, 520px);
  background: #c5cad6 center/cover no-repeat;
  position: relative;
}
.profile-hero .back {
  position: absolute;
  left: 16px; top: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  font-size: 18px;
}
.profile-body {
  margin: -40px 16px 0;
  background: #fff;
  border-radius: 28px;
  padding: 24px 22px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.profile-body h2 { font-size: 26px; font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.section-title {
  margin: 22px 0 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photos img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: #eef1f6;
  width: 100%;
  height: 100%;
}
.photo-wall .wall-shot {
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1;
}
.photo-wall .wall-shot:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.photo-wall-edit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.photo-wall-empty {
  grid-column: 1 / -1;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.pwe-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #eee;
}
.pwe-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pwe-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

/* ========== Messages / Chat ========== */
.conv-list { padding: 10px 16px 24px; max-width: 820px; margin: 0 auto; }
.conv-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1px solid transparent;
  transition: .2s;
}
.conv-item:hover { border-color: #fecdd3; transform: translateY(-1px); }
.avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  object-fit: cover;
  background: #d6dbe6;
  flex: 0 0 auto;
}
.avatar.lg { width: 78px; height: 78px; }
.conv-item .t { flex: 1; min-width: 0; }
.conv-item .n {
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.conv-item .m {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.unread {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-weight: 700;
}

.chat-page {
  display: none;
  flex-direction: column;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding-bottom: 0 !important;
  background: #fff;
}
.chat-page.active {
  display: flex !important;
}
.shell.chat-open .top-desktop { display: none !important; }
.shell.chat-open .app-stage { padding: 0 !important; }
.shell.chat-open .tabbar { display: none !important; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 72%;
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  animation: pageIn .2s ease;
}
.bubble.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #e11d48, #fb7185);
  color: #fff;
  border-bottom-right-radius: 5px;
}
.bubble.them {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}
.chat-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}
.chat-input input,
.chat-input #chat-text {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 14px;
  outline: none;
  background: #f8fafc;
}
.chat-input input:focus,
.chat-input #chat-text:focus {
  border-color: #fda4af;
  box-shadow: 0 0 0 3px rgba(225,29,72,.1);
  background: #fff;
}

/* ========== Me / VIP ========== */
.me-wrap { max-width: 720px; margin: 0 auto; padding-bottom: 20px; }
.me-head {
  padding: 28px 20px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.me-head .info h2 { font-size: 24px; font-weight: 800; }
.vip-card {
  margin: 0 16px 14px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(500px 200px at 100% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg, #e11d48 0%, #be123c 40%, #0f766e 120%);
  box-shadow: 0 16px 40px rgba(190,18,60,.25);
  cursor: pointer;
  transition: transform .2s;
}
.vip-card:hover { transform: translateY(-2px); }
.vip-card h3 { font-size: 22px; font-weight: 800; }
.vip-card p { opacity: .92; font-size: 13px; margin-top: 6px; }
.menu {
  margin: 0 16px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.menu a, .menu button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  background: #fff;
  border-bottom: 1px solid #f1f3f7;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-weight: 600;
}
.menu a:last-child, .menu button:last-child { border-bottom: 0; }
.menu button:hover { background: #fcfdff; }
.plans { padding: 12px 16px; display: grid; gap: 14px; max-width: 720px; margin: 0 auto; }
.plan {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.plan-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.plan-ico { font-size: 28px; }
.plan-tag { font-size: 12px; color: var(--muted); margin-top: 2px; }
.plan-from { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); }
.plan-from b { display: block; color: var(--brand); font-size: 18px; }
.plan-desc { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.plan-perks {
  list-style: none;
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
}
.plan-perks li {
  font-size: 13px;
  color: #374151;
  padding-left: 18px;
  position: relative;
}
.plan-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #0f766e;
  font-weight: 800;
}
.sku-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sku-btn {
  position: relative;
  border: 1px solid var(--line);
  background: #fafbfc;
  border-radius: 12px;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
}
.sku-btn.hot {
  border-color: #fda4af;
  background: #fff1f2;
}
.sku-btn em {
  position: absolute;
  top: -8px;
  right: 6px;
  font-style: normal;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
}
.sku-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sku-btn strong { display: block; color: var(--brand); font-size: 16px; }
.sku-btn del { font-size: 11px; color: #9ca3af; }
.plan-crown .plan-from b { color: #b45309; }
.plan-crown .sku-btn.hot { border-color: #fcd34d; background: #fffbeb; }
.plan-crown .sku-btn.hot em { background: #b45309; }
.plan-crown .sku-btn strong { color: #b45309; }
.pay-body { margin-top: 8px; }
.pay-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed #e5e7eb;
}
.pay-row:last-of-type { border-bottom: 0; }
.pay-row.price b { color: var(--brand); font-size: 20px; }
.pay-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 380px) {
  .sku-row { grid-template-columns: 1fr; }
  .plan-from { display: none; }
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 56px 20px;
  font-size: 14px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(18,24,38,.92);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 100;
  max-width: 86%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.edit-wrap, .list-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 20px 28px;
}

/* ========== Desktop / Tablet ========== */
@media (min-width: 768px) {
  .tabbar { display: none; }
  .page { padding-bottom: 40px; }
  .page.no-nav { padding-bottom: 40px; }

  .top-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px 24px;
    width: 100%;
  }
  .top-desktop .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .04em;
  }
  .top-desktop .logo span {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e11d48, #fb7185);
    color: #fff;
    display: grid; place-items: center;
    font-size: 14px;
  }
  .desk-nav {
    display: flex;
    gap: 6px;
    background: rgba(255,255,255,.8);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px;
    box-shadow: var(--shadow);
  }
  .desk-nav button {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
  }
  .desk-nav button.on {
    background: var(--ink);
    color: #fff;
  }
  .shell.logged .top-desktop { display: flex; }
  .shell:not(.logged) .top-desktop { display: none; }

  .welcome {
    grid-template-columns: 1.15fr .95fr;
    min-height: 100vh;
    max-width: var(--max);
    margin: 0 auto;
    align-items: stretch;
    padding: 28px;
    gap: 24px;
  }
  .welcome-visual {
    min-height: auto;
    border-radius: 32px;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .welcome-visual::after { display: none; }
  .welcome-points { display: grid; }
  .welcome-panel {
    margin: 0;
    align-self: center;
    width: 100%;
    padding: 32px 28px;
    border-radius: 28px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 16px 24px 40px;
  }
  .filters { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 24px; padding-right: 24px; }

  .profile-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 24px;
    padding: 24px;
    align-items: start;
  }
  .profile-hero {
    height: auto;
    min-height: 620px;
    border-radius: 28px;
    overflow: hidden;
  }
  .profile-body {
    margin: 0;
    min-height: 620px;
  }

  .chat-page {
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    border: 0;
    box-shadow: none;
  }
  .shell.logged .app-stage {
    padding: 0 24px 24px;
  }
  .shell.logged.chat-open .app-stage {
    padding: 0 !important;
  }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .shell.logged .top-desktop { display: none !important; }
}
