:root {
  --primary: #1a73e8;
  --primary-600: #1559b8;
  --primary-50: #e8f1fe;
  --navy: #0b2a55;
  --navy-2: #123b73;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --border: #e3e8f0;
  --text: #0f1b2d;
  --muted: #5b6b82;
  --like: #e0245e;
  --danger: #d93025;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 2px 8px rgba(15, 27, 45, .04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 18px; height: 18px; }
.ic-xs { width: 15px; height: 15px; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 620px) 330px;
  justify-content: center;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 16px;
}
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 16px 0;
}
.main { padding: 16px 0 40px; min-width: 0; }
.rightbar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.topbar, .bottomnav { display: none; }

.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px; margin-bottom: 12px; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; flex: none; }
.brand-logo img { width: 40px; height: 40px; object-fit: contain; }
.brand-text { font-weight: 800; font-size: 20px; color: var(--navy); letter-spacing: -.02em; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-link { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 999px; font-size: 17px; font-weight: 500; color: var(--text); transition: background .15s; }
.nav-link:hover { background: var(--primary-50); }
.nav-link.active { font-weight: 700; color: var(--primary); }
.nav-link.active .ic { stroke-width: 2.5; }

.side-user { margin-top: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 999px; width: 100%; text-align: left; }
.user-chip:hover { background: var(--primary-50); }
.user-chip .uc-text { min-width: 0; flex: 1; }
.user-chip .uc-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .uc-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: background .15s, opacity .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-outline { border: 1px solid var(--border); background: var(--surface); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); border: 1px solid #f3c6c2; background: #fff; }
.btn-danger:hover { background: #fdecea; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 14px; }
.card-pad { padding: 16px; }
.card-title { font-size: 18px; font-weight: 800; padding: 14px 16px 6px; }

.page-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 14px; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { font-size: 13px; color: var(--muted); }

/* ---------- Avatars ---------- */
.av { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; overflow: hidden; flex: none; background: var(--primary); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-school { background: #fff; border: 1px solid var(--border); }
.av-school img { object-fit: contain; padding: 8%; }
.av-xs { width: 28px; height: 28px; font-size: 11px; }
.av-sm { width: 36px; height: 36px; font-size: 13px; }
.av-md { width: 44px; height: 44px; font-size: 16px; }
.av-lg { width: 64px; height: 64px; font-size: 22px; }
.av-xl { width: 132px; height: 132px; font-size: 44px; border: 4px solid #fff; box-shadow: var(--shadow); }

.badge-verified { display: inline-flex; color: var(--primary); vertical-align: -3px; margin-left: 3px; }
.badge-verified .ic { width: 17px; height: 17px; fill: var(--primary); stroke: #fff; stroke-width: 1.6; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); font-size: 13px; font-weight: 600; }
.pill-navy { background: var(--navy); color: #fff; }
.pill-admin { background: #fff4e0; color: #9a5b00; }

/* ---------- Hero (inicio) ---------- */
.hero { overflow: hidden; }
.hero-cover {
  height: 150px;
  background:
    radial-gradient(circle at 82% 30%, rgba(255, 214, 102, .55) 0 34px, rgba(255, 214, 102, .18) 35px 70px, transparent 71px),
    linear-gradient(180deg, transparent 62%, rgba(255, 255, 255, .14) 62% 76%, transparent 76%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 45%, var(--primary) 100%);
}
.hero-body { padding: 0 18px 18px; position: relative; }
.hero-logo { width: 112px; height: 112px; border-radius: 50%; background: #fff; border: 4px solid #fff; box-shadow: var(--shadow); margin-top: -56px; display: grid; place-items: center; }
.hero-logo img { width: 96px; height: 96px; object-fit: contain; }
.hero h1 { font-size: 24px; font-weight: 800; margin-top: 10px; letter-spacing: -.02em; display: flex; align-items: center; gap: 4px; }
.hero .loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 6px; }
.hero-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.hero-stats b { color: var(--text); }

/* ---------- Composer ---------- */
.composer { display: flex; gap: 12px; padding: 14px 16px; }
.composer-main { flex: 1; min-width: 0; }
.composer textarea { width: 100%; border: 0; resize: none; outline: none; font-size: 17px; min-height: 56px; padding: 8px 0; background: transparent; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; gap: 10px; }
.file-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.file-btn:hover { background: var(--primary-50); }
.file-btn input { display: none; }
.img-preview { position: relative; margin-top: 8px; }
.img-preview img { border-radius: 14px; max-height: 280px; object-fit: cover; width: 100%; }
.img-preview button { position: absolute; top: 8px; right: 8px; background: rgba(15, 27, 45, .7); color: #fff; }

/* ---------- Posts ---------- */
.post { padding: 14px 16px 6px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .name { font-weight: 700; }
.post-head .time { font-size: 13px; color: var(--muted); }
.post-text { margin: 10px 0 4px; font-size: 16px; white-space: normal; overflow-wrap: anywhere; }
.post-img { margin-top: 10px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.post-img img { width: 100%; max-height: 520px; object-fit: cover; }
.post-actions { display: flex; gap: 6px; border-top: 1px solid var(--border); margin-top: 12px; padding-top: 4px; }
.act { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.act:hover { background: var(--surface-2); color: var(--text); }
.act.like:hover, .act.like.on { color: var(--like); }
.act.like:hover { background: #fde8ef; }
.act.like.on .ic { fill: var(--like); }
.act.like.pop .ic { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }

/* ---------- Comments ---------- */
.thread { padding: 8px 0 10px; }
.cmt-form { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 12px; }
.cmt-input { flex: 1; display: flex; align-items: flex-end; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 4px 4px 4px 14px; }
.cmt-input:focus-within { border-color: var(--primary); background: #fff; }
.cmt-input textarea { flex: 1; border: 0; background: transparent; outline: none; resize: none; padding: 7px 0; min-height: 22px; max-height: 160px; line-height: 1.4; }
.send-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.send-btn:hover { background: var(--primary-600); }
.send-btn .ic { width: 17px; height: 17px; }
.cmt { display: flex; gap: 10px; margin-top: 10px; }
.cmt-body { flex: 1; min-width: 0; }
.bubble { display: inline-block; max-width: 100%; background: var(--surface-2); border-radius: 18px; padding: 8px 13px; }
.cmt-name { font-weight: 700; font-size: 14px; }
.bubble p { overflow-wrap: anywhere; }
.cmt-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); padding: 3px 10px 0; flex-wrap: wrap; }
.cmt-meta button { font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.cmt-meta button:hover { text-decoration: underline; }
.cmt-meta button.on { color: var(--like); }
.cmt-meta button.on .ic { fill: var(--like); }
.cmt-replies { border-left: 2px solid var(--border); margin: 4px 0 0 4px; padding-left: 12px; }
.empty-sm { color: var(--muted); font-size: 14px; padding: 8px 2px; }
.login-nudge { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--primary-50); border-radius: 14px; padding: 12px 14px; margin: 6px 0 10px; font-size: 14px; color: var(--navy); }

/* ---------- Profiles grid ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 14px; color: var(--muted); }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .n { opacity: .7; margin-left: 4px; font-weight: 500; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pcard { overflow: hidden; text-align: center; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 27, 45, .1); }
.pcard-cover { height: 64px; background-size: cover; background-position: center; }
.pcard .av { margin: -32px auto 0; border: 3px solid #fff; }
.pcard-body { padding: 8px 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.pcard-name { font-weight: 700; line-height: 1.25; }
.pcard-role { font-size: 13px; color: var(--muted); }
.pcard-subj { font-size: 13px; color: var(--primary-600); font-weight: 600; }
.pcard-foot { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.pcard-foot span { display: inline-flex; align-items: center; gap: 4px; }

.faltan { margin-top: 18px; overflow: hidden; }
.faltan-head { display: flex; gap: 12px; align-items: center; padding: 16px; background: linear-gradient(135deg, var(--primary-50), #f4f8ff); border-bottom: 1px solid var(--border); }
.faltan-head .ic { width: 30px; height: 30px; color: var(--primary); }
.faltan-head h2 { font-size: 18px; font-weight: 800; color: var(--navy); }
.faltan-head p { font-size: 14px; }
.faltan-form { display: flex; gap: 8px; flex-wrap: wrap; }
.faltan-form input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; outline: none; background: var(--surface-2); }
.faltan-form input:focus { border-color: var(--primary); background: #fff; }
.faltan-list { display: grid; }
.faltan-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.faltan-item:first-child { border-top: 0; }
.faltan-item .r-text { flex: 1; min-width: 0; }
.faltan-item .r-name { font-weight: 700; }
.faltan-item .r-sub { font-size: 13px; color: var(--muted); }

/* ---------- Profile page ---------- */
.back-head { display: flex; align-items: center; gap: 14px; padding: 0 4px 12px; }
.back-head .t { font-weight: 800; font-size: 18px; line-height: 1.2; }
.back-head .s { font-size: 13px; color: var(--muted); }
.profile { overflow: hidden; }
.profile-cover { height: 200px; background-size: cover; background-position: center; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 18px; margin-top: -66px; }
.profile-info { padding: 12px 18px 16px; }
.profile-name { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.profile-role { color: var(--muted); margin-top: 2px; }
.profile-subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.profile-bio { margin-top: 12px; font-size: 15px; }
.profile-bio.no-bio { color: var(--muted); font-style: italic; }
.profile-stats { display: flex; gap: 18px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.profile-stats b { color: var(--text); }

.tabs { display: flex; border-top: 1px solid var(--border); }
.tab { flex: 1; padding: 14px 6px; font-weight: 600; color: var(--muted); position: relative; text-align: center; font-size: 15px; }
.tab:hover { background: var(--surface-2); }
.tab.active { color: var(--text); font-weight: 700; }
.tab.active::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 56px; height: 4px; border-radius: 4px; background: var(--primary); }
.tab .n { font-weight: 500; color: var(--muted); margin-left: 4px; }
.tab-panel { padding: 14px 16px; border-top: 1px solid var(--border); }

.desc-intro { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, var(--primary-50), #f4f8ff); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.desc-intro .ic { color: var(--primary); width: 28px; height: 28px; }
.desc-intro b { color: var(--navy); }
.desc-intro p { font-size: 14px; color: var(--muted); }
.desc-form { margin-bottom: 14px; }
.desc-form .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.counter { font-size: 13px; color: var(--muted); }
.field-box { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; resize: vertical; min-height: 70px; outline: none; background: var(--surface-2); }
.field-box:focus { border-color: var(--primary); background: #fff; }
.desc-list { display: grid; gap: 10px; }
.desc { border: 1px solid var(--border); border-radius: 14px; padding: 14px; position: relative; }
.desc-text { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.desc-text::before { content: '“'; color: var(--primary); font-weight: 800; margin-right: 2px; }
.desc-text::after { content: '”'; color: var(--primary); font-weight: 800; margin-left: 2px; }
.desc-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.desc-foot .who { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.desc-foot .act { padding: 5px 10px; font-size: 13px; }
.desc.top { border-color: #b9d3fb; background: #f7fbff; }
.top-tag { position: absolute; top: -9px; right: 12px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }

.info-list { display: grid; gap: 14px; }
.info-row { display: flex; gap: 12px; align-items: flex-start; }
.info-row .ic { color: var(--primary); margin-top: 1px; }
.info-row .k { font-size: 13px; color: var(--muted); }
.info-row .v { font-weight: 600; }

/* ---------- Search ---------- */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.search-box input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; min-width: 0; }
.search-box .ic { color: var(--muted); }
.result { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.result:first-child { border-top: 0; }
.result:hover { background: var(--surface-2); }
.result .r-text { flex: 1; min-width: 0; }
.result .r-name { font-weight: 700; }
.result .r-sub { font-size: 13px; color: var(--muted); }
.section-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 18px 4px 10px; }
mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- Realidad ---------- */
.realidad-head { overflow: hidden; }
.realidad-banner { padding: 22px 18px; background: linear-gradient(135deg, var(--navy), var(--primary)); color: #fff; display: flex; gap: 14px; align-items: center; }
.realidad-banner .ic { width: 40px; height: 40px; stroke-width: 1.6; }
.realidad-banner h2 { font-size: 22px; font-weight: 800; }
.realidad-banner p { opacity: .85; font-size: 14px; }
.realidad-text { padding: 16px 18px; font-size: 15px; }

/* ---------- Right bar ---------- */
.rb-card .result { padding: 10px 16px; }
.rb-more { display: block; padding: 12px 16px; color: var(--primary); font-weight: 600; font-size: 14px; border-top: 1px solid var(--border); }
.rb-more:hover { background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.rb-foot { font-size: 12px; color: var(--muted); padding: 0 8px; }

/* ---------- Account ---------- */
.account-head { display: flex; gap: 14px; align-items: center; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.account-stats b { display: block; font-size: 20px; }
.account-stats span { font-size: 13px; color: var(--muted); }
.admin-tools { display: grid; gap: 8px; }
.admin-tools .btn { justify-content: flex-start; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11, 42, 85, .45); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: rise .2s ease; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 0 16px; }
.modal-head h2 { flex: 1; font-size: 19px; font-weight: 800; }
.modal-body { padding: 14px 20px 20px; }
.modal-logo { width: 72px; height: 72px; margin: 0 auto 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg button { padding: 9px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input:not([type=file]):not([type=checkbox]), .field select, .field textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; outline: none; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.seo-intro h1 { font-size: 22px; font-weight: 800; color: var(--navy); }
.seo-intro p { margin-top: 8px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; color: var(--border); margin: 0 auto 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 76px minmax(0, 640px); }
  .rightbar { display: none; }
  .brand-text, .nav-link span, .user-chip .uc-text { display: none; }
  .brand { justify-content: center; padding: 6px 0; }
  .nav-link { justify-content: center; padding: 14px; }
  .user-chip { justify-content: center; }
}

@media (max-width: 700px) {
  body { font-size: 15px; }
  .app { display: block; padding: 0; }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  }
  .topbar .brand { margin: 0; padding: 0; }
  .topbar .brand-logo { width: 38px; height: 38px; }
  .topbar .brand-logo img { width: 33px; height: 33px; }
  .topbar .brand-text { display: inline; font-size: 18px; }
  .main { padding: 12px 0 calc(84px + env(safe-area-inset-bottom)); }
  .main > * { margin-left: 0; margin-right: 0; }
  .page-head, .back-head { padding-left: 16px; padding-right: 16px; }
  .chips { padding-left: 16px; padding-right: 16px; }
  .card { border-radius: 0; border-left: 0; border-right: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 12px; }
  .grid .card { border-radius: 14px; border: 1px solid var(--border); }
  .search-wrap { padding: 0 16px; }
  .section-label { padding-left: 16px; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bn-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
  .bn-link .ic { width: 25px; height: 25px; }
  .bn-link.active { color: var(--primary); }
  .bn-link.active .ic { stroke-width: 2.5; }
  .tab { font-size: 14px; padding: 13px 2px; }
  .profile-cover { height: 140px; }
  .av-xl { width: 104px; height: 104px; font-size: 36px; }
  .profile-top { margin-top: -52px; padding: 0 16px; }
  .profile-info { padding: 10px 16px 14px; }
  .hero-cover { height: 120px; }
  .hero-logo { width: 96px; height: 96px; margin-top: -48px; }
  .hero-logo img { width: 82px; height: 82px; }
  .modal-backdrop { place-items: end center; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
}
