/* ==========================================================
   Night palette: the page fades from rich bordeaux to near-black;
   ivory text, gold accents and thin gold lines.
   ========================================================== */
/* Clagista — display font for English section titles */
@font-face {
  font-family: "Clagista";
  src: url("../assets/fonts/Clagista.ttf") format("truetype");
  font-display: swap;
}

:root {
  --parchment: #3E1220;
  --parchment-deep: #241F26;
  --sand: #E4D3AE;
  --sand-dark: #D9B871;
  --stone-line: #D9C9A3;
  --cedar: #F4ECE8;
  --cedar-deep: #1C1C1C;
  --brass: #C9A24E;
  --brass-light: #E6CF94;
  --green: #245E45;
  --blue: #E9DCDA;
  --blue-deep: #F4ECE8;
  --vermilion: #C0392B;
  --ink: #F4ECE8;
  --ink-soft: #CBBEC1;

  /* rich bordeaux at the top, fading to near-black at the bottom */
  --dusk: linear-gradient(180deg, #3E1220 0%, #120709 100%);
  --dusk-end: #120709;
  --line: #C9A24E;   /* thin gold lines */

  /* リュウミン everywhere (Japanese and English). Shippori Mincho is the free
     stand-in until a リュウミン web font (Adobe Fonts / TypeSquare) is added. */
  --font-ryumin: "a-otf-ryumin-pr6n", "Ryumin Pr6N", "A-OTF Ryumin Pr6N", "Shippori Mincho", serif;
  --font-display: var(--font-ryumin);
  --font-body: var(--font-ryumin);
  --font-jp-display: var(--font-ryumin);

  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
  --pillar: clamp(14px, 4vw, 60px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

html:lang(ja) body { font-family: var(--font-body); }
html:lang(ja) .names,
html:lang(ja) .section-title:not(:lang(en)),
html:lang(ja) .venue-name { font-family: var(--font-jp-display); }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ==========================================================
   Header
   ========================================================== */
.site-header {
  /* just the language button, floating over the page */
  position: fixed;
  top: 14px;
  right: var(--gutter);
  z-index: 20;
  /* the button stays light on the dark page: local colours for it and its menu */
  --cedar: #2F3542;
  --ink: #2F3542;
  --blue: #3C4558;
  --parchment-deep: #F5EFF1;
}

/* Language menu */
.lang-menu { position: relative; }
.lang-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  /* a thin gold ring on a dark wine pane, so it reads over photos too */
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: rgba(26, 8, 14, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  color: var(--brass-light);
  cursor: pointer;
  transition: background 0.2s ease;
}
.lang-button:hover,
.lang-button[aria-expanded="true"] { background: rgba(26, 8, 14, 0.8); }
/* "A / あ": one letter from each language */
.lang-glyph {
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.lang-glyph span { margin: 0 1px; opacity: 0.5; }

.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}
.lang-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.lang-list button:hover,
.lang-list button:focus-visible { background: var(--parchment-deep); outline: none; }
.lang-list button[aria-checked="true"]::after { content: "✓"; color: var(--brass); }

.lang-button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.lang-button:focus-visible { outline-color: var(--brass-light); }

/* ==========================================================
   Shared bits
   ========================================================== */
.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand-dark);
}
html:lang(ja) .eyebrow { letter-spacing: 0.15em; text-transform: none; font-size: 14px; }
/* in Clagista, in English for Japanese readers too (French for French readers) */
.couple .eyebrow:lang(en) {
  font-family: "Clagista", var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--blue-deep);
  text-align: center;
}
.section-title--light { color: #fff; }
/* section titles are in Clagista, in English for Japanese readers too (French for French readers) */
.section-title {
  font-family: "Clagista", var(--font-display);
  font-weight: 400;
  line-height: 1.3;
  /* Clagista's descenders (the y of "your trip") hang far below the line */
  padding-bottom: 0.55em;
  margin-bottom: clamp(16px, 2vw, 24px);
}

/* Frosted glass buttons: a soft tinted pane over whatever is behind */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1px solid rgba(217, 184, 113, 0.5);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  color: var(--ink);
  text-decoration: none;
  text-shadow: none;
  font-size: 15px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-1px); }

/* on photos: light glass, white text */
.btn--on-photo {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 248, 236, 0.2);
  color: #fff;
}
.btn--on-photo:hover { background: rgba(255, 248, 236, 0.32); }

.divider-star {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px auto;
  max-width: 260px;
}
.divider-star span { flex: 1; height: 1px; background: var(--line); }
.divider-star i {
  width: 12px; height: 12px;
  background: var(--line);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ==========================================================
   The gate. The scene is taller than the screen: while it
   scrolls past, the stage stays pinned and main.js opens the
   doors, then zooms through the arch into the opening scene.
   ========================================================== */
.gate-scene { position: relative; height: calc(100svh + 200vh); }
.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background: #111;
}

