/* ==========================================================================
   Confirmar Presença Page Styles — Family Auth System
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-white);
    color: var(--color-dark);
    min-height: 100vh;     /* fallback */
    min-height: 100svh;    /* iOS: small viewport (exclui a URL bar) */
    overflow-x: hidden;
}

/* ==========================================================================
   Navigation - Light version (matching galeria sizes)
   ========================================================================== */

.navbar-light {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 28px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.navbar-light .logo {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.navbar-light .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-light .nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.navbar-light .nav-links a {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-dark);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.navbar-light .nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 1px; background: var(--color-gold);
    transition: width 0.3s ease;
}

.navbar-light .nav-links a:hover::after { width: 100%; }

.navbar-light .nav-links li.active a,
.navbar-light .nav-links a:hover {
    color: var(--color-gold-dark);
}

.navbar-light .nav-links li.active a::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 500;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--color-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background-color: var(--color-cream, #F8FAF6);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    text-align: center;
    list-style: none;
}

.mobile-nav-links li {
    margin: var(--space-xl) 0;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.active .mobile-nav-links li {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu.active .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav-links li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav-links li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav-links li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-nav-links li:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-nav-links li:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.active .mobile-nav-links li:nth-child(7) { transition-delay: 0.4s; }

.mobile-nav-links a {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-dark);
    text-decoration: none;
}

/* ==========================================================================
   Main Section
   ========================================================================== */

.confirmar-section {
    width: 100%;
    min-height: 100vh;     /* fallback */
    min-height: 100svh;    /* iOS: small viewport (sem URL bar) — evita scroll vazio */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Names */
/* Letras de fundo desligadas (decisão de 2026-05-29 — ficaram esquisitas
   no mobile e nada adicionavam ao desktop). DOM e JS continuam, mas o
   elemento é display:none — chamadas a .style.opacity viram no-op. */
.names-background {
    display: none;
}

/* ==========================================================================
   Steps — Shared base
   ========================================================================== */

.step {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    padding: 0 var(--space-2xl);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.step.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    /* small trick: re-trigger transition on display change */
    animation: stepIn 0.45s ease both;
}

@keyframes stepIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   STEP 1 — Search
   ========================================================================== */

.step-search {
    font-family: var(--font-display);
    font-size: 48px;
}

/* Input Container */
.input-container {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.guest-input {
    font-family: var(--font-display);
    font-size: 48px;
    text-align: right;
    border: none;
    outline: none;
    background-color: transparent;
    min-width: 0;
    color: var(--color-dark);
    caret-color: transparent;
    width: 15ch;
}

.guest-input::placeholder {
    opacity: 1;
    color: var(--color-dark);
}

.guest-input:focus {
    caret-color: var(--color-gold);
    text-align: center;
}

.guest-input.has-value {
    text-align: center;
    caret-color: var(--color-gold);
}

/* Dots animation */
.dots {
    padding-left: 4px;
    font-family: var(--font-display);
    font-size: 48px;
    color: var(--color-gold);
}

.dots span {
    animation: blink 1s infinite;
}

.dots span:first-child  { animation-delay: 0s; }
.dots span:nth-child(2) { animation-delay: 0.333s; }
.dots span:nth-child(3) { animation-delay: 0.66s; }

@keyframes blink {
    0%, 100% { color: var(--color-gold); }
    33%, 66% { color: var(--color-white); }
}

.dots.hidden { display: none; }

/* Message Container */
.message-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%);
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.message-container small {
    font-size: 18px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.48);
    letter-spacing: 1.3px;
}

.message-container.hidden { display: none; }

/* Results Container */
.results-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%);
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.results-container.hidden { display: none; }

/* Guest Name Display */
.guest-name-small {
    font-size: 18px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.48);
    letter-spacing: 1.3px;
    display: block;
    margin-bottom: 12px;
}

/* Pre-list (multiple results) */
.pre-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Lista longa (até 10 nomes) rola em vez de empurrar o layout. */
    max-height: 320px;
    overflow-y: auto;
    /* Espaço pra barra de rolagem não encostar nos nomes / cortar o hover. */
    padding: 4px 12px;
    /* Rolagem suave em iOS. */
    -webkit-overflow-scrolling: touch;
}

.pre-list h4 {
    cursor: pointer;
    color: var(--color-gold);
    font-weight: 200;
    font-size: 26px;
    transition: transform 0.2s ease;
}

.pre-list h4:hover {
    transform: scale(1.05);
}

