/* Hallmark · checked: 2026-11-17 · genre: editorial (inferred) · shape: app screen
 * floor: 0 FAIL · fixed: 7a, 12, 19, 29, 34, 39a, 40, 41, 48, 63, 64 · structural: none printed (app scope)
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · answered F24 · the hairline keeps each card's edge on the ivory paper where the soft shadow alone washes out */
/* Amigo Secreto — Natal clássico.
   Verde-pinheiro, vermelho-cereja, dourado e papel marfim. Títulos serifados,
   texto em fonte do sistema. Tema claro por padrão; escuro pelo aparelho ou pelo botão. */
:root {
  --bg: #f8f3ea;
  --card: #fffdf8;
  --field: #f7f1e6;
  --ink: #1c2a22;
  --muted: #5f6b63;
  --line: #e9dfcf;
  --line-strong: #d8cbb5;
  --hero: #123a2a;
  --hero-2: #1d5a40;
  --hero-ink: #fbf6ec;
  --hero-soft: rgb(251 246 236 / .82);
  --snow: rgb(255 255 255 / .55);
  --badge: rgb(255 255 255 / .1);
  --red: #b42318;
  --red-2: #8c1a12;
  --red-soft: #fbe9e6;
  --green: #1f6b4a;
  --green-soft: #e3f1e8;
  --on-green: #ffffff;
  --gold: #b8861b;
  --gold-soft: #e8c66a;
  --warn-bg: #fdf3da;
  --warn-line: #efd99c;
  --on-color: #fffaf3;
  --on-red: var(--on-color);
  --red-ink: #b42318;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --hero-line: rgb(251 246 236 / .18);
  --hero-line-strong: rgb(251 246 236 / .3);
  --gold-line: rgb(232 198 106 / .45);
  --gold-band: rgb(232 198 106 / .9);
  --selection: rgb(184 134 27 / .28);
  --focus-glow: rgb(184 134 27 / .18);
  --sheen: rgb(255 255 255 / .15);
  --sheen-soft: rgb(255 255 255 / .14);
  --paper-ring: rgb(255 255 255 / .18);
  --paper-dash: rgb(255 255 255 / .35);
  --paper-ghost: rgb(255 255 255 / .16);
  --overlay: rgb(10 33 23 / .62);
  --shadow-red: 0 6px 16px rgb(140 26 18 / .25);
  --shadow-gift: 0 14px 32px rgb(140 26 18 / .3);
  --shadow-sheet: 0 24px 60px rgb(0 0 0 / .35);
  --shadow-tab: 0 1px 3px rgb(0 0 0 / .15);
  --shadow-toast: 0 8px 24px rgb(0 0 0 / .25);
  --wa: #178044;
  --shadow: 0 1px 2px rgb(60 40 20 / .05), 0 8px 24px rgb(60 40 20 / .07);
  --shadow-lift: 0 2px 4px rgb(60 40 20 / .06), 0 16px 36px rgb(60 40 20 / .1);
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1611; --card: #142219; --field: #0f1b14; --ink: #f2ece0; --muted: #a8b4ab;
    --line: #233629; --line-strong: #31493a;
    --hero: #0a2117; --hero-2: #14402d; --hero-ink: #fbf6ec; --hero-soft: rgb(251 246 236 / .78);
    --snow: rgb(255 255 255 / .45); --badge: rgb(255 255 255 / .08);
    --red: #d2453a; --red-2: #a52a20; --red-soft: #3a1714; --red-ink: #ff8f80;
    --green: #7fd1a3; --green-soft: #173527; --on-green: #0c1611;
    --gold: #e2b955; --gold-soft: #e8c66a;
    --warn-bg: #33290f; --warn-line: #5a4a1c;
    --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 10px 26px rgb(0 0 0 / .3);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1611; --card: #142219; --field: #0f1b14; --ink: #f2ece0; --muted: #a8b4ab;
  --line: #233629; --line-strong: #31493a;
  --hero: #0a2117; --hero-2: #14402d; --hero-ink: #fbf6ec; --hero-soft: rgb(251 246 236 / .78);
  --snow: rgb(255 255 255 / .45); --badge: rgb(255 255 255 / .08);
  --red: #d2453a; --red-2: #a52a20; --red-soft: #3a1714; --red-ink: #ff8f80;
  --green: #7fd1a3; --green-soft: #173527; --on-green: #0c1611;
  --gold: #e2b955; --gold-soft: #e8c66a;
  --warn-bg: #33290f; --warn-line: #5a4a1c;
  --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 10px 26px rgb(0 0 0 / .3);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px rgb(0 0 0 / .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* clip (não hidden): corta o que passar da largura sem deixar a página rolar de lado no iPhone */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.125rem/1.5 var(--sans); /* rem: respeita o tamanho de letra escolhido no navegador */
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}
::selection { background: var(--selection); color: inherit; }
input, textarea { caret-color: var(--red); }
html { scrollbar-color: var(--line-strong) transparent; accent-color: var(--green); }
.tag, .chip, .receipt, dl.ficha dd, ul.qa .receipt { font-variant-numeric: tabular-nums; }
:where(a) { color: var(--green); text-underline-offset: 3px; }

/* o main ocupa a tela toda; cada bloco tem a largura da coluna, e o cabeçalho vai de ponta a ponta */
main {
  --measure: 35rem;
  padding: 0 0 calc(3rem + env(safe-area-inset-bottom));
}
main.wide { --measure: 44rem; }
#app > * { width: min(var(--measure), 100% - 2rem); margin-inline: auto; }
#app > header.top { width: auto; margin-inline: 0; }

/* ---------- cabeçalho: céu de pinheiro com neve e fita dourada ---------- */
header.top {
  position: relative;
  text-align: center;
  color: var(--hero-ink);
  padding: calc(2.4rem + env(safe-area-inset-top)) max(1.25rem, 50% - 16.25rem) 4rem;
  background-color: var(--hero);
  background-image:
    radial-gradient(circle at 12% 22%, var(--snow) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 14%, var(--snow) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 68%, var(--snow) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 90% 60%, var(--snow) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 56% 36%, var(--snow) 0 1px, transparent 2px),
    radial-gradient(120% 95% at 50% 0%, var(--hero-2), transparent 72%);
  background-size: 11rem 9rem, 13rem 11rem, 9rem 12rem, 15rem 10rem, 7rem 8rem, 100% 100%;
  /* neve cai por dois minutos e para (o desenho se repete, então parar não dá salto): poupa bateria */
  animation: neve 40s linear 3 forwards;
}
@keyframes neve {
  to { background-position: 0 9rem, 0 11rem, 0 12rem, 0 10rem, 0 8rem, 0 0; }
}
/* fita dourada na base do cabeçalho */
header.top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 20%, var(--gold) 50%, var(--gold-soft) 80%, transparent);
  opacity: .9;
}
header.top .badge {
  display: inline-grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--badge);
  box-shadow: inset 0 0 0 1.5px var(--gold-soft);
  color: var(--gold-soft);
}
header.top .badge-ico { width: 2rem; height: 2rem; stroke-width: 1.5; }
header.top h1 {
  font: 600 2rem/1.15 var(--serif);
  letter-spacing: -.005em;
  margin: .9rem auto 0;
  max-width: 28rem;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
header.top .lead {
  margin: .55rem auto 0;
  max-width: 26rem;
  color: var(--hero-soft);
  font-size: .98rem;
  text-wrap: pretty;
}
header.top .theme {
  position: absolute;
  top: calc(.75rem + env(safe-area-inset-top));
  right: max(.8rem, env(safe-area-inset-right));
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: var(--hero-ink);
  background: var(--badge);
  border: 1px solid var(--hero-line);
}
header.top .theme.left { right: auto; left: max(.8rem, env(safe-area-inset-left)); }
header.top .theme.dot::after {
  content: "";
  position: absolute;
  top: .1rem;
  right: .1rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px var(--hero);
}
/* atalhos dentro do cabeçalho (trocar de amigo secreto, voltar, criar) */
.switcher { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1rem; }
.switcher button, .switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: .3rem .9rem;
  font: 600 .88rem/1.2 var(--sans);
  color: var(--hero-ink);
  background: transparent;
  border: 1px solid var(--hero-line-strong);
  border-radius: 999px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.switcher button.on { background: var(--hero-ink); color: var(--hero); border-color: transparent; }
/* o primeiro bloco sobe por cima do cabeçalho */
header.top + * { margin-top: -2.6rem; position: relative; }

/* ---------- texto ---------- */
/* pretty (e não balance): com o ícone na frente, balance partia "Perguntas / anônimas para você" */
h2 { font: 600 1.18rem/1.25 var(--serif); margin: 0 0 .5rem; text-wrap: pretty; }
/* ícones: SVG de traço, mesma espessura em todo o app */
svg.ico, svg.badge-ico, svg.status-ico, svg.lock-ico, svg.gift {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
svg .fill { fill: currentColor; stroke: none; }
svg.ico { width: 1.1em; height: 1.1em; vertical-align: -.17em; margin-right: .5rem; }
h2 > svg.ico, summary svg.ico, .set-head svg.ico { color: var(--green); }
header.top .theme svg.ico { width: 1.15rem; height: 1.15rem; margin: 0; }
p { margin: .45rem 0; }
.muted { color: var(--muted); font-size: .95rem; }
code, .mono { font-family: var(--mono); font-size: .8rem; overflow-wrap: anywhere; }
.chain { overflow-wrap: anywhere; font-weight: 600; }
.notice {
  font-size: .9rem;
  padding: .55rem .8rem;
  border-radius: 12px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
}
.notice.on { background: var(--green-soft); border-color: transparent; }

/* ---------- cartões ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: .9rem 0;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.card .card { box-shadow: none; margin-bottom: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .9rem 0 0; background: transparent; }
.card.ok { color: var(--ink); background: var(--green-soft); border-color: transparent; box-shadow: none; }
.card.warn { color: var(--ink); background: var(--warn-bg); border-color: var(--warn-line); box-shadow: none; }
header.top + .card.ok, header.top + .card.warn { box-shadow: var(--shadow-lift); }
details.card > summary {
  cursor: pointer;
  font: 600 1.08rem/1.3 var(--serif);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after {
  content: "";
  flex: none;
  width: .55rem;
  height: .55rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s;
  margin-right: .2rem;
}
details.card[open] > summary::after { transform: rotate(-135deg); }
details.card[open] > summary { margin-bottom: .6rem; }
details:not(.card) > summary { cursor: pointer; }

/* ---------- botões e campos ---------- */
button, .button {
  font: 600 1rem/1.2 var(--sans);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: .7rem 1.2rem;
  min-height: 2.9rem;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}
a.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
button:hover:not(:disabled), .button:hover { filter: brightness(.97); }
button:active:not(:disabled), .button:active { transform: scale(.98); }
button.primary {
  background: linear-gradient(180deg, var(--red), var(--red-2));
  color: var(--on-color);
  border-color: transparent;
  width: 100%;
  min-height: 3.25rem;
  font-size: 1.05rem;
  box-shadow: var(--shadow-red), inset 0 1px 0 var(--sheen);
}
button.small, a.button.small { min-height: 2.3rem; padding: .35rem .9rem; font-size: .9rem; }
button.danger { color: var(--red-ink); background: transparent; border-color: var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: saturate(.4); }
a:focus-visible, button:focus-visible, .button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-soft);
  outline-offset: 2px;
}
label { display: block; font-weight: 600; font-size: .92rem; margin: .75rem 0 .3rem; }
input, textarea, select {
  font: inherit;
  width: 100%;
  padding: .75rem .9rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ink);
  min-height: 3rem;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--focus-glow); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
