:root {
  --y: #FFD400;
  --on-y: #000;
  --y-soft: rgba(255,212,0,.12);
  --bg: #0B0B0B;
  --card: #151515;
  --card2: #1d1d1d;
  --line: #2a2a2a;
  --text: #FFFFFF;
  --muted: #9b9b9b;
  --red: #FF4D4D;
  --green: #3DDC84;
  --r: 18px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
#app { max-width: 560px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px calc(96px + var(--safe-b)); min-height: 100vh; }
h1 { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; margin: 8px 0 16px; text-transform: uppercase; }
h1 em { font-style: normal; color: var(--y); }
h2 { font-size: 18px; font-weight: 800; margin: 0; }
h3 { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 24px 0 10px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.y { color: var(--y); }
.red { color: var(--red); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stack > * + * { margin-top: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.card.y-card { background: var(--y); color: var(--on-y); border-color: var(--y); }
.card.y-card .muted { color: inherit; opacity: .65; }
.tap { cursor: pointer; transition: transform .1s; }
.tap:active { transform: scale(.98); }

/* Botões */
button, .btn {
  font: inherit; font-weight: 800; border: 0; border-radius: 14px; padding: 14px 18px; cursor: pointer;
  background: var(--y); color: var(--on-y); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: transform .1s, opacity .2s;
}
button:active, .btn:active { transform: scale(.97); }
button:disabled { opacity: .5; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-dark { background: var(--on-y); color: var(--y); }
.btn-white { background: #fff; color: #000; }
.btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--card2); color: var(--text); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #4a1f1f; }
.link { background: none; color: var(--y); padding: 0; font-weight: 700; }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; outline: none; -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--y); }
textarea { min-height: 80px; resize: vertical; }
.field + .field { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-weight: 600; font-size: 14px; }
.chip.on { background: var(--y); color: var(--on-y); border-color: var(--y); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.switch input[type=checkbox] { width: 50px; height: 30px; border-radius: 99px; background: #333; position: relative; padding: 0; border: 0; flex: none; }
.switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch input[type=checkbox]:checked { background: var(--y); }
.switch input[type=checkbox]:checked::after { left: 23px; background: var(--on-y); }

/* Header da data */
.datebar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.datebar .label { font-weight: 800; font-size: 17px; }

/* Anel de calorias */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 150px; height: 150px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .big { font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.kv b { font-weight: 800; }

.bar { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--y); border-radius: 99px; transition: width .4s; }
.bar.over > i { background: var(--red); }
.macro .t { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.macro .v { font-weight: 800; font-size: 15px; }

.alert { background: rgba(255, 77, 77, .12); border: 1px solid rgba(255, 77, 77, .4); color: #ffb3b3; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin-top: 12px; }
.ok { background: var(--y-soft); border: 1px solid var(--y); color: var(--y); padding: 12px 14px; border-radius: 14px; font-size: 14px; }

/* Refeições */
.meal { padding: 0; overflow: hidden; }
.meal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.entry { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); }
.entry .k { font-weight: 800; }
.entry .del { background: none; color: var(--muted); padding: 4px 6px; font-size: 18px; }
.meal-add { width: 100%; background: transparent; color: var(--y); border-top: 1px solid var(--line); border-radius: 0; padding: 12px; font-size: 14px; }

/* Lista genérica */
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--y); color: var(--on-y); text-transform: uppercase; letter-spacing: .04em; }
.badge.dark { background: var(--card2); color: var(--muted); }
.num { width: 36px; height: 36px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-weight: 900; color: var(--y); flex: none; }

/* Tabbar */
#tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  background: rgba(11, 11, 11, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--safe-b));
}
#tabbar[hidden] { display: none; }
#tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; padding: 4px; }
#tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#tabbar a.on { color: var(--y); }

/* Bottom sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 40; animation: fade .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto;
  background: #111; border-top-left-radius: 24px; border-top-right-radius: 24px; border: 1px solid var(--line);
  max-height: 92vh; overflow-y: auto; padding: 8px 18px calc(24px + var(--safe-b)); animation: up .25s cubic-bezier(.2,.8,.2,1);
}
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: #333; margin: 6px auto 14px; }
.sheet h2 { margin-bottom: 14px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

#toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%) translateY(20px);
  background: #fff; color: #000; font-weight: 700; padding: 12px 18px; border-radius: 14px; z-index: 60;
  opacity: 0; pointer-events: none; transition: all .25s; max-width: 90vw; text-align: center; font-size: 14px;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); color: #fff; }

/* Login */
.auth { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; }
.logo { font-size: 56px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.logo span { color: var(--y); }
.hero-stripe { height: 8px; width: 80px; background: var(--y); border-radius: 9px; margin: 14px 0 22px; }

/* Player de treino */
.timer { font-size: 44px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.set-row { display: grid; grid-template-columns: 34px 1fr 1fr 48px; gap: 8px; align-items: center; margin-top: 8px; }
.set-row input { padding: 10px; text-align: center; }
.set-row .n { color: var(--muted); font-weight: 800; text-align: center; }
.check { width: 48px; height: 44px; border-radius: 12px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); padding: 0; font-size: 20px; }
.check.on { background: var(--y); color: var(--on-y); border-color: var(--y); }
.ex-card.done { border-color: var(--y); }
.rest-overlay { position: fixed; inset: 0; z-index: 50; background: var(--y); color: var(--on-y); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; animation: fade .2s; }
.rest-overlay .timer { font-size: 96px; }

/* Gráficos */
.chart { width: 100%; height: 160px; display: block; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .icon { font-size: 40px; margin-bottom: 8px; }
.spinner { width: 22px; height: 22px; border: 3px solid rgba(0,0,0,.2); border-top-color: #000; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.light { border-color: rgba(255,255,255,.15); border-top-color: var(--y); }
@keyframes spin { to { transform: rotate(360deg); } }
.scanner video { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 4/3; object-fit: cover; }
.grid2 > .card, .grid3 > .card { margin-top: 0; }

/* ---------- v2 ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grid4 .btn-sm { line-height: 1.25; padding: 10px 4px; }
.stat { font-size: 26px; font-weight: 900; }
.sticky-top { position: sticky; top: calc(8px + var(--safe-t)); z-index: 5; }
body.acting .sticky-top { top: calc(56px + var(--safe-t)); }
.bar.on-y { background: rgba(0,0,0,.15); }
.bar.on-y > i { background: var(--on-y); }
.btn-icon.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.check.sm { width: 34px; height: 30px; font-size: 14px; flex: none; }
.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scroll-x::-webkit-scrollbar { display: none; }
.scroll-x .chip { flex: none; text-decoration: none; }
.cups { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.cup { width: 16px; height: 22px; border: 2px solid #3a3a3a; border-top: 0; border-radius: 0 0 5px 5px; }
.cup.on { background: #4FC3F7; border-color: #4FC3F7; }
.brandbar { display: flex; align-items: center; gap: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; color: var(--y); }
.brandbar img { height: 34px; width: 34px; object-fit: contain; border-radius: 8px; background: #fff; }
#actbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--y); color: var(--on-y); padding: calc(8px + var(--safe-t)) 16px 8px; font-size: 14px; }
#actbar[hidden] { display: none; }
#tabbar a { position: relative; }
#tabbar .dot { position: absolute; top: 2px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg a { flex: 1; text-align: center; padding: 9px 4px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 13px; }
.seg a.on { background: var(--y); color: var(--on-y); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bdg { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; opacity: .45; filter: grayscale(1); }
.bdg.on { opacity: 1; filter: none; border-color: var(--y); }
.bdg .i { font-size: 28px; } .bdg .n { font-size: 12px; font-weight: 700; margin-top: 4px; } .bdg .p { font-size: 11px; color: var(--muted); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
.cal-h { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.cal-d { aspect-ratio: 1; padding: 0; border-radius: 10px; background: var(--card2); color: var(--text); flex-direction: column; gap: 2px; font-weight: 700; font-size: 13px; border: 2px solid transparent; }
.cal-d.in { border-color: var(--green); } .cal-d.over { border-color: var(--red); } .cal-d.today { background: #333; }
.cal-d i { display: flex; gap: 3px; height: 6px; }
.dot-y, .dot-b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--y); } .dot-b { background: #4FC3F7; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--green); vertical-align: middle; } .lg.over { border-color: var(--red); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.ph { position: relative; } .ph img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; display: block; cursor: pointer; }
.ph span, .compare span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.7); font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; } .compare div { position: relative; }
.compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; display: block; }
.photo-prev { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; margin-top: 10px; display: block; }
.photo-full { width: 100%; border-radius: 14px; display: block; }
.logo-prev { height: 48px; width: 48px; object-fit: contain; background: #fff; border-radius: 10px; }
.swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #333; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--y); color: var(--on-y); display: grid; place-items: center; font-weight: 900; font-size: 18px; flex: none; text-transform: uppercase; }
.red-badge { background: var(--red); color: #fff; margin-left: 4px; }
.shop { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; color: var(--text); font-size: 15px; font-weight: 500; }
.shop:last-child { border-bottom: 0; }
.shop input { width: 22px; height: 22px; padding: 0; flex: none; accent-color: var(--y); -webkit-appearance: auto; appearance: auto; }
.shop.got span { text-decoration: line-through; opacity: .5; }
details summary { cursor: pointer; } details ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 80px; }
.msg { max-width: 80%; background: var(--card2); padding: 10px 12px; border-radius: 16px 16px 16px 4px; align-self: flex-start; }
.msg.me { background: var(--y); color: var(--on-y); border-radius: 16px 16px 4px 16px; align-self: flex-end; }
.msg span { display: block; font-size: 10px; opacity: .6; margin-top: 4px; }
.chat-input { position: fixed; left: 0; right: 0; bottom: calc(66px + var(--safe-b)); display: flex; gap: 8px; padding: 10px 16px; background: rgba(11,11,11,.95); max-width: 560px; margin: 0 auto; z-index: 15; }

body.acting #app { padding-top: calc(64px + var(--safe-t)); }
input, select, textarea { min-width: 0; }
.grid2 > *, .grid3 > *, .grid4 > * { min-width: 0; }
input[type=date], input[type=time] { min-height: 46px; }
.water-head { display: flex; flex-direction: column; gap: 2px; }

/* ---------- v3: motivação, treino, social ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }
.xp-pop { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 65; background: var(--y); color: var(--on-y); font-weight: 900; font-size: 22px;
  padding: 10px 18px; border-radius: 99px; animation: xp 1.4s ease-out forwards; pointer-events: none; }
@keyframes xp { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.level-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.lvl { width: 48px; height: 48px; border-radius: 14px; background: var(--y); color: var(--on-y); display: grid; place-items: center; font-weight: 900; font-size: 22px; flex: none; transform: rotate(-4deg); }
.lvl.xl { width: 88px; height: 88px; font-size: 44px; border-radius: 24px; margin: 0 auto 10px; }
.level-big { text-align: center; }
.risk { display: flex; align-items: center; gap: 10px; background: #2a1a00; border-color: #7a5200; }
.quest { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.quest .qi { width: 30px; height: 30px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; flex: none; }
.quest.done .qi { background: var(--y); color: var(--on-y); font-weight: 900; }
.quest.done .grow { text-decoration: line-through; opacity: .6; }
.quote { font-style: italic; color: var(--muted); text-align: center; padding: 4px 12px; font-size: 14px; }
.pin { border-left: 4px solid var(--y); }
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.hub a, .hub button { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 4px; color: var(--text); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.hub span { font-size: 22px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; }
.week-strip div { text-align: center; background: var(--card); border-radius: 10px; padding: 6px 0; font-size: 11px; color: var(--muted); }
.week-strip div b { display: block; } .week-strip .has span { color: var(--y); } .week-strip .today { outline: 2px solid var(--y); }
.habit { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.dots { display: flex; gap: 3px; } .dots i { width: 7px; height: 7px; border-radius: 50%; background: #333; } .dots i.on { background: var(--y); }
.fast-time { font-size: 38px; font-weight: 900; letter-spacing: -0.03em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.interval { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; transition: background .3s; }
.interval.work { background: var(--y); color: var(--on-y); } .interval.rest { background: #1d2b3a; color: #fff; }
.interval .btn-dark { background: rgba(0,0,0,.85); color: #fff; }
.timer.big { font-size: 120px; line-height: 1; margin: 10px 0; }
.anim { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: #fff; }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s; }
.video { width: 100%; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 10px; display: block; }
.video iframe { width: 100%; height: 100%; border: 0; }
ol.steps { padding-left: 20px; margin: 0; } ol.steps li { margin-bottom: 8px; font-size: 14px; color: #ddd; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.lib-item img, .lib-item .noimg { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: #fff; display: grid; place-items: center; font-size: 28px; }
.lib-item .btn-sm { flex: 1; padding: 6px; }
.avail-row { display: grid; grid-template-columns: 70px 1fr 1fr 64px 24px; gap: 6px; align-items: center; margin-top: 8px; }
.avail-row input, .avail-row select { padding: 8px 6px; font-size: 14px; }
.me-row { background: var(--y-soft); border-radius: 10px; }

/* ---------- PT IA ---------- */
.ai-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-y); background: var(--y); border-color: var(--y); }
.avatar.ai { background: #fff; color: #000; font-size: 22px; }
.ai-card .avatar.ai { background: var(--on-y); }
.ai-head { position: sticky; top: calc(0px + var(--safe-t)); background: rgba(11,11,11,.95); z-index: 10; padding: 6px 0; }
.msg.ai { background: var(--card); border: 1px solid var(--line); max-width: 88%; }
.msg.ai-intro { background: var(--card); border: 1px solid var(--y); max-width: 92%; align-self: flex-start; border-radius: 16px 16px 16px 4px; padding: 12px 14px; }
.msg .li { padding-left: 4px; margin-top: 2px; } .msg .sp { height: 6px; }
.msg .act { display: block; margin-top: 8px; background: var(--y-soft); border: 1px solid var(--y); color: var(--y); padding: 8px 10px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 13px; }
.typing span { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.sugg { position: fixed; left: 0; right: 0; bottom: calc(126px + var(--safe-b)); padding: 0 16px; max-width: 560px; margin: 0 auto; z-index: 14; }
.sugg:empty { display: none; }
.sugg .chip { background: var(--card); white-space: nowrap; font-size: 13px; }
.chat:has(+ .sugg:not(:empty)) { padding-bottom: 140px; }
.msg { overflow-wrap: anywhere; }

/* ---------- O meu boneco ---------- */
.pf-photo { width: 64px; height: 64px; border-radius: 50%; padding: 0; overflow: hidden; background: var(--y); color: var(--on-y); font-size: 26px; font-weight: 900; flex: none; border: 3px solid var(--y); }
.pf-photo img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar { overflow: hidden; }
.btn-reset { font: inherit; color: inherit; text-align: left; border-radius: var(--r); padding: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 400; display: flex; }
.avatar-pair { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 8px; align-items: center; text-align: center; margin: 10px 0; }
.avatar-pair .btn-sm { margin-top: 6px; }
.ap-box { aspect-ratio: 3/4; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font-size: 40px; }
.ap-box.char { border-color: var(--y); }
.ap-box img { width: 100%; height: 100%; object-fit: cover; }
.ap-arrow { font-size: 22px; color: var(--y); font-weight: 900; }
.consent span { color: var(--muted); }
.poses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pose { padding: 0; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; color: var(--text); font-weight: 600; aspect-ratio: 3/4.6; }
.pose.has { border-style: solid; border-color: var(--y); }
.pose img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pose span { flex: 1; display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.pose small { font-size: 10px; padding: 4px; line-height: 1.2; }
.drawing { z-index: 80; }

/* ---------- v6 ---------- */
.hub { grid-template-columns: repeat(3, 1fr); }
.terms { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 12px; font-weight: 400; }
.terms input { width: 22px; height: 22px; flex: none; -webkit-appearance: auto; appearance: auto; accent-color: var(--y); padding: 0; margin-top: 2px; }
.terms a, .legal a { color: var(--y); }
.legal { line-height: 1.6; font-size: 15px; color: #ddd; } .legal h1 { font-size: 26px; } .legal h2 { font-size: 17px; margin-top: 20px; } .legal li { margin-bottom: 8px; }
.ob-dots { display: flex; gap: 6px; margin: 6px 0 10px; } .ob-dots i { flex: 1; height: 5px; border-radius: 9px; background: #333; } .ob-dots i.on { background: var(--y); }
.ob-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.ob-card { background: var(--card); border: 2px solid var(--line); color: var(--text); border-radius: 16px; padding: 14px 8px; flex-direction: column; gap: 4px; font-weight: 600; }
.ob-card span { font-size: 30px; } .ob-card small { color: var(--muted); font-weight: 500; font-size: 12px; }
.ob-card.on { border-color: var(--y); background: var(--y-soft); }
.ob-list { display: flex; flex-direction: column; gap: 8px; }
.ob-list a { display: grid; grid-template-columns: 34px 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--text); text-decoration: none; font-size: 24px; align-items: center; }
.ob-list a b { font-size: 16px; } .ob-list a small { grid-column: 2; color: var(--muted); font-size: 13px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 80px; } .spark i { flex: 1; background: var(--y); border-radius: 3px 3px 0 0; min-height: 2px; }
.coins { background: var(--card); border: 1px solid var(--y); color: var(--y); font-weight: 900; padding: 8px 14px; border-radius: 99px; }
.wr-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.wr-stage { position: relative; aspect-ratio: 3/4; background: var(--card); border: 2px solid var(--y); border-radius: 20px; overflow: hidden; display: grid; place-items: center; }
.wr-stage img { width: 100%; height: 100%; object-fit: cover; } .wr-stage img.dim { opacity: .45; }
.wr-stage .btn-sm { position: absolute; bottom: 10px; left: 10px; right: 10px; }
.wr-side { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.wr-equipped { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; } .wr-equipped span { width: 34px; height: 34px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-size: 18px; }
.wr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.wr-item { flex-direction: column; gap: 3px; background: var(--card); border: 2px solid var(--line); color: var(--text); border-radius: 16px; padding: 12px 6px; font-weight: 600; }
.wr-item span { font-size: 30px; } .wr-item b { font-size: 12px; line-height: 1.2; } .wr-item small { font-size: 11px; color: var(--muted); font-weight: 600; }
.wr-item.eq { border-color: var(--y); background: var(--y-soft); } .wr-item.locked { opacity: .65; }
.mini-bar { width: 80%; height: 4px; background: #333; border-radius: 9px; overflow: hidden; } .mini-bar i { display: block; height: 100%; background: var(--y); }
.story { position: fixed; inset: 0; z-index: 45; background: #0B0B0B; color: #fff; padding: calc(16px + var(--safe-t)) 22px 30px; display: flex; flex-direction: column; }
.story.yb { background: var(--y); color: var(--on-y); }
.story-bars { display: flex; gap: 4px; } .story-bars i { flex: 1; height: 4px; border-radius: 9px; background: rgba(128,128,128,.35); } .story-bars i.done, .story-bars i.on { background: currentColor; }
.story-x { position: absolute; right: 18px; top: calc(30px + var(--safe-t)); color: inherit; text-decoration: none; font-size: 22px; }
.story-img { flex: 1; display: grid; place-items: center; margin-top: 30px; min-height: 0; } .story-img img { max-height: 100%; max-width: 80%; border-radius: 24px; border: 4px solid var(--y); }
.story-body { margin-top: auto; padding-bottom: 20px; }
.story-big { font-size: 72px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.story-title { font-size: 24px; font-weight: 800; margin-top: 6px; text-transform: uppercase; } .story-sub { font-size: 16px; opacity: .8; margin-top: 10px; }
.story-actions { display: flex; gap: 8px; } .story.yb .btn-dark { background: #000; color: #fff; }
.cam { position: fixed; inset: 0; z-index: 60; background: #000; }
.cam video, .cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-top { position: absolute; top: calc(12px + var(--safe-t)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; color: #fff; }
.cam-count { position: absolute; top: 18%; left: 0; right: 0; text-align: center; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.cam-count div { font-size: 140px; font-weight: 900; line-height: 1; color: var(--y); } .cam-count small { font-size: 18px; font-weight: 700; }
.cam-tip { position: absolute; bottom: 110px; left: 20px; right: 20px; text-align: center; color: #fff; background: rgba(0,0,0,.55); padding: 8px; border-radius: 12px; }
.cam-bottom { position: absolute; bottom: calc(30px + var(--safe-b)); left: 20px; right: 20px; } .cam-bottom .btn-sm { width: 100%; padding: 14px; }
.frames { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 10px; } .frames img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-top: 10px; }
.post-img { width: 100%; border-radius: 14px; margin-top: 10px; max-height: 420px; object-fit: cover; display: block; }
.reacts { display: flex; gap: 6px; margin-top: 10px; } .reacts button { background: var(--card2); color: var(--text); padding: 6px 10px; border-radius: 99px; font-size: 14px; border: 1px solid var(--line); font-weight: 600; }
.reacts button.on { border-color: var(--y); background: var(--y-soft); }
.avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.buddy { border-color: var(--y); }
.duo-panel { margin-top: 10px; background: rgba(0,0,0,.85); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.duo-code { font-size: 44px; font-weight: 900; letter-spacing: .2em; text-align: center; color: var(--y); margin-top: 10px; }