/* Not found message */
.not-found {
    font-size: 18px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.48);
}

/* Single guest confirm button */
.single-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Shared button (reused from original)
   ========================================================================== */

.btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: calc(0.875rem - 1px) calc(1.5rem - 1px);
    min-height: 3.2rem;
    min-width: 260px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 12px;
}

.btn-confirm.btn-gold {
    background-color: var(--color-white);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}

.btn-confirm.btn-gold:hover {
    background-color: var(--color-gold);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(156, 175, 136, 0.35);
}

/* ==========================================================================
   STEP 2 — Password
   ========================================================================== */

.step-password {
    gap: 12px;
}

.password-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-dark);
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.25);
}

.password-guest-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.password-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--color-dark);
    text-align: center;
}

.password-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 300;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 8px;
}

/* Code digit inputs */
.code-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 12px 0;
}

.code-digit {
    width: 56px;
    height: 68px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 400;
    color: var(--color-dark);
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.015);
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    appearance: textfield;
    -moz-appearance: textfield;
}

.code-digit::-webkit-outer-spin-button,
.code-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.code-digit:focus {
    border-color: var(--color-gold);
    background: rgba(156, 175, 136, 0.04);
    box-shadow: 0 0 0 3px rgba(156, 175, 136, 0.12);
}

.code-digit.error {
    border-color: #d4564e;
    background: rgba(212, 86, 78, 0.04);
}

.code-digit.success {
    border-color: var(--color-gold);
    background: rgba(156, 175, 136, 0.1);
    color: var(--color-gold-dark);
    animation: digitSuccess 0.35s ease both;
}

.code-digit.success:nth-child(1) { animation-delay: 0.00s; }
.code-digit.success:nth-child(2) { animation-delay: 0.06s; }
.code-digit.success:nth-child(3) { animation-delay: 0.12s; }
.code-digit.success:nth-child(4) { animation-delay: 0.18s; }
.code-digit.success:nth-child(5) { animation-delay: 0.24s; }

@keyframes digitSuccess {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.code-digit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Shake animation */
.code-input-container.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%      { transform: translateX(-8px); }
    30%      { transform: translateX(8px); }
    45%      { transform: translateX(-6px); }
    60%      { transform: translateX(6px); }
    75%      { transform: translateX(-3px); }
    90%      { transform: translateX(3px); }
}

/* Error */
.password-error {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: #c0392b;
    text-align: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.password-error.visible {
    opacity: 1;
    max-height: 40px;
}

/* Attempts */
.password-attempts {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-attempts.visible {
    opacity: 1;
}

/* Hint */
.password-hint {
    margin-top: 16px;
}

.password-hint small {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
}

/* ==========================================================================
   STEP 3 — Family Confirmation
   ========================================================================== */

.step-family {
    gap: 20px;
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 100vh;
    justify-content: flex-start;
    padding-top: max(120px, 15vh);
}

/* No fluxo normal (topo-esquerda da coluna) pra não ser clipado pelo
   overflow:hidden da .confirmar-section nem ficar atrás do menu. */
.family-back-btn {
    align-self: flex-start;
    margin-bottom: 4px;
}

.family-header {
    text-align: center;
    margin-bottom: 8px;
}

.family-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.family-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 300;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.5px;
}

/* Member Card */
.family-members {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

/* "Confirmar todos" minimalista, à direita acima da lista */
.family-toolbar {
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: -6px;
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.015);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    transition: all 0.25s ease;
    animation: cardIn 0.4s ease both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.member-card:hover {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.1);
}

.member-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.member-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.member-status-dot.status-pending {
    background: rgba(0, 0, 0, 0.15);
}

.member-status-dot.status-confirmed {
    background: var(--color-gold);
    box-shadow: 0 0 8px rgba(156, 175, 136, 0.4);
}

.member-status-dot.status-declined {
    background: #d4564e;
    box-shadow: 0 0 8px rgba(212, 86, 78, 0.25);
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    color: var(--color-dark);
    letter-spacing: 0.02em;
}

.member-status-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Member action buttons */
.member-actions {
    display: flex;
    gap: 8px;
}

.btn-member {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(0, 0, 0, 0.35);
}

.btn-member:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.6);
}

/* Confirm active */
.btn-member-confirm.active {
    border-color: var(--color-gold);
    background: var(--color-gold);
    color: var(--color-white);
    box-shadow: 0 2px 10px rgba(156, 175, 136, 0.3);
}

