/* ============================================================
   CELEBRATION WALL — LED display (wall.html)
   Everything is sized in vh/vw so it fills any screen resolution
   without scrolling. Dark backdrop: LEDs render deep green + gold
   far better than a pale page.
   ============================================================ */

:root{
  --night: #071F17;
  --green: #0F3D2E;
  --green-soft: #1E6B45;
  --gold: #C6A24D;
  --gold-bright: #E7C873;
  --gold-pale: #F6DE98;
  --cream: #FAF3E4;
  --paper: #FFFDF8;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Print', cursive;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; margin: 0; }
.wl{
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden;
  width: 100vw; height: 100vh; height: 100dvh;
  font-family: var(--body); color: var(--cream);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(231,200,115,0.20), transparent 70%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(30,107,69,0.55), transparent 70%),
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(30,107,69,0.35), transparent 70%),
    linear-gradient(180deg, #0B2E22, var(--night));
  -webkit-font-smoothing: antialiased;
}
.wl.idle{ cursor: none; }
.wl [hidden]{ display: none !important; }

.wl-sparks, .wl-confetti{ position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wl-sparks{ z-index: 0; }
.wl-confetti{ z-index: 30; }
.wl-head, .wl-stage, .wl-foot{ position: relative; z-index: 1; }

/* ---------------- Header ---------------- */
.wl-head{ display: flex; align-items: center; justify-content: space-between; gap: 3vw; padding: 3.2vh 4vw 0; }
.wl-brand{ display: flex; align-items: center; gap: 1.6vw; min-width: 0; }
.wl-seal{ width: 9.5vh; height: 9.5vh; flex: none; filter: drop-shadow(0 0 2vh rgba(231,200,115,0.35)); }
.wl-flame{ transform-origin: 110px 80px; animation: wlFlicker 2.4s ease-in-out infinite; }
@keyframes wlFlicker{ 0%,100%{ transform: scale(1) rotate(0); } 30%{ transform: scale(1.06,.96) rotate(-2deg); } 60%{ transform: scale(.97,1.05) rotate(2deg); } }
.wl-church{ margin: 0 0 .4vh; font-size: 1.7vh; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-bright); }
.wl-title{ margin: 0; font-family: var(--display); font-weight: 700; font-size: 6.4vh; line-height: 1; color: var(--paper); white-space: nowrap; }

