:root {
  --bg-body: #deddd8;
  --bg-app: #ffffff;
  --card-bg: #ffffff;
  --primary-color: #68735a;
  --primary-light: #7d886f;
  --primary-subtle: #f0f2eb;
  --accent-gold: #c5a059;
  --text-dark: #232521;
  --text-muted: #7c8275;
  --border-color: #e6e7e2;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.04);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Montserrat', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-body);
  font-family: var(--font-sans);
  color: var(--text-dark);
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.device-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  background-color: var(--bg-app);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tab-content {
  display: none;
  width: 100%;
  height: calc(100% - 68px);
  position: absolute;
  top: 0;
  left: 0;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  animation: slideFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.view-container {
  width: 100%;
  height: 100%;
  padding: 18px 20px 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scrollable-view {
  overflow-y: auto;
  padding-bottom: 25px;
  -webkit-overflow-scrolling: touch;
}

.scrollable-view::-webkit-scrollbar {
  width: 4px;
}
.scrollable-view::-webkit-scrollbar-thumb {
  background: #d0d2c8;
  border-radius: 4px;
}

.view-hero {
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.hero-image-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.25) 0%,
      rgba(0,0,0,0.08) 30%,
      rgba(0,0,0,0) 50%,
      rgba(255,255,255,0.05) 60%,
      rgba(255,255,255,0.7) 80%,
      #ffffff 95%
    );
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 20px 0 20px;
  pointer-events: none;
  flex-shrink: 0;
  padding-top: 20px;
}

.hero-content .header-botanical {
  width: 75px;
  height: 28px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.hero-content .header-botanical .botanical-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.hero-content .main-title {
  font-family: var(--font-serif);
  font-weight: 400;
  text-align: center;
  line-height: 0.95;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}

.hero-content .main-title .name {
  font-size: clamp(2rem, 5vh, 2.8rem);
  letter-spacing: 5px;
  color: #ffffff;
  font-weight: 400;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content .main-title .ampersand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vh, 1.8rem);
  color: rgba(255,255,255,0.85);
  margin: 1px 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero-content .subtitle-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 0 0 0;
  flex-shrink: 0;
}

.hero-content .subtitle-divider .heart-icon {
  width: 12px;
  height: 12px;
  fill: rgba(255,255,255,0.8);
  color: rgba(255,255,255,0.8);
  margin-bottom: 2px;
  animation: pulseHeart 2s infinite ease-in-out;
}

@keyframes pulseHeart {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

.hero-content .subtitle {
  font-size: 0.7rem;
  letter-spacing: 5px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  text-shadow: 0 2px 15px rgba(0,0,0,0.2);
}

.event-details {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 10px 20px;
  margin-top: auto;
  background: transparent;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.detail-icon {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.date-text {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.5vh, 1.6rem);
  letter-spacing: 5px;
  color: var(--text-dark);
  font-weight: 500;
}

.location-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
}

.loc-text {
  font-size: 0.6rem;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.pin-icon {
  width: 13px;
  height: 13px;
  color: var(--primary-color);
}

.countdown-card {
  background: var(--card-bg);
  width: 100%;
  max-width: 400px;
  padding: 12px 8px;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 20px rgba(104, 115, 90, 0.07);
  border: 1px solid rgba(104, 115, 90, 0.12);
  position: relative;
}

.botanical-branch {
  width: 45px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.branch-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(104, 115, 90, 0.15));
}

.countdown-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--primary-color);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 2px;
}

.countdown-label {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.header-botanical {
  width: 75px;
  height: 28px;
  flex-shrink: 0;
}

.botanical-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(104, 115, 90, 0.15));
}

.main-title {
  font-family: var(--font-serif);
  font-weight: 400;
  text-align: center;
  line-height: 0.95;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2px 0;
  flex-shrink: 0;
}

.main-title .name {
  font-size: clamp(1.8rem, 5vh, 2.3rem);
  letter-spacing: 5px;
  color: var(--text-dark);
  font-weight: 400;
}

.main-title .ampersand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vh, 1.5rem);
  color: var(--primary-color);
  margin: 1px 0;
}

.subtitle-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.subtitle-divider .heart-icon {
  width: 10px;
  height: 10px;
  fill: var(--primary-color);
  color: var(--primary-color);
  margin-bottom: 4px;
  animation: pulseHeart 2s infinite ease-in-out;
}

.subtitle {
  font-size: 0.62rem;
  letter-spacing: 4px;
  color: var(--primary-color);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  letter-spacing: 4px;
  color: var(--text-dark);
  font-weight: 500;
  text-align: center;
}

.section-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-align: center;
}

.small-heart {
  color: var(--primary-color);
  margin: 6px 0 16px 0;
}

.small-heart i {
  width: 10px;
  height: 10px;
  fill: var(--primary-color);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
}

.gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: #e2e4dc;
  aspect-ratio: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  cursor: pointer;
}

.gallery-item.large {
  grid-column: span 2;
  aspect-ratio: 16/10;
}

.gallery-item.wide {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(104, 115, 90, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: #fff;
}

.gallery-overlay i {
  width: 22px;
  height: 22px;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-item:hover img, .gallery-item:active img {
  transform: scale(1.06);
}

.gallery-item:hover .gallery-overlay, .gallery-item:active .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay i, .gallery-item:active .gallery-overlay i {
  transform: scale(1);
}

.lightbox {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.25s ease;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
}

.lightbox img {
  max-width: 100%;
  max-height: 80%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.info-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-card {
  background: var(--card-bg);
  padding: 14px 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.info-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background-color: var(--primary-subtle);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-icon-wrapper i {
  width: 20px;
  height: 20px;
}

.info-details {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: var(--primary-color);
  font-weight: 600;
}

.info-details h4 {
  font-size: 0.88rem;
  color: var(--text-dark);
  margin: 2px 0;
  font-weight: 600;
}

.info-details p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.rsvp-card {
  background: var(--card-bg);
  width: 100%;
  border-radius: 20px;
  padding: 20px 18px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
}

.rsvp-mail-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  color: var(--primary-color);
}

.rsvp-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-dark);
}

.rsvp-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 3px;
  margin-bottom: 16px;
}

.toggle-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-toggle {
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #fcfcfb;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.25s ease;
}

.btn-toggle.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(104, 115, 90, 0.25);
}

.guests-selector {
  margin-bottom: 16px;
  transition: opacity 0.3s ease;
}

.guests-selector label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f4f5f1;
  border-radius: 30px;
  width: 130px;
  margin: 0 auto;
  padding: 3px 6px;
}

.stepper button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  transition: transform 0.1s ease;
}

.stepper button:active {
  transform: scale(0.9);
}

.stepper button i {
  width: 14px;
  height: 14px;
}

.stepper span {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.input-group {
  position: relative;
  margin-bottom: 10px;
}

.input-group input, .input-group textarea {
  width: 100%;
  padding: 11px 12px 11px 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #fafaf8;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.input-group textarea {
  padding-left: 12px;
  resize: none;
}

.input-group input:focus, .input-group textarea:focus {
  border-color: var(--primary-color);
  background: #ffffff;
}

.input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #aaa;
}

.textarea-heart {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 13px;
  height: 13px;
  color: #ccc;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.68rem;
  letter-spacing: 2px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 4px 15px rgba(104, 115, 90, 0.3);
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-submit:active {
  transform: scale(0.98);
  background: var(--primary-light);
}

.btn-submit i {
  width: 14px;
  height: 14px;
  fill: #fff;
}

.modal-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popUp {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  color: var(--primary-color);
  margin-bottom: 10px;
}
.modal-icon i { width: 40px; height: 40px; }

.modal-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.modal-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
}
.btn-modal-close {
  padding: 8px 18px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.65rem;
  letter-spacing: 1px;
  cursor: pointer;
}

.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 68px;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.02);
  flex-shrink: 0;
}

.nav-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #a0a59a;
  cursor: pointer;
  position: relative;
  width: 25%;
  height: 100%;
  justify-content: center;
  transition: color 0.25s ease;
}

.nav-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease;
}

.nav-item span {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.25s ease;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active i {
  transform: translateY(-2px) scale(1.1);
  color: var(--primary-color);
}

.active-indicator {
  position: absolute;
  bottom: 6px;
  width: 20px;
  height: 3px;
  background-color: transparent;
  border-radius: 3px;
  transition: background-color 0.3s ease, width 0.3s ease;
}

.nav-item.active .active-indicator {
  background-color: var(--primary-color);
}

@media (min-width: 768px) {
  .app-container {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  
  .hero-content .main-title .name {
    font-size: clamp(3rem, 8vh, 5rem);
  }
  
  .hero-content .main-title .ampersand {
    font-size: clamp(2rem, 5vh, 3rem);
  }
  
  .hero-content .subtitle {
    font-size: clamp(0.8rem, 2vh, 1.2rem);
    letter-spacing: 8px;
  }
  
  .date-text {
    font-size: clamp(1.6rem, 4vh, 2.2rem);
  }
  
  .countdown-number {
    font-size: clamp(2.8rem, 6vh, 4rem);
  }
  
  .countdown-card {
    max-width: 500px;
    padding: 16px 12px;
  }
  
  .botanical-branch {
    width: 55px;
    height: 65px;
  }
  
  .event-details {
    padding: 0 30px 20px 30px;
  }
  
  .hero-content {
    padding: 30px 30px 0 30px;
  }
}