/* --- behind the door: the opening scene of the site --- */
.inside { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
.inside-photo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  /* main.js sizes and places it to keep the couple in the middle of the doorway */
  object-position: 57% 65%;
}
/* on a wide screen the photo stops short of the sides (main.js sets .is-framed):
   a blurred copy fills in behind, and the photo's edges fade into it */
.inside.is-framed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/img/couple.jpg") 50% 40% / cover;
  filter: blur(28px) brightness(0.94);
  transform: scale(1.15);
}
.inside.is-framed .inside-photo {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
/* a soft, airy veil over the photo */
.inside::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, rgba(255, 252, 246, 0.5), rgba(255, 252, 246, 0.12) 45%, rgba(255, 252, 246, 0) 70%);
}

/* Handwritten greeting, high in the doorway (main.js sets --door-x/-y/-w),
   slanted, each line with a pen underline */
.invitation {
  position: absolute;
  z-index: 1;
  left: var(--door-x, 50%);
  top: var(--door-y, 55%);
  margin: 0;
  transform: translate(-50%, -50%) rotate(-7deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-ryumin);
  font-weight: 400;
  font-size: calc(var(--door-w, 360px) * 0.13);
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
  color: #FFFCF6;
  text-shadow: 0 1px 3px rgba(40, 25, 10, 0.45), 0 2px 18px rgba(40, 25, 10, 0.45);
}
html:lang(ja) .invitation {
  font-size: calc(var(--door-w, 360px) * 0.12);
  line-height: 1.4;
}
/* English and French: the greeting in Clagista */
html:not(:lang(ja)) .invitation {
  font-family: "Clagista", var(--font-display);
  font-size: calc(var(--door-w, 360px) * 0.125);
  letter-spacing: 0;
  line-height: 1.55;
  gap: 0.1em;
}
html:not(:lang(ja)) .hand-line { border-bottom: 0; box-shadow: none; }
/* Japanese lines are 花鳥風月 lettering, outlined to SVG by tools/make_greeting.py */
.hand-art {
  display: none;
  height: 1.05em;
  width: auto;
  max-width: none;
  filter: drop-shadow(0 1px 2px rgba(40, 25, 10, 0.45)) drop-shadow(0 2px 12px rgba(40, 25, 10, 0.4));
}
html:lang(ja) .hand-text { display: none; }
html:lang(ja) .hand-art { display: block; }
.hand-line {
  display: block;
  width: fit-content;
  padding: 0 0.15em 0.12em;
  border-bottom: 1.5px solid rgba(255, 252, 246, 0.9);
  box-shadow: 0 6px 6px -6px rgba(40, 25, 10, 0.5);
}
/* a slight stagger, like real handwriting */
.hand-line:first-child { transform: translateX(-0.35em); }
.hand-line + .hand-line { transform: translateX(0.35em); }


/* --- the facade: gate photo (doorway masked out) between tiled walls --- */
.facade {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;   /* on phones the gate overflows equally both sides */
  will-change: transform, opacity;
}
.wall { flex: 1 0 0; background-size: auto 100%; background-repeat: repeat-x; }
.wall--left  { background-image: url("../assets/img/wall-left.jpg"); background-position: right top; }
.wall--right { background-image: url("../assets/img/wall-right.jpg"); background-position: left top; }

.gate {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 376 / 531;
}
.gate-photo {
  width: 100%;
  height: 100%;
  -webkit-mask: url("../assets/img/gate-mask.svg") 0 0 / 100% 100% no-repeat;
          mask: url("../assets/img/gate-mask.svg") 0 0 / 100% 100% no-repeat;
}

