/* Emo Social — visual inspirado no "Modern Social Media web Design" (Figma Community, CC BY 4.0, por Banish):
   preto neutro, cartões cinza arredondados, 3 colunas no desktop, arcos em volta do avatar, stories no topo. */
:root {
  --bg: #0f0f10;
  --panel: #1c1c1f;
  --panel-2: #252529;
  --line: #2e2e33;
  --text: #f5f3f7;
  --muted: #8e8b96;
  --pink: #ff3d7f;
  --pink-soft: #ff2e8822;
  --purple: #a84bff;
  --green: #38ff9c;
  --red: #ff3b5c;
  --blue: #3cc8ff;
  --radius: 20px;
  --topbar: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--pink); }
[hidden] { display: none !important; }

/* ---------- Barra do topo ---------- */
.topbar {
  height: var(--topbar); display: none; align-items: center; gap: 16px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: #0f0f10ee; backdrop-filter: blur(10px);
}
body.in-app .topbar { display: flex; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: block; }
.hero-icon { width: 96px; height: 96px; border-radius: 26px; display: block; margin: 0 auto 14px; box-shadow: 0 12px 40px #ff2e8855; }
.logo { font-family: Fredoka, Inter, sans-serif; font-weight: 700; font-size: 26px; letter-spacing: -.5px; color: #f7efe9; line-height: 1; }
.logo span { color: #ff3d7f; }
.logo.big { font-size: 48px; }
.search-pill {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); border-radius: 12px; padding: 9px 14px; font-size: 14px; min-width: 210px;
}
.search-pill:hover { border-color: var(--pink); color: var(--text); }
.nav { display: flex; gap: 6px; margin: 0 auto; }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 16px; border-radius: 12px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab span { font-size: 19px; filter: grayscale(1); opacity: .7; transition: .2s; }
.tab:hover { background: var(--panel); }
.tab.active { color: var(--text); }
.tab.active span { filter: none; opacity: 1; }
.tab .ico-svg { display: grid; place-items: center; height: 23px; color: var(--muted); }
.tab.active .ico-svg { color: var(--pink); }
.tab.active::after { content: ""; position: absolute; bottom: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--pink); display: none; }
.dot.on { display: block; }
.me-chip { width: 40px; height: 40px; border-radius: 50%; background: var(--panel) center/cover; border: 2px solid var(--pink); }

/* ---------- Layout 3 colunas ---------- */
.layout { height: 100dvh; display: grid; grid-template-columns: 1fr; justify-content: center; }
body.in-app .layout { height: calc(100dvh - var(--topbar)); grid-template-columns: 300px minmax(0, 560px) 320px; gap: 24px; padding: 20px 24px 0; }
.side { display: none; overflow-y: auto; padding-bottom: 20px; }
body.in-app .side { display: flex; flex-direction: column; gap: 16px; }
.center-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; width: 100%; max-width: 560px; justify-self: center; }
body:not(.in-app) .center-col { max-width: 440px; padding: 0 16px; }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.box h4 { font-size: 15px; font-weight: 800; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.box h4 small { color: var(--muted); font-weight: 600; font-size: 12px; }

/* Cartão de perfil com arcos (como no Figma) */
.pcard { text-align: center; padding-top: 22px; }
.arcs { position: relative; width: 150px; height: 96px; margin: 0 auto 10px; }
.arcs::before, .arcs::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); border-radius: 200px 200px 0 0;
  border: 6px solid var(--pink); border-bottom: 0;
}
.arcs::before { width: 150px; height: 75px; top: 0; }
.arcs::after { width: 124px; height: 62px; top: 13px; border-color: var(--purple); opacity: .85; }
.arcs .av { position: absolute; left: 50%; top: 24px; transform: translateX(-50%); width: 88px; height: 88px; border-radius: 22px; border: 3px solid var(--panel); z-index: 1; }
.pstats { display: flex; justify-content: space-between; margin: -4px 4px 10px; }
.pstats div { text-align: center; }
.pstats b { display: block; font-size: 18px; }
.pstats span { font-size: 11px; color: var(--muted); }
.pcard h3 { font-size: 18px; margin-top: 18px; }
.pcard .handle { color: var(--muted); font-size: 13px; }
.pcard .pbio { font-size: 13px; color: #cfcbd6; line-height: 1.5; margin: 12px 0 14px; }
.btn-soft { width: 100%; padding: 10px; border-radius: 12px; background: var(--panel-2); font-weight: 700; font-size: 14px; }
.btn-soft:hover { background: #303036; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-wrap span { font-size: 12px; padding: 6px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }

/* Atividade recente */
.act-item { display: flex; gap: 12px; align-items: center; background: var(--panel-2); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.act-item .av { width: 44px; height: 44px; border-radius: 14px; border: 0; position: relative; }
.act-item .av.new::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--pink); border: 2px solid var(--panel-2); }
.act-item strong { display: block; font-size: 14px; }
.act-item small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-item .go { margin-left: auto; flex: none; font-size: 12px; font-weight: 800; padding: 7px 12px; border-radius: 10px; background: var(--pink); color: #fff; }
.empty-side { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Stories (matches) */
.stories { flex: none; display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 64px; text-align: center; font-size: 11px; color: var(--muted); }
.story .ring { width: 60px; height: 60px; border-radius: 18px; padding: 3px; background: linear-gradient(135deg, var(--pink), var(--purple)); margin: 0 auto 5px; }
.story .ring div { width: 100%; height: 100%; border-radius: 15px; background: var(--panel) center/cover; border: 2px solid var(--bg); }
.story span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Telas ---------- */
.screen { display: none; flex: 1; flex-direction: column; min-height: 0; padding-top: 14px; }
.screen.active { display: flex; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.top h2 { font-size: 24px; font-weight: 800; }
.pill { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; white-space: nowrap; }
.pill:hover { border-color: var(--pink); }
.count { background: var(--pink); color: #fff; font-weight: 800; border-radius: 10px; padding: 4px 12px; }
.center { margin: auto; text-align: center; }
.center-text { text-align: center; margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.scroll { overflow-y: auto; flex: 1; min-height: 0; padding-bottom: 24px; }
.grow { flex: 1; min-width: 0; }

/* Baralho */
.deck-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.deck { position: relative; flex: 1; min-height: 360px; }
.card {
  position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: var(--panel) center/cover no-repeat;
  box-shadow: 0 18px 40px #000a; touch-action: none; user-select: none; cursor: grab; will-change: transform;
  transition: transform .35s cubic-bezier(.2,.8,.2,1); border: 1px solid var(--line);
}
.card.dragging { transition: none; cursor: grabbing; }
.card:nth-last-child(2) { transform: scale(.95) translateY(14px); }
.card:nth-last-child(n+3) { transform: scale(.9) translateY(28px); opacity: .6; }
.card .shade { position: absolute; inset: 0; background: linear-gradient(transparent 45%, #000e 90%); }
.card .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.card .matchpct { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; background: #000a; border: 1px solid var(--green); color: var(--green); padding: 4px 10px; border-radius: 10px; margin-bottom: 10px; }
.card .matchpct::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.card h3 { font-size: 30px; font-weight: 800; }
.card h3 small { font-weight: 400; font-size: 24px; opacity: .9; }
.card .where { color: #ddd; font-size: 14px; margin: 2px 0 8px; }
.card .bio { font-size: 14px; line-height: 1.4; color: #eee; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 10px; background: #ffffff1a; border: 1px solid #ffffff2a; }
.bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.bars i { flex: 1; height: 4px; border-radius: 4px; background: #ffffff55; }
.bars i.on { background: #fff; }
.stamp { position: absolute; top: 36px; font-size: 34px; font-weight: 800; letter-spacing: 2px; padding: 4px 14px; border: 5px solid; border-radius: 10px; opacity: 0; pointer-events: none; z-index: 3; }
.stamp.like { left: 24px; color: var(--green); border-color: var(--green); transform: rotate(-16deg); }
.stamp.nope { right: 24px; color: var(--red); border-color: var(--red); transform: rotate(16deg); }
.stamp.super { left: 50%; top: auto; bottom: 200px; color: var(--blue); border-color: var(--blue); transform: translateX(-50%) rotate(-6deg); font-size: 26px; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; border: 2px dashed var(--line); border-radius: 24px; color: var(--muted); }
.empty big { display: block; font-size: 56px; margin-bottom: 10px; }
.empty button { margin-top: 16px; background: var(--pink); color: #fff; font-weight: 800; padding: 12px 20px; border-radius: 12px; }
.actions { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 16px 0 14px; }
.act { width: 62px; height: 62px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); font-size: 26px; font-weight: 800; display: grid; place-items: center; transition: transform .15s, box-shadow .15s, border-color .15s; }
.act:hover { transform: translateY(-2px); }
.act:active { transform: scale(.94); }
.act-nope { color: var(--red); } .act-nope:hover { border-color: var(--red); box-shadow: 0 0 20px #ff3b5c44; }
.act-like { color: #fff; background: var(--pink); border-color: var(--pink); } .act-like:hover { box-shadow: 0 0 24px #ff2e8877; }
.act-star { width: 50px; height: 50px; border-radius: 16px; font-size: 20px; color: var(--blue); } .act-star:hover { border-color: var(--blue); box-shadow: 0 0 20px #3cc8ff44; }

/* Instalar app (PWA) */
.install-bar { flex: none; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.install-bar span { flex: 1; }
.install-bar #ib-go { padding: 7px 12px; border-radius: 10px; background: var(--pink); color: #fff; font-weight: 800; font-size: 12px; }
.install-bar #ib-x { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); }
.install-steps { margin: 12px 0 12px 20px; line-height: 1.7; }
.ios-share { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--panel-2); }

/* Banner #ad no topo */
.ad-bar { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 8px 8px 10px; border-radius: 14px; background: linear-gradient(90deg, #ff3d7f26, #a84bff26), var(--panel); border: 1px solid #ff3d7f66; font-size: 14px; font-weight: 700; }
body:not(.in-app) .ad-bar { margin-top: 14px; }
.ad-tag { flex: none; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 7px; background: var(--pink); color: #fff; }
.ad-txt { flex: 1; min-width: 0; color: var(--text); text-decoration: none; line-height: 1.3; overflow-wrap: anywhere; }
a.ad-txt::after { content: " →"; color: var(--pink); }
.ad-x { flex: none; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); }
.ad-x:hover { background: var(--panel-2); color: var(--text); }
@media (max-width: 820px) { .ad-bar { font-size: 12.5px; gap: 8px; padding: 6px 4px 6px 8px; } .ad-tag { font-size: 10px; padding: 2px 6px; } .ad-x { width: 26px; height: 26px; } }

/* Moderação (admin) */
.modal-box.adm { max-width: 520px; max-height: 88dvh; overflow-y: auto; }
.adm-seg { display: flex; gap: 6px; margin: 12px 0 8px; }
.adm-seg button { flex: 1; padding: 9px; border-radius: 10px; background: var(--panel-2); font-weight: 800; color: var(--muted); }
.adm-seg button.on { background: var(--pink); color: #fff; }
.adm-q { width: 100%; padding: 11px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); margin-bottom: 8px; font: inherit; }
.adm-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 6px; }
.adm-item { background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.adm-item.banned { opacity: .65; }
.adm-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-head strong { margin-right: auto; }
.adm-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--panel); color: var(--muted); }
.adm-tag.hot { background: var(--red); color: #fff; }
.adm-reason { margin: 8px 0 2px; line-height: 1.4; word-break: break-word; }
.adm-photos { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.adm-ph { position: relative; flex: none; width: 64px; height: 84px; border-radius: 10px; background: var(--panel) center/cover; }
.adm-ph b { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: #000b; font-size: 10px; display: grid; place-items: center; }
.adm-acts { display: flex; gap: 6px; }
.adm-acts .btn-soft { flex: 1; font-size: 13px; }
.adm-danger { color: var(--red); }

/* Matches */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 12px; overflow-y: auto; padding-bottom: 16px; align-content: start; align-items: start; min-height: 0; }
/* Card de match: nome numa faixa no topo, colada na foto (sem sobrepor outros cards) */
.mcard { display: flex; flex-direction: column; padding: 0; border-radius: 18px; overflow: hidden; background: var(--panel); text-align: left; border: 1px solid var(--line); }
.mcard .mname { display: block; padding: 9px 12px; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--panel-2); }
.mcard .mphoto { position: relative; width: 100%; height: 0; padding-top: 125%; background: var(--panel) center/cover; }
.mcard em { position: absolute; top: 8px; right: 8px; z-index: 1; font-style: normal; font-size: 11px; font-weight: 800; background: var(--pink); padding: 3px 8px; border-radius: 8px; }
.hint { grid-column: 1/-1; color: var(--muted); text-align: center; padding: 40px 10px; line-height: 1.5; }

/* Mensagens */
.msg-list { list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg-list li button { width: 100%; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.msg-list li button:hover { border-color: var(--pink); }
.av { width: 52px; height: 52px; border-radius: 16px; background: var(--panel-2) center/cover; flex: none; border: 2px solid var(--pink); }
.msg-list strong { display: block; }
.msg-list small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.msg-list .unread small { color: var(--text); font-weight: 600; }

/* Perfil */
.profile .hero { height: 300px; border-radius: 24px; background: center/cover; position: relative; overflow: hidden; flex: none; }
.profile .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 50%, var(--bg)); }
.profile h2 { font-size: 28px; margin-top: -40px; position: relative; z-index: 1; padding: 0 6px; }
.profile .sub { color: var(--muted); padding: 0 6px; margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stats div { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.stats b { display: block; font-size: 22px; color: var(--pink); }
.stats span { font-size: 12px; color: var(--muted); }
.bio-box { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 12px; line-height: 1.45; }

/* Formulários */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 12px; font: inherit; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--pink); }
.field select { appearance: none; }
fieldset.field { border: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); padding: 8px 12px; border-radius: 12px; font-size: 13px; cursor: pointer; }
.chips label:has(input:checked) { border-color: var(--pink); background: var(--pink-soft); }
.chips input { accent-color: var(--pink); }
.btn { width: 100%; padding: 14px; border-radius: 14px; font-weight: 800; background: linear-gradient(90deg, var(--pink), var(--purple)); color: #fff; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); margin-top: 10px; }
.btn.danger { color: var(--red); }
.btn.danger-fill { background: var(--red); }
.link { display: block; margin: 12px auto 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.form-msg { margin-top: 12px; font-size: 14px; text-align: center; min-height: 1em; }
.form-msg.bad { color: var(--red); }
.form-msg.ok { color: var(--green); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.check input { accent-color: var(--pink); margin-top: 2px; width: 18px; height: 18px; flex: none; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 18px; }
.ph { position: relative; aspect-ratio: 3/4; border-radius: 14px; background: var(--panel) center/cover; border: 1px solid var(--line); overflow: hidden; }
.ph b { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: #000b; font-size: 12px; display: grid; place-items: center; }
.ph em { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--pink); padding: 2px 8px; border-radius: 8px; }
.ph i { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 4px; font-style: normal; font-size: 10px; font-weight: 800; text-align: center; line-height: 1.2; background: #000c; }
.ph.st-checando { opacity: .7; }
.ph.st-bad, .ph.st-erro { border: 2px solid var(--red); }
.ph.st-bad i, .ph.st-erro i { background: var(--red); color: #fff; }
.ph.add { display: grid; place-content: center; font-size: 30px; color: var(--pink); border: 2px dashed var(--line); }
.ph.add small { font-size: 12px; color: var(--muted); }
.ph.add:hover { border-color: var(--pink); }

/* Login */
.auth { margin: auto 0; padding: 20px 4px; }
.auth .logo { text-align: center; display: block; }
.tagline { text-align: center; color: var(--muted); margin: 6px 0 26px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.seg-btn { padding: 10px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg-btn.active { background: linear-gradient(90deg, var(--pink), var(--purple)); color: #fff; }

/* Modal */
.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .2s; }
.modal-box { width: 100%; max-width: 400px; max-height: 90dvh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; animation: pop .25s; }
.modal-box h3 { font-size: 20px; margin-bottom: 14px; }
.city-list { display: grid; gap: 8px; margin-bottom: 4px; }
.city-list button { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); text-align: left; }
.city-list button:hover { border-color: var(--pink); }
.city-list button.sel { border-color: var(--pink); background: var(--pink-soft); }
.range-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
input[type=range] { width: 100%; accent-color: var(--pink); margin: 6px 0 14px; }
.itsamatch { text-align: center; background: radial-gradient(circle at 50% 30%, #ff2e8840, transparent 70%), var(--panel); }
.itsamatch h3 { font-family: Fredoka, Inter, sans-serif; font-weight: 700; font-size: 40px; color: var(--pink); line-height: 1; margin: 6px 0 8px; text-shadow: 0 0 24px #ff2e88aa; }
.itsamatch p { color: var(--muted); margin-bottom: 20px; }
.pair { display: flex; justify-content: center; margin: 10px 0 8px; }
.pair .av { width: 110px; height: 110px; border-width: 4px; border-radius: 28px; }
.pair .av:first-child { transform: rotate(-8deg) translateX(12px); }
.pair .av:last-child { transform: rotate(8deg) translateX(-12px); }

/* Chat */
.chat { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; background: #000c; }
.chat > * { width: 100%; max-width: 560px; background: var(--bg); }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-top small { display: block; color: var(--green); font-size: 12px; }
.chat-avatar { width: 44px; height: 44px; border-radius: 14px; background: center/cover; border: 2px solid var(--pink); flex: none; }
.back { font-size: 34px; line-height: 1; padding: 0 6px; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px; line-height: 1.35; font-size: 15px; animation: pop .2s; overflow-wrap: anywhere; }
.bubble.them { background: var(--panel); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.me { background: linear-gradient(135deg, var(--pink), var(--purple)); align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble.sys { align-self: center; background: none; color: var(--muted); font-size: 12px; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.chat-form input { flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 12px 16px; font: inherit; }
.chat-form input:focus { outline: none; border-color: var(--pink); }
.chat-form button { background: var(--pink); color: #fff; font-weight: 800; border-radius: 14px; padding: 0 18px; }

.toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--blue); color: var(--text); padding: 10px 16px; border-radius: 14px; font-weight: 600; z-index: 60; animation: pop .2s; }
.toast.bad { border-color: var(--red); }

/* ---------- Telas médias: some a coluna da direita ---------- */
@media (max-width: 1180px) {
  body.in-app .layout { grid-template-columns: 280px minmax(0, 1fr); }
  .side-right { display: none !important; }
}
/* ---------- Celular: uma coluna, abas embaixo ---------- */
@media (max-width: 820px) {
  body.in-app .layout { grid-template-columns: 1fr; padding: 0 14px; height: calc(100dvh - var(--topbar) - 64px); }
  body.in-app .side { display: none; }
  .search-pill, .me-chip { display: none; }
  .topbar { padding: 0 14px; backdrop-filter: none; background: var(--bg); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; height: 64px; margin: 0; justify-content: space-around; background: #0f0f10f2; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
  .tab { padding: 8px 10px; }
  .stories { padding-top: 12px; padding-bottom: 10px; }
  /* O cartão encolhe para caber; os botões de curtir nunca ficam atrás da barra de abas */
  .deck { min-height: 0; }
  .deck-head { margin-bottom: 10px; }
  .actions { flex: none; padding: 12px 0 10px; }
  body.in-app .layout { height: calc(100dvh - var(--topbar) - 64px - env(safe-area-inset-bottom)); }
  .nav { height: calc(64px + env(safe-area-inset-bottom)); }
  .chat > * { max-width: none; }
}

@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: scale(.94) } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Perfil aberto pelo chat */
.chat-avatar { cursor: pointer; padding: 0; }
.chat-who { text-align: left; padding: 0; cursor: pointer; }
.chat-who:hover strong { color: var(--pink); }
.modal-box.vp { padding: 0; overflow: hidden auto; max-width: 420px; }
.vp-photo { position: relative; aspect-ratio: 3/4; background: var(--panel-2) center/cover; }
.vp-nav { position: absolute; top: 0; bottom: 0; width: 50%; font-size: 0; }
.vp-nav.prev { left: 0; } .vp-nav.next { right: 0; }
.vp-body { padding: 18px 20px 22px; }
.vp-body h3 { font-size: 28px; margin: 8px 0 2px; }
.vp-body h3 small { font-weight: 400; font-size: 22px; }
.vp-pct { display: inline-block; font-size: 12px; font-weight: 800; border: 1px solid var(--green); color: var(--green); padding: 4px 10px; border-radius: 10px; }
.vp-bio { margin: 12px 0 4px; line-height: 1.45; }
.vp-body .tags { margin-bottom: 18px; }

/* Bandas em chips */
.band-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.band-box:focus-within { border-color: var(--pink); }
.band-chips { display: contents; }
.bchip { display: inline-flex; align-items: center; gap: 6px; background: var(--pink-soft); border: 1px solid var(--pink); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.bchip b { font-size: 10px; opacity: .8; }
.band-box input { flex: 1; min-width: 160px; background: none; border: 0; color: var(--text); font: inherit; padding: 6px; }
.band-box input:focus { outline: none; }
