/* =========================================================
   DESIGN TOKENS
   Palette: ivory paper, blush, champagne gold, deep ink, rose accent
   Type: Playfair Display (display) + Work Sans (body/UI)
   ========================================================= */
:root {
  --ivory: #FBF6EE;
  --ivory-deep: #F3ECDF;
  --paper: #FFFDF9;
  --blush: #F4DADD;
  --blush-deep: #E8B9C2;
  --gold: #C6A15B;
  --gold-deep: #A9813C;
  --gold-line: #D8BE87;
  --ink: #3B2E2A;
  --ink-soft: #6B5B54;
  --rose: #B15A5F;
  --rose-deep: #8F4448;

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-soft: 0 12px 30px -14px rgba(59, 46, 42, 0.28);
  --shadow-card: 0 8px 24px -12px rgba(169, 129, 60, 0.35);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { font-size: 17px; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(198,161,91,0.12), transparent 40%),
    radial-gradient(circle at 88% 92%, rgba(177,90,95,0.09), transparent 45%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.032'/%3E%3C/svg%3E");
}

button { font-family: inherit; cursor: pointer; }
textarea, input { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

@media (min-width: 860px) {
  .page-wrap {
    padding-bottom: 40px;
  }
}

.app-main { padding-top: 8px; }

/* =========================================================
   TOP NAV (desktop)
   ========================================================= */
.top-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 238, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-line);
}
.top-nav__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-nav__mark {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  font-style: italic;
  color: var(--rose-deep);
  letter-spacing: 0.01em;
}
.top-nav__amp { color: var(--gold-deep); }
.top-nav__links { display: flex; gap: 10px; }
.top-nav__link {
  border: none;
  background: transparent;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.25s ease, color 0.25s ease;
}
.top-nav__link:hover { background: var(--blush); color: var(--rose-deep); }
.top-nav__link.is-active {
  background: var(--rose-deep);
  color: var(--paper);
}

@media (min-width: 860px) {
  .top-nav { display: block; }
  .bottom-nav { display: none !important; }
  .app-main { padding-top: 4px; }
}

/* =========================================================
   BOTTOM NAV (mobile, floating luxury glass dock)
   ========================================================= */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 260px;
  max-width: 300px;
  background: rgba(255, 253, 249, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(216, 190, 135, 0.45);
  border-radius: 999px;
  padding: 5px 6px;
  box-shadow: 0 14px 34px -10px rgba(59, 46, 42, 0.22),
              0 2px 10px -2px rgba(169, 129, 60, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform;
}
.bottom-nav.bottom-nav--hidden {
  transform: translate(-50%, calc(100% + 32px));
  opacity: 0;
  pointer-events: none;
}
.bottom-nav__btn {
  flex: 1;
  position: relative;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 42px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  transition: color 0.22s ease, background 0.22s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav__btn:active {
  transform: scale(0.94);
}
.bottom-nav__btn.is-active {
  background: linear-gradient(135deg, rgba(177, 90, 95, 0.14), rgba(198, 161, 91, 0.12));
  color: var(--rose-deep);
}
.bottom-nav__icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease;
}
.bottom-nav__btn.is-active .bottom-nav__icon {
  transform: translateY(-1px) scale(1.08);
  stroke-width: 2.2;
}
.bottom-nav__label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  transition: font-weight 0.2s ease;
}
.bottom-nav__btn.is-active .bottom-nav__label {
  font-weight: 600;
}

/* =========================================================
   TABS
   ========================================================= */
.tab-panel { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   HOME: heading + counter
   ========================================================= */
.love-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 6vw, 3.3rem);
  text-align: center;
  color: var(--rose-deep);
  margin: 10px 0 4px;
}
.love-heading__amp { color: var(--gold-deep); font-style: italic; }
.love-heading__heart {
  display: inline-block;
  animation: pulseGlow 2.6s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); text-shadow: 0 0 0 rgba(177,90,95,0); }
  50% { transform: scale(1.12); text-shadow: 0 0 18px rgba(177,90,95,0.45); }
}
.love-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 28px;
}

.counter-card {
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(216, 190, 135, 0.55);
  border-radius: 20px;
  padding: 20px 8px;
  box-shadow: 0 10px 30px -12px rgba(59, 46, 42, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  margin-bottom: 36px;
}
.counter-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}
.counter-cell {
  flex: 1;
  position: relative;
  padding: 0 4px;
}
.counter-cell:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 18%;
  height: 64%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(216, 190, 135, 0.45), transparent);
}
.counter-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 4.8vw, 2.05rem);
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.counter-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  margin-top: 4px;
}

/* =========================================================
   ENVELOPE + NOTE
   ========================================================= */