/* Doorway position as fractions of the photo */
.doorway {
  position: absolute;
  left: 23.936%;
  top: 25.612%;
  width: 51.33%;
  height: 70.433%;
  clip-path: url(#doorway-shape);
  perspective: 900px;
  perspective-origin: 50% 60%;
}
.door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
/* the full photo, scaled and shifted so only this leaf shows */
.door img {
  position: absolute;
  max-width: none;
  width: 389.64%;     /* 1 / 0.25665 (leaf width) */
  height: 141.98%;    /* 1 / 0.70433 */
  top: -36.364%;      /* -0.25612 / 0.70433 */
}
.door--left  { left: 0;   transform-origin: left center;  clip-path: url(#leaf-left); }
.door--right { left: 50%; transform-origin: right center; clip-path: url(#leaf-right); }
.door--left img  { left: -93.264%; }    /* -0.23936 / 0.25665 */
.door--right img { left: -193.264%; }   /* -0.49601 / 0.25665 */

/* ==========================================================
   The couple + welcome
   ========================================================== */
.couple {
  padding: clamp(64px, 9vw, 110px) var(--gutter) 0;
  text-align: center;
}
.couple .names-native { justify-content: center; }
/* Profile: arch portraits with an offset outline, a name plate, a message */
.profile {
  padding: clamp(56px, 8vw, 96px) var(--gutter);
  text-align: center;
}
.profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 7vw, 96px);
  max-width: 820px;
  margin: 0 auto;
}
.person { display: flex; flex-direction: column; align-items: center; }
.person-photo {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 3 / 4;
  padding: 12px;
  border: 1px solid var(--brass);
  border-radius: 999px 999px 0 0;
}
.person-photo img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: cover;
  object-position: 50% 20%;
  border-radius: 999px 999px 0 0;
}.person-plate {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: min(100%, 240px);
  margin: 18px 0 20px;
  padding: 10px 28px 12px;
  border: 1px solid var(--brass);
}
/* in English and in the title script (Clagista) on both language versions */
.person-role {
  font-family: "Clagista", var(--font-display);
  font-size: 26px;
  line-height: 1.3;
  /* the script's tall ascenders (T, h, b) and the g's tail reach well outside
     its line box, so give them room inside the plate */
  padding: 0.5em 0 0.55em;
  color: var(--sand-dark);
}
.person-name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  color: var(--ink);
}
html:lang(ja) .person-name { font-family: var(--font-jp-display); font-size: 22px; letter-spacing: 0.1em; }
.person-message {
  margin: 0;
  max-width: 22em;
  line-height: 1.9;
  color: var(--ink-soft);
}
/* a small gold keepsake under each message, both resting on the same line:
   a zellige tile for the groom, the Totoro bus stop for the bride.
   The artwork is a mask; the gold is a gradient. */
.person-deco {
  margin-top: auto;
  padding-top: 24px;
}
.person-deco::before {
  content: "";
  display: block;
  margin: 0 auto;
  background: linear-gradient(165deg, var(--brass-light), var(--brass) 55%, #A8822F);
  -webkit-mask: var(--art) center / contain no-repeat;
  mask: var(--art) center / contain no-repeat;
}
.person-deco--zellige::before {
  --art: url("../assets/img/zellige-tile.svg");
  width: 56px;
  height: 56px;
}
.person-deco--totoro::before {
  --art: url("../assets/img/totoro-bus-stop.png");
  height: 96px;
  aspect-ratio: 283 / 240;
}
@media (max-width: 640px) {
  .profiles { grid-template-columns: minmax(0, 1fr); }
}

.welcome {
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px);
  text-align: center;
}

.names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(46px, 7vw, 80px);
  line-height: 1.05;
  margin: 0 0 12px;
  color: var(--ink);
}

/* Omar in Arabic, Mei in kanji */
.names-native {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: -4px 0 16px;
  color: var(--sand-dark);
  line-height: 1.2;
}
.names-native [lang="ar"] { font-family: "Amiri", serif; font-size: 36px; }
.names-native [lang="ja"] { font-family: var(--font-jp-display); font-size: 26px; letter-spacing: 0.08em; }
.names-native i {
  width: 7px; height: 7px;
  background: var(--line);
  transform: rotate(45deg);
}

.hero-date {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--blue);
  letter-spacing: 0.04em;
}
.hero-place {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
html:lang(ja) .hero-place { text-transform: none; letter-spacing: 0.1em; }

/* The thank-you message: a double gold hairline with a soft candle glow inside */
.message-frame {
  max-width: 660px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 28px) clamp(4px, 3vw, 32px);
  /* double gold frame with cut corners; the corners never stretch */
  border: 30px solid transparent;
  border-image: url("../assets/img/frame-chamfer.svg") 30 / 30px stretch;
  position: relative;
  isolation: isolate;
}
/* a deep bordeaux pane, darker than the page, filling right up to the inner gold line
   (which sits 7px inside the 30px frame border) */
.message-frame::before {
  content: "";
  position: absolute;
  inset: -23px;
  z-index: -1;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, #4A1020, #2A0811 85%);
}
.welcome-text {
  margin: 0 auto;
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.9;
  color: #F7F0EA;
  white-space: pre-line; /* line breaks written in the translations */
  text-wrap: pretty;     /* no lone 「い！」 at the end of a wrapped line */
}
/* Japanese wraps between phrases (お楽しみください！ moves down whole) */
html:lang(ja) .welcome-text { word-break: auto-phrase; }

/* ==========================================================
   Thank you
   ========================================================== */

/* ==========================================================
   Countdown
   ========================================================== */
.countdown-section {
  display: grid;
  /* fixed column sizes, so the photos never resize with the number of days */
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr) minmax(0, 1fr);
  align-items: stretch;
  color: #FFF8EC;
  font-family: var(--font-body);   /* stays English even on the Japanese page */
}
/* both photos glow brighter as the wedding approaches (--glow 0 → 1, set by main.js) */
.countdown-photo {
  width: 100%;
  height: clamp(420px, 44vw, 560px);
  object-fit: cover;
  display: block;
  filter: brightness(calc(0.42 + 0.63 * var(--glow, 0))) saturate(calc(0.6 + 0.5 * var(--glow, 0)));
}
.countdown-photo--japan { object-position: 62% 50%; }

