/* Bloom — lilás + rosa, mobile-first. Visual calmo: superfícies claras, ícones de traço fino, cor só onde importa. */
:root {
  --bg: #faf7fc;
  --ink: #2a2236;
  --ink-soft: #7c7189;
  --ink-faint: #a69daf;
  --line: rgba(60, 40, 90, .09);
  --line-strong: rgba(60, 40, 90, .16);
  --surface: #ffffff;
  --surface-2: #f4eff8;
  --purple: #7c5cd6;
  --pink: #e05a9a;
  --accent: #8b5cf6;
  --grad: linear-gradient(135deg, #8b6cf0 0%, #c47bdc 55%, #ec7fb2 100%);
  --grad-soft: linear-gradient(135deg, #f1ebff 0%, #fbeaf3 100%);
  --c0: #ffffff;
  --c1: #f7f3ff;
  --c2: #fff4f9;
  --c3: #f3f4ff;
  --c4: #fdf6fb;
  --shadow: 0 1px 2px rgba(40, 20, 70, .05), 0 6px 18px -10px rgba(60, 30, 110, .18);
  --shadow-lg: 0 10px 40px -12px rgba(40, 20, 70, .35);
  --tape: rgba(236, 127, 178, .3);
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141118;
    --ink: #f2edf7;
    --ink-soft: #a89cb6;
    --ink-faint: #75697f;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .16);
    --surface: #1e1a24;
    --surface-2: #26212d;
    --purple: #b59cff;
    --pink: #f48fbf;
    --grad-soft: linear-gradient(135deg, #2a2238 0%, #33222f 100%);
    --c0: #1e1a24;
    --c1: #211c2b;
    --c2: #261d26;
    --c3: #1d1d2b;
    --c4: #231c26;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px -12px rgba(0, 0, 0, .6);
    --tape: rgba(244, 143, 191, .22);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; max-width: 100%; }
/* nada pode arrastar a tela para o lado (Android instalado). clip não cria rolagem própria, então o sticky continua funcionando */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
@supports not (overflow: clip) { body { overflow-x: hidden; } html { overflow-x: visible; } }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  font-size: 15px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--purple); }
.hidden { display: none !important; }
.i { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -0.25em; }
small { font-weight: 500; color: var(--ink-faint); text-transform: none; letter-spacing: 0; }

/* ───── topo ───── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--safe-t) + 12px) 18px 10px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 28px; letter-spacing: -.6px; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.top .conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); opacity: .5; transition: .3s; }
.top .conn.on { background: #34c38f; opacity: 1; box-shadow: 0 0 0 4px rgba(52, 195, 143, .15); }

/* ───── abas ───── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: center;
  padding: 6px 12px calc(var(--safe-b) + 6px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 72px; padding: 6px 10px; border-radius: 14px;
  font-size: 11px; font-weight: 600; color: var(--ink-faint); transition: color .2s;
}
.tab .ico { width: 24px; height: 24px; stroke-width: 1.7; }
.tab.active { color: var(--ink); }
.tab.active .ico { stroke-width: 2.1; color: var(--purple); }
.tab .badge {
  position: absolute; top: 2px; right: 18px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}
.fab {
  position: fixed; right: 18px; bottom: calc(var(--safe-b) + 76px); z-index: 25;
  width: 56px; height: 56px; border-radius: 18px; background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  box-shadow: 0 10px 28px -8px rgba(40, 20, 70, .55);
  transition: transform .15s;
}
.fab .i { width: 26px; height: 26px; stroke-width: 2.2; }
.fab:active { transform: scale(.92); }

main { padding: 16px 16px calc(var(--safe-b) + 170px); max-width: 1100px; margin: 0 auto; }

.pill-new {
  position: fixed; top: calc(var(--safe-t) + 62px); left: 50%; transform: translateX(-50%); z-index: 30;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow-lg);
  animation: drop .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ───── mural orgânico (masonry): posições calculadas por pack() em app.js ───── */
.board { position: relative; min-height: 120px; }
.card, .wd { position: absolute; left: 0; top: 0; margin: 0; min-width: 0; transition: top .35s cubic-bezier(.2, .9, .3, 1), left .35s cubic-bezier(.2, .9, .3, 1); }
.card {
  --rot: 0deg;
  container-type: inline-size;
  background: var(--c0); border-radius: var(--radius); padding: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transform: rotate(calc(var(--rot) * .5));
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), top .35s cubic-bezier(.2, .9, .3, 1), left .35s cubic-bezier(.2, .9, .3, 1);
  animation: pop .45s cubic-bezier(.2, 1.1, .4, 1) both;
}
.card.c1 { background: var(--c1); } .card.c2 { background: var(--c2); }
.card.c3 { background: var(--c3); } .card.c4 { background: var(--c4); }
.card:active { transform: rotate(0deg) scale(.985); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) rotate(calc(var(--rot) * .5)) scale(.97); } }
.card .tape {
  position: absolute; top: -8px; left: 50%; width: 60px; height: 18px; margin-left: -30px; z-index: 1;
  background: var(--tape); border-radius: 2px; transform: rotate(var(--tape-rot, -3deg));
  backdrop-filter: blur(2px);
}
.card.hl { outline: 2px solid var(--pink); outline-offset: 3px; }

/* widgets do painel */
.wd {
  container-type: inline-size; text-align: left; display: block; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}