.envelope-zone { display: flex; flex-direction: column; align-items: center; }
.envelope-eyebrow {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 14px;
  font-style: italic;
  font-family: var(--font-display);
}
.envelope {
  position: relative;
  width: 220px;
  height: 140px;
  border: none;
  background: transparent;
  padding: 0;
  perspective: 900px;
}
.envelope__back {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--blush) 0%, var(--blush-deep) 100%);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}
.envelope__flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 70px;
  background: var(--blush-deep);
  clip-path: polygon(0 0, 100% 0, 50% 78%);
  border-radius: 10px 10px 0 0;
  transform-origin: top center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform 0.65s cubic-bezier(0.34, 1.3, 0.64, 1);
  z-index: 3;
}
.envelope[aria-expanded="true"] .envelope__flap {
  transform: rotateX(180deg);
  z-index: 1;
}

/* Floating micro-hearts burst animation */
.floating-heart {
  position: fixed;
  pointer-events: none;
  z-index: 99;
  font-size: 1.25rem;
  color: var(--rose-deep);
  animation: floatUpBurst 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes floatUpBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(0.6); }
  50% { opacity: 0.95; transform: translate(var(--dx, 0px), -65px) scale(1.18); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -125px) scale(0.85); }
}
.envelope__seal {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--gold-deep));
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(169,129,60,0.5);
  z-index: 2;
}

.note-card {
  margin-top: 22px;
  max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  padding: 26px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: unfold 0.4s ease;
}
@keyframes unfold { from { opacity: 0; transform: scaleY(0.85) translateY(-6px); } to { opacity: 1; transform: scaleY(1) translateY(0); } }
.note-card__date {
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--gold-deep);
  margin: 0 0 10px;
}
.note-card__text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 16px;
}
.note-card__close {
  border: 1px solid var(--gold-line);
  background: transparent;
  color: var(--rose-deep);
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  transition: background 0.2s ease;
}
.note-card__close:hover { background: var(--blush); }

/* =========================================================
   SECTION TITLES
   ========================================================= */
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  color: var(--rose-deep);
  margin: 6px 0 2px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-bottom: 26px;
}

/* =========================================================
   GALLERY / BALANCED POLAROID COLLAGE / LIGHTBOX
   ========================================================= */
#tab-memories .page-wrap {
  max-width: 960px;
  padding-left: 14px;
  padding-right: 14px;
}

/* Base Mobile: 2 perfectly balanced, equal columns */
.masonry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

@media (min-width: 680px) {
  #tab-memories .page-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* Desktop: 3 perfectly balanced, equal columns */
  .masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Scrapbook Keepsake Card — Uniform & Balanced */
.mem-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  background: var(--paper);
  border: 1px solid rgba(216, 190, 135, 0.45);
  box-shadow: 0 8px 22px -6px rgba(59, 46, 42, 0.12),
              0 2px 6px rgba(169, 129, 60, 0.06);
  cursor: pointer;
  padding: 8px 8px 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

@media (min-width: 680px) {
  .mem-card {
    padding: 10px 10px 12px;
    transform: rotate(var(--tilt, 0deg));
  }
  .mem-card:hover {
    transform: rotate(0deg) translateY(-5px) scale(1.02);
    box-shadow: 0 18px 36px -10px rgba(59, 46, 42, 0.22),
                0 4px 12px rgba(169, 129, 60, 0.12);
    z-index: 6;
  }
  .mem-card:hover img {
    transform: scale(1.03);
  }
}

.mem-card:active {
  transform: scale(0.98);
}

/* Romantic Washi-tape accent */
.mem-card::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 14px;
  background: rgba(232, 185, 194, 0.75);
  border: 1px dashed rgba(177, 90, 95, 0.38);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(59, 46, 42, 0.08);
  z-index: 5;
  pointer-events: none;
}

/* Picture Frame — Consistent, Harmonious Height with Full Uncropped Photo */
.mem-card__frame {
  position: relative;
  width: 100%;
  height: 185px; /* Balanced height on mobile */
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #f7f1e6, #ece2d2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 3px rgba(59, 46, 42, 0.08);
}

@media (min-width: 680px) {
  .mem-card__frame {
    height: 240px; /* Balanced height on desktop */
  }
}

.mem-card img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Full photo 100% visible, NEVER cropped */
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(59, 46, 42, 0.1);
  transition: transform 0.35s ease;
}

.mem-card__fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--paper);
  background: linear-gradient(155deg, var(--rose-deep), var(--gold-deep));
}

/* Caption Section — Perfectly Uniform & Consistent Across All Cards */
.mem-card__caption {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 8px 2px 2px;
  min-height: 52px; /* Equal height lock so all cards line up flawlessly */
  box-sizing: border-box;
}

@media (min-width: 680px) {
  .mem-card__caption {
    min-height: 56px;
    padding: 10px 4px 2px;
  }
}