.countdown-text {
  align-self: center;
  padding: 32px clamp(20px, 4vw, 56px);
  text-align: center;
}
.countdown-text .section-title { margin-bottom: 10px; max-width: 9em; margin-inline: auto; }
.countdown-days {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  color: var(--brass-light);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(76px, 10vw, 124px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #FFF8EC;
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown-done {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  margin: 12px 0 0;
}

/* brass slider: today → wedding day */
.glow-slider { margin: 28px auto 0; width: min(260px, 100%); }
.glow-slider input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brass) var(--fill, 0%), rgba(255, 248, 236, 0.22) var(--fill, 0%));
  cursor: pointer;
}
.glow-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFF8EC;
  border: 3px solid var(--brass);
  box-shadow: 0 0 0 5px rgba(232, 176, 75, 0.18), 0 0 18px rgba(255, 210, 120, 0.55);
}
.glow-slider input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFF8EC;
  border: 3px solid var(--brass);
  box-shadow: 0 0 0 5px rgba(232, 176, 75, 0.18), 0 0 18px rgba(255, 210, 120, 0.55);
}
.glow-slider input:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 6px; }
.glow-slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 248, 236, 0.65);
}

@media (max-width: 760px) {
  .countdown-section { grid-template-columns: 1fr 1fr; }
  .countdown-photo { height: 260px; }
  .countdown-photo--morocco { grid-row: 1; grid-column: 1; }
  .countdown-photo--japan { grid-row: 1; grid-column: 2; }
  .countdown-text { grid-row: 2; grid-column: 1 / -1; padding: 36px var(--gutter) 44px; }
}

/* ==========================================================
   Venue
   ========================================================== */
.venue { padding: clamp(56px, 8vw, 100px) var(--gutter); }
.venue-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(16px, 3vw, 28px);
  align-items: stretch;
}
.venue-card {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.venue-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.venue-city {
  margin: 4px 0 20px;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-dark);
}
html:lang(ja) .venue-city { text-transform: none; letter-spacing: 0.1em; }
.venue-details { margin: 0; display: grid; gap: 14px; width: 100%; }
.venue-details div { padding-left: 14px; border-left: 1.5px solid var(--line); }
.venue-details dt {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
html:lang(ja) .venue-details dt { text-transform: none; letter-spacing: 0.05em; }
.venue-details dd { margin: 0; font-size: 19px; color: var(--ink); }
.venue-details dd.venue-address { font-size: 16px; line-height: 1.5; }

.map-frame {
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--parchment-deep);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ==========================================================
   RSVP
   ========================================================== */
.rsvp {
  padding: clamp(16px, 3vw, 32px) var(--gutter) clamp(72px, 10vw, 120px);
  text-align: center;
}
.rsvp p { max-width: 32em; margin: 0 auto 26px; color: var(--ink); white-space: pre-line; }

/* ==========================================================
   Prepare your trip
   ========================================================== */
/* Aït Benhaddou kasbah, darkened just enough for the text */
.page {
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.38), rgba(15, 15, 15, 0.6)),
    url("../assets/img/kasbah.webp") center 40% / cover;
  color: #FFF6E8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.trip-cta {
  --trip-photo: none;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.38), rgba(15, 15, 15, 0.6)),
    var(--trip-photo) center 40% / cover;
  color: #FFF6E8;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  padding: clamp(96px, 14vw, 180px) var(--gutter);
  text-align: center;
}
.trip-cta p { max-width: 32em; margin: 0 auto 26px; color: rgba(255, 246, 232, 0.92); white-space: pre-line; }

/* ==========================================================
   Footer
   ========================================================== */
main { background: var(--dusk); }

.site-footer {
  padding: 32px var(--gutter) 40px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--dusk-end);
}
.site-footer p { margin: 0; }
.footer-names {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--cedar);
}

/* ==========================================================
   Prepare your trip page (trip.html)
   ========================================================== */
/* Text is written once per language; show only the page's language.
   data-show can list several, e.g. data-show="en ja" for a title that
   stays in English for Japanese readers. */
html[lang="en"] [data-show]:not([data-show~="en"]),
html[lang="ja"] [data-show]:not([data-show~="ja"]),
html[lang="fr"] [data-show]:not([data-show~="fr"]) { display: none !important; }

/* Hero: the Hassan II Mosque at sunset, with the title and a welcome.
   The sky is bright, so a deep wine veil (darkest in the middle, where
   the text sits) keeps the text easy to read */