.wd-hello { background: var(--grad-soft); padding: 16px 16px 14px; }
.wd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wd-kicker { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.wd-name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 28px; line-height: 1.1; letter-spacing: -.4px; }
.wd-people { display: flex; flex: none; padding-left: 8px; }
.wd-people .avatar { margin-left: -9px; width: 32px; height: 32px; box-shadow: 0 0 0 2px var(--surface); }
.wd-people .avatar.more { background: var(--surface); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.wd-chips { display: flex; gap: 6px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.wd-chips::-webkit-scrollbar { display: none; }
.fchip { flex: none; padding: 7px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink-soft); font-weight: 600; font-size: 13px; border: 1px solid var(--line); }
.fchip.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.wd-music { padding: 0; overflow: hidden; color: #fff; min-height: 150px; border: 0;
  background: linear-gradient(135deg, #6d5bb8, #b7699a) center / cover; }
.wd-music .shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 8, 25, .85), rgba(15, 8, 25, .05) 72%); }
.wd-music .in { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; height: 100%; padding: 12px; }
.wd-music .kk { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; opacity: .85; display: flex; gap: 6px; align-items: center; }
.wd-music .kk i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.wd-music .tt { font-weight: 700; font-size: 14.5px; line-height: 1.25; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-music .by { font-size: 12px; opacity: .8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-music.empty-m { display: grid; place-items: center; text-align: center; font-weight: 600; font-size: 13px; background: var(--surface); color: var(--ink-faint); border: 1px dashed var(--line-strong); box-shadow: none; }
.wd-music.empty-m .i { width: 26px; height: 26px; margin-bottom: 6px; }
.wd-week h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .7px; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.stat { display: flex; align-items: baseline; gap: 7px; margin: 2px 0 6px; }
.stat b { font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1; color: var(--ink); min-width: 1.1ch; }
.stat span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.board .none { position: absolute; text-align: center; padding: 30px 10px; color: var(--ink-soft); font-weight: 600; }

.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.avatar.ph { background: var(--surface-2) !important; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.lg { width: 56px; height: 56px; font-size: 28px; }
.who .nm { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .tm { font-size: 11.5px; color: var(--ink-faint); }
.who .col { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }

.txt { margin: 10px 0 0; font-size: 15px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.txt.big { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(17px, 10cqi, 28px); line-height: 1.22; letter-spacing: -.3px; }
.txt.big.xl { font-size: clamp(20px, 15cqi, 38px); }
.mention { color: var(--purple); font-weight: 700; }

.media { display: grid; gap: 3px; margin-top: 10px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.media.n1 { grid-template-columns: 1fr; }
.media.n2, .media.n4, .media.n3 { grid-template-columns: 1fr 1fr; }
.media.n3 > :first-child { grid-column: 1 / -1; }
.media > img, .media video { display: block; width: 100%; height: auto; object-fit: cover; background: #0001; }
.media.n1 > img, .media.n1 video { max-height: 460px; }
.media.n2 > img, .media.n4 > img, .media.n3 > img:not(:first-child) { aspect-ratio: 1; }
.media.n3 > img:first-child { aspect-ratio: 16 / 10; }
/* foto com GIFs por cima: sem recorte, para os GIFs ficarem no lugar certo */
.phx { position: relative; overflow: hidden; width: 100%; }
.phx > img.base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.phx > img.ov { position: absolute; height: auto; max-width: none; pointer-events: none; }
.media .vid { position: relative; }
.media .vid::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; pointer-events: none;
  background: rgba(15, 10, 25, .45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 22px no-repeat;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.media .vid.playing::after { display: none; }

.linkchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 10px;
  padding: 6px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600; text-decoration: none; overflow: hidden;
}
.linkchip .i { width: 14px; height: 14px; }
.linkchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───── cartão do Spotify ───── */
.sp {
  position: relative; margin-top: 10px; border-radius: 16px; overflow: hidden; color: #fff;
  background: #1f1a29;
}
.sp-row { display: flex; align-items: center; gap: 12px; padding: 9px; width: 100%; text-align: left; }
.sp-cover {
  flex: none; width: 56px; height: 56px; border-radius: 10px; background: rgba(255, 255, 255, .1) center / cover;
  display: grid; place-items: center;
}
.sp-cover .i { width: 24px; height: 24px; opacity: .7; }
.sp-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.sp-meta { flex: 1; min-width: 0; }
.sp-kind { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; opacity: .65; display: flex; gap: 5px; align-items: center; }
.sp-kind i { width: 7px; height: 7px; border-radius: 50%; background: #1ed760; display: inline-block; }
.sp-title { font-weight: 700; font-size: 14px; line-height: 1.25; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-artist { font-size: 12px; opacity: .7; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-play { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #1f1a29; display: grid; place-items: center; }
.sp-play .i { width: 15px; height: 15px; fill: currentColor; margin-left: 2px; }
.sp iframe { display: block; width: 100%; border: 0; background: transparent; }
@container (max-width: 240px) {
  .sp-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
  .sp-cover { width: 100%; height: auto; aspect-ratio: 1; }
  .sp-play { width: 32px; height: 32px; }
}

/* busca do Spotify (compositor e comentários) */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.chip.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.sp-pick .chips { margin-top: 8px; }
.sp-res { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 38dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sp-item { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 12px; background: transparent; text-align: left; width: 100%; }
.sp-item:hover, .sp-item.playing { background: var(--surface-2); }
.sp-item .sp-cover { position: relative; width: 44px; height: 44px; border-radius: 8px; background-color: var(--surface-2); color: var(--ink-soft); }
/* play por cima da capa: abre a prévia */
.sp-item .pv > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 8px; background: rgba(15, 10, 25, .38); color: #fff; }
.sp-item .pv > span .i { width: 18px; height: 18px; fill: currentColor; }
.sp-item.playing .pv > span { background: rgba(15, 10, 25, .6); }
.sp-item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.sp-prev { padding: 4px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.sp-prev iframe { display: block; width: 100%; border: 0; border-radius: 12px; background: transparent; }
.sp-item b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-item i { font-style: normal; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-item .add { color: var(--ink-soft); padding: 0 6px; display: grid; }

.foot { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.act {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 999px;
  font-weight: 600; font-size: 13px; color: var(--ink-soft); transition: .15s;
}
.act .i { width: 19px; height: 19px; }
.act:active { transform: scale(.9); }
.act.on { color: var(--pink); }
.act.on .h { fill: currentColor; animation: beat .4s; }
@keyframes beat { 40% { transform: scale(1.35); } }

.empty { text-align: center; padding: 60px 24px; color: var(--ink-soft); }
.empty .big .i { width: 42px; height: 42px; stroke-width: 1.3; color: var(--ink-faint); }
.empty h3 { color: var(--ink); margin: 10px 0 4px; }
.more { display: block; margin: 20px auto 0; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; color: var(--ink-soft); }

/* ───── sheets (composer / post) ───── */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(15, 8, 25, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 640px; margin: 0 auto;
  max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
  animation: up .32s cubic-bezier(.2, .9, .3, 1); padding-bottom: var(--safe-b);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet .grab { width: 38px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 10px auto 4px; flex: none; }
.sheet .hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 10px; flex: none; }
.sheet .hd h2 { margin: 0; font-size: 19px; font-family: var(--serif); font-style: italic; font-weight: 700; }
.sheet .bd { padding: 0 18px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.x { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-soft); }
.x .i { width: 18px; height: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px; font-weight: 700; background: var(--ink); color: var(--bg);
  transition: .15s;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.sm { padding: 9px 14px; border-radius: 12px; font-size: 13px; }
.btn.block { width: 100%; }
#pub, .welcome #go { background: var(--grad); color: #fff; }

textarea.in, input.in {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px;
  padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.in:focus, input.in:focus { border-color: var(--purple); box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 18%, transparent); }
textarea.in { resize: none; min-height: 110px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); margin: 0 0 6px 4px; letter-spacing: .4px; }
.count { text-align: right; font-size: 12px; color: var(--ink-faint); margin: 4px 6px 0 0; }
.count.warn { color: var(--pink); font-weight: 700; }

.tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.tool .i { width: 17px; height: 17px; color: var(--ink); }
.tool:active { transform: scale(.95); }

.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.thumb { position: relative; flex: none; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb > button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(15, 10, 25, .6); color: #fff; display: grid; place-items: center; }
.thumb > button .i { width: 13px; height: 13px; }
.thumb .pg { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--pink); transition: width .15s; }
.thumb .ed-badge { position: absolute; left: 4px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; background: rgba(15, 10, 25, .7); color: #fff; font-size: 10.5px; font-weight: 600; backdrop-filter: blur(4px); }
.thumb .ed-badge .i { width: 11px; height: 11px; }
.thumbs-hint { font-size: 12px; color: var(--ink-faint); margin: -2px 2px 6px; }

.mention-list { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.mchip { flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; font-size: 13px; }
.mchip .avatar { width: 26px; height: 26px; font-size: 14px; }

.cm { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cm:first-child { border-top: 0; }
.cm .body { flex: 1; min-width: 0; }
.cm .nm { font-weight: 700; font-size: 13px; }
.cm .tm { font-size: 11px; color: var(--ink-faint); margin-left: 6px; }
.cm .t { font-size: 14.5px; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cm .del { color: var(--ink-faint); margin-left: auto; align-self: flex-start; }
.cm .del .i { width: 15px; height: 15px; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; padding: 10px 18px 14px; border-top: 1px solid var(--line); flex: none; background: var(--bg); }
.composer-row .in { min-height: 0; height: 44px; padding: 10px 16px; border-radius: 22px; }
.round { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink-soft); }
.round .i { width: 20px; height: 20px; }
.round.go { background: var(--ink); color: var(--bg); border: 0; }
.likers { font-size: 12.5px; color: var(--ink-soft); margin: 8px 2px 0; }

/* ───── avisos / eu ───── */
.list { display: flex; flex-direction: column; gap: 8px; }
.nt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; }
.nt.unread { background: var(--grad-soft); border-color: transparent; }
.nt .tx { flex: 1; font-size: 14px; }
.nt .tx b { font-weight: 700; }
.nt .tm { font-size: 11.5px; color: var(--ink-faint); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 12px; }
.panel h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15.5px; font-weight: 700; }
.panel h3 .i { width: 19px; height: 19px; color: var(--purple); }
.panel p { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.panel ol { margin: 0 0 12px; padding-left: 20px; font-size: 14px; }
.panel.admin { background: var(--grad-soft); border-color: transparent; }
.panel.admin p { margin: 0; }
.panel li { margin: 4px 0; }
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.me-head .nm { font-size: 22px; font-weight: 700; font-family: var(--serif); font-style: italic; }
.me-head .hd2 { color: var(--ink-soft); font-weight: 600; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-weight: 600; font-size: 14.5px; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line-strong); position: relative; transition: .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked { background: var(--purple); }
.switch input:checked::after { left: 21px; }

/* ───── boas-vindas / convite / login ───── */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 28px 22px calc(var(--safe-b) + 28px); max-width: 440px; margin: 0 auto; }
.welcome .logo { font-size: 60px; text-align: center; margin-bottom: 6px; }
.welcome .tag { text-align: center; color: var(--ink-soft); font-weight: 500; margin: 0 0 26px; }
.welcome .fine { text-align: center; color: var(--ink-faint); font-size: 13px; margin: 6px 8px 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.sw { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: .15s; }
.sw.on { outline: 2px solid var(--ink); outline-offset: 3px; }
.emojis { display: flex; gap: 6px; flex-wrap: wrap; }
.em { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 22px; display: grid; place-items: center; }
.em.on { border-color: var(--ink); background: var(--surface-2); }
.err { color: #d83a5f; font-weight: 600; font-size: 13.5px; margin: 8px 4px; }
.err:empty { display: none; }

/* seletor de foto de perfil */
.pp { display: flex; align-items: center; gap: 16px; }
.pp-c { position: relative; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 38px; overflow: visible; }
.pp-c > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pp-c > i { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.pp-c > i .i { width: 16px; height: 16px; }
.pp-b { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 92px); transform: translate(-50%, 20px); z-index: 99;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; max-width: 86vw; text-align: center; box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ───── stories, hashtags e perfil ───── */
.avatar.st { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--pink); cursor: pointer; overflow: visible; }
.avatar.st.st-seen { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--line-strong); }
.avatar.lg.st { margin: 4px; }
.wd-stories { padding: 12px 10px 8px; }
.st-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 2px 6px 4px; }
.st-row::-webkit-scrollbar { display: none; }
.st-item { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.st-item .avatar.lg { position: relative; width: 56px; height: 56px; overflow: visible; }
.st-item .nm { font-size: 11.5px; font-weight: 600; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.st-item .plus { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.st-item .plus .i { width: 14px; height: 14px; stroke-width: 2.4; }
.wd-tagbar { padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.tag-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; align-items: center; width: 100%; }
.tag-row::-webkit-scrollbar { display: none; }
.tagnow { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 22px; flex: 1; }
.tagnow.soft { flex: none; font-size: 20px; color: var(--ink-faint); }
.hashtag { display: inline-flex; align-items: baseline; gap: 5px; flex: none; padding: 2px 10px 3px; border-radius: 999px; background: var(--surface-2); color: var(--purple); font-weight: 600; font-size: .92em; }
.hashtag small { font-size: 10.5px; opacity: .7; }
.txt .hashtag { padding: 0 7px 1px; font-size: .95em; vertical-align: baseline; }
.mention[data-profile] { cursor: pointer; }
.who[data-profile], .cm [data-profile] { cursor: pointer; }
.wd-prof { padding: 14px 16px 16px; }
.wd-prof .back { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--ink-soft); font-size: 14px; padding: 2px 8px 8px 0; }
.wd-prof .back .i { width: 18px; height: 18px; }
.prof-top { display: flex; align-items: center; gap: 14px; }
.prof-top .avatar.lg { width: 76px; height: 76px; font-size: 40px; margin: 4px; }
.prof-name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 26px; line-height: 1.1; }
.prof-handle { color: var(--ink-soft); font-weight: 600; font-size: 14px; }
.prof-bio { margin: 12px 0 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prof-stats { display: flex; gap: 8px; margin-top: 14px; }
.prof-stats > div { flex: 1; text-align: center; background: var(--surface-2); border-radius: 12px; padding: 8px 4px; }
.prof-stats b { display: block; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.1; }
.prof-stats span { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.prof-music { margin-top: 14px; }
.prof-k { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.prof-mini .row2 { display: flex; gap: 8px; margin-top: 12px; }
.prof-mini .row2 .btn { flex: 1; }
button.mchip { cursor: pointer; }

/* visualizador de stories */
.sv { position: fixed; inset: 0; z-index: 90; background: #0c0a10; color: #fff; display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.sv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sv-media > img, .sv-media video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sv-media .phx { max-height: 100dvh; }
.sv-bars { position: absolute; z-index: 3; left: 10px; right: 10px; top: calc(var(--safe-t) + 8px); display: flex; gap: 4px; }
.sv-bars i { flex: 1; height: 2.5px; border-radius: 3px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sv-bars b { display: block; height: 100%; background: #fff; width: 0; }
.sv-head { position: absolute; z-index: 3; left: 12px; right: 12px; top: calc(var(--safe-t) + 20px); display: flex; align-items: center; gap: 10px; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.sv-head .col { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.sv-head .nm { font-weight: 700; font-size: 14px; }
.sv-head .tm { font-size: 12px; opacity: .8; }
.sv-head .x { background: rgba(0, 0, 0, .35); color: #fff; }
.sv-foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(var(--safe-b) + 16px); display: flex; justify-content: center; gap: 10px; }
.sv-foot button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-weight: 600; font-size: 14px; backdrop-filter: blur(8px); }
.sv-foot .i { width: 17px; height: 17px; }
.sv-views { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; max-height: 55dvh; overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 22px 22px 0 0; padding: 14px 18px calc(var(--safe-b) + 18px); }
.sv-views .hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sv-views .vw { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 600; }
@media (min-width: 700px) { .sv-media > img, .sv-media video { max-width: 460px; } .sv-media .phx { max-width: 460px; } .sv { background: rgba(12, 10, 16, .95); } }

/* desktop: abas no topo */
@media (min-width: 900px) {
  .tabs { top: 0; bottom: auto; left: auto; right: 18px; width: auto; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: calc(var(--safe-t) + 8px) 0 0; z-index: 25; gap: 4px; }
  .tab { flex-direction: row; gap: 7px; min-width: 0; padding: 8px 14px; font-size: 13.5px; }
  .tab .ico { width: 19px; height: 19px; }
  .tab.active { background: var(--surface-2); }
  .tab .badge { position: static; margin-left: 2px; box-shadow: none; }
  .fab { bottom: 28px; right: 28px; }
  main { padding-bottom: 80px; }
}

/* ═════════════════════ finanças ═════════════════════ */
:root {
  --fin-bg: #f6f5f9;
  --fin-inc: #6250d6;   /* receitas (validado com despesas: CVD e visão normal) */
  --fin-exp: #e87ba4;   /* despesas */
  --fin-bar: #8b7ad8;   /* barras de uma série só */
  --fin-crit: #d03b3b;
  --fin-warn: #b7791f;
}
@media (prefers-color-scheme: dark) {
  :root { --fin-bg: #110f15; --fin-inc: #9085e9; --fin-exp: #d55181; --fin-bar: #9085e9; --fin-crit: #e66767; --fin-warn: #fab219; }
}
body.fin-mode { background: var(--fin-bg); }
body.fin-mode .top { background: color-mix(in srgb, var(--fin-bg) 85%, transparent); }
body.fin-mode .top .logo::after { content: " finanças"; font-family: var(--font); font-style: normal; font-weight: 700; font-size: 13px; letter-spacing: .3px; color: var(--ink-soft); -webkit-text-fill-color: var(--ink-soft); margin-left: 4px; }
.fin { max-width: 980px; margin: 0 auto; }
.fin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 2px 14px; }
.fin-title { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 30px; letter-spacing: -.5px; line-height: 1; display: flex; flex-direction: column; }
.fin-title small { font-family: var(--font); font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--ink-faint); letter-spacing: .2px; margin-top: 4px; }
.fin-month { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 3px; }
.fm-b { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--ink-soft); }
.fm-b:active { background: var(--surface-2); }
.fm-b .i { width: 18px; height: 18px; }
.fm-l { padding: 0 8px; font-weight: 700; font-size: 14px; min-width: 120px; text-align: center; }
.fin-subs { position: sticky; top: calc(var(--safe-t) + 55px); z-index: 10; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: 0 -2px 14px; background: color-mix(in srgb, var(--fin-bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 14px; }
.fin-subs::-webkit-scrollbar { display: none; }
.fin-subs button { flex: none; padding: 8px 14px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.fin-subs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.fin-loading { display: flex; justify-content: center; gap: 6px; padding: 60px 0; }
.fin-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-faint); animation: blink 1s infinite alternate; }
.fin-loading span:nth-child(2) { animation-delay: .2s; } .fin-loading span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { to { opacity: .2; } }

.fin-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.fin-one { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto; min-width: 0; }
.fin-one > * { min-width: 0; }
@media (min-width: 760px) {
  .fin-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .fin-grid > .hero, .fin-grid > .fin-quick { grid-column: 1 / -1; }
}
.fc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.fc h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.fc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.fc-h h3 { margin: 0; }
.fc.hero { background: var(--ink); color: var(--bg); border: 0; padding: 20px; }
.fc.hero .k { font-size: 12.5px; font-weight: 600; opacity: .7; }
.fc.hero .big { font-size: 38px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.1; margin: 4px 0 14px; }
.fc.hero .big.neg, .hero .neg { color: #ff9db5; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.hero-row > div { background: color-mix(in srgb, var(--bg) 10%, transparent); border-radius: 14px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.hero-row > div .lg { display: inline-block; vertical-align: middle; margin-right: 6px; }
.hero-row b { font-size: 17px; font-weight: 700; }
.hero-foot { margin-top: 12px; font-size: 12.5px; opacity: .8; line-height: 1.5; }
.fc.hero.soft { background: var(--grad-soft); color: var(--ink); border: 1px solid var(--line); }
.fc.hero.soft .k, .fc.hero.soft .hero-foot { opacity: 1; color: var(--ink-soft); }
.fc.hero.soft .hero-foot b { color: var(--ink); }
.lg { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.lg.inc { background: var(--fin-inc); } .lg.exp { background: var(--fin-exp); }
.fc.hero .lg.inc { background: #b3a8ff; } .fc.hero .lg.exp { background: #f5a3c4; }

.fin-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fin-quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.fin-quick button .i { width: 22px; height: 22px; color: var(--purple); }
.fin-quick button:active { transform: scale(.96); }

.fin-empty { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-soft); }
.fin-empty.center, .fin-hint.center { text-align: center; }
.fin-hint { margin: 10px 2px 0; font-size: 12px; color: var(--ink-faint); }
.fin-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--purple); }
.fc-h .fin-link { margin: 0; }
.fin-link .i { width: 16px; height: 16px; }
.cdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.neg { color: var(--fin-crit); }

/* ranking por categoria */
.cbars { display: flex; flex-direction: column; gap: 12px; }
.cb-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.cb-top span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-top b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-top em { font-style: normal; font-size: 12px; color: var(--ink-faint); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.cb-track, .pr-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.cb-track i, .pr-track i { display: block; height: 100%; border-radius: 4px; background: var(--fin-bar); }
.pr-track.near i { background: var(--fin-warn); }
.pr-track.over i { background: var(--fin-crit); }
.fc.hero .pr-track { background: color-mix(in srgb, var(--ink) 10%, transparent); margin-top: -4px; }

/* gráfico de 6 meses */
.hchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.hc-legend { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.hc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hchart .grid { stroke: var(--line); stroke-width: 1; }
.hchart .base { stroke: var(--line-strong); stroke-width: 1; }
.hchart .ax { font-size: 9px; fill: var(--ink-faint); font-family: var(--font); }
.hchart .ml { font-size: 10.5px; fill: var(--ink-faint); font-weight: 600; font-family: var(--font); }
.hchart .hg.on .ml { fill: var(--ink); }
.hchart path.inc { fill: var(--fin-inc); } .hchart path.exp { fill: var(--fin-exp); }
.hchart .hsel { fill: var(--surface-2); }
.hchart .hit { fill: transparent; cursor: pointer; }
.hc-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hc-tip b { width: 100%; font-size: 12px; color: var(--ink-soft); }
.hc-tip span { display: inline-flex; align-items: center; gap: 6px; }
.hc-table { margin-top: 8px; font-size: 12.5px; overflow-x: auto; }
.hc-table summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.hc-table table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.hc-table th, .hc-table td { text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.hc-table th:first-child, .hc-table td:first-child { text-align: left; }
.hc-table th { font-weight: 600; color: var(--ink-faint); font-size: 11.5px; }

/* linhas e progresso */
.rows { display: flex; flex-direction: column; }
.trow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.rows > :last-child { border-bottom: 0; }
.trow > .i { width: 16px; height: 16px; color: var(--ink-faint); }
.tr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.tr-d { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; overflow: hidden; }
.tr-d small { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow b, .tr-main b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
b.income { color: var(--fin-inc); }
b.expense { color: var(--ink); }
.trow.rec.paid .tr-d { color: var(--ink-soft); }
.trow.rec.paid b { opacity: .6; }
.chk { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: #fff; }
.trow.paid .chk { background: var(--purple); border-color: var(--purple); }
.chk .i { width: 15px; height: 15px; stroke-width: 2.6; }
.mini-pay { flex: none; padding: 6px 11px; border-radius: 10px; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.day { margin-top: 4px; }
.day-h { font-size: 11.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .5px; margin: 10px 2px 2px; }
.lanc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lanc-top .chips { padding: 0; }
.lanc-sum { display: flex; gap: 16px; font-size: 13px; color: var(--ink-soft); padding: 0 4px; }
.lanc-sum b { margin-left: 4px; }
.prow { padding: 8px 0; }
.pr-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 6px; }
.pr-top span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-top b { font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-top small { color: var(--ink-faint); font-weight: 500; }
.prow .st { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.prow .st .i { width: 14px; height: 14px; }
.prow .st.warn { color: var(--fin-warn); } .prow .st.crit { color: var(--fin-crit); }
.poup-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.poup-total b { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.poup-total span { font-size: 12.5px; color: var(--ink-soft); }

/* planejar */
.plan-list { display: flex; flex-direction: column; }
.plan-row { display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.pl-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; }
.pl-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-top small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ink-faint); white-space: nowrap; }
.plan-row .pr-track { grid-column: 1 / -1; height: 6px; }
.money-in { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 0 14px; transition: border-color .15s, box-shadow .15s; }
.money-in:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px color-mix(in srgb, var(--purple) 18%, transparent); }
.money-in span { font-weight: 700; color: var(--ink-faint); }
.money-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 0; font-size: 16px; font-variant-numeric: tabular-nums; }
.money-in input.big { font-size: 28px; font-weight: 800; letter-spacing: -.5px; padding: 10px 0; }
.money-in.sm { border-radius: 10px; padding: 0 10px; }
.money-in.sm input { padding: 8px 0; font-size: 15px; text-align: right; }

/* poupanças */
.goal .g-top { display: flex; align-items: center; gap: 14px; }
.g-ring { --p: 0; --c: var(--purple); flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); }
.g-ring b { font-size: 12.5px; font-weight: 800; }
.g-id { flex: 1; min-width: 0; }
.g-id h3 { margin: 0 0 2px; font-size: 16px; }
.g-id span { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.g-note { margin: 12px 0 0; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.g-note b { color: var(--ink); }
.g-note.done { color: var(--purple); font-weight: 700; }
.g-note .i { width: 16px; height: 16px; }
.g-btns { display: flex; gap: 8px; margin-top: 12px; }
.g-btns .btn { flex: 1; }
.fin-ib { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-soft); }
.fin-ib:active { background: var(--surface-2); }
.fin-ib .i { width: 18px; height: 18px; }

/* vales */
.wallets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .wallets { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.wcard { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; color: #fff; background: linear-gradient(135deg, #5b4bc4, #8b5cf6); box-shadow: var(--shadow); }
.wcard::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
.wcard.k-food { background: linear-gradient(135deg, #0f766e, #10b981); }
.wcard.k-transport { background: linear-gradient(135deg, #1d4ed8, #0ea5e9); }
.w-top { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; }
.fin-ib.light { color: rgba(255, 255, 255, .85); }
.w-k { margin-top: 14px; font-size: 12px; font-weight: 600; opacity: .75; }
.w-bal { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; opacity: .85; }
.w-row span { display: flex; flex-direction: column; }
.w-row b { font-size: 14px; font-weight: 700; }
.w-btns { position: relative; z-index: 1; display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.w-btns button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 11px; background: rgba(255, 255, 255, .18); font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); }
.w-btns button:first-child { background: #fff; color: #111; }
.w-btns .i { width: 15px; height: 15px; }
.mini-wallets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 8px; }
.mw { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; padding: 12px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #5b4bc4, #8b5cf6); }
.mw.k-food { background: linear-gradient(135deg, #0f766e, #10b981); }
.mw.k-transport { background: linear-gradient(135deg, #1d4ed8, #0ea5e9); }
.mw span { font-size: 11.5px; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mw small { font-size: 11px; opacity: .8; color: #fff; overflow-wrap: anywhere; }

/* formulários das finanças */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.seg2 button { padding: 10px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.seg2 button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.cat-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; }
.cchip.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.cchip small { opacity: .7; }
.cchip.add { color: var(--purple); border-style: dashed; }
.cchip .i { width: 14px; height: 14px; }
.newcat { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); align-items: flex-start; }
.swatches.sm .sw { width: 26px; height: 26px; }
.row2f { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.btn.danger { color: var(--fin-crit); }
.menu { display: flex; flex-direction: column; }
.mi { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.mi:last-child { border-bottom: 0; }
.mi .i { width: 20px; height: 20px; color: var(--ink-soft); }
.mi.danger, .mi.danger .i { color: var(--fin-crit); }
.fin-sheet input[type=date], .fin-sheet input[type=month] { min-height: 46px; }
/* "até quando?" da fixa: sem fim · parcelas · mês final */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg3 button { padding: 9px 4px; border-radius: 11px; font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.seg3 button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.parc { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.parc button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.parc button .i { width: 18px; height: 18px; }
.parc input { width: 72px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.parc span { flex: 1; font-weight: 600; color: var(--ink-soft); }
.mcal { margin-top: 10px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.mc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mc-h b { font-size: 15px; font-variant-numeric: tabular-nums; }
.mc-h button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.mc-h button .i { width: 18px; height: 18px; }
.mc-h button:disabled { opacity: .3; }
.mc-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mc-g button { padding: 10px 0; border-radius: 10px; background: var(--surface); font-weight: 600; font-size: 13.5px; text-transform: capitalize; }
.mc-g button.in { background: color-mix(in srgb, var(--purple) 16%, var(--surface)); }
.mc-g button.on { background: var(--purple); color: #fff; }
.mc-g button:disabled { opacity: .35; }

/* ═════════════════════ editor de fotos ═════════════════════ */
body.ed-open { overflow: hidden; }
.ed {
  --e-bg: #0c0b0f; --e-panel: #16151b; --e-raise: #222028; --e-line: rgba(255, 255, 255, .08);
  --e-ink: #f4f2f7; --e-soft: #a19cab; --e-faint: #6f6a78; --e-acc: #f472b6;
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: var(--e-bg); color: var(--e-ink); font-family: var(--font);
  user-select: none; -webkit-user-select: none;
}
.ed .i { width: 20px; height: 20px; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-t) + 10px) 12px 8px; }
.ed-hist { display: flex; gap: 4px; }
.ed-ib { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--e-ink); background: transparent; transition: background .15s; }
.ed-ib:hover { background: var(--e-raise); }
.ed-ib:disabled { opacity: .28; background: transparent; }
.ed-ib.sm { width: 36px; height: 36px; border-radius: 10px; }
.ed-ib.sm .i { width: 18px; height: 18px; }
.ed-ib.danger { color: #fb7185; }
.ed-done { padding: 9px 18px; border-radius: 12px; background: var(--e-ink); color: var(--e-bg); font-weight: 700; font-size: 14px; }
.ed-done:disabled { opacity: .6; }
.ed-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 14px 10px; }
.ed-frame { position: relative; flex: none; }
.ed-frame canvas { display: block; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); touch-action: none; background: #000; }
.ed-stage.drawing canvas { cursor: crosshair; }
.ed-ovl { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 4px; }
.ed-ovl img { position: absolute; height: auto; max-width: none; }
.ed-ovl img.sel { outline: 2px dashed #fff; outline-offset: 4px; }

.ed-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 12px 8px; padding: 8px 10px; border-radius: 16px; background: var(--e-panel); border: 1px solid var(--e-line); }
.ed-sel .ed-range { flex: 1 1 120px; margin: 0; }
.ed-selbtns { display: flex; gap: 2px; flex: none; margin-left: auto; }

.ed-bottom { background: var(--e-panel); border-top: 1px solid var(--e-line); padding-bottom: var(--safe-b); }
.ed-panel { height: 34dvh; max-height: 260px; min-height: 150px; overflow-y: auto; padding: 14px 16px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ed-panel::-webkit-scrollbar { display: none; }
.ed-panel input, .ed-panel textarea { user-select: text; -webkit-user-select: text; }
.ed-tabs { display: flex; overflow-x: auto; scrollbar-width: none; padding: 4px 6px 6px; border-top: 1px solid var(--e-line); }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tab { flex: 1 0 auto; min-width: 58px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 4px; font-size: 10.5px; font-weight: 600; color: var(--e-faint); transition: color .15s; }
.ed-tab .i { width: 22px; height: 22px; stroke-width: 1.6; }
.ed-tab.on { color: var(--e-ink); }
.ed-tab.on .i { stroke-width: 2; }

/* controles do editor */
.ed-lab { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--e-faint); margin: 12px 2px 2px; }
.ed-range { position: relative; display: flex; align-items: center; gap: 12px; margin: 4px 0; }
.ed-range input[type=range] { flex: 1; min-width: 0; height: 30px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
.ed-range input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: var(--e-raise); }
.ed-range input[type=range]::-moz-range-track { height: 3px; border-radius: 3px; background: var(--e-raise); }
.ed-range input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.ed-range input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.ed-range.center::before { content: ""; position: absolute; left: calc((100% - 48px) / 2 - 1px); top: 9px; width: 2px; height: 12px; border-radius: 2px; background: var(--e-faint); pointer-events: none; }
.ed-range output { flex: none; width: 36px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--e-soft); font-variant-numeric: tabular-nums; }
.ed-tip { font-size: 12.5px; color: var(--e-soft); margin: 10px 2px 4px; line-height: 1.5; }
.ed-tip.small { font-size: 11px; color: var(--e-faint); }
.ed-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.ed-chips::-webkit-scrollbar { display: none; }
.ed .chip { background: var(--e-raise); border: 0; color: var(--e-soft); font-weight: 600; padding: 7px 13px; }
.ed .chip.on { background: var(--e-ink); color: var(--e-bg); }
.ed-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ed-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 12px; background: var(--e-raise); color: var(--e-ink); font-weight: 600; font-size: 13px; cursor: pointer; }
.ed-btn .i { width: 17px; height: 17px; }
.ed-btn:active { transform: scale(.96); }
.ed-big { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 16px; background: var(--e-raise); font-weight: 700; font-size: 15px; border: 1px dashed rgba(255, 255, 255, .16); }
.ed-row2 { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 10px 0 2px; }
.ed-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--e-bg); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.ed-seg::-webkit-scrollbar { display: none; }
.ed-seg > button { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--e-soft); white-space: nowrap; }
.ed-seg > button .i { width: 16px; height: 16px; }
.ed-seg > button.on { background: var(--e-raise); color: var(--e-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.ed-seg.ic > button { padding: 7px 9px; }
.ed-seg.sm > button { padding: 6px 10px; font-size: 12px; }
.ed-sel .ed-seg { flex: none; }
.ed .in { background: var(--e-bg); border: 1px solid var(--e-line); color: var(--e-ink); border-radius: 12px; font-size: 16px; }
.ed .in:focus { border-color: rgba(255, 255, 255, .3); box-shadow: none; }
.ed textarea.in.ed-ta { min-height: 58px; padding: 10px 12px; }
.ed-search { position: relative; }
.ed-search .i { position: absolute; left: 12px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--e-faint); pointer-events: none; }
.ed-search .in { padding: 10px 12px 10px 38px; }
.ed-search + .ed-chips, .ed-search + .ed-row2 { margin-top: 10px; }

/* cores */
.ed-sw { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 2px 4px; align-items: center; }
.ed-sw::-webkit-scrollbar { display: none; }
.ed .sw { flex: none; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.ed .sw.on { outline: 2px solid #fff; outline-offset: 2px; }
.ed .sw.custom { position: relative; cursor: pointer; background: conic-gradient(#f43f5e, #fde047, #34d399, #38bdf8, #a855f7, #f43f5e); }
.ed .sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* filtros */
.ed-presets { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.ed-presets::-webkit-scrollbar { display: none; }
.pr { flex: none; width: 68px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--e-soft); }
.pr img { display: block; width: 68px; height: 68px; border-radius: 12px; object-fit: cover; margin-bottom: 6px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.pr.on img { outline-color: #fff; }
.pr.on { color: var(--e-ink); }

/* ajustes */
.ed-adjs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.ed-adjs::-webkit-scrollbar { display: none; }
.adj { position: relative; flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--e-faint); }
.adj .i { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--e-raise); color: var(--e-soft); stroke-width: 1.7; transition: .15s; }
.adj.on { color: var(--e-ink); }
.adj.on .i { background: var(--e-ink); color: var(--e-bg); }
.adj.set::after { content: ""; position: absolute; top: 0; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--e-acc); }

/* texto */
.ed-fonts { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 2px; }
.ed-fonts::-webkit-scrollbar { display: none; }
.fnt { flex: none; padding: 8px 14px; border-radius: 12px; background: var(--e-raise); color: var(--e-soft); line-height: 1.2; }
.fnt.on { background: var(--e-ink); color: var(--e-bg); }

/* figurinhas */
.el-h { font-size: 11px; font-weight: 700; color: var(--e-faint); margin: 14px 2px 8px; letter-spacing: .5px; text-transform: uppercase; }
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.el { aspect-ratio: 1; border-radius: 12px; background: var(--e-raise); font-size: 26px; line-height: 1; display: grid; place-items: center; }
.el:active { transform: scale(.9); }
.el img { width: 68%; height: 68%; }
.el-grid.phr { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.el.phrase { aspect-ratio: auto; padding: 10px 6px; font-size: 13px; font-weight: 700; background: var(--e-raise); color: #f9a8d4; }
.el-colors { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--e-faint); font-weight: 700; margin-top: 4px; white-space: nowrap; }
.el-colors .ed-sw { padding: 6px 2px; }
.sug { padding: 3px 10px; margin: 2px 2px 2px 0; border-radius: 999px; background: var(--e-raise); color: var(--e-ink); font-weight: 600; font-size: 12px; }
.el.net.busy { opacity: .45; }
.el.net img { width: 74%; height: 74%; object-fit: contain; }

/* GIFs */
.gif-grid { columns: 3 90px; column-gap: 6px; margin-top: 10px; }
.gif { display: block; width: 100%; margin: 0 0 6px; border-radius: 10px; overflow: hidden; background: var(--e-raise); break-inside: avoid; }
.gif img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gif:active { transform: scale(.96); }

@media (min-width: 900px) {
  .ed-bottom { display: grid; grid-template-columns: 1fr; max-width: 760px; width: 100%; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--e-line); border-bottom: 0; }
  .ed-sel { max-width: 760px; width: calc(100% - 24px); margin-left: auto; margin-right: auto; }
}

/* Fotos abertas a partir do mural e dos comentários. */
.media [data-photo] { cursor: zoom-in; }
.media [data-photo]:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; }
.photo-viewer { position: fixed; inset: 0; margin: 0; border: 0; padding: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; background: #0c0a10; color: #fff; overflow: hidden; }
.photo-viewer::backdrop { background: #0c0a10; }
.photo-viewer header { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 12px) 16px 12px; background: linear-gradient(#0c0a10, transparent); pointer-events: none; }
.photo-viewer header button { pointer-events: auto; }
.photo-viewer button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #27242dcc; color: #fff; }
.photo-viewer button[hidden] { display: none; }
.photo-viewer button:disabled { opacity: .25; }
.photo-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.photo-track::-webkit-scrollbar { display: none; }
.photo-slide { flex: 0 0 100%; min-width: 0; height: 100%; padding: calc(var(--safe-t) + 70px) 12px calc(var(--safe-b) + 70px); display: flex; align-items: center; justify-content: center; scroll-snap-align: start; scroll-snap-stop: always; box-sizing: border-box; }
.photo-slide > img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.photo-slide > .phx { flex: none; width: min(100%, calc((100dvh - var(--safe-t) - var(--safe-b) - 140px) * var(--photo-ratio))); }
.photo-prev, .photo-next { position: absolute; bottom: calc(var(--safe-b) + 14px); font-size: 32px; }
.photo-prev { left: calc(50% - 58px); }
.photo-next { right: calc(50% - 58px); }