.mem-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  line-height: 1;
}

.mem-card__tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mem-card__dot {
  font-size: 0.6rem;
  color: var(--rose-deep);
  opacity: 0.7;
}

.mem-card__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 680px) {
  .mem-card__text {
    font-size: 0.94rem;
    line-height: 1.32;
  }
}

/* Lightbox with Prev/Next Controls */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(30, 20, 18, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  touch-action: pan-y;
}
.lightbox[hidden] {
  display: none !important;
}
.lightbox__figure {
  max-width: 92vw;
  max-height: 82vh;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  object-fit: contain;
}
.lightbox__figure figcaption {
  color: var(--paper);
  margin-top: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.3;
}
.lightbox__counter {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

.lightbox__close,
.lightbox__download {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.18);
  color: var(--paper);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(4px);
  z-index: 70;
}
.lightbox__close:hover,
.lightbox__download:hover {
  background: rgba(255,255,255,0.32);
}
.lightbox__close:active,
.lightbox__download:active {
  transform: scale(0.95);
}
.lightbox__close { right: 20px; }
.lightbox__download { right: 70px; }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(6px);
  z-index: 68;
}
.lightbox__nav:hover {
  background: rgba(177, 90, 95, 0.8);
  transform: translateY(-50%) scale(1.08);
}
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

@media (max-width: 600px) {
  .lightbox__nav {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* =========================================================
   PLAN A DATE (Organized Cards & Polished Spacing)
   ========================================================= */
.plan-block {
  margin-bottom: 24px;
  background: var(--paper);
  border: 1px solid rgba(216, 190, 135, 0.45);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 6px 18px -8px rgba(59, 46, 42, 0.08);
}
.plan-block__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--rose-deep);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-block__title::before {
  content: '';
  width: 3px;
  height: 18px;
  background: var(--gold);
  border-radius: 2px;
}

.when-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 140px;
}
.field__label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
}
.field__input {
  border: 1px solid var(--gold-line);
  background: var(--ivory);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ink);
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}
.field__input:focus {
  border-color: var(--rose-deep);
}
.field__hint {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 10px;
}

.search-input {
  display: block;
  width: 100%;
  border: 1px solid var(--gold-line);
  background: var(--paper);
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 14px;
}
.search-input::placeholder { color: var(--ink-soft); opacity: 0.8; }

.load-more-btn { display: block; margin: 16px auto 0; }
.empty-hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-style: italic;
  padding: 10px 0;
}

/* Restaurant Dropdown */
.dropdown-wrapper {
  position: relative;
  width: 100%;
}
.restaurant-dropdown {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  box-shadow: 0 16px 32px -10px rgba(59, 46, 42, 0.25);
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
  animation: fadeIn 0.2s ease;
}
.restaurant-dropdown__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.restaurant-card {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.restaurant-card:hover, .restaurant-card:focus {
  background: var(--blush);
}
.restaurant-card.is-selected {
  border-color: var(--rose-deep);
  background: var(--blush);
}
.restaurant-card__emoji { font-size: 1.4rem; }
.restaurant-card__name { font-weight: 500; font-size: 0.95rem; margin: 0 0 1px; color: var(--ink); }
.restaurant-card__vibe { font-size: 0.8rem; color: var(--ink-soft); margin: 0; font-style: normal; }

/* Selected Restaurant Card */
.selected-restaurant-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blush);
  border: 1px solid var(--rose-deep);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  animation: fadeIn 0.25s ease;
}
.selected-restaurant-card__info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.selected-restaurant-card__emoji { font-size: 1.4rem; }
.selected-restaurant-card__name { font-weight: 600; font-size: 0.95rem; margin: 0; color: var(--rose-deep); }
.selected-restaurant-card__addr { font-size: 0.78rem; color: var(--ink-soft); margin: 0; }
.selected-restaurant-card__clear {
  border: none;
  background: rgba(177, 90, 95, 0.15);
  color: var(--rose-deep);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.selected-restaurant-card__clear:hover {
  background: rgba(177, 90, 95, 0.3);
}

/* Food Section: Original comfortable size with instant full-menu browsing */
.food-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.food-tab {
  border: 1px solid var(--gold-line);
  background: var(--paper);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: all 0.2s ease;
}
.food-tab.is-active {
  background: var(--rose-deep);
  border-color: var(--rose-deep);
  color: var(--paper);
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 480px) {
  .food-grid {
    grid-template-columns: 1fr;
    max-height: 390px;
  }
}
.food-grid::-webkit-scrollbar {
  width: 5px;
}
.food-grid::-webkit-scrollbar-thumb {
  background: var(--gold-line);
  border-radius: 999px;
}
.food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--gold-line);
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.food-item:active {
  transform: scale(0.98);
}
.food-item.is-selected {
  background: var(--blush);
  border-color: var(--rose-deep);
}
.food-item__text {
  flex: 1;
}
.food-item__check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--ivory-deep);
  color: var(--ink-soft);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.food-item.is-selected .food-item__check {
  background: var(--rose-deep);
  color: var(--paper);
}