.page {
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(26, 8, 14, 0.5), rgba(26, 8, 14, 0) 100%),
    linear-gradient(180deg, rgba(26, 8, 14, 0.5), rgba(26, 8, 14, 0.72)),
    url("../assets/img/hassan-ii.webp") center 30% / cover;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  min-height: 78svh;
  padding: clamp(96px, 12vw, 150px) var(--gutter) clamp(64px, 9vw, 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.page .section-title { color: #fff; margin-bottom: 0; }
.page .divider-star { margin-top: 0; }
.page p { max-width: 34em; margin: 0 auto 18px; color: rgba(255, 246, 232, 0.92); }
.page .marhaba {
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: 0.04em;
  color: #fff;
}
.marhaba small { font-size: 0.6em; color: rgba(255, 246, 232, 0.75); letter-spacing: 0.02em; }
.back-link {
  position: absolute;
  top: 22px;
  left: var(--gutter);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(255, 246, 232, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 246, 232, 0.4);
}
.back-link::before { content: "← "; }
.back-link:hover { color: #fff; border-color: #fff; }

/* The guide: one readable column on the dusk background */
.guide {
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(64px, 9vw, 110px);
}
.guide > * { max-width: 760px; margin-inline: auto; }

/* Contents: numbered parts with their topics, thin gold rules */
.guide-toc { margin-bottom: clamp(48px, 7vw, 80px); }
.toc-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--sand-dark);
}
html:lang(ja) .toc-title { letter-spacing: 0.15em; font-size: 15px; }
.guide .guide-toc > ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 48px;
  border-top: 1px solid rgba(201, 162, 78, 0.35);
}
/* a part with its topics underneath; never split across columns */
.guide .guide-toc > ol > li {
  break-inside: avoid;
  padding: 14px 0 12px;
  border-bottom: 1px solid rgba(201, 162, 78, 0.35);
}
.guide .guide-toc a {
  text-decoration: none;
  color: var(--ink);
  transition: color 0.2s ease;
}
.guide .guide-toc a:hover { color: var(--brass-light); }
.guide .guide-toc > ol > li > a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 18px;
}
.guide .guide-toc b {
  flex: 0 0 1em;
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  color: var(--brass);
}
/* topics, lined up under the part title */
.guide .guide-toc ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 calc(1em + 14px);
}
.guide .guide-toc ul li { margin: 0; }
.guide .guide-toc ul a {
  display: block;
  padding: 2px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Each part opens with an English title */
.guide-part {
  padding-top: clamp(40px, 6vw, 64px);
  scroll-margin-top: 16px;
}
.guide-part + .guide-part { margin-top: clamp(24px, 4vw, 48px); }
.guide-part .section-title { margin-bottom: 0; }
.guide .part-sub {
  /* clear the swashes of the script title's descenders (the g of "Getting") */
  margin: clamp(18px, 2.4vw, 26px) 0 0;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.15em;
  color: var(--sand-dark);
}
.guide .part-intro { margin: 20px 0 0; text-align: center; color: var(--ink-soft); }

/* One topic: a small heading, then prose */
.topic {
  padding-top: clamp(28px, 4vw, 40px);
  scroll-margin-top: 16px;
}
.topic h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 23px);
  line-height: 1.4;
  color: var(--brass-light);
}
/* a small gold diamond before each topic */
.topic h3::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--line);
  transform: rotate(45deg);
}
.guide p,
.guide li,
.guide dd { color: var(--ink); }
.guide p { margin: 0 0 14px; }
.guide ol,
.guide ul { margin: 0 0 14px; padding-left: 1.4em; }
.guide li { margin-bottom: 6px; }
.guide li::marker { color: var(--brass); }
.guide ul ul { margin: 6px 0 0; }
.topic a,
.schedule a {
  color: var(--brass-light);
  text-decoration: underline;
  text-decoration-color: rgba(230, 207, 148, 0.45);
  text-underline-offset: 3px;
}
.topic a:hover,
.schedule a:hover { text-decoration-color: currentColor; }
.guide strong { font-weight: 600; color: #fff; }
.guide small { font-size: 0.8em; color: var(--ink-soft); }
html:lang(ja) .guide p,
html:lang(ja) .guide li,
html:lang(ja) .guide dd { line-height: 1.95; }

/* asides: a gold hairline on the left */
.guide .note {
  padding-left: 14px;
  border-left: 1.5px solid var(--line);
  font-size: 0.94em;
  color: var(--ink-soft);
}

/* places: name, then a line about it */
.places { margin: 0; }
.places dt {
  font-weight: 600;
  color: #fff;
}
.guide .places dd { margin: 2px 0 14px; color: var(--ink-soft); }

/* weekend schedule: thin gold rules, no boxes */
.schedule {
  width: 100%;
  margin-top: clamp(24px, 3vw, 36px);
  border-collapse: collapse;
  font-size: 16px;
}
.schedule th {
  padding: 0 12px 10px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  color: var(--sand-dark);
  border-bottom: 1px solid var(--line);
}
html:lang(ja) .schedule th { letter-spacing: 0.05em; text-transform: none; white-space: nowrap; }
.schedule td {
  padding: 12px 12px 12px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(201, 162, 78, 0.3);
}
.schedule td:nth-child(-n + 2) { white-space: nowrap; color: var(--brass-light); }
.schedule td:last-child { padding-right: 0; }
.schedule + .note { margin-top: 20px; }
.topic .schedule { margin: 4px 0 0; }

/* ==========================================================
   RSVP page (rsvp.html)
   ========================================================== */
.page--short { min-height: 56svh; }
/* RSVP: a madrasa courtyard (carved arch, zellige, reflecting pool),
   under the same wine veil; the door stays centred behind the title */
.page--rsvp {
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(26, 8, 14, 0.5), rgba(26, 8, 14, 0) 100%),
    linear-gradient(180deg, rgba(26, 8, 14, 0.42), rgba(26, 8, 14, 0.62)),
    url("../assets/img/madrasa-courtyard.webp") 50% 45% / cover;
}
.page strong { font-weight: 700; color: #fff; }

/* one narrow column: label, then the field; thin gold outlines */
.guide > .rsvp-form,
.guide > .rsvp-thanks { max-width: 560px; }
/* every question is centred: its title, its answers and its hint */
.rsvp-form .field {
  margin: 0 0 30px;
  padding: 0;
  border: 0;
  min-width: 0;
  text-align: center;
}
.rsvp-form .field > label,
.rsvp-form legend {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--brass-light);
}
html:lang(ja) .rsvp-form .field > label,
html:lang(ja) .rsvp-form legend { font-size: clamp(18px, 2vw, 20px); letter-spacing: 0.04em; word-break: auto-phrase; }
/* the same gold star as under the page title, before each question */
.rsvp-form .field > label::before,
.rsvp-form legend::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 10px;
  vertical-align: 0.1em;
  background: var(--line);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.rsvp-form input[type="text"],
