:root {
    --bg: #F7EFEA; --surface: #FFFBF8; --sunk: #F1E6E0; --ink: #3B2A33; --muted: #85707B;
    --line: #EADCD4; --rose: #B0646F; --rose-soft: #F3DCDC; --clay: #C98B6B; --clay-soft: #F5E3D6;
    --sage: #7F9A7A; --sage-soft: #E3EBDF; --plum-soft: #E9DDE6; --on-rose: #FFFBF8;
    --shadow: 0 1px 2px rgba(59,42,51,.05), 0 6px 20px rgba(59,42,51,.06);
    --display: "Gloock", "Georgia", "Times New Roman", serif;
    --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      color-scheme: dark;
      --bg: #211A1E; --surface: #2B2227; --sunk: #33292E; --ink: #F3E8E4; --muted: #B29FA8;
      --line: #3F3238; --rose: #DA959E; --rose-soft: #4A3036; --clay: #DDA587; --clay-soft: #463429;
      --sage: #A5BE9F; --sage-soft: #2F3A2D; --plum-soft: #3C2E38; --on-rose: #2B1F24;
      --shadow: 0 1px 2px rgba(0,0,0,.25), 0 6px 20px rgba(0,0,0,.2);
    }
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #211A1E; --surface: #2B2227; --sunk: #33292E; --ink: #F3E8E4; --muted: #B29FA8;
    --line: #3F3238; --rose: #DA959E; --rose-soft: #4A3036; --clay: #DDA587; --clay-soft: #463429;
    --sage: #A5BE9F; --sage-soft: #2F3A2D; --plum-soft: #3C2E38; --on-rose: #2B1F24;
    --shadow: 0 1px 2px rgba(0,0,0,.25), 0 6px 20px rgba(0,0,0,.2);
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
  button, input, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
  h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
  p { margin: 0; }
  .muted { color: var(--muted); }
  .eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
  svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

  /* ---------- Shell ---------- */
  .app { display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; gap: 32px; max-width: 1320px; margin: 0 auto; padding-inline: 24px; min-height: 100%; }
  .side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding-block: 24px; display: flex; flex-direction: column; gap: 22px; }
  .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
  .brand svg { width: 34px; height: 34px; color: var(--rose); }
  .brand b { font-family: var(--display); font-weight: 400; font-size: 24px; }
  .proto { display: inline-block; font-size: 11px; font-weight: 600; color: var(--clay); background: var(--clay-soft); padding: 3px 9px; border-radius: 99px; }
  .nav { display: flex; flex-direction: column; gap: 2px; }
  .nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 500; }
  .nav button:hover { background: var(--sunk); }
  .nav button[aria-current="page"] { background: var(--rose-soft); color: var(--ink); font-weight: 600; }
  .nav button[aria-current="page"] svg { color: var(--rose); }
  .nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--on-rose); background: var(--rose); border-radius: 99px; padding: 0 7px; }
  .nav-sec button { padding: 6px 12px; font-size: 14px; }
  .mono { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 13px; flex: none; }
  .soon { font-size: 13px; color: var(--muted); padding: 6px 12px; }
  .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line); }

  main { min-width: 0; padding-block: 28px 64px; }
  .rail { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding-block: 28px; display: flex; flex-direction: column; gap: 18px; }

  .topbar, .tabbar { display: none; }

  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
  .page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
  .page-head h1 { font-size: 34px; line-height: 1.1; }
  .page-head p { color: var(--muted); max-width: 60ch; }

  .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 14px; flex: none; color: var(--ink); }
  .av.sm { width: 32px; height: 32px; font-size: 12.5px; }
  .c0 { background: var(--rose-soft); } .c1 { background: var(--clay-soft); } .c2 { background: var(--sage-soft); } .c3 { background: var(--plum-soft); } .c4 { background: var(--sunk); }

  .btn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: 14px; }
  .btn:hover { border-color: var(--muted); }
  .btn.primary { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
  .btn.primary:hover { filter: brightness(1.05); }
  .btn.on { background: var(--sage-soft); border-color: var(--sage); color: var(--ink); }
  .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--sunk); color: var(--ink); border: 0; }
  button.chip:hover { background: var(--rose-soft); }

  /* ---------- Feed ---------- */
  .feed { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
  .hello { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
  .hello h1 { font-size: 32px; line-height: 1.1; }
  .composer { padding: 16px; display: flex; gap: 12px; }
  .composer .body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .composer textarea { width: 100%; border: 0; background: none; resize: none; min-height: 52px; font-size: 15.5px; outline: none; }
  .composer textarea::placeholder { color: var(--muted); }
  .composer .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
  .composer select { border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 6px 12px; font-size: 13.5px; }
  .composer .row .btn.primary { margin-left: auto; }
  .ghost-media { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); background: none; border: 0; padding: 6px 8px; border-radius: 8px; }
  .ghost-media:hover { background: var(--sunk); color: var(--ink); }

  .filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filters button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; }
  .filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

  .meet-strip { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--clay-soft); border-radius: 16px; }
  .date { width: 52px; flex: none; text-align: center; background: var(--surface); border-radius: 12px; padding: 6px 0; line-height: 1.1; }
  .date b { display: block; font-family: var(--display); font-weight: 400; font-size: 22px; }
  .date span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
  .meet-strip .info { flex: 1; min-width: 0; }
  .meet-strip .info b { display: block; }

  .post { padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 12px; }
  .post header { display: flex; gap: 12px; align-items: center; }
  .post header .who { flex: 1; min-width: 0; line-height: 1.3; }
  .post header .who b { font-weight: 600; }
  .post .text { font-size: 15.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
  .media { border-radius: 12px; aspect-ratio: 16 / 10; max-width: 100%; display: flex; align-items: flex-end; padding: 12px; }
  .media span { font-size: 12px; font-weight: 600; background: rgba(255,251,248,.85); color: #3B2A33; padding: 3px 10px; border-radius: 99px; }
  .m-altar { background: radial-gradient(circle at 70% 30%, #F8E3C8 0 9%, transparent 10%), radial-gradient(ellipse at 50% 120%, #9C6B5B 0 35%, transparent 36%), linear-gradient(160deg, #E8C9BC, #C99A8E 60%, #8E6A6E); }
  .m-mar { background: radial-gradient(circle at 50% 58%, #F6D2A6 0 7%, transparent 8%), linear-gradient(180deg, #E7B6A4 0%, #D59C9B 40%, #9E8BA6 58%, #6C7E98 59%, #4F6480 100%); }
  .m-livro { background: linear-gradient(100deg, transparent 0 46%, rgba(59,42,51,.18) 49%, transparent 52%), linear-gradient(135deg, #F4E7DA, #E7CDBC 55%, #D3AE9B); }
  .actions { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
  .actions button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .actions button:hover { background: var(--sunk); color: var(--ink); }
  .actions button.liked { color: var(--rose); }
  .actions button.liked svg { fill: var(--rose); }
  .comments { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 6px; }
  .comment { display: flex; gap: 10px; }
  .comment div { background: var(--sunk); border-radius: 12px; padding: 8px 12px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
  .comment b { font-weight: 600; margin-right: 4px; }
  .reply { display: flex; gap: 8px; }
  .reply input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 8px 14px; font-size: 14px; }

  /* ---------- Rail ---------- */
  .rail .panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
  .rail h3 { font-size: 19px; }
  .event { display: flex; gap: 12px; align-items: center; }
  .event .date { background: var(--sunk); width: 48px; }
  .event .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
  .event .txt b { font-weight: 600; display: block; }
  .bookmonth { display: flex; gap: 14px; }
  .cover { width: 64px; aspect-ratio: 2 / 3; border-radius: 4px 8px 8px 4px; flex: none; background: linear-gradient(90deg, rgba(0,0,0,.12) 0 6%, transparent 7%), linear-gradient(160deg, #C98B8F, #8E5E6B); display: flex; align-items: flex-end; padding: 6px; color: #FFF6F2; font-family: var(--display); font-size: 10px; line-height: 1.1; }
  .bar { height: 6px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
  .bar i { display: block; height: 100%; background: var(--sage); border-radius: inherit; }

  /* ---------- Chat ---------- */
  .chat { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100dvh - 150px); min-height: 460px; overflow: hidden; }
  .chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
  .seg { display: flex; gap: 4px; padding: 12px; }
  .seg button { flex: 1; border: 0; border-radius: 99px; padding: 7px; font-weight: 600; font-size: 13.5px; background: var(--sunk); }
  .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .threads { overflow-y: auto; flex: 1; }
  .thread { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: 0; background: none; text-align: left; }
  .thread:hover { background: var(--sunk); }
  .thread[aria-current="true"] { background: var(--rose-soft); }
  .thread .t { flex: 1; min-width: 0; line-height: 1.3; }
  .thread .t b { display: block; font-weight: 600; }
  .thread .t span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .thread .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose); flex: none; }
  .chat-win { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .chat-head { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .chat-head .t { flex: 1; line-height: 1.3; min-width: 0; }
  .chat-head .t b { font-weight: 600; display: block; }
  .back { display: none; border: 0; background: none; padding: 6px; border-radius: 8px; }
  .msgs { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
  .day { align-self: center; font-size: 12px; color: var(--muted); padding: 2px 10px; }
  .msg { max-width: min(78%, 480px); padding: 9px 13px; border-radius: 16px; font-size: 14.5px; overflow-wrap: anywhere; }
  .msg small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
  .msg .from { display: block; font-size: 12px; font-weight: 600; color: var(--clay); }
  .msg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
  .msg.me { align-self: flex-end; background: var(--rose); color: var(--on-rose); border-bottom-right-radius: 6px; }
  .msg.me small { color: inherit; opacity: .8; }
  .send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
  .send input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 10px 16px; }
  .send button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--rose); color: var(--on-rose); display: grid; place-items: center; flex: none; }

  /* ---------- Hábitos ---------- */
  .hab-sum { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 20px; margin-bottom: 16px; }
  .ring { width: 92px; height: 92px; }
  .ring circle { fill: none; stroke-width: 9; }
  .ring .bg { stroke: var(--sunk); }
  .ring .fg { stroke: var(--sage); stroke-linecap: round; transition: stroke-dashoffset .4s ease; transform: rotate(-90deg); transform-origin: center; }
  .ring text { font-family: var(--display); font-size: 22px; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
  .hab-sum h2 { font-size: 22px; }
  .habits { display: flex; flex-direction: column; }
  .habit { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
  .habit:first-child { border-top: 0; }
  .habit .name b { font-weight: 600; display: block; }
  .habit .name span { font-size: 13px; color: var(--muted); }
  .week { display: grid; grid-template-columns: repeat(7, 34px); gap: 6px; }
  .wk-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 12px 18px 4px; }
  .wk-head .week span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .wk-head .week span.today { color: var(--rose); }
  .d { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; padding: 0; }
  .d:hover:not(:disabled) { border-color: var(--sage); }
  .d.done { background: var(--sage); border-color: var(--sage); color: var(--surface); }
  .d.today { border-color: var(--rose); }
  .d.done.today { border-color: var(--sage); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--rose); }
  .d:disabled { opacity: .4; cursor: default; }
  .d svg { width: 16px; height: 16px; stroke-width: 2.4; }
  .streak { font-size: 12.5px; font-weight: 600; color: var(--clay); }
  .add-habit { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
  .add-habit input { flex: 1; min-width: 0; border: 1px dashed var(--line); background: var(--bg); border-radius: 99px; padding: 8px 14px; }
  .challenge { margin-top: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--sage-soft); border: 0; }

  /* ---------- Seções ---------- */
  .sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .sec-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease; }
  .sec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
  .sec-card .mono { width: 44px; height: 44px; font-size: 21px; }
  .sec-card h3 { font-size: 20px; line-height: 1.15; }
  .sec-card p { font-size: 14px; color: var(--muted); }
  .sec-card .meta { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: auto; }
  .sec-card.new { border-style: dashed; background: none; align-items: flex-start; justify-content: center; color: var(--muted); }

  .sec-hero { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 20px; margin-bottom: 22px; }
  .sec-hero .mono { width: 64px; height: 64px; font-size: 30px; background: var(--surface); }
  .sec-hero h1 { font-size: 32px; line-height: 1.1; }
  .crumb { border: 0; background: none; padding: 0; color: var(--muted); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; }
  .crumb:hover { color: var(--ink); }
  .block { margin-bottom: 26px; }
  .block > h2 { font-size: 22px; margin-bottom: 12px; }
  .cur { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
  .cur-item { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
  .cur-item b { font-weight: 600; line-height: 1.3; }
  .cur-item p { font-size: 13.5px; color: var(--muted); }
  .type { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--sunk); color: var(--muted); }
  .events { display: flex; flex-direction: column; gap: 10px; }
  .ev-row { display: flex; gap: 14px; align-items: center; padding: 14px 16px; flex-wrap: wrap; }
  .ev-row .date { background: var(--sunk); }
  .ev-row .txt { flex: 1; min-width: 180px; }
  .ev-row .txt b { font-weight: 600; display: block; }
  .ev-row .txt span { font-size: 13.5px; color: var(--muted); }
  .partner { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
  .partner .off { font-family: var(--display); font-size: 30px; color: var(--rose); line-height: 1; }
  .code { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
  .code code { flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; border: 1px dashed var(--clay); border-radius: 8px; padding: 6px 10px; background: var(--bg); letter-spacing: .06em; }

  .toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100vw - 32px); }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* ---------- Boas-vindas e Nossa história ---------- */
  .welcome { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px; background: var(--plum-soft); border-radius: 16px; }
  .welcome > svg { width: 38px; height: 38px; color: var(--rose); flex: none; }
  .welcome .info { flex: 1; min-width: 200px; line-height: 1.4; }
  .welcome .info b { display: block; font-family: var(--display); font-weight: 400; font-size: 19px; }
  .welcome .info span { font-size: 14px; color: var(--muted); }
  .welcome .acts { display: flex; gap: 8px; flex-wrap: wrap; }
  .topbrand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; }

  .story { max-width: 720px; display: flex; flex-direction: column; gap: 40px; }
  .story h2 { font-size: 28px; }
  .sky { background: #2A1F2B; color: #F7EFEA; border-radius: 22px; padding: 22px 28px 30px; overflow: hidden; }
  .sky svg.const { width: 100%; height: auto; display: block; max-width: 100%; margin-bottom: 8px; }
  .sky .eyebrow { color: #E7B9A6; }
  .sky h1 { font-size: 46px; line-height: 1.05; margin-top: 6px; }
  .sky p { color: #D9C6C4; max-width: 52ch; margin-top: 10px; font-size: 16px; }
  .sky .ln { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.4s ease forwards; }
  .sky .tw { animation: twinkle 3.2s ease-in-out infinite; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes twinkle { 50% { opacity: .15; } }
  .prose { display: flex; flex-direction: column; gap: 14px; }
  .prose p { font-size: 16.5px; line-height: 1.75; max-width: 62ch; }
  .readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
  .reading { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
  .reading svg { color: var(--rose); width: 22px; height: 22px; }
  .reading h3 { font-size: 20px; line-height: 1.2; }
  .reading p { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
  .manifesto { margin: 0; font-family: var(--display); font-size: 27px; line-height: 1.35; padding: 30px 32px; background: var(--rose-soft); border-radius: 20px; text-wrap: pretty; }
  .values { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
  .values div { border-top: 1px solid var(--line); padding-top: 12px; }
  .values dt { font-family: var(--display); font-size: 21px; }
  .values dd { margin: 4px 0 0; color: var(--muted); }
  .closing { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 8px; }
  .closing p { font-family: var(--display); font-size: 22px; line-height: 1.4; max-width: 44ch; color: var(--muted); }

  /* ---------- Responsivo ---------- */
  @media (max-width: 1140px) {
    .app { grid-template-columns: 220px minmax(0, 1fr); }
    .rail { display: none; }
  }
  @media (max-width: 780px) {
    .app { display: block; padding-inline: 16px; }
    .side { display: none; }
    main { padding-block: 12px calc(90px + env(safe-area-inset-bottom, 0px)); }
    .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); padding-block: 12px; margin-inline: -16px; padding-inline: 16px; border-bottom: 1px solid var(--line); }
    .topbar svg { width: 28px; height: 28px; color: var(--rose); }
    .topbar b { font-family: var(--display); font-weight: 400; font-size: 21px; }
    .topbar .proto { margin-left: auto; }
    .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
    .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 10px; }
    .tabbar button[aria-current="page"] { color: var(--rose); }
    .page-head h1, .hello h1, .sec-hero h1 { font-size: 27px; }
    .chat { grid-template-columns: 1fr; height: calc(100dvh - 180px); }
    .chat.open .chat-list { display: none; }
    .chat:not(.open) .chat-win { display: none; }
    .chat-list { border-right: 0; }
    .back { display: grid; }
    .habit { grid-template-columns: 1fr; }
    .week, .wk-head .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
    .d { width: 100%; max-width: 40px; aspect-ratio: 1; height: auto; justify-self: center; }
    .wk-head { display: none; }
    .habit .week::before { content: none; }
    .sec-hero { padding: 16px; }
    .sec-hero .mono { width: 52px; height: 52px; font-size: 24px; }
    .sky { padding: 16px 18px 24px; }
    .sky h1 { font-size: 32px; }
    .manifesto { font-size: 21px; padding: 22px; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .sky .ln, .sky .tw { animation: none; stroke-dashoffset: 0; }
  }

/* =================== App real: login, perfil, estados vazios =================== */
.auth { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.auth-brand svg { width: 56px; height: 56px; color: var(--rose); }
.auth-brand h1 { font-size: 36px; }
.auth-brand p { color: var(--muted); max-width: 34ch; }
.auth-box { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--sunk); border-radius: 99px; padding: 4px; }
.auth-tabs button { border: 0; background: none; border-radius: 99px; padding: 8px; font-weight: 600; font-size: 14px; }
.auth-tabs button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input, .field textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 11px 14px; font-size: 15px; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--rose); outline-offset: 0; border-color: transparent; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.auth-box .btn.primary { padding: 12px; font-size: 15px; }
.linkish { border: 0; background: none; padding: 0; color: var(--rose); font-weight: 600; font-size: 14px; align-self: center; }
.linkish:hover { text-decoration: underline; }
.msg-box { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.msg-box.err { background: var(--rose-soft); color: var(--ink); }
.msg-box.ok { background: var(--sage-soft); color: var(--ink); }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted); }
.btn:disabled { opacity: .6; cursor: default; }

.empty { padding: 22px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.empty b { color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 19px; }
.loading { padding: 28px; text-align: center; color: var(--muted); }
.me button.btn { margin-left: auto; padding: 6px 12px; font-size: 12.5px; }
.me .who { line-height: 1.3; min-width: 0; }
.me .who b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile { padding: 22px; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head .av { width: 64px; height: 64px; font-size: 22px; }
.post-del { margin-left: auto; }
.coming { padding: 24px; display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.coming h2 { font-size: 24px; }

[hidden] { display: none !important; }

/* Ferramentas da administradora e conversas */
.admin-box { margin-bottom: 12px; padding: 0; border-style: dashed; }
.admin-box summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--rose); list-style: none; }
.admin-box summary::-webkit-details-marker { display: none; }
.admin-box[open] summary { border-bottom: 1px solid var(--line); }
.admin-form { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.admin-form select, .field select { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.admin-form .btn.primary { align-self: flex-start; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.msg-del { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.chat .seg { padding: 14px 14px 6px; }
/* Páginas de texto: termos, privacidade, regras */
.doc-page { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.doc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.doc-top svg { width: 32px; height: 32px; color: var(--rose); }
.doc-top b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.doc-top a { margin-left: auto; color: var(--rose); font-weight: 600; font-size: 14px; text-decoration: none; }
.doc-top a:hover { text-decoration: underline; }
.doc h1 { font-size: 38px; line-height: 1.1; margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.doc h2 { font-size: 23px; margin: 30px 0 10px; }
.doc p, .doc li { font-size: 16px; line-height: 1.75; max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.doc .draft { background: var(--clay-soft); border-radius: 14px; padding: 14px 16px; font-size: 14.5px; margin-bottom: 24px; }
.doc .fill { background: var(--rose-soft); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.doc .rule { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.doc .rule h3 { font-size: 20px; margin-bottom: 4px; }
.doc a { color: var(--rose); }
.legal-links { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: 12.5px; }
.legal-links a { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--rose); flex: none; }
.check a { color: var(--rose); font-weight: 600; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.danger-zone h3 { font-size: 18px; }
.btn.danger { border-color: #B3261E; color: #B3261E; }
.report-form { display: flex; flex-direction: column; gap: 8px; background: var(--sunk); border-radius: 12px; padding: 12px; }
.report-form textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 14px; resize: vertical; }
.report-form .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .report-btn { margin-left: auto; }
.actions .post-del + .report-btn, .actions .report-btn + .post-del { margin-left: 0; }
.rep { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.rep blockquote { margin: 0; padding: 10px 14px; background: var(--sunk); border-radius: 10px; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rep .meta { font-size: 13px; color: var(--muted); }
.rep .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.nav .count { color: var(--on-rose); }
/* Área de Membros */
.av-link { border: 0; padding: 0; cursor: pointer; }
.name-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: inherit; cursor: pointer; text-align: left; }
.name-link:hover { color: var(--rose); text-decoration: underline; }
.msg .from.name-link { display: block; font-size: 12px; color: var(--clay); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 9px; border-radius: 99px; background: var(--sage-soft); color: var(--ink); white-space: nowrap; }
.badge.star { background: var(--rose-soft); }
.member-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.member-tools input { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 11px 18px; font-size: 15px; width: 100%; max-width: 520px; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.member-card { text-align: left; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease; }
.member-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.member-top { display: flex; gap: 12px; align-items: center; }
.member-top .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.member-top .who b { font-weight: 600; }
.member-top .who .muted { font-size: 13px; }
.member-card .bio { font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.member-card .reading { font-size: 13px; line-height: 1.45; }
.member-card .reading .eyebrow { font-size: 10.5px; color: var(--rose); margin-right: 4px; }
.member-hero { display: flex; gap: 18px; align-items: center; padding: 22px; flex-wrap: wrap; }
.member-hero .av { width: 76px; height: 76px; font-size: 26px; }
.member-hero .who { flex: 1; min-width: 200px; }
.member-hero h1 { font-size: 32px; line-height: 1.1; }
.member-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.member-details .detail { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.member-details .detail p { font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.interests { border: 0; padding: 0; margin: 0; }
.interests legend { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.chip-check { cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 6px 13px; font-size: 13.5px; font-weight: 500; }
.chip-check input:checked + span { background: var(--rose); border-color: var(--rose); color: var(--on-rose); }
.chip-check input:focus-visible + span { outline: 2px solid var(--rose); outline-offset: 2px; }
@media (max-width: 780px) {
  .tabbar { grid-template-columns: repeat(5, 1fr); }
  .tabbar button { font-size: 10.5px; }
  .member-hero h1 { font-size: 26px; }
}