textarea { min-height: 5rem; resize: vertical; }
textarea[aria-label="Chave de recuperação"] { font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
/* iPhone: o campo de data ignora a largura e vaza para fora do cartão */
input[type="date"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
label.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 600; cursor: pointer; }
label.check input { width: 1.3rem; min-height: 1.3rem; height: 1.3rem; margin-top: .15rem; flex: none; accent-color: var(--green); }
label.check .muted { font-weight: 400; }

.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 10rem; min-width: 0; }
.stack > * + * { margin-top: .65rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.fields .wide { grid-column: 1 / -1; }
@media (max-width: 22rem) { .fields { grid-template-columns: 1fr; } }

/* ---------- pessoas ---------- */
ul.people { list-style: none; padding: 0; margin: .5rem 0 0; }
ul.people li {
  display: flex;
  align-items: center;
  gap: .45rem .65rem;
  flex-wrap: wrap;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
}
ul.people li:first-child { border-top: 0; }
ul.people .name { font-weight: 600; flex: 1 1 7rem; overflow-wrap: anywhere; }
ul.people .tags { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: .35rem; padding-left: 2.95rem; }
ul.people .access { flex: 1 1 100%; display: flex; gap: .4rem; padding-left: 2.95rem; }
ul.people .tags:empty { display: none; }
ul.people .pending { flex: 1 1 100%; padding-left: 2.95rem; font-size: .85rem; color: var(--muted); }
.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  color: var(--on-color);
  font: 700 .85rem/1 var(--sans);
  box-shadow: inset 0 0 0 2px var(--paper-ring);
}
.tag {
  font-size: .75rem;
  font-weight: 600;
  padding: .16rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.tag.on { color: var(--green); border-color: transparent; background: var(--green-soft); }
.tag.alert { color: var(--red-ink); border-color: transparent; background: var(--red-soft); }
.add-person { margin: .2rem 0 .8rem; }

/* ---------- lista de amigos secretos (host) ---------- */
ul.events { list-style: none; padding: 0; margin: .4rem 0 0; }
ul.events li + li { border-top: 1px solid var(--line); }
button.event {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 12px;
  padding: .8rem .5rem;
  margin: 0 -.5rem;
  width: calc(100% + 1rem);
  background: transparent;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .4rem .75rem;
  align-items: center;
}
button.event::after {
  content: "";
  grid-row: 1 / span 2;
  grid-column: 2;
  width: .5rem;
  height: .5rem;
  border-right: 2px solid var(--muted);
  border-top: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-right: .3rem;
}
button.event:hover:not(:disabled) { filter: none; background: var(--field); }
.event-name { font: 600 1.06rem/1.25 var(--serif); overflow-wrap: anywhere; }
.event-meta { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- revelação: um presente embrulhado ---------- */
.reveal {
  position: relative;
  overflow: hidden;
  text-align: center;
  color: var(--on-red);
  background:
    linear-gradient(90deg, transparent calc(50% - 14px), var(--gold-band) calc(50% - 14px), var(--gold-band) calc(50% + 14px), transparent calc(50% + 14px)) top / 100% 1.1rem no-repeat,
    radial-gradient(90% 70% at 50% 0%, var(--sheen-soft), transparent 70%),
    linear-gradient(180deg, var(--red), var(--red-2));
  border-radius: 24px;
  padding: 2.4rem 1.25rem 1.8rem;
  margin: .9rem 0;
  box-shadow: var(--shadow-gift);
}
.reveal::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1.5px dashed var(--paper-dash);
  border-radius: 16px;
  pointer-events: none;
}
.reveal > * { position: relative; z-index: 1; }
.reveal .gift { width: 3.4rem; height: 3.4rem; stroke-width: 1.5; color: var(--gold-soft); display: inline-block; animation: balanca 2.4s ease-in-out infinite; }
.reveal .lede { font-size: 1.05rem; margin: 0; opacity: .9; }
.reveal .title { font: 600 1.4rem/1.2 var(--serif); margin: .5rem 0 .2rem; text-wrap: balance; }
.reveal .hint { font-size: .92rem; opacity: .86; margin-bottom: 1rem; }
.reveal .who {
  font: 600 2.7rem/1.1 var(--serif);
  margin: .35rem 0 .2rem;
  overflow-wrap: anywhere;
  text-wrap: balance;
  animation: surge .6s cubic-bezier(.16, 1, .3, 1) both;
}
.reveal .who::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 3px;
  border-radius: 3px;
  background: var(--gold-soft);
  margin: .75rem auto .95rem;
}
.reveal button { background: var(--on-color); color: var(--red-2); border: 0; font-weight: 700; padding-inline: 1.5rem; }
.reveal button.ghost { background: var(--paper-ghost); color: var(--on-red); }
@keyframes balanca { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) translateY(-3px); } }
@keyframes surge { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* ---------- conferência ---------- */
ul.checks { list-style: none; padding: 0; margin: .4rem 0; }
ul.checks li { padding: .2rem 0; }
ul.checks li.good, ul.checks li.bad { padding-left: 1.9rem; position: relative; }
ul.checks li.good::before, ul.checks li.bad::before {
  position: absolute;
  left: 0;
  top: .3rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .75rem;
  font-weight: 800;
}
ul.checks li.good::before, ul.checks li.bad::before { content: ""; }
ul.checks li.good::before { background: var(--green); }
ul.checks li.bad::before { background: var(--red); }
ul.checks li.good::after, ul.checks li.bad::after {
  content: "";
  position: absolute;
  left: .3rem;
  top: .6rem;
  width: .7rem;
  height: .7rem;
  background: var(--card);
  -webkit-mask: var(--mark) center / contain no-repeat;
  mask: var(--mark) center / contain no-repeat;
}
ul.checks li.good::after { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
ul.checks li.bad::after { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ---------- ficha de presente ---------- */
dl.ficha { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; margin: .5rem 0 0; }
dl.ficha dt { color: var(--muted); font-size: .9rem; }
dl.ficha dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- perguntas anônimas (balões) ---------- */
ul.qa { list-style: none; padding: 0; margin: .7rem 0; display: grid; gap: .9rem; }
ul.qa li { display: grid; gap: .35rem; }
ul.qa p { margin: 0; }
ul.qa .q, ul.qa .a {
  max-width: 88%;
  padding: .6rem .85rem;
  border-radius: 16px;
  overflow-wrap: anywhere;
}
ul.qa .q { justify-self: start; background: var(--field); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
ul.qa .a { justify-self: end; background: var(--green-soft); border-bottom-right-radius: 4px; }
ul.qa .q::before, ul.qa .a::before {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
ul.qa .q::before { content: "Pergunta"; }
ul.qa .a::before { content: "Resposta"; }
ul.qa .receipt { justify-self: start; font-size: .82rem; color: var(--muted); padding-left: .3rem; }
ul.qa textarea { min-height: 4rem; }

/* ---------- confraternização ---------- */
.card.party { display: flex; align-items: center; gap: .85rem; border-color: var(--warn-line); }
.card.party .ico { width: 1.7rem; height: 1.7rem; margin: 0; color: var(--gold); }
.card.party .grow { flex: 1; min-width: 0; }
.card.party strong { font: 600 1.06rem/1.25 var(--serif); }
.card.party p { margin: .1rem 0 0; overflow-wrap: anywhere; }

/* ---------- mensagens e WhatsApp ---------- */
.wa-btn, a.button.wa-btn { background: var(--wa); color: var(--on-color); border-color: transparent; }
textarea.message { font: inherit; font-size: .95rem; line-height: 1.45; min-height: 10rem; }
ul.placeholders { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; font-size: .9rem; color: var(--muted); }
ul.placeholders code { color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 0 .3rem; }

/* ---------- janelas (instalar, configurações, mensagem) ---------- */
dialog.sheet {
  width: min(32rem, 100% - 1.5rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold-soft);
  border-radius: 24px;
  padding: 1.2rem 1.3rem 1.4rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sheet);
}
dialog.sheet::backdrop { background: var(--overlay); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.sheet-head h2 { margin: 0; font-size: 1.3rem; }
ul.why { margin: .3rem 0 1rem; padding-left: 1.2rem; }
ul.why li { margin: .2rem 0; }
.tabs { display: flex; gap: .3rem; padding: .25rem; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.tabs button { flex: 1; min-height: 2.3rem; padding: .3rem .4rem; font-size: .88rem; border: 0; background: transparent; color: var(--muted); }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-tab); }
ol.steps { list-style: none; counter-reset: passo; padding: 0; margin: 1rem 0; display: grid; gap: .8rem; }
ol.steps li { counter-increment: passo; position: relative; padding-left: 2.7rem; min-height: 2rem; }
ol.steps li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -.1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 .95rem/1 var(--sans);
  background: var(--green);
  color: var(--on-green);
}
.settings section { padding: .9rem 0; border-top: 1px solid var(--line); }
.settings section:first-child { border-top: 0; padding-top: .3rem; }
.settings section > * + * { margin-top: .5rem; }
.set-head { display: flex; align-items: center; gap: .3rem; }
.set-head strong { flex: 1; font: 600 1.05rem/1.3 var(--serif); }

/* ---------- aviso flutuante ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 1rem);
  opacity: 0;
  pointer-events: none;
  background: var(--hero);
  color: var(--hero-ink);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  max-width: calc(100% - 2rem);
  transition: opacity .2s, transform .2s;
  z-index: 10;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
  box-shadow: var(--shadow-toast), inset 0 -2px 0 var(--gold-soft);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  header.top, .reveal .gift, .reveal .who { animation: none; }
  #toast, button, details.card > summary::after { transition: none; }
}

/* lembrete discreto (senha pessoal) */
.hint-link { text-align: center; margin: -.2rem 0 .4rem; }
button.link {
  background: none;
  border: 0;
  min-height: 2.4rem;
  padding: .3rem .6rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

/* senha pessoal: cartão pequeno e claro */
.card.lockcard { display: flex; align-items: flex-start; gap: .8rem; flex-wrap: wrap; border-color: var(--warn-line); }
.card.lockcard .lock-ico { width: 1.6rem; height: 1.6rem; color: var(--gold); margin-top: .05rem; } /* alinhado ao título, não ao meio do texto */
.card.lockcard .grow { flex: 1 1 12rem; min-width: 0; }
.card.lockcard strong { font: 600 1.08rem/1.25 var(--serif); }
.card.lockcard p { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }
.card.lockcard button { flex: 0 0 auto; }
/* data da troca no cabeçalho */
header.top .chip {
  display: inline-block;
  margin: .8rem auto 0;
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--badge);
  border: 1px solid var(--gold-line);
  color: var(--hero-ink);
  font-weight: 600;
  font-size: .95rem;
}

/* telas de aviso (fechado, impedido, encerrado, saiu) */
.card.status { text-align: center; padding: 1.6rem 1.3rem 1.4rem; }
.card.status .status-ico { width: 2.75rem; height: 2.75rem; stroke-width: 1.5; color: var(--gold); margin-bottom: .5rem; }
.card.status h2 { font-size: 1.4rem; }
.card.status p { color: var(--muted); max-width: 26rem; margin: .5rem auto 1rem; }


/* explicação abaixo de uma opção */
label.check .sub { display: block; margin-top: .15rem; font-size: .9rem; }

/* erro escrito ao lado do campo */
.field-error { color: var(--red-ink); font-size: .9rem; font-weight: 600; margin: .35rem 0 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-ink); }

/* senha com botão de mostrar */
.pw { position: relative; }
.pw input { padding-right: 6rem; }
.pw-toggle {
  position: absolute;
  top: .3rem;
  bottom: .3rem;
  right: .3rem;
  min-height: 0;
  padding: 0 .8rem;
  font-size: .88rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}
.pw-toggle:hover:not(:disabled) { filter: none; background: var(--line); color: var(--ink); }

/* ação em andamento */
button[aria-busy="true"] { cursor: progress; }

/* etiqueta dentro de um título recolhível segue a fonte das etiquetas */
summary .tag { font-family: var(--sans); }

/* confirmação antes de uma ação séria: título, o que acontece, e os dois caminhos */
dialog.confirm { width: min(26rem, 100% - 1.5rem); }
dialog.confirm h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
dialog.confirm p { margin: 0 0 .5rem; color: var(--muted); }
.confirm-actions { display: grid; gap: .6rem; margin-top: 1.1rem; }
.confirm-actions button { width: 100%; }

/* adicionar várias pessoas: abre abaixo do campo de uma pessoa */
details.add-many { margin: 0 0 .8rem; }
details.add-many > summary { font-weight: 600; font-size: .92rem; color: var(--green); list-style: none; display: flex; align-items: center; gap: .5rem; }
details.add-many > summary::-webkit-details-marker { display: none; }
details.add-many > summary::before {
  content: "";
  width: .45rem;
  height: .45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s;
}
details.add-many[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { details.add-many > summary::before { transition: none; } }
details.add-many[open] > summary { margin-bottom: .4rem; }

/* voltar para a lista (painel do host): canto de cima, à esquerda, onde se procura um voltar */
header.top .back {
  position: absolute;
  top: calc(.75rem + env(safe-area-inset-top));
  left: max(.8rem, env(safe-area-inset-left));
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  min-height: 2.75rem;
  padding: 0 1rem 0 .6rem;
  font: 600 .92rem/1 var(--sans);
  color: var(--hero-ink);
  background: var(--badge);
  border: 1px solid var(--hero-line);
}
header.top .back svg.ico { width: 1.15rem; height: 1.15rem; margin: 0; }

/* avisos já ligados: uma linha no rodapé em vez de um cartão */
.push-footer { text-align: center; margin-top: 1.4rem; }
.push-footer button.link { min-height: 2.75rem; }

/* fileira de etiquetas: quebra de linha em vez de vazar do cartão */
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
/* título recolhível com etiqueta: a etiqueta desce inteira para a linha de baixo, o título não parte */
details.card > summary > span { display: flex; flex-wrap: wrap; align-items: center; column-gap: .5rem; row-gap: .3rem; }
details.card > summary > span > svg.ico { margin-right: 0; }

/* adicionar várias pessoas: lista numerada, um nome por campo */
ol.many-list { margin: 0; padding-left: 1.6rem; display: grid; gap: .5rem; }
ol.many-list li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
ol.many-list .field-error { margin-top: .25rem; }
details.add-many button.link { display: block; padding-inline: 0; color: var(--green); text-decoration-color: currentColor; }

/* Participante | Organizador: um botão de dois lados, o lado atual destacado */
nav.mode {
  display: inline-flex;
  margin: 1rem auto 0;
  padding: .2rem;
  border-radius: 999px;
  background: var(--badge);
  border: 1px solid var(--hero-line);
}
nav.mode a {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  font: 600 .9rem/1 var(--sans);
  color: var(--hero-soft);
  text-decoration: none;
}
nav.mode a.on { background: var(--hero-ink); color: var(--hero); }
nav.mode a:not(.on):hover { color: var(--hero-ink); }