.rsvp-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(201, 162, 78, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.rsvp-form textarea { resize: vertical; }
.rsvp-form input:focus-visible,
.rsvp-form textarea:focus-visible {
  outline: none;
  border-color: var(--brass-light);
  box-shadow: 0 0 0 3px rgba(230, 207, 148, 0.18);
}
.guide .rsvp-form .hint { margin: 8px 0 0; font-size: 14px; color: var(--ink-soft); }

/* radio answers: a plain list, a gold ring that fills when chosen */
/* the list sits in the middle; its rows stay lined up with each other */
.choices { display: grid; justify-content: center; gap: 12px; text-align: left; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  cursor: pointer;
  transition: color 0.2s ease;
}
.choice:hover,
.choice:has(input:checked) { color: var(--brass-light); }
.choice input {
  -webkit-appearance: none;
          appearance: none;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 3px;
  border: 1.5px solid var(--brass);
  border-radius: 50%;
  background-clip: content-box;
}
/* the dot only fills the content box, so the gap shows the page behind */
.choice input:checked { background-color: var(--brass-light); }
.choice input:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }

.choices--inline { grid-auto-flow: column; column-gap: 40px; }

/* a part of the form: a thin gold rule, then a small heading */
.form-part {
  margin: 44px 0 6px;
  padding-top: 28px;
  border-top: 1px solid rgba(201, 162, 78, 0.35);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 28px);
  text-align: center;
  color: var(--ink);
}
.guide .rsvp-form .form-part-hint { margin: 0 0 24px; text-align: center; }

/* Attend / Decline: two circles, English over Japanese; the chosen one
   fills with cream and a thin gold ring just inside its edge */
.attend-choices { display: flex; justify-content: center; gap: clamp(28px, 6vw, 44px); }
.attend { position: relative; cursor: pointer; }
.attend input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.attend > span {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}
.attend > span::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(201, 162, 78, 0.35);
  border-radius: 50%;
  transition: border-color 0.25s ease;
}
.attend:hover > span::before { border-color: var(--brass); }
.attend b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
}
.rsvp-form .attend small { font-size: 12px; letter-spacing: 0.1em; color: inherit; }
.attend input:checked + span { background: var(--ink); color: var(--parchment); }
.attend input:checked + span::before { border-color: var(--brass); }
.attend input:focus-visible + span { outline: 2px solid var(--brass-light); outline-offset: 3px; }