.btn-member-confirm.active:hover {
    background: var(--color-gold-dark);
    border-color: var(--color-gold-dark);
}

/* Decline active */
.btn-member-decline.active {
    border-color: #d4564e;
    background: #d4564e;
    color: var(--color-white);
    box-shadow: 0 2px 10px rgba(212, 86, 78, 0.25);
}

.btn-member-decline.active:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Maybe active */
.btn-member-maybe.active {
    border-color: #d4a74e;
    background: #d4a74e;
    color: var(--color-white);
    box-shadow: 0 2px 10px rgba(212, 167, 78, 0.25);
}

.btn-member-maybe.active:hover {
    background: #c49a3a;
    border-color: #c49a3a;
}

/* Maybe dot */
.member-status-dot.status-maybe {
    background: #d4a74e;
    box-shadow: 0 0 8px rgba(212, 167, 78, 0.3);
}

/* ==========================================================================
   Faixa de idade — checkbox "É uma criança?" por pessoa confirmada
   ========================================================================== */

.age-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 2px;
}

/* Checkbox custom "É uma criança?" — adulto é o padrão (desmarcado) */
.age-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.age-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.age-check-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(0, 0, 0, 0.22);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    color: #fff;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.age-check-box svg {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.age-check-input:checked + .age-check-box {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.age-check-input:checked + .age-check-box svg {
    opacity: 1;
}

.age-check-input:focus-visible + .age-check-box {
    box-shadow: 0 0 0 3px rgba(156, 175, 136, 0.25);
}

.age-check-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-dark);
    line-height: 1.3;
}

.age-check-hint {
    display: block;
    font-size: 11px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 0.3px;
}

/* Bandas (<8 / 8–12) — linha de baixo, só quando "criança" marcado */
.age-bands {
    display: flex;
    gap: 8px;
    flex-basis: 100%;
    padding-left: 29px;
}

.age-chip {
    padding: 7px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: var(--color-dark);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.age-chip:hover {
    border-color: var(--color-gold);
}

.age-chip.active {
    border-color: var(--color-gold);
    background: rgba(156, 175, 136, 0.12);
    font-weight: 400;
}

/* Escondidos: campo todo quando não confirmado; bandas quando não é criança */
.age-field.age-hidden,
.age-bands.age-hidden {
    display: none;
}

/* Aviso quando "Criança?" marcado mas faixa não escolhida — explica por
   que o "Pronto" está travado. */
.age-band-warn {
    flex-basis: 100%;
    margin: 4px 0 0;
    padding-left: 29px;
    font-size: 12px;
    font-style: italic;
    color: #d4564e;
}

/* ==========================================================================
   E-mail do convite — recebe os QR codes (um por confirmação)
   ========================================================================== */

.email-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 480px;
    margin: 0;
    padding: 16px;
    background: rgba(156, 175, 136, 0.08);
    border: 1px solid rgba(156, 175, 136, 0.32);
    border-radius: 14px;
}

.email-headline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-dark);
}

.email-headline svg {
    color: var(--color-gold);
    flex-shrink: 0;
}

.email-explain {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.72);
    margin: 0;
}

.email-explain strong {
    font-weight: 500;
    color: var(--color-dark);
}

.email-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.55);
    margin-top: 2px;
}

.email-input {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: var(--color-dark);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.email-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.email-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(156, 175, 136, 0.18);
}

.email-field.email-valid .email-input {
    border-color: var(--color-gold);
}

.email-field.email-invalid .email-input {
    border-color: #d4564e;
}

.email-feedback {
    font-size: 12px;
    min-height: 14px;
    font-weight: 400;
}

.email-field.email-valid .email-feedback::after {
    content: '✓ e-mail válido';
    color: #5a7a4f;
}

.email-field.email-invalid .email-feedback::after {
    content: '✗ e-mail inválido';
    color: #d4564e;
}

/* Escondido enquanto não houver ninguém confirmado */
.email-field.email-hidden {
    display: none;
}

/* ==========================================================================
   Lista aberta — convidado declara acompanhantes (até max_guests)
   ========================================================================== */

.companion-adder {
    width: 100%;
    max-width: 480px;
    margin: 0;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: 14px;
}

.companion-adder.companion-hidden {
    display: none;
}

.companion-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.companion-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-dark);
}

.companion-hint {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.55);
}

.companion-row {
    display: flex;
    gap: 8px;
}

