:root {
    --bg: #f5f6f1; 
    --card: #ffffff;
    --ink: #111111;
    --muted: #8e8e93;
    --accent: #007aff;
    --purple: #6d4aff;
    --bar: #1c1c1e; 
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

html, body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg); 
    color: var(--ink); 
    line-height: 1.5; 
    overflow-x: hidden; 
    width: 100%;
}

h1, h2, h3, h4 { margin: 0; }
button { cursor: pointer; outline: none; }

.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.box-shadow { box-shadow: 0 10px 30px rgba(0,0,0,0.15); }

.app { max-width: 480px; margin: 0 auto; position: relative; background: var(--bg); min-height: 100vh; overflow-x: hidden; }
.hero { position: relative; width: 100%; height: 400px; z-index: 1; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.content-wrapper {
    position: relative; z-index: 2; margin-top: -50px; background: var(--bg); 
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.08); overflow: hidden;
}
.handle { width: 36px; height: 4px; background: #d1d1d6; border-radius: 2px; margin: 12px auto 0; }
.hero-card { padding: 24px 24px 10px; text-align: center; }
.title { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 600; margin-bottom: 8px; }
.subtitle { font-size: 15px; color: var(--muted); max-width: 320px; margin: 0 auto; }
.section { padding: 24px 24px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-head h2 { font-size: 20px; font-weight: 700; }

.stack { position: relative; height: 380px; width: 100%; margin-top: 10px; }
.stack .card {
    position: absolute; width: 100%; height: 100%; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15); transform-origin: center bottom; transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stack .card img { width: 100%; height: 100%; object-fit: cover; }
.stack .front { z-index: 3; transform: scale(1) translateY(0); opacity: 1; }
.stack .middle { z-index: 2; transform: scale(0.92) translateY(20px); opacity: 0.6; }
.stack .back { z-index: 1; transform: scale(0.84) translateY(40px); opacity: 0.3; }

.local-carousel {
    width: calc(100% + 48px); margin-left: -24px; margin-bottom: 24px; height: 220px; position: relative; overflow: hidden; pointer-events: none;
}
.local-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease-in-out;
}
.local-slide.active { opacity: 1; }

.date-subtitle { font-size: 16px; font-weight: 600; color: var(--muted); margin-top: 0; margin-bottom: 16px; }
.stats-container { background: #1c1c1e; color: #fff; border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; }
.stat { text-align: center; flex: 1; position: relative; }
.stat.divider::after { content: ''; position: absolute; right: 0; top: 10%; height: 80%; width: 1px; background: rgba(255,255,255,0.15); }
.stat-value { font-size: 22px; font-weight: 700; display: block; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.6; }
.address-text { text-align: center; font-size: 14px; color: var(--muted); margin: 0 0 20px; }

/* Contêiner de Presentes e Fade */
.gift-scroller { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
.gift-scroller::-webkit-scrollbar { display: none; } 
.fade-container { transition: opacity 0.5s ease-in-out; opacity: 1; }

.gift-store-card { min-width: 200px; background: #ffffff; border-radius: var(--radius-md); padding: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); scroll-snap-align: start; flex-shrink: 0; }
.gift-img-box { height: 150px; border-radius: 16px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gift-img-box .gift-img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }

.bg-blue { background: #cceef6; }
.bg-green { background: #eaf1d7; }
.bg-orange { background: #faebd2; }
.bg-purple { background: #e8dff5; }
.bg-gray { background: #f0f0f0; }

.gift-img-box img { max-width: 90%; max-height: 90%; object-fit: contain; mix-blend-mode: multiply; }
.icon-top-right { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; background: #000; color: #fff; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; }
.gift-details { padding-top: 12px; }
.gift-colors { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.heart-btn { margin-left: auto; background: none; border: none; font-size: 16px; color: #999; }
.gift-details h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #111; }
.gift-bottom { display: flex; justify-content: space-between; align-items: center; }
.price { font-weight: 700; font-size: 16px; }
.add-btn { background: #000; color: #fff; border: none; padding: 8px 14px; border-radius: 20px; font-size: 11px; font-weight: 600; }

.blurred-card { position: relative; overflow: hidden; }
.blur-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(245, 246, 241, 0.4); backdrop-filter: blur(5px); display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: 15px; font-weight: 700; color: #111; }
.blur-overlay-btn { margin-top: 12px; width: 44px; height: 44px; border-radius: 50%; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; border: none; font-size: 18px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

.rsvp-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 10px; }
.rsvp-long-card { background-color: var(--purple); color: #fff; border-radius: var(--radius-lg); height: 110px; display: flex; align-items: center; justify-content: center; padding: 0 24px; position: relative; overflow: hidden; transition: all 0.2s ease; }
.rsvp-long-card.reverse { flex-direction: row-reverse; }
.rsvp-text h3 { font-size: 18px; margin: 0; line-height: 1.2; }
.rsvp-text.right-align { text-align: right; }
.rsvp-text.center { text-align: center; width: 100%; }
.rsvp-img-container { height: 100%; width: 120px; position: relative; }
.rsvp-img-container img { position: absolute; bottom: -10px; height: 130%; object-fit: contain; }
.rsvp-img-container.right img { right: -10px; transform: rotate(5deg); }
.rsvp-img-container.left img { left: -10px; transform: scaleX(-1) rotate(5deg); }

.primary-btn { width: 100%; height: 56px; background: var(--ink); color: #fff; border: none; border-radius: var(--radius-lg); font-size: 16px; font-weight: 700; }
.outline-btn { width: 100%; height: 56px; background: transparent; color: var(--ink); border: 2px solid #e5e5ea; border-radius: var(--radius-lg); font-size: 16px; font-weight: 700; }

/* BARRAS INFERIORES */
.bottom-bar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 440px; padding: 8px; background: var(--bar); border-radius: 32px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 20px 40px rgba(0,0,0,0.3); z-index: 100; transition: transform 0.3s ease; }
.main-bottom-bar { z-index: 100; }
.gift-bottom-bar { z-index: 1001; justify-content: space-evenly; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); }

.nav-item { display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 14px; border-radius: 24px; color: rgba(255, 255, 255, 0.5); text-decoration: none; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; background: transparent; border: none;}
.nav-text { max-width: 0; opacity: 0; font-size: 13px; font-weight: 600; white-space: nowrap; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-item.active { background: #3a3a3c; color: #ffffff; }
.nav-item.active .nav-text { max-width: 100px; opacity: 1; margin-left: 8px; }

/* MODAL LISTA DE PRESENTES */
.gift-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 1000; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.gift-modal.open { transform: translateY(0); }
.gift-modal-header { display: flex; align-items: center; padding: 20px 24px 10px; background: var(--bg); position: sticky; top: 0; z-index: 10; }
.back-btn { background: #ffffff; border: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); color: #111; }
.modal-title { margin-left: auto; margin-right: auto; font-size: 18px; transform: translateX(-22px); }
.gift-modal-content { padding: 0 24px; }
.gift-modal-content { position: relative; padding-bottom: 120px; }

/* CARROSSEL NO TOPO DA TELA DE PRESENTES */
.gift-top-carousel {
    position: relative;
    width: calc(100% + 48px);
    margin-left: -24px;
    height: 220px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.partner-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: block;
    text-decoration: none;
}
.partner-slide.active { opacity: 1; z-index: 2; }
.partner-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.category-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 20px 0; margin: 0 -24px; padding-left: 24px; padding-right: 24px; scroll-snap-type: x mandatory; }
.category-tabs::-webkit-scrollbar { display: none; }
.tab { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 10px 20px; border-radius: 24px; font-weight: 600; font-size: 15px; white-space: nowrap; flex-shrink: 0; scroll-snap-align: start; }
.tab.active { background: #111; color: #fff; }

.gift-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gift-grid-2col .gift-store-card { min-width: 0; scroll-snap-align: unset; width: 100%; padding: 10px; }
.gift-grid-2col .gift-img-box { height: 130px; }
.gift-grid-2col .gift-details h4 { font-size: 13px; }
.gift-grid-2col .price { font-size: 14px; }
.gift-grid-2col .add-btn { padding: 6px 10px; font-size: 10px; }
#home-gift-fade-container .gift-store-card { min-width: 160px; padding: 10px; }
#home-gift-fade-container .gift-img-box { height: 130px; }
#home-gift-fade-container .gift-details h4 { font-size: 13px; }
#home-gift-fade-container .price { font-size: 14px; }
#home-gift-fade-container .add-btn { padding: 6px 10px; font-size: 10px; }

/* Nossa História Overlay */
.historia-overlay { position: fixed; inset: 0; display: none; background: #ffffff; z-index: 1000; }
.historia-overlay.open { display: flex; }
.carousel-screen { width: 100%; max-width: 480px; margin: 0 auto; height: 100%; position: relative; display: flex; }
.carousel-track { position: relative; flex: 1; }
.carousel-slide { position: absolute; inset: 0; display: none; flex-direction: column; overflow-y: auto; }
.carousel-slide::-webkit-scrollbar { display: none; } 
.carousel-slide.active { display: flex; }
.slide-img { width: 100%; height: 55vh; object-fit: cover; flex-shrink: 0; }

.first-slide-content { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; padding-bottom: 80px; }
.slide-img-first { max-height: 75vh; width: auto; max-width: 100%; object-fit: contain; }
.first-slide-text { text-align: center; margin-top: 10px; }
.cursive-text { font-family: 'Great Vibes', cursive; font-size: 46px; font-weight: 400; color: #111; margin: 0; line-height: 1.1; }
.elegant-text { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; color: #666; margin: 0; letter-spacing: 1.5px; }

.slide-panel { margin-top: -32px; background: #ffffff; padding: 32px 24px 100px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; color: #111; min-height: 45vh; display: flex; flex-direction: column; justify-content: flex-start; position: relative; z-index: 2; box-shadow: 0 -10px 25px rgba(0,0,0,0.1); }
/* Estilo Instagram para Nossa História */
.insta-post { background: #fff; border-radius: 0; display: flex; flex-direction: column; width: 100%; height: 100%; }
.insta-header { display: flex; align-items: center; padding: 12px; gap: 10px; border-bottom: 1px solid #efefef; }
.insta-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); padding: 2px; }
.insta-avatar img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.insta-username { font-size: 14px; font-weight: 700; color: #262626; }
.insta-img-container { width: 100%; aspect-ratio: 1/1; position: relative; background: #fafafa; }
.insta-img { width: 100%; height: 100%; object-fit: cover; }
.insta-actions { display: flex; align-items: center; padding: 12px; gap: 16px; }
.insta-action-icon { width: 24px; height: 24px; color: #262626; }
.insta-likes { padding: 0 12px; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.insta-caption { padding: 0 12px 20px; font-size: 14px; line-height: 1.4; color: #262626; }
.insta-caption strong { margin-right: 6px; }
.insta-caption p { margin: 0; display: inline; }

/* Início Especial */
.story-start { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 24px; text-align: center; background: #fff; }
.story-start-img { width: 280px; height: 400px; object-fit: cover; border-radius: 140px; margin-bottom: 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.story-start h2 { font-family: 'Great Vibes', cursive; font-size: 42px; margin-bottom: 8px; color: #111; }
.story-start p { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: #666; font-style: italic; }

.story-year-label { font-size: 13px; font-weight: 600; color: #8e8e93; margin-bottom: 12px; display: block; }


.close-overlay { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(0,0,0,0.4); color: #fff; font-size: 24px; z-index: 10; line-height: 44px; }
.story-bottom-bar { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 440px; padding: 8px; background: var(--bar); border-radius: 32px; display: flex; gap: 8px; align-items: center; overflow-x: auto; scroll-snap-type: x mandatory; z-index: 100; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.story-bottom-bar::-webkit-scrollbar { display: none; }
.story-nav-item { background: transparent; color: rgba(255, 255, 255, 0.5); border: none; height: 40px; padding: 0 18px; border-radius: 20px; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; }
.story-nav-item.active { background: #3a3a3c; color: #ffffff; }
.gift-bottom-bar { position: sticky; bottom: 16px; }
.gift-modal .gift-bottom-bar { left: auto; right: auto; transform: none; margin: 0 auto; width: 90%; max-width: 440px; }

/* Bottom Sheet de Avisos */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; z-index: 10000; }
.sheet-overlay.open { display: block; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #ffffff; border-radius: 16px 16px 0 0; padding: 16px; transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); max-height: 80vh; overflow-y: auto; box-shadow: 0 -10px 30px rgba(0,0,0,0.2); }
.sheet-overlay.open .sheet { transform: translateY(0); }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #1c1c1e; color: #fff; font-size: 18px; }
.sheet-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; padding-right: 48px; }
.sheet-items { display: flex; flex-direction: column; gap: 10px; }
.sheet-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 12px; background: #fff; }
.sheet-icon { width: 36px; height: 36px; border-radius: 10px; background: #f5f6f1; display: flex; align-items: center; justify-content: center; color: #111; }
.sheet-text { font-size: 14px; color: #333; }

/* RSVP cores */
.rsvp-long-card.bege { background-color: #f5e6d3; color: #333; }
.rsvp-long-card.verde { background-color: #2ecc71; color: #fff; }
.rsvp-status { text-align:center; font-size:14px; color:#2e7d32; font-weight:700; margin-bottom:8px; display:none; }
.rsvp-status.show { display:block; }

/* Manual do convidado */
.guest-manual-overlay { position: fixed; inset: 0; background: #ffffff; z-index: 10000; display: none; }
.guest-manual-overlay.open { display: flex; align-items: center; justify-content: center; }
.guest-manual { width: 100%; max-width: 480px; height: 100%; display:flex; flex-direction:column; }
.guest-manual-header { padding: 16px; text-align:center; font-weight:700; }
.guest-manual-body { flex:1; display:flex; align-items:center; justify-content:center; }
.guest-manual-body img { max-width: 90%; max-height: 70vh; object-fit: contain; }
.guest-manual-footer { padding: 16px; }
.progress-track { width: 100%; height: 8px; background: #eee; border-radius: 8px; overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: #6d4aff; transition: width 0.3s linear; }
.confirm-banner { display:none; align-items:center; gap:8px; justify-content:center; color:#2e7d32; font-weight:700; margin-top:12px; }
.confirm-banner.show { display:flex; }

/* Modal de Mapa */
.map-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 1000; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; }
.map-modal.open { transform: translateY(0); }
.map-modal-header { display: flex; align-items: center; padding: 20px 24px 10px; background: var(--bg); position: sticky; top: 0; z-index: 10; }
.map-modal-content { padding: 0 24px 120px; flex: 1; display: flex; flex-direction: column; }
.map-apps-trigger { margin-top: 24px; }
.map-apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px 0; }
.map-app-item { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: #111; font-size: 12px; font-weight: 600; text-align: center; }
.map-app-item img { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