.wl-count{ display: grid; grid-template-columns: auto; justify-items: end; line-height: 1; text-align: right; }
.wl-count strong{
  font-family: var(--display); font-weight: 700; font-size: 9vh; font-variant-numeric: tabular-nums;
  background: linear-gradient(110deg, #B8902F, var(--gold-pale) 35%, var(--gold) 55%, #FFF1C4 75%, #9C7A28);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wlShimmer 6s linear infinite;
}
.wl-count strong.bump{ animation: wlShimmer 6s linear infinite, wlBump .7s var(--ease); }
@keyframes wlShimmer{ from{ background-position: 120% 0; } to{ background-position: -130% 0; } }
@keyframes wlBump{ 40%{ transform: scale(1.25); } }
.wl-count > span:last-child{ font-size: 2vh; color: #CFE0D6; letter-spacing: .06em; margin-top: .6vh; }
.wl-live{ display: inline-flex; align-items: center; gap: .6vh; font-size: 1.5vh; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #8FE3AE; margin-bottom: .6vh; }
.wl-live-dot{ width: 1.1vh; height: 1.1vh; border-radius: 50%; background: #5BD18B; animation: wlBlip 1.8s ease-out infinite; }
@keyframes wlBlip{ 0%{ box-shadow: 0 0 0 0 rgba(91,209,139,.7); } 100%{ box-shadow: 0 0 0 1.4vh rgba(91,209,139,0); } }

/* ---------------- Photo strip ---------------- */
.wl-stage{ display: flex; align-items: center; min-height: 0; min-width: 0; }
.wl-strip{
  display: flex; align-items: center; gap: 4vh; width: 100%; height: 100%;
  overflow: hidden; padding: 0 4vw;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6vw, #000 calc(100% - 6vw), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6vw, #000 calc(100% - 6vw), transparent 100%);
}
.wl-snap{
  --size: min(44vh, 30vw);
  flex: none; margin: 0; width: calc(var(--size) + 2.4vh); padding: 1.2vh 1.2vh 5vh; background: #fff; border-radius: .5vh;
  box-shadow: 0 1vh 3vh rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
  transform: rotate(var(--r, 0deg));
  animation: wlDrop .9s var(--ease) both; animation-delay: var(--delay, 0s);
}
.wl-snap img{ display: block; width: var(--size); height: var(--size); object-fit: cover; background: #EFE4CA; }
.wl-strip > .wl-snap:first-child{ margin-left: auto; }
.wl-strip > .wl-snap:last-child{ margin-right: auto; }
@keyframes wlDrop{ from{ opacity: 0; transform: translateY(-6vh) rotate(calc(var(--r, 0deg) * 3)) scale(.9); } }
.wl-snap.is-new{ box-shadow: 0 0 0 .6vh var(--gold-bright), 0 1vh 4vh rgba(231,200,115,.45); }

.wl-empty{ position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.wl-empty-big{ margin: 0 0 1.5vh; font-family: var(--display); font-weight: 700; font-size: 8vh; color: var(--paper); }
.wl-empty p:last-child{ margin: 0; font-size: 2.8vh; color: #CFE0D6; }

/* ---------------- Footer ---------------- */
.wl-foot{ display: flex; align-items: center; justify-content: space-between; gap: 3vw; padding: 0 4vw 3.2vh; }
.wl-tag{
  margin: 0; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 9vh; line-height: 1;
  background: linear-gradient(110deg, #B8902F, var(--gold-pale) 35%, var(--gold) 55%, #FFF1C4 75%, #9C7A28);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wlShimmer 7s linear infinite;
}
.wl-cta{ margin: 0; flex: 1; text-align: center; font-family: var(--display); font-weight: 600; font-size: 3.4vh; color: var(--paper); }
.wl-cta span{ display: block; margin-top: .8vh; font-family: var(--body); font-weight: 600; font-size: 1.6vh; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-bright); }
.wl-qr{ display: flex; flex-direction: column; align-items: center; gap: .8vh; }
.wl-qr-code{ width: 15vh; height: 15vh; padding: 1vh; background: #fff; border-radius: 1vh; box-shadow: 0 0 0 .4vh var(--gold); }
.wl-qr-code svg, .wl-qr-code img{ display: block; width: 100%; height: 100%; }
.wl-qr p{ margin: 0; font-size: 1.6vh; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-bright); }
.wl-qr-fallback{ display: flex; align-items: center; justify-content: center; height: 100%; color: var(--green); font-size: 1.4vh; font-weight: 700; text-align: center; word-break: break-all; }

/* ---------------- New-arrival spotlight ---------------- */
.wl-spot{
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh;
  background: radial-gradient(ellipse at center, rgba(11,46,34,0.82), rgba(7,31,23,0.97));
  animation: wlFade .6s ease both;
}
.wl-spot.out{ animation: wlFadeOut .8s ease both; }
@keyframes wlFade{ from{ opacity: 0; } }
@keyframes wlFadeOut{ to{ opacity: 0; } }
.wl-spot-hello{ margin: 0; font-family: var(--hand); font-weight: 700; font-size: 11vh; line-height: 1; color: var(--gold-bright); text-shadow: 0 0 4vh rgba(231,200,115,.45); animation: wlHello 1s var(--ease) .2s both; }
@keyframes wlHello{ from{ opacity: 0; transform: translateY(-4vh) scale(.8); } }
.wl-spot-photos{ --ph: min(56vh, 70vw); display: flex; align-items: flex-start; justify-content: center; gap: 4vh; }
.wl-spot-photos.n2{ --ph: min(46vh, 40vw); }
.wl-spot-photos.n3{ --ph: min(38vh, 27vw); }
.wl-spot-photos.n4{ --ph: min(33vh, 20vw); gap: 3vh; }
.wl-spot-photo{
  margin: 0; padding: 1.6vh 1.6vh 1.2vh; background: #fff; border-radius: .6vh;
  box-shadow: 0 0 0 .6vh var(--gold-bright), 0 3vh 8vh rgba(0,0,0,.55);
  animation: wlSpotIn 1.1s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--i, 0) * .18s);
}
.wl-spot-photo:nth-child(even){ animation-name: wlSpotIn2; }
.wl-spot-photo img{ display: block; width: var(--ph); height: var(--ph); object-fit: cover; background: #EFE4CA; }
.wl-spot-photo figcaption{ margin-top: 1vh; max-width: var(--ph); font-family: var(--hand); font-weight: 700; font-size: 4.6vh; line-height: 1.1; text-align: center; color: #3A2A14; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-spot-photos.n3 figcaption, .wl-spot-photos.n4 figcaption{ font-size: 3.6vh; }
@keyframes wlSpotIn{ from{ opacity: 0; transform: scale(.3) rotate(-18deg); filter: sepia(1) brightness(1.6) blur(8px); } 60%{ filter: none; } to{ transform: rotate(-2deg); } }
@keyframes wlSpotIn2{ from{ opacity: 0; transform: scale(.3) rotate(18deg); filter: sepia(1) brightness(1.6) blur(8px); } 60%{ filter: none; } to{ transform: rotate(2deg); } }
.wl-spot-more{ margin: 0; padding: .8vh 2.4vh; border-radius: 999px; font-size: 2.3vh; font-weight: 700; letter-spacing: .06em; color: var(--night); background: var(--gold-bright); animation: wlHello .8s var(--ease) both; }
.wl-spot-tag{ margin: 0; font-size: 2.6vh; font-weight: 600; letter-spacing: .08em; color: var(--cream); animation: wlHello 1s var(--ease) .5s both; }

/* ---------------- Fullscreen button ---------------- */
.wl-fs{
  position: fixed; right: 1.6vw; bottom: 1.6vh; z-index: 40; padding: 1vh 1.6vh; border-radius: 999px; cursor: pointer;
  font: 700 1.5vh var(--body); color: var(--night); background: var(--gold-bright); border: none; opacity: .85;
  transition: opacity .3s ease;
}
.wl-fs kbd{ font: inherit; padding: .1vh .6vh; margin-left: .4vh; border-radius: .4vh; background: rgba(0,0,0,.12); }
.wl.idle .wl-fs, :fullscreen .wl-fs{ opacity: 0; pointer-events: none; }

/* Portrait screens (e.g. a vertical LED panel): stack the header, bigger strip */
@media (max-aspect-ratio: 1/1){
  .wl-head{ flex-direction: column; align-items: flex-start; }
  .wl-count{ justify-items: start; text-align: left; }
  .wl-title{ white-space: normal; }
  .wl-snap{ --size: min(34vh, 60vw); }
  .wl-foot{ flex-wrap: wrap; justify-content: center; }
}

/* ---------------- Team Abroad ---------------- */
.wl-counts{ display: flex; align-items: flex-end; gap: 3.2vw; }
.wl-count-abroad strong{ font-size: 7vh; }
.wl-count-abroad .wl-live{ color: var(--gold-bright); }
.wl-snap{ position: relative; }
.wl-abroad-tag{
  position: absolute; left: 50%; top: 1.4vh; transform: translateX(-50%); max-width: 92%; /* at the top: never cut off by the strip */
  display: flex; align-items: center; gap: .8vh; padding: .6vh 1.4vh; border-radius: 999px; white-space: nowrap;
  font-size: 1.8vh; font-weight: 700; color: #fff; background: rgba(11,46,34,.88); box-shadow: 0 .6vh 1.6vh rgba(0,0,0,.3);
}
.wl-abroad-tag span{ overflow: hidden; text-overflow: ellipsis; }
.wl-spot-place{
  display: flex; align-items: center; justify-content: center; gap: 1vh; margin: .6vh 0 0;
  font-size: 2.6vh; font-weight: 700; color: #3A2A14;
}
.flag{ width: 1.4em; height: 1.05em; border-radius: .2vh; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.2); flex: none; }
/* the photo rules above size every <img> in a card; the flag must stay small */
.wl-snap img.flag, .wl-spot-photo img.flag{
  display: inline-block; width: 1.4em; height: 1.05em; aspect-ratio: auto; background: none; object-fit: cover;
}

/* ---------------- The strip in rows (100+ guests) ----------------
   wall.js sets --rows (2–4) and --tile (the photo size); photos fill each column top to bottom
   and the whole band scrolls left together. */
.wl-strip.multi{
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows), auto);
  align-content: center; justify-content: start; gap: 2vh 2.2vh;
}
.wl-strip.multi .wl-snap{
  --size: var(--tile); width: auto; margin: 0;
  padding: calc(var(--tile) * .045); border-radius: calc(var(--tile) * .03);
  box-shadow: 0 .6vh 1.8vh rgba(0,0,0,.45);
}
.wl-strip.multi .wl-abroad-tag{ top: calc(var(--tile) * .06); padding: .4vh .9vh; font-size: clamp(1.3vh, calc(var(--tile) * .075), 1.8vh); }

/* wall.html?demo — the preview bar */
.wl-demo{
  position: fixed; left: 50%; bottom: 1.4vh; transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; gap: 1vh; padding: .8vh 1.4vh; border-radius: 999px;
  font: 600 1.6vh var(--body); color: var(--night); background: rgba(250,243,228,.92); box-shadow: 0 .6vh 2vh rgba(0,0,0,.4);
}
.wl-demo button{ padding: .5vh 1.2vh; border: none; border-radius: 999px; cursor: pointer; font: 700 1.5vh var(--body); color: var(--cream); background: var(--green); }
.wl-demo kbd{ font: inherit; opacity: .7; }