.companion-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--color-dark);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.companion-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.companion-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(156, 175, 136, 0.18);
}

.companion-add-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-white);
    background: var(--color-gold);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.companion-add-btn:hover {
    background: var(--color-gold-dark);
}

.companion-full {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
    text-align: center;
}

/* Remover acompanhante (lista aberta) */
.btn-member-remove:hover {
    border-color: #d4564e;
    color: #d4564e;
}

/* ==========================================================================
   Decline Confirmation Modal
   ========================================================================== */

.decline-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.decline-modal.visible {
    opacity: 1;
    visibility: visible;
}

.decline-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.decline-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.decline-modal.visible .decline-modal-content {
    transform: translateY(0) scale(1);
}

.decline-modal-icon {
    color: #d4a74e;
    margin-bottom: 16px;
}

.decline-modal-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--color-dark);
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.decline-modal-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    margin-bottom: 28px;
}

.decline-modal-text strong {
    font-weight: 400;
    color: var(--color-dark);
}

.decline-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.decline-modal-btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.decline-modal-cancel {
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    color: var(--color-dark);
}

.decline-modal-cancel:hover {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.03);
}

.decline-modal-confirm {
    background: #d4564e;
    color: var(--color-white);
}

.decline-modal-confirm:hover {
    background: #c0453e;
    box-shadow: 0 4px 14px rgba(212, 86, 78, 0.3);
}

/* ==========================================================================
   Summary Tags
   ========================================================================== */

.family-summary {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
    max-width: 480px;
}

.summary-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.summary-tag.tag-confirmed {
    background: rgba(156, 175, 136, 0.12);
    color: var(--color-gold-dark);
}

.summary-tag.tag-maybe {
    background: rgba(212, 167, 78, 0.1);
    color: #b08930;
}

.summary-tag.tag-declined {
    background: rgba(212, 86, 78, 0.08);
    color: #c0392b;
}

.summary-tag.tag-pending {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.4);
}

/* Family actions */
.family-actions {
    margin-top: 8px;
}

.btn-confirm-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-confirm-all:hover {
    color: var(--color-gold-dark);
    border-color: var(--color-gold);
    background: rgba(156, 175, 136, 0.05);
}

.btn-confirm-all svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.btn-confirm-all:hover svg {
    opacity: 0.8;
}

/* Footer note */
.family-footer {
    margin-top: 4px;
}

.family-footer small {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(0, 0, 0, 0.25);
    letter-spacing: 0.3px;
}

/* ==========================================================================
   Done Button (Step 3)
   ========================================================================== */

.btn-done {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 48px;
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 2px;
    color: var(--color-white);
    background: var(--color-gold);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-done:hover:not(:disabled) {
    background: var(--color-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 175, 136, 0.35);
}

.btn-done:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-done svg {
    transition: transform 0.2s ease;
}

.btn-done:hover:not(:disabled) svg {
    transform: translateX(4px);
}

/* ==========================================================================
   STEP 4 — Farewell / Done Screen
   ========================================================================== */

.step-done {
    gap: 20px;
    text-align: center;
}

.done-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    animation: doneIconIn 0.6s ease both;
}

@keyframes doneIconIn {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.done-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--color-dark);
    animation: fadeUp 0.5s ease 0.15s both;
}

.done-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    animation: fadeUp 0.5s ease 0.25s both;
}

.done-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: 0.3px;
    text-align: left;
}

.done-line strong {
    font-weight: 400;
}