/* Selected Foods Tray (Outside the grid) */
.selected-foods-tray {
  margin-top: 16px;
  background: var(--paper);
  border: 1px dashed var(--rose-deep);
  border-radius: 14px;
  padding: 12px 14px;
  animation: fadeIn 0.25s ease;
}
.selected-foods-tray__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.selected-foods-tray__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.selected-foods-tray__clear {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.selected-foods-tray__clear:hover {
  color: var(--rose-deep);
}
.selected-foods-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.food-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blush);
  border: 1px solid var(--rose-deep);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  animation: fadeIn 0.2s ease;
}
.food-chip__remove {
  border: none;
  background: rgba(177, 90, 95, 0.2);
  color: var(--rose-deep);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease;
}
.food-chip__remove:hover {
  background: var(--rose-deep);
  color: var(--paper);
}

.love-note {
  width: 100%;
  border: 1px solid var(--gold-line);
  background: var(--paper);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 0.95rem;
  resize: vertical;
}

/* =========================================================
   TICKET
   ========================================================= */
.ticket-wrap { display: flex; justify-content: center; padding: 6px; }
.ticket {
  display: flex;
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border-radius: 16px;
  position: relative;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gold-line);
  transition: max-width 0.2s ease;
}
.ticket__val--note {
  font-size: 0.86rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--rose-deep);
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}
.ticket__side--main {
  flex: 1;
  padding: 20px 20px;
  background: linear-gradient(165deg, var(--paper), var(--ivory-deep));
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
}
.ticket__eyebrow { font-size: 0.76rem; color: var(--gold-deep); margin: 0 0 4px; letter-spacing: 0.02em; }
.ticket__names { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; color: var(--rose-deep); margin: 0 0 14px; }
.ticket__names span { color: var(--gold-deep); font-style: italic; }
.ticket__row { display: flex; gap: 22px; margin-bottom: 10px; }
.ticket__key { font-size: 0.72rem; color: var(--ink-soft); margin: 6px 0 1px; text-transform: capitalize; }
.ticket__val { font-size: 0.96rem; color: var(--ink); margin: 0; font-weight: 500; }
.ticket__val--small { font-size: 0.85rem; font-weight: 400; }
.ticket__perf {
  width: 0;
  border-left: 2px dashed var(--gold-line);
  position: relative;
}
/* Authentic vintage ticket cutout notches */
.ticket__perf::before,
.ticket__perf::after {
  content: "";
  position: absolute;
  left: -8px;
  width: 14px;
  height: 14px;
  background: var(--ivory);
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  z-index: 5;
}
.ticket__perf::before {
  top: -8px;
}
.ticket__perf::after {
  bottom: -8px;
}
.ticket__side--stub {
  width: 110px;
  background: var(--rose-deep);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 10px;
  text-align: center;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
}
.ticket__stub-label { font-size: 0.72rem; margin: 0; opacity: 0.9; }
.ticket__stub-two { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 0 0 8px; }
.ticket__badge { font-size: 0.72rem; line-height: 1.4; margin: 0; border-top: 1px solid rgba(255,255,255,0.4); padding-top: 8px; }

.ticket-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* =========================================================
   PILL BUTTONS
   ========================================================= */
.pill-btn {
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pill-btn:active { transform: scale(0.97); }
.pill-btn--gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--paper);
  box-shadow: 0 8px 18px -8px rgba(169,129,60,0.6);
}
.pill-btn--rose {
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: var(--paper);
  box-shadow: 0 8px 18px -8px rgba(143,68,72,0.6);
}
.pill-btn--outline {
  background: transparent;
  color: var(--rose-deep);
  border: 1px solid var(--gold-line);
  box-shadow: none;
}
.pill-btn--outline:hover { background: var(--blush); }

/* =========================================================
   BGM FLOATING BUTTON
   ========================================================= */
.bgm-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bgm-btn__disc {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ink) 0%, var(--ink) 28%, var(--rose-deep) 30%, var(--rose-deep) 60%, var(--ink) 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.bgm-btn.is-playing .bgm-btn__disc {
  opacity: 1;
  animation: spin 3.2s linear infinite;
}
.bgm-btn__hole {
  position: absolute;
  inset: 44%;
  border-radius: 50%;
  background: var(--paper);
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.bgm-btn__icon {
  position: relative;
  z-index: 2;
  color: var(--rose-deep);
  font-size: 1.1rem;
}
.bgm-btn.is-playing .bgm-btn__icon { color: var(--paper); }