/* after a failed send, point at what's missing */
.rsvp-form.was-submitted :is(input, textarea):invalid { border-color: #F2A49A; }
.rsvp-form.was-submitted .field:has(:invalid) :is(legend, label:not(.choice, .attend)) { color: #F2A49A; }
.rsvp-form.was-submitted .choice input:invalid { border-color: #F2A49A; }
.rsvp-form.was-submitted .attend input:invalid + span::before { border-color: #F2A49A; }

.rsvp-form button.btn { display: block; margin: 0 auto; font: inherit; font-size: 15px; cursor: pointer; }
.rsvp-form button.btn:disabled { opacity: 0.5; cursor: progress; }
.guide .form-status p { margin: 16px 0 0; text-align: center; color: #F2A49A; }

.rsvp-thanks { text-align: center; }
.rsvp-thanks:focus { outline: none; }
.rsvp-thanks .btn { margin-top: 12px; }

.guide-part:last-child .btn { margin-top: 24px; }
.guide-part:last-child { text-align: center; }
.guide-part:last-child .topic { text-align: left; }

@media (max-width: 640px) {
  .guide .guide-toc > ol { columns: 1; }
  .schedule thead { display: none; }
  .schedule tr { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(201, 162, 78, 0.3); }
  .schedule td { padding: 0; border: 0; }
  .schedule td:last-child { grid-column: 1 / -1; margin-top: 4px; }
}

/* several guests on one invitation: their names, the current one filled */
.guide > .guest-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 560px;
  margin-bottom: 36px;
  scroll-margin-top: 80px;
}
.guide > .guest-picker[hidden] { display: none; }
.guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(201, 162, 78, 0.45);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.guest-chip:hover { border-color: var(--brass); }
.guest-chip[aria-pressed="true"] { background: var(--ink); color: var(--parchment); border-color: var(--brass); }
/* a small gold check once their card is in */
.guest-chip.is-replied::after { content: "✓"; color: var(--brass); }
.guest-chip:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }

/* whose card this is: the guest's name over the form */
.rsvp-form .guest-name {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 32px);
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
}
.guide .form-status p.is-good { color: var(--brass-light); }
.guide > .no-guests { text-align: center; }

/* a button that reads as a link: "Change a reply", "Log out" */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:focus-visible { outline: 2px solid var(--brass-light); outline-offset: 3px; }
.rsvp-thanks .link-button { margin-top: 20px; font-size: 15px; color: var(--ink-soft); }

.site-footer .footer-account {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
  font-size: 13px;
}
.site-footer .footer-account [hidden] { display: none; }

/* ==========================================================
   The door (login.html): the gate at rest, an arched plaque
   on its doors; logging in swings them open
   ========================================================== */
.login-page { overflow: hidden; }
.login-stage { position: relative; }
/* lamplight waiting behind the doors */
.door-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 30% 45% at 50% 62%, #F6D9A0 0%, #B9772F 45%, #2A1408 100%);
}
.login-stage .door { transition: transform 1.4s cubic-bezier(0.55, 0, 0.25, 1), filter 1.4s ease; }
.is-entering .login-stage .door--left  { transform: rotateY(80deg);  filter: brightness(0.55); }
.is-entering .login-stage .door--right { transform: rotateY(-80deg); filter: brightness(0.55); }

/* centred on the doorway: the gate is centred and as tall as the screen,
   and its doorway's middle sits 61% of the way down */
.login-form {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translate(-50%, -50%);
  /* narrower than the doorway, so the carved leaves still show around it */
  width: clamp(236px, 28svh, 290px);
  max-width: calc(100vw - 32px);
  padding: 40px 22px 22px;
  border: 1px solid rgba(201, 162, 78, 0.7);
  border-radius: 999px 999px 16px 16px / 130px 130px 16px 16px;
  background: rgba(26, 8, 14, 0.66);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 5px rgba(26, 8, 14, 0.4), inset 0 0 0 6px rgba(201, 162, 78, 0.35);
  text-align: center;
  transition: opacity 0.5s ease;
}
.is-entering .login-form { opacity: 0; pointer-events: none; }
.login-names {
  margin: 0;
  font-family: "Clagista", var(--font-display);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.3;
  white-space: nowrap;
  padding-bottom: 0.25em;
  margin-bottom: 10px;
  color: var(--brass-light);
}
.login-field {
  display: block;
  margin-bottom: 14px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand-dark);
}
html:lang(ja) .login-field { letter-spacing: 0.06em; }
.login-field input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 162, 78, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: none;
}
.login-field input:focus-visible {
  outline: none;
  border-color: var(--brass-light);
  box-shadow: 0 0 0 3px rgba(230, 207, 148, 0.18);
}
.login-form .btn { margin-top: 6px; font: inherit; font-size: 15px; cursor: pointer; }
.login-form .btn:disabled { opacity: 0.6; cursor: progress; }
.login-form .form-status p { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: #F2A49A; }
/* short screens (phones on their side): a tighter plaque, still on the doors */
@media (max-height: 620px) {
  .login-form { top: 50%; padding: 26px 20px 16px; border-radius: 999px 999px 14px 14px / 90px 90px 14px 14px; }
  .login-names { font-size: 22px; }
  .login-field { margin-bottom: 8px; }
  .login-field input { padding: 7px 10px; }
  .login-form .btn { padding: 9px 22px; }
}

/* ==========================================================
   Replies (admin.html): totals, then every guest
   ========================================================== */
.admin { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter) 64px; }
/* the summary: sections side by side, three per row (one above another on small screens) */
.admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 40px;
  margin: 0 0 44px;
}
.summary-section h3 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201, 162, 78, 0.35);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-dark);
}
.summary-section h4 { margin: 16px 0 8px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }

