/* Amigo Secreto: white + purple, hand-drawn ("scribbly") look.
   Brand purple #9d75fc is used for fills, strokes and decoration. A deeper purple is used
   wherever text sits on it or it is text itself, so contrast stays readable (WCAG AA). */
:root {
  --purple: #9d75fc;
  --purple-strong: #7550e0;
  --purple-ink: #4b2fa8;
  --purple-mid: #e2d6fe;
  --purple-soft: #f4efff;
  --ink: #1f1a2e;
  --muted: #5f5873;
  --line: #ddd5ee;
  --danger: #b4233c;
  --danger-soft: #fdecef;

  /* Wobbly corners that read as hand-drawn. */
  --wobble: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --wobble-card: 26px 18px 28px 16px / 16px 28px 18px 26px;
  --wobble-sm: 14px 9px 16px 8px / 8px 16px 9px 14px;
  --wobble-round: 52% 48% 55% 45% / 47% 55% 45% 53%;

  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 14 1, 24 9, 37 5 S 58 1, 71 6 S 96 9, 118 4' fill='none' stroke='%239d75fc' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--purple-strong); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--purple-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .4em; font-variation-settings: "SOFT" 50; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 .75em; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.container-form { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; margin: 0 auto; }
main { padding: 28px 0 72px; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xsmall { font-size: .8rem; }
.center { text-align: center; }
.eyebrow { color: var(--purple-strong); font-weight: 700; font-size: .85rem; margin-bottom: 4px; letter-spacing: .02em; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
/* Utilities instead of style="" attributes, which the Content-Security-Policy blocks.
   !important because they stand in for inline styles, which beat any selector. */
.items-start { align-items: flex-start !important; }
.justify-center { justify-content: center !important; }
.gap-6 { gap: 6px !important; }
.gap-8 { gap: 8px !important; }
.mb-1 { margin-bottom: 8px !important; }
.mw-260 { max-width: 260px !important; }
.mw-280 { max-width: 280px !important; }
.welcome-lede { max-width: 540px; margin: 0 auto 24px !important; }
/* Bot trap field (Views/Shared/_BotTrap.cshtml): off-screen rather than display:none, which some bots skip. */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Marker-pen highlight behind a word or name. */
.title-accent {
  color: var(--ink);
  background: linear-gradient(100deg, transparent 1%, var(--purple-mid) 3%, var(--purple-mid) 96%, transparent 99%) 0 88% / 100% 42% no-repeat;
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* Hand-drawn squiggle under a heading. */
/* The squiggle lives in ::after so it can be revealed ("drawn") left to right. */
.scribble { position: relative; display: inline-block; padding-bottom: 10px; }
.scribble::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--squiggle) left center / 100% 10px no-repeat; }

/* ---------- Top bar ---------- */
.topbar { border-bottom: 1.5px solid var(--ink); background: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--purple-strong); }
.topbar-nav { display: flex; align-items: center; gap: 10px; }
.topbar-user { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.topbar-user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: inline; margin: 0; }
@media (max-width: 520px) { .topbar-user-name { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 26px; border: 2px solid var(--ink); border-radius: var(--wobble);
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; background: #fff; color: var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
  white-space: nowrap;
}
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.btn-primary { background: var(--purple-strong); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary:hover { background: var(--purple-ink); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { background: var(--purple-mid); color: var(--muted); border-color: #a59cbd; box-shadow: none; transform: none; cursor: not-allowed; }
.btn-soft { background: var(--purple-soft); }
.btn-outline { background: #fff; }
.btn-outline:disabled { color: #9a93ad; border-color: #cfc8de; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 6px 10px; font-weight: 600; }
.btn-ghost:hover { color: var(--ink); box-shadow: none; transform: none; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--purple); }
.btn-danger-ghost { background: none; border: none; color: var(--danger); padding: 6px 10px; font: inherit; font-weight: 600; cursor: pointer; }
.btn-danger-ghost:hover { text-decoration: underline; text-decoration-style: wavy; }
.btn-sm { padding: 7px 16px; font-size: .9rem; }
.btn-xs { padding: 4px 12px; font-size: .82rem; border-width: 1.5px; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }
.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--purple-strong); text-decoration: underline; cursor: pointer; font-weight: 600; }
.link-muted { color: var(--muted); }
.link-strong { font-weight: 700; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--wobble-card);
  box-shadow: 4px 5px 0 var(--purple-mid);
  padding: 24px;
}
.card + .card { margin-top: 18px; }
.card-accent { border-left: 6px solid var(--purple); }
.card-soft { background: var(--purple-soft); }
.card-title { margin: 0 0 4px; }
.card-split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.card-split > div { padding: 0 24px; }
.card-split > div:first-child { padding-left: 0; border-right: 1.5px dashed var(--line); }
.card-split > div:last-child { padding-right: 0; }
@media (max-width: 760px) {
  .card-split { grid-template-columns: 1fr; }
  .card-split > div { padding: 0; }
  .card-split > div:first-child { border-right: none; border-bottom: 1.5px dashed var(--line); padding-bottom: 20px; margin-bottom: 20px; }
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Flash ---------- */
.flash { border: 1.5px solid var(--ink); border-radius: var(--wobble-sm); padding: 12px 16px; margin-bottom: 18px; font-weight: 600; background: var(--purple-soft); color: var(--purple-ink); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field > label, .label { display: block; font-weight: 700; margin-bottom: 8px; }
.label-sm { font-size: .85rem; font-weight: 500; margin-bottom: 6px; display: block; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--ink); border-radius: var(--wobble-sm); padding: 11px 16px; min-height: 48px;
  transition: box-shadow .12s;
}
input[type=file] { font: inherit; font-size: .9rem; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; border: 1.5px solid var(--ink); border-radius: var(--wobble); background: var(--purple-soft); padding: 6px 14px; margin-right: 10px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: #a39cb5; }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: 3px 3px 0 var(--purple); }
textarea { resize: vertical; min-height: 88px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field-error, .validation-summary-errors { color: var(--danger); font-size: .85rem; margin-top: 6px; font-weight: 600; }
.validation-summary-errors ul { margin: 0 0 12px; padding-left: 18px; }
.validation-summary-valid { display: none; }
.input-validation-error { border-color: var(--danger) !important; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--muted); font-size: .92rem; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--purple-strong); }
.money { display: flex; align-items: center; gap: 8px; }
.money span { color: var(--muted); font-size: .9rem; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--purple-soft); border: 1.5px dashed var(--purple); border-radius: var(--wobble-sm); padding: 5px; width: 100%; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 8px 16px; border: 1.5px solid transparent; border-radius: var(--wobble); cursor: pointer; color: var(--muted); font-weight: 600; font-size: .92rem; }
.segmented input:checked + span { background: #fff; color: var(--ink); border-color: var(--ink); box-shadow: 2px 2px 0 var(--purple); }
.segmented input:focus-visible + span { outline: 2px solid var(--purple-strong); }

details.expander > summary { list-style: none; cursor: pointer; color: var(--purple-strong); font-weight: 700; font-size: 1.05rem; }
details.expander > summary::-webkit-details-marker { display: none; }
details.expander > summary::before { content: "+ "; }
details.expander[open] > summary::before { content: "– "; }
details.expander > summary small { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; }
details.expander[open] > summary { padding-bottom: 16px; border-bottom: 1.5px dashed var(--line); margin-bottom: 20px; }

/* ---------- Avatars ---------- */
/* Photos are pinned to the circle (absolute + inset), so any photo shape is cropped from its
   centre into a perfect circle. Sizing the img with % inside the grid let non-square photos
   grow to their own proportions and turn into ovals. */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--purple-soft); color: var(--purple-ink); font-weight: 700; width: 40px; height: 40px; font-size: .9rem; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border-radius: 50%; object-fit: cover; object-position: center; }
.avatar-xs { width: 28px; height: 28px; font-size: .72rem; border-width: 1px; }
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 96px; height: 96px; font-size: 1.6rem; border-width: 2px; }
.avatar-anon { background: #fff; color: var(--muted); border-style: dashed; }
.avatar-star { z-index: 1; position: absolute; right: -4px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 10px; display: grid; place-items: center; border: 1.5px solid var(--ink); }

.people { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.person { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; text-align: center; font-size: .85rem; color: var(--muted); text-decoration: none; }
.person:hover { color: var(--ink); }
/* Only the name label: a plain ".person span" also hit the avatar and its star (both spans),
   stretching the circle into an oval and the star into a bar. */
.person-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Group header ---------- */
.group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.group-title h1 { margin: 0; font-size: 2rem; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--wobble-round); border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; background: #fff; }
.icon-btn:hover { background: var(--purple-soft); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: var(--wobble); background: var(--purple-soft); border: 1.5px dashed var(--purple-strong); color: var(--purple-ink); font-weight: 700; font-size: .9rem; }
.chip svg { flex: none; }
.linkbox-label { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.linkbox { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--ink); border-radius: var(--wobble-sm); padding: 8px 8px 8px 18px; background: #fff; }
.linkbox input { border: none; padding: 0; min-height: 36px; color: var(--muted); font-size: .9rem; background: transparent; text-overflow: ellipsis; }
.linkbox input:focus { box-shadow: none; }
.linkbox .btn { flex: none; }
.linkbox-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
@media (max-width: 640px) {
  .linkbox { flex-direction: column; align-items: stretch; padding: 12px; }
  .linkbox-actions .btn { flex: 1; }
}

.tabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--ink); margin: 26px 0; overflow-x: auto; scrollbar-width: thin; }
.tab { position: relative; padding: 14px 14px 16px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 700; }
.tab.active::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 9px; background: var(--squiggle) center / 100% 9px no-repeat; }
.badge-alert { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 11px; font-weight: 800; border: 1.5px solid var(--ink); }
.badge { display: inline-block; padding: 2px 10px; border-radius: var(--wobble); border: 1.5px solid var(--purple-strong); font-size: .75rem; font-weight: 700; background: var(--purple-soft); color: var(--purple-ink); }
.badge-muted { border-color: var(--line); background: #fff; color: var(--muted); }
.badge-warn { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.badge-ok { border-color: var(--ink); background: var(--purple-mid); color: var(--ink); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1.5px dashed var(--line); flex-wrap: wrap; }
.list > li:first-child { border-top: none; }
.list-name { font-weight: 700; }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1.5px dashed var(--line); }
.kv li span:first-child { color: var(--muted); }
.kv li span:last-child { font-weight: 700; text-align: right; white-space: pre-line; }

/* ---------- Mural ---------- */
.post { border-top: 1.5px dashed var(--line); padding: 20px 0 8px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-author { font-weight: 700; }
.post-time { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.post-text { margin: 12px 0; white-space: pre-line; overflow-wrap: anywhere; }
.x-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 4px 8px; border-radius: var(--wobble-sm); }
.x-btn:hover { background: var(--purple-soft); color: var(--ink); }
.comments { margin: 8px 0 8px 14px; padding-left: 16px; border-left: 2px solid var(--purple-mid); }
.comment { padding: 8px 0; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: .9rem; flex-wrap: wrap; }
.comment-text { margin: 4px 0 0 36px; white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; }
details.comment-box { margin: 4px 0; }
details.comment-box > summary { list-style: none; display: inline-block; cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 0; }
details.comment-box > summary::-webkit-details-marker { display: none; }
details.comment-box > summary:hover { color: var(--ink); text-decoration: underline wavy var(--purple); }
.report-btn { background: none; border: none; cursor: pointer; color: var(--muted); font: inherit; font-size: .8rem; padding: 4px 0; }
button.report-btn:hover { color: var(--danger); text-decoration: underline; }
.composer-bar { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.composer-bar .btn-primary { margin-left: auto; }

.emoji-wrap { position: relative; display: inline-block; }
.emoji-btn { width: 44px; height: 44px; border-radius: var(--wobble-round); border: 1.5px solid var(--ink); background: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.emoji-btn:hover { background: var(--purple-soft); }
.emoji-panel { position: absolute; bottom: 52px; left: 0; z-index: 10; background: #fff; border: 1.5px solid var(--ink); border-radius: var(--wobble-sm); box-shadow: 4px 4px 0 var(--purple-mid); padding: 8px; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; }
.emoji-panel button { width: 36px; height: 36px; border: none; background: none; font-size: 1.25rem; cursor: pointer; border-radius: 8px; }
.emoji-panel button:hover { background: var(--purple-soft); }
@media (max-width: 420px) { .emoji-panel { grid-template-columns: repeat(6, 36px); } }

/* ---------- Messages ---------- */
.section-label { font-size: .78rem; letter-spacing: .08em; font-weight: 800; color: var(--purple-strong); text-transform: uppercase; margin: 26px 0 10px; }
.convo-link { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1.5px dashed var(--line); text-decoration: none; color: var(--ink); }
.convo-link:first-of-type { border-top: none; }
.convo-link:hover { color: var(--ink); }
.convo-link:hover .list-name { text-decoration: underline wavy var(--purple); }
button.convo-link { width: 100%; background: none; border: none; font: inherit; text-align: left; cursor: pointer; }
.card form + form button.convo-link { border-top: 1.5px dashed var(--line); }
.convo-preview { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { display: flex; flex-direction: column; gap: 10px; padding: 8px 4px 16px 0; max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; }
.chat-error { color: var(--danger); font-size: .85rem; font-weight: 600; }

/* Unread counts (Mensagens tab, conversation rows, home card buttons). */
.badge-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--purple-strong); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1; border: 1.5px solid var(--ink); }
.badge-count[hidden] { display: none; }
.convo-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.convo-link.unread .list-name { color: var(--purple-ink); }
.convo-link.unread .convo-preview { color: var(--ink); font-weight: 600; }
.bubble { max-width: 78%; padding: 10px 14px; border: 1.5px solid var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.bubble-time { display: block; font-size: .72rem; margin-top: 4px; opacity: .8; }
.bubble-mine { align-self: flex-end; background: var(--purple-strong); color: #fff; border-radius: 18px 16px 4px 18px / 16px 18px 4px 16px; }
.bubble-theirs { align-self: flex-start; background: var(--purple-soft); border-radius: 16px 18px 18px 4px / 18px 16px 16px 4px; }
.notice { border-top: 1.5px dashed var(--line); padding: 14px 0; }
.notice:first-of-type { border-top: none; }
.notice-text { white-space: pre-line; overflow-wrap: anywhere; margin: 6px 0 0; }

/* ---------- Welcome & obligations ---------- */
.hero-icon { width: 76px; height: 76px; border-radius: var(--wobble-round); border: 2px solid var(--ink); background: var(--purple-soft); display: grid; place-items: center; margin: 0 auto 14px; color: var(--purple-strong); box-shadow: 3px 3px 0 var(--purple-mid); }
.step-num { width: 36px; height: 36px; border-radius: var(--wobble-round); border: 2px solid var(--ink); background: var(--purple); color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; font-family: var(--font-display); }
.step-num-soft { width: 32px; height: 32px; border-radius: var(--wobble-round); border: 1.5px solid var(--ink); background: var(--purple-soft); color: var(--purple-ink); font-weight: 800; display: grid; place-items: center; flex: none; font-size: .9rem; font-family: var(--font-display); }
.obligation { display: flex; gap: 16px; align-items: flex-start; }
.obligation h3 { margin-bottom: 4px; }
.obligation p { color: var(--muted); margin-bottom: 8px; }
.obligation a { font-weight: 700; }
details.card > summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; font-family: var(--font-display); }
details.card[open] > summary { margin-bottom: 16px; }

/* ---------- Wishlist ---------- */
.wish-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1.5px dashed var(--line); }
.wish-item:first-child { border-top: none; }
.wish-icon { width: 38px; height: 38px; border-radius: var(--wobble-round); border: 1.5px solid var(--ink); background: var(--purple-soft); color: var(--purple-strong); display: grid; place-items: center; flex: none; }
.wish-title { font-weight: 600; overflow-wrap: anywhere; }
.wish-link { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.wish-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
@media (max-width: 640px) { .wish-form { grid-template-columns: 1fr; } }
.nudge { background: var(--purple-soft); border: 1.5px dashed var(--purple-strong); border-radius: var(--wobble-sm); padding: 14px 18px; margin-bottom: 20px; }
.big-title { position: relative; font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1.15; margin-bottom: 10px; display: inline-block; padding-bottom: 12px; }
.big-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 11px; background: var(--squiggle) left center / 100% 11px no-repeat; }
@media (max-width: 640px) { .big-title { font-size: 2rem; } }

/* ---------- About ---------- */
/* Group photo: a circle, like the avatars. */
.cover-photo { position: relative; width: 88px; height: 88px; border-radius: 50%; border: 1.5px solid var(--ink); overflow: hidden; flex: none; background: var(--purple-soft); }
.cover-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.cover-placeholder { width: 88px; height: 88px; border-radius: 50%; border: 1.5px dashed var(--ink); background: var(--purple-soft); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: var(--purple-ink); flex: none; }

/* ---------- Landing / my groups ---------- */
.hero { position: relative; text-align: center; padding: 44px 0 24px; }
.hero h1 { font-size: 2.9rem; margin-bottom: 14px; }
.hero p { color: var(--muted); font-size: 1.12rem; max-width: 560px; margin: 0 auto 26px; }
@media (max-width: 640px) { .hero h1 { font-size: 2.1rem; } }

/* Decorative doodles, positioned inside a position:relative parent (.hero, .doodle-zone). */
.doodle-zone { position: relative; }
.doodle { position: absolute; color: var(--purple); pointer-events: none; }
.doodle-1 { left: 6%; top: 36px; transform: rotate(-12deg); }
.doodle-2 { right: 7%; top: 70px; transform: rotate(10deg); }
.doodle-3 { left: 14%; bottom: 0; }
.doodle-tl { left: 2%; top: 4px; transform: rotate(-10deg); }
.doodle-tr { right: 3%; top: 40px; transform: rotate(14deg); }
@media (max-width: 640px) { .doodle { display: none; } }
.group-card { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); flex-wrap: wrap; }
.group-card:hover { color: var(--ink); }
.group-card:hover h3 { text-decoration: underline wavy var(--purple); }
.group-thumb { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--purple-soft); color: var(--purple-ink); font-weight: 800; display: grid; place-items: center; flex: none; overflow: hidden; font-family: var(--font-display); }
.group-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }

.auth-card { max-width: 460px; margin: 24px auto 0; }
.photo-picker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Drawn friend ---------- */
.drawn { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.drawn-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; }

/* =====================================================================
   Motion. Purely decorative; all of it is switched off for
   prefers-reduced-motion at the end of the file.
   ===================================================================== */
:root {
  --ease-pen: cubic-bezier(.6, .05, .35, 1);
  --ease-pop: cubic-bezier(.2, 1.5, .4, 1);
}

/* Doodles: each stroke draws itself once, then the drawing stays still. */
.doodle-svg { overflow: visible; }
.doodle-svg path {
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: doodle-draw var(--draw-dur, 1s) var(--ease-pen) var(--draw-delay, .15s) forwards;
}
.doodle-svg path:nth-child(2) { animation-delay: calc(var(--draw-delay, .15s) + .25s); }
.doodle-svg path:nth-child(3) { animation-delay: calc(var(--draw-delay, .15s) + .5s); }
.doodle-svg path:nth-child(4) { animation-delay: calc(var(--draw-delay, .15s) + .7s); }
.doodle-svg path:nth-child(5) { animation-delay: calc(var(--draw-delay, .15s) + .85s); }
@keyframes doodle-draw {
  from { opacity: 1; stroke-dashoffset: 1; }
  to { opacity: 1; stroke-dashoffset: 0; }
}
/* Staggered so the drawings appear one after another. */
.brand-mark .doodle-svg { --draw-dur: .7s; }
.hero-icon .doodle-svg { --draw-delay: .3s; }
.doodle-1 .doodle-svg { --draw-delay: .6s; }
.doodle-2 .doodle-svg { --draw-delay: .9s; }
.doodle-3 .doodle-svg { --draw-delay: 1.2s; --draw-dur: 1.5s; }
.doodle-tl .doodle-svg { --draw-delay: .7s; }
.doodle-tr .doodle-svg { --draw-delay: 1s; }
/* The header logo draws itself only on the first page of a visit (class set in _Layout). */
.intro-seen .brand-mark .doodle-svg path { animation: none; opacity: 1; stroke-dashoffset: 0; }

/* Squiggle underlines draw left to right, then nudge now and then. */
.scribble::after, .big-title::after {
  clip-path: inset(0 100% 0 0);
  transform-origin: 0 50%;
  animation:
    scribble-draw .9s var(--ease-pen) var(--scribble-delay, .35s) forwards,
    scribble-nudge 8s calc(var(--scribble-delay, .35s) + 1.2s) infinite;
}
.tab.active::after { clip-path: inset(0 100% 0 0); animation: scribble-draw .55s var(--ease-pen) .1s forwards; }
@keyframes scribble-draw { to { clip-path: inset(0 0 0 0); } }
@keyframes scribble-nudge {
  0%, 90%, 100% { transform: none; }
  92% { transform: translateY(-2px) scaleX(1.02); }
  95% { transform: translateY(1px); }
}

/* Marker highlight sweeps across (group name on the welcome page). */
.title-accent { animation: marker-sweep .8s var(--ease-pen) .55s both; }
@keyframes marker-sweep { from { background-size: 0% 42%; } }

/* Hand-drawn circles slowly "boil", like a line redrawn frame by frame. */
.hero-icon { animation: blob-morph 7s ease-in-out infinite alternate; }
@keyframes blob-morph {
  0% { border-radius: 52% 48% 55% 45% / 47% 55% 45% 53%; }
  50% { border-radius: 45% 55% 47% 53% / 55% 46% 54% 45%; }
  100% { border-radius: 56% 44% 51% 49% / 46% 53% 47% 54%; }
}

/* Step numbers land like a rubber stamp, one after the other. */
.step-num { animation: stamp .5s var(--ease-pop) .2s both; }
.grid-3 > :nth-child(2) .step-num { animation-delay: .35s; }
.grid-3 > :nth-child(3) .step-num { animation-delay: .5s; }
@keyframes stamp { from { opacity: 0; transform: scale(1.6); } }

/* "Você tirou": the reveal pops in, then the name gets underlined. */
.drawn { animation: reveal-pop .7s var(--ease-pop) .25s both; }
.drawn .scribble { --scribble-delay: 1s; }
@keyframes reveal-pop { from { opacity: 0; transform: translateY(10px) scale(.9); } }

/* The "!" on Convidar gives a little bounce every few seconds. */
.badge-alert { animation: badge-bounce 4.5s 1.5s infinite; }
@keyframes badge-bounce {
  0%, 86%, 100% { transform: none; }
  89% { transform: translateY(-4px); }
  92% { transform: translateY(0); }
  95% { transform: translateY(-1.5px); }
}

/* Flash messages drop in. */
.flash { animation: flash-in .5s var(--ease-pop) both; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-10px); } }

/* Live chat: new bubbles slide up, the unread badge pops when it changes. */
.bubble-new { animation: bubble-in .3s var(--ease-pop) both; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.badge-pop { animation: pop .4s var(--ease-pop); }

/* Small feedback. */
.btn-copied { animation: pop .4s var(--ease-pop); }
@keyframes pop { 40% { transform: scale(1.08); } }
.emoji-btn:hover, .wish-item:hover .wish-icon { animation: hop .45s ease-out; }
@keyframes hop {
  35% { transform: translateY(-4px); }
  65% { transform: translateY(0); }
  82% { transform: translateY(-1.5px); }
}
.card:has(> .group-card) { transition: transform .18s, box-shadow .18s; }
.card:has(> .group-card):hover { transform: translateY(-2px); box-shadow: 6px 7px 0 var(--purple-mid); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .doodle-svg path { opacity: 1; stroke-dashoffset: 0; }
  .scribble::after, .big-title::after, .tab.active::after { clip-path: none; }
}