.done-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-confirmed { background: var(--color-gold); }
.dot-maybe     { background: #d4a74e; }
.dot-declined  { background: #d4564e; }

.done-message {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 300;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    margin-top: 4px;
    animation: fadeUp 0.5s ease 0.35s both;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 1.5px;
    color: var(--color-dark);
    background: transparent;
    border: 1.5px solid var(--color-dark);
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-top: 8px;
    animation: fadeUp 0.5s ease 0.45s both;
}

.btn-back-home:hover {
    background: var(--color-dark);
    color: var(--color-cream);
}

.btn-back-home svg {
    transition: transform 0.2s ease;
}

/* Linha de 2 CTAs no step "done": gifts (primário, preenchido)
   + voltar pra home (secundário, outline) — empilha no mobile. */
.done-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.btn-gifts-cta {
    background: var(--color-gold);
    color: var(--color-white);
    border-color: var(--color-gold);
}

.btn-gifts-cta:hover {
    background: var(--color-gold-dark);
    color: var(--color-white);
    border-color: var(--color-gold-dark);
}

.btn-back-home:hover svg {
    transform: translateX(4px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Toast Error
   ========================================================================== */

.toast-error {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2C2C2C;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.3px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast-error.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-dark {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-dark);
    color: var(--color-white);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1.25px;
    font-family: var(--font-display);
    display: flex;
    justify-content: center;
    padding: 12px 0;
    z-index: 50;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 767px) {
    .navbar-light { padding: 20px 24px; }
    .navbar-light .nav-links { display: none; }
    .menu-toggle { display: flex; }

    .input-container {
        padding: 0 32px;
    }

    .guest-input {
        font-size: 32px;
    }

    .dots {
        font-size: 32px;
    }

    /* #7 — scroll vazio era do body+section usando 100vh (no iOS inclui a
       URL bar). Agora ambos usam 100svh (small viewport). Mantém
       justify-content:center, conteúdo centraliza, sem scroll fantasma. */

    /* #8 — letras de fundo agora desligadas globalmente (acima) */

    /* #9 — no celular o input fica no fluxo natural acima da mensagem
       e dos resultados (como no desktop). Sem position:absolute. */
    .message-container {
        position: static;
        margin-top: 24px;
        padding: 0 32px;
        transform: none;
    }

    .results-container {
        position: static;
        margin-top: 16px;
        padding: 0 32px;
        transform: none;   /* zera o translate(-50%) da regra base */
    }

    .pre-list {
        /* Teto menor no mobile pra lista longa não tomar a tela toda. */
        max-height: 48vh;
    }

    .pre-list h4 {
        font-size: 22px;
    }

    .btn-confirm {
        font-size: 14px;
        letter-spacing: 1px;
        min-width: 180px;
    }

    /* Password step */
    .code-digit {
        width: 48px;
        height: 60px;
        font-size: 26px;
        border-radius: 10px;
    }

    .code-input-container {
        gap: 8px;
    }

    .password-title {
        font-size: 1.5rem;
    }

    /* Family step (#7 — sem min-height:100vh no celular pra não criar
       espaço em branco/scroll vazio quando a família tem poucos cards) */
    .step-family {
        min-height: auto;
        padding-top: 90px;
        padding-bottom: 40px;
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }

    .member-card {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .member-name {
        font-size: 17px;
    }

    .btn-member {
        width: 38px;
        height: 38px;
    }

    .btn-confirm-all {
        padding: 12px 24px;
        font-size: 14px;
    }

    .btn-done {
        padding: 14px 36px;
        font-size: 17px;
    }

    .btn-back-home {
        padding: 12px 28px;
        font-size: 16px;
    }

    .age-chip {
        padding: 6px 12px;
        font-size: 12px;
    }

    .email-input {
        font-size: 13px;
        padding: 9px 12px;
    }
}

/* Celulares estreitos (≤480) — aperta paddings e diminui um pouco a fonte
   pra o placeholder "Digite seu nome" caber sem ser cortado. */
@media (max-width: 480px) {
    .step {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    .input-container {
        padding: 0 16px;
    }
    .guest-input {
        font-size: 28px;
    }
    .dots {
        font-size: 28px;
    }
}

@media (max-width: 380px) {
    .code-digit {
        width: 42px;
        height: 54px;
        font-size: 22px;
    }

    .code-input-container {
        gap: 6px;
    }

    /* Celulares muito estreitos (iPhone SE etc.) — mais agressivo. */
    .input-container {
        padding: 0 4px;
    }
    .guest-input {
        font-size: 22px;
    }
    .dots {
        font-size: 22px;
    }
}

/* ==========================================================================
   OVERRIDE: Botão "Sim" (confirmar) = SEMPRE VERDE
   Ignora o tema global — regra de negócio: confirmação é sempre verde.
   ========================================================================== */

.btn-member-confirm.active {
    border-color: #4CAF50 !important;
    background: #4CAF50 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.35) !important;
}

.btn-member-confirm.active:hover {
    background: #43A047 !important;
    border-color: #43A047 !important;
}

.btn-member-confirm:hover {
    border-color: rgba(76, 175, 80, 0.4);
    color: #4CAF50;
}

/* Dot de status confirmado = sempre verde também */
.member-status-dot.status-confirmed {
    background: #4CAF50 !important;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4) !important;
}

/* Dot na tela final */
.dot-confirmed {
    background: #4CAF50 !important;
}