/* numbers with labels; zeros are dimmed so real counts stand out */
.summary-stats { margin: 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
.summary-stats li { display: flex; align-items: baseline; gap: 10px; padding: 2px 0; }
.summary-stats b {
  min-width: 1.6em;
  font-size: 20px;
  font-weight: 500;
  text-align: right;
  color: var(--brass-light);
}
.summary-stats .is-zero { color: rgba(203, 190, 193, 0.5); }
.summary-stats .is-zero b { color: inherit; }
@media (max-width: 720px) { .admin-summary { grid-template-columns: minmax(0, 1fr); } }
/* the two admin pages: Replies · Accounts */
.admin-nav { display: flex; justify-content: center; gap: 28px; margin: -8px 0 36px; font-size: 15px; }
.admin-nav a { color: var(--ink-soft); text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid transparent; }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a[aria-current="page"] { color: var(--brass-light); border-bottom-color: var(--brass); }

/* Accounts page (accounts.html) */
.admin-heading {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-dark);
}
.admin-heading .account-count { letter-spacing: 0.04em; text-transform: none; color: var(--ink-soft); }
.account-new { margin: 0 0 48px; padding: 24px; border: 1px solid rgba(201, 162, 78, 0.35); border-radius: 14px; }
.account-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.admin-field { display: block; margin: 0 0 16px; padding: 0; border: 0; font-size: 13px; color: var(--ink-soft); }
.admin-field legend { padding: 0; margin-bottom: 6px; }
.admin-field input,
.inline-input,
.account-search {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(201, 162, 78, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.admin-field input:focus-visible,
.inline-input:focus-visible,
.account-search:focus-visible { outline: none; border-color: var(--brass-light); box-shadow: 0 0 0 3px rgba(230, 207, 148, 0.18); }
.with-button { display: flex; align-items: center; gap: 12px; }
.with-button input { flex: 1; margin-top: 6px; }
/* Generate, with Easy below it */
.button-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.guest-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; margin-bottom: 8px; }
.guest-inputs input { margin-top: 0; }
.guest-input { display: flex; align-items: center; gap: 8px; }
.admin .remove-row { padding: 0 6px; font-size: 18px; line-height: 1; text-decoration: none; color: var(--ink-soft); }
.guest-label.is-unnamed { font-style: italic; color: var(--ink-soft); }
.admin .link-button { font-size: 14px; color: var(--brass-light); }
.admin-hint { margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); }
.account-form .btn { font: inherit; font-size: 15px; cursor: pointer; }
.admin-status { margin: 12px 0 0; font-size: 14px; }
.admin-status.is-good { color: var(--brass-light); }
.admin-status.is-error { color: #F2A49A; }
.account-search { max-width: 320px; margin-top: 0; }

.account-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.account-card { padding: 18px 20px 14px; border: 1px solid rgba(201, 162, 78, 0.3); border-radius: 14px; }
.account-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 10px; }
.account-name { margin: 0; font-size: 20px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.account-badge { padding: 1px 9px; border: 1px solid var(--brass); border-radius: 999px; font-size: 12px; color: var(--brass-light); }
.account-meta { font-size: 13px; color: var(--ink-soft); }
.account-head .account-actions,
.account-head .account-locked { flex-basis: 100%; }
.account-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.account-guests { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.account-guests li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid rgba(201, 162, 78, 0.15); }
.guest-label { flex: 1 1 140px; overflow-wrap: anywhere; }
.account-add { margin: 8px 0 0; }
.account-notice { margin: 6px 0 0; font-size: 14px; color: var(--brass-light); overflow-wrap: anywhere; }
.account-notice:empty { display: none; }
.account-empty { margin: 0; color: var(--ink-soft); font-size: 14px; }
.inline-edit { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.inline-edit .inline-input { flex: 1 1 180px; width: auto; margin: 0; }
.btn--small { padding: 7px 16px; font: inherit; font-size: 14px; cursor: pointer; }
@media (max-width: 560px) {
  .account-fields, .guest-inputs { grid-template-columns: minmax(0, 1fr); }
  .account-new { padding: 18px 16px; }
}
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-actions .btn { font-size: 14px; padding: 9px 20px; }
.admin-filter { display: flex; gap: 8px; flex-wrap: wrap; }
/* the table scrolls sideways on its own; the page doesn't */
.admin-table-wrap { overflow-x: auto; border: 1px solid rgba(201, 162, 78, 0.3); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.admin-table th,
.admin-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(201, 162, 78, 0.18); }
.admin-table th { position: sticky; top: 0; background: #2A0D17; font-weight: 500; color: var(--sand-dark); white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .account-start td { border-top: 1px solid rgba(201, 162, 78, 0.45); }
.admin-table td.wide { min-width: 220px; white-space: pre-line; }
.admin-table .muted { color: var(--ink-soft); }
.answer { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.answer--yes { background: rgba(36, 94, 69, 0.55); color: #DDF2E6; }
.answer--no { background: rgba(192, 57, 43, 0.35); color: #F8D5CF; }
.answer--none { border: 1px dashed rgba(203, 190, 193, 0.5); color: var(--ink-soft); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 860px) {
  .venue-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; animation: none; }
  /* the door fades instead of swinging */
  .login-stage .door { transition: opacity 0.3s ease; }
  .is-entering .login-stage .door--left,
  .is-entering .login-stage .door--right { transform: none; opacity: 0; }
}

.trip-cta.is-visible { --trip-photo: url("../assets/img/kasbah.webp"); }
.logout-error, .rsvp-load-error { color: #F2A49A; }
.guest-chip:disabled { opacity: 0.6; cursor: progress; }
