/* =========================================================================
   The Full Gallery · black, champagne gold, soft cream, restrained silver.
   Built to browse 250+ memories quickly, then open one large.
   ========================================================================= */
:root {
  --ink: #050505;
  --gold: #d7b25f;
  --gold-light: #f3e0a8;
  --cream: #f1ede4;
  --tb-h: 68px;
  --btn-h: 52px;
  --font-caps: "Cinzel", Georgia, serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", cursive;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brush-gold:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 2px, rgba(0, 0, 0, 0.05) 2px 3px, rgba(255, 255, 255, 0) 3px 6px),
    linear-gradient(180deg, #fff6d2 0%, #f5dd95 28%, #e3c164 54%, #caa23f 74%, #f1d78f 100%);
  --brush-gold-bright:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, rgba(0, 0, 0, 0.04) 2px 3px, rgba(255, 255, 255, 0) 3px 6px),
    linear-gradient(180deg, #fffbe6 0%, #fbe9ae 28%, #eccd78 54%, #d8b154 74%, #ffeaa9 100%);
  --brush-silver:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, rgba(0, 0, 0, 0.06) 2px 3px, rgba(255, 255, 255, 0) 3px 6px),
    linear-gradient(180deg, #fdfefe 0%, #e2e7ec 28%, #b2bac3 54%, #eef2f6 74%, #9ea6b0 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #080808; color: var(--cream); overflow-x: hidden; }
body { font-family: var(--font-ui); font-size: 16px; -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Sticky header ---------- */
.topbar { position: sticky; top: 0; z-index: 60; height: var(--tb-h); background: rgba(5, 5, 5, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(215, 178, 95, 0.3); }
.topbar-inner { max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tb-brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none; white-space: nowrap; min-width: 0; }
.tb-title { display: flex; align-items: baseline; gap: 0.28em; }
.tb-word { font-family: var(--font-caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; font-size: clamp(14px, 1.35vw, 20px);
  background: linear-gradient(180deg, #fff6d8 0%, #f0d799 34%, #c9a24a 60%, #f6e5ae 82%, #b8862a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-script { font-family: var(--font-script); font-size: clamp(12px, 1vw, 15px); color: #e9edf2; }
.tb-event { font-weight: 700; font-size: 9.5px; letter-spacing: 0.2em; margin-right: -0.2em; text-transform: uppercase; color: rgba(243, 224, 168, 0.85); }
.tb-nav { display: flex; align-items: center; gap: clamp(0.9rem, 1.8vw, 1.8rem); }
.tb-nav a { font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: #e8eaee; text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.tb-nav a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.tb-add {                                   /* the one primary action: solid brushed gold */
  display: inline-flex; align-items: center; min-height: var(--btn-h); padding: 0 22px; border-radius: 26px;
  border: 1px solid rgba(160, 122, 40, 0.55); color: #171308 !important; background: var(--brush-gold);
  font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); transition: background 0.2s ease;
}
.tb-add:hover { background: var(--brush-gold-bright); border-bottom-color: rgba(160, 122, 40, 0.55) !important; }
.tb-add:active { background: var(--brush-silver); color: #0d0d0f !important; }
.tb-menu { display: none; }

/* ---------- Hero ---------- */
.g-hero {
  position: relative; width: 100%; height: clamp(280px, 22vw, 340px);
  background: #050505 url("/memories/experience/media/gallery-hero.webp") center right / cover no-repeat;
  display: flex; align-items: center;
}
.g-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0.12) 68%, rgba(0, 0, 0, 0.18) 100%); }
.g-hero-copy { position: relative; z-index: 1; max-width: 540px; padding-left: clamp(24px, 6vw, 90px); padding-right: 24px; }
.g-eyebrow { margin: 0; font-family: var(--font-caps); font-weight: 600; font-size: clamp(14px, 1.1vw, 16px); letter-spacing: 0.3em; margin-right: -0.3em; text-transform: uppercase; color: var(--gold-light); }
.g-title { margin: 4px 0 0; font-family: var(--font-caps); font-weight: 700; text-transform: uppercase; line-height: 1; letter-spacing: 0.02em;
  font-size: clamp(42px, 5.4vw, 82px); color: #fdfbf6; text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8); }
.g-sub { margin: 14px 0 0; font-size: clamp(16px, 1.4vw, 21px); color: #eceadf; }
.g-sub b { color: var(--gold-light); font-weight: 800; }
.g-note { margin: 6px 0 0; font-size: 15px; color: rgba(255, 255, 255, 0.6); }

/* ---------- Tools ---------- */
.g-tools { max-width: 1600px; margin: 0 auto; padding: clamp(1rem, 2.4vw, 1.6rem) clamp(1rem, 3vw, 2.5rem);
  display: flex; align-items: center; gap: clamp(0.7rem, 1.6vw, 1.4rem); flex-wrap: wrap; }
.g-filters { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.g-chip {
  min-height: 48px; padding: 0 22px; border-radius: 26px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 800; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(10, 10, 11, 0.6); border: 1px solid rgba(215, 178, 95, 0.6);
  transition: background 0.2s ease, color 0.2s ease;
}
.g-chip:hover { background: rgba(215, 178, 95, 0.16); color: #fff6d8; }
.g-chip.on { background: var(--brush-gold); color: #171308; border-color: rgba(160, 122, 40, 0.55); }
.g-chip:active { background: var(--brush-silver); color: #0d0d0f; }
.g-search { flex: 1 1 260px; min-width: 220px; }
.g-search input {
  width: 100%; min-height: 48px; padding: 0 18px; border-radius: 26px; font-family: var(--font-ui); font-size: 16px;
  color: var(--cream); background: rgba(10, 10, 11, 0.6); border: 1px solid rgba(215, 178, 95, 0.35);
}
.g-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.g-search input:focus { outline: none; border-color: var(--gold); }
.g-sort select {
  min-height: 48px; padding: 0 16px; border-radius: 26px; font-family: var(--font-ui); font-size: 15px; cursor: pointer;
  color: var(--cream); background: rgba(10, 10, 11, 0.6); border: 1px solid rgba(215, 178, 95, 0.35);
}

/* ---------- The gallery ---------- */
.g-main { max-width: 1600px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vh, 3.5rem); }
.g-status { margin: 0 0 1rem; font-size: 15px; color: rgba(255, 255, 255, 0.6); }
.g-grid { column-count: 5; column-gap: 14px; }
.g-tile {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 1px solid rgba(215, 178, 95, 0.18);
  border-radius: 6px; overflow: hidden; background: #131316; cursor: pointer; break-inside: avoid; position: relative;
  transition: transform 0.25s cubic-bezier(.2, .7, .2, 1), border-color 0.25s ease;
}
.g-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) {
  .g-tile:hover, .g-tile:focus-visible { transform: translateY(-3px); border-color: var(--gold); outline: none; }
}
.g-play {                                  /* a plain play mark, nothing cute */
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(5, 5, 5, 0.6); border: 1px solid rgba(243, 224, 168, 0.85);
}
.g-play::after { content: ""; position: absolute; left: 22px; top: 17px; border-left: 20px solid var(--gold-light); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.g-more { display: flex; justify-content: center; padding-top: 0.6rem; }
.g-load {
  min-height: 56px; padding: 0 34px; border-radius: 28px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(10, 10, 11, 0.6); border: 1px solid rgba(215, 178, 95, 0.7);
}
.g-load:hover { background: rgba(215, 178, 95, 0.16); color: #fff6d8; }
.g-load:active { background: var(--brush-silver); color: #0d0d0f; }

/* ---------- The viewer ---------- */
.g-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 5, 0.97); color: var(--cream); }
.g-viewer::backdrop { background: rgba(0, 0, 0, 0.9); }
.gv-stage { display: flex; align-items: center; justify-content: center; gap: clamp(0.5rem, 2vw, 2rem); height: calc(100dvh - 150px); padding: 18px clamp(0.5rem, 2vw, 2rem) 0; }
.gv-media { flex: 1 1 auto; height: 100%; display: flex; align-items: center; justify-content: center; }
.gv-media img, .gv-media video { max-width: 100%; max-height: min(78vh, 100%); object-fit: contain; border-radius: 4px; }
.gv-nav {
  flex: none; min-height: 56px; padding: 0 18px; border-radius: 28px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cream); background: rgba(16, 16, 18, 0.9); border: 1px solid rgba(215, 178, 95, 0.55);
}
.gv-nav:hover { background: rgba(215, 178, 95, 0.16); }
.gv-nav:active { background: var(--brush-silver); color: #0d0d0f; }
.gv-nav span[aria-hidden] { font-size: 22px; line-height: 1; }
.gv-info { text-align: center; padding: 16px 1.25rem 24px; display: grid; justify-items: center; gap: 6px; }
.gv-by { margin: 0; font-size: 16px; color: rgba(255, 255, 255, 0.75); }
.gv-by b { color: var(--gold-light); font-weight: 700; }
.gv-caption { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 20px; color: var(--cream); max-width: 46rem; }
.gv-pos { margin: 2px 0 8px; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.gv-full {
  display: inline-flex; align-items: center; min-height: var(--btn-h); padding: 0 24px; border-radius: 26px; text-decoration: none;
  font-weight: 800; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(10, 10, 11, 0.6); border: 1px solid rgba(215, 178, 95, 0.7);
}
.gv-full:hover { background: rgba(215, 178, 95, 0.16); color: #fff6d8; }
.gv-close {
  position: absolute; top: 14px; right: 16px; z-index: 2; min-height: var(--btn-h); padding: 0 22px; border-radius: 26px; cursor: pointer;
  font-family: var(--font-ui); font-weight: 800; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(16, 16, 18, 0.9); border: 1px solid rgba(215, 178, 95, 0.6);
}
.gv-close:hover { background: rgba(215, 178, 95, 0.18); }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid rgba(215, 178, 95, 0.18); padding: 22px 1.25rem; text-align: center; display: grid; justify-items: center; gap: 4px; background: #060606; }
.foot-name { margin: 0; font-family: var(--font-caps); font-weight: 600; font-size: 16px; letter-spacing: 0.22em; margin-right: -0.22em; text-transform: uppercase; color: #f4f2ee; }
.foot-sub { margin: 0; font-weight: 700; font-size: 12px; letter-spacing: 0.24em; margin-right: -0.24em; text-transform: uppercase; color: rgba(243, 224, 168, 0.9); }
.foot-line { margin: 10px 0 0; font-size: 11.5px; letter-spacing: 0.22em; margin-right: -0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.foot-line::before { content: ""; display: block; width: 70px; height: 1px; margin: 0 auto 10px; background: linear-gradient(90deg, transparent, rgba(215, 178, 95, 0.55), transparent); }
.foot-links { margin: 12px 0 0; display: flex; gap: 0.9rem; align-items: center; font-size: 15px; }
.foot-links a { color: rgba(255, 255, 255, 0.75); }
.foot-links span { color: rgba(215, 178, 95, 0.6); }

/* ---------- Columns by width ---------- */
@media (max-width: 1599px) { .g-grid { column-count: 4; } }
@media (max-width: 1199px) { .g-grid { column-count: 3; } }
@media (max-width: 900px) {
  .tb-nav a:not(.tb-add) { display: none; }
  .tb-menu {
    display: inline-block; background: transparent; border: 1px solid rgba(215, 178, 95, 0.6); color: var(--cream);
    border-radius: 22px; padding: 12px 16px; font-weight: 800; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer;
  }
  .tb-drop { position: absolute; top: 100%; left: 0; right: 0; background: #0b0b0b; border-bottom: 1px solid rgba(215, 178, 95, 0.3); display: grid; padding: 6px 16px 14px; z-index: 61; }
  .tb-drop a { padding: 15px 2px; font-size: 16px; color: #f2f3f5; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  :root { --tb-h: 60px; }
  .g-hero { height: clamp(220px, 58vw, 260px); background-position: 72% center; align-items: flex-start; }
  .g-hero::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.7) 100%); }
  .g-hero-copy { max-width: none; padding: 22px 24px 0; text-align: center; margin: 0 auto; }
  .g-eyebrow { font-size: 13px; letter-spacing: 0.26em; margin-right: -0.26em; }
  .g-title { font-size: clamp(42px, 13vw, 52px); }
  .g-sub { font-size: 17px; margin-top: 10px; }
  .g-note { font-size: 14px; }
  .g-tools { gap: 0.6rem; padding: 1rem; }
  .g-filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .g-filters::-webkit-scrollbar { display: none; }
  .g-chip { flex: none; font-size: 13px; padding: 0 18px; }
  .g-search { flex: 1 1 100%; }
  .g-sort select { width: 100%; }
  .g-grid { column-count: 2; column-gap: 10px; }
  .g-tile { margin-bottom: 10px; }
  .gv-stage { height: calc(100dvh - 210px); gap: 0; }
  .gv-nav { position: absolute; bottom: 18px; z-index: 3; min-height: 54px; }
  .gv-prev { left: 14px; }
  .gv-next { right: 14px; }
  .gv-word { display: none; }
  .gv-nav span[aria-hidden] { font-size: 26px; }
  .gv-info { padding: 12px 1rem 86px; }
  .gv-caption { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .g-tile { transition: none; } }

/* ---------- Fixes from the device pass ---------- */
[hidden] { display: none !important; }        /* the menu really is closed until it is opened */
.tb-add { white-space: nowrap; }
.tb-add-short { display: none; }
@media (max-width: 767px) {
  .tb-add-full { display: none; }
  .tb-add-short { display: inline; }
  .tb-add { padding: 0 16px; min-height: 44px; font-size: 12px; }
  .tb-menu { padding: 10px 14px; }
  .tb-brand { overflow: hidden; }
  .gv-stage { padding-top: 74px; height: calc(100dvh - 250px); }
  .gv-nav { bottom: 26px; }
  .gv-info { padding-bottom: 104px; }
  .gv-close { top: 16px; right: 14px; }
}

/* =========================================================================
   Revision 2 · the memory opens beside the gallery, not over it.
   The grid narrows, the panel docks on the right and follows as you scroll.
   ========================================================================= */
.g-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 2vw, 1.6rem); align-items: start; }
.g-layout.panel-open { grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 460px); }
.g-layout.panel-open .g-grid { column-count: 3; }
.g-col { min-width: 0; }

.g-panel {
  position: sticky; top: calc(var(--tb-h) + 16px); align-self: start;
  max-height: calc(100vh - var(--tb-h) - 32px); overflow-y: auto;
  background: #0b0b0d; border: 1px solid rgba(215, 178, 95, 0.55); border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.g-panel-inner { position: relative; padding: clamp(1rem, 1.6vw, 1.5rem); display: grid; gap: 0.6rem; }
.gv-close {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 42px; height: 42px; min-height: 0; padding: 0;
  border-radius: 50%; font-size: 24px; line-height: 1; letter-spacing: 0; cursor: pointer;
  color: var(--cream); background: rgba(10, 10, 11, 0.85); border: 1px solid rgba(215, 178, 95, 0.5);
}
.gv-close:hover { background: rgba(215, 178, 95, 0.18); color: #fff6d8; }
.gv-media { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 34px; }
.gv-media img, .gv-media video { max-width: 100%; max-height: 58vh; width: auto; border-radius: 4px; display: block; }
.gv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; cursor: pointer;
  color: var(--cream); background: rgba(10, 10, 11, 0.8); border: 1px solid rgba(215, 178, 95, 0.55);
}
.gv-nav span[aria-hidden] { font-size: 24px; line-height: 1; }
.gv-nav:hover { background: rgba(215, 178, 95, 0.2); color: #fff6d8; }
.gv-prev { left: -6px; }
.gv-next { right: -6px; }
.gv-info { text-align: center; display: grid; justify-items: center; gap: 4px; padding-top: 4px; }
.gv-by { margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.72); }
.gv-caption { margin: 2px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--cream); }
.gv-pos { margin: 4px 0 10px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.gv-full {                                   /* primary action: solid brushed gold */
  width: 100%; justify-content: center; min-height: var(--btn-h); border-radius: 26px;
  background: var(--brush-gold); color: #171308; border: 1px solid rgba(160, 122, 40, 0.55);
}
.gv-full:hover { background: var(--brush-gold-bright); color: #171308; }
.gv-full:active { background: var(--brush-silver); color: #0d0d0f; }

/* the tile you are looking at is marked in the grid */
.g-tile.is-open { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(215, 178, 95, 0.55); }

@media (max-width: 1599px) { .g-layout.panel-open .g-grid { column-count: 3; } }
@media (max-width: 1199px) { .g-layout.panel-open .g-grid { column-count: 2; } }

/* ---------- Tablet and phone: the panel takes the screen ---------- */
@media (max-width: 900px) {
  .g-layout.panel-open { grid-template-columns: minmax(0, 1fr); }
  .g-panel {
    position: fixed; inset: 0; z-index: 80; max-height: none; border-radius: 0; border: 0;
    background: rgba(5, 5, 5, 0.98); display: flex; align-items: center; justify-content: center;
  }
  .g-panel-inner { width: 100%; max-width: 560px; padding: 1rem; }
  .gv-media { margin-top: 44px; }
  .gv-media img, .gv-media video { max-height: 56vh; }
  .gv-nav { width: 52px; height: 52px; }
  .gv-prev { left: 2px; }
  .gv-next { right: 2px; }
  .gv-close { width: 48px; height: 48px; top: 14px; right: 14px; }
  body.panel-locked { overflow: hidden; }
  .g-layout.panel-open .g-grid { column-count: 2; }
}

/* The full-screen panel on small screens needs an explicit height: with only
   inset:0 the box collapsed to its content and the gallery showed underneath. */
@media (max-width: 900px) {
  .g-panel { top: 0; left: 0; right: 0; bottom: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
  .g-panel-inner { margin: auto; }
}

/* =========================================================================
   Revision 3 · the panel fits the screen (no inner scrollbar), and full size
   opens over the page with one button back to the gallery.
   ========================================================================= */
.g-panel { overflow: hidden; }                       /* the picture is sized to fit instead */
.g-panel-inner { padding-top: 0.9rem; }
.gv-media { margin-top: 40px; }
.gv-media img, .gv-media video {
  max-height: calc(100vh - var(--tb-h) - 310px);     /* leaves room for the words and the button */
  min-height: 180px; object-fit: contain;
}
.gv-caption {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gv-full { display: inline-flex; align-items: center; cursor: pointer; font-family: var(--font-ui); }

/* ---------- Full size, still on this page ---------- */
.g-full {
  position: fixed; inset: 0; z-index: 95; background: rgba(4, 4, 5, 0.97);
  display: flex; align-items: center; justify-content: center; padding: 20px 20px 96px;
}
.g-full img { max-width: 96vw; max-height: calc(100vh - 130px); object-fit: contain; border-radius: 4px; }
.g-full-back {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  min-height: 56px; padding: 0 30px; border-radius: 28px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-ui); font-weight: 800; font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cream); background: rgba(10, 10, 11, 0.85); border: 1px solid rgba(215, 178, 95, 0.75);
}
.g-full-back:hover { background: rgba(215, 178, 95, 0.18); color: #fff6d8; }
.g-full-back:active { background: var(--brush-silver); color: #0d0d0f; }

@media (max-width: 900px) {
  .gv-media img, .gv-media video { max-height: calc(100dvh - 300px); }
  .g-full { padding: 16px 12px 92px; }
  .g-full img { max-height: calc(100dvh - 120px); }
}

.gv-media { margin-bottom: 12px; }        /* the name shouldn't sit on the photo's edge */

/* =========================================================================
   Buttons · smooth gold, squared corners, smaller footprint
   ========================================================================= */
:root {
  --btn-radius: 7px;
  --btn-h: 48px;
  --brush-gold: linear-gradient(180deg, #fbeab4 0%, #efd694 30%, #dcbb66 55%, #cfa94f 78%, #e8cd85 100%);
  --brush-gold-bright: linear-gradient(180deg, #fff6d8 0%, #f7e3ab 30%, #ebcc7c 55%, #dcb95f 78%, #f6e2a4 100%);
  --brush-silver: linear-gradient(180deg, #f7f9fb 0%, #e4e9ee 30%, #c3cad2 55%, #d9e0e7 78%, #eef2f6 100%);
}
.tb-add, .col-btn, .btn.btn-gold, .btn.btn-line, .g-chip, .g-load, .gv-full, .g-full-back, #showAll, .cta-primary {
  border-radius: var(--btn-radius) !important;
  min-height: var(--btn-h) !important;
  font-size: 13.5px !important;
  letter-spacing: 0.1em !important;
  padding-left: 22px !important; padding-right: 22px !important;
}
.tb-add, .col-btn, .btn.btn-gold, .gv-full, .cta-primary {
  background: var(--brush-gold) !important;
  color: #171308 !important;
  border: 1px solid rgba(150, 115, 40, 0.5) !important;
  box-shadow: 0 1px 0 rgba(255, 250, 225, 0.55) inset, 0 8px 20px rgba(0, 0, 0, 0.45) !important;
}
.tb-add:hover, .col-btn:hover, .btn.btn-gold:hover, .gv-full:hover, .cta-primary:hover {
  background: var(--brush-gold-bright) !important;
}
.tb-add:active, .col-btn:active, .btn.btn-gold:active, .gv-full:active, .cta-primary:active {
  background: var(--brush-silver) !important; color: #0d0d0f !important;
}
.g-chip.on { background: var(--brush-gold) !important; color: #171308 !important; }
.g-chip:active, .btn.btn-line:active, .g-load:active, .g-full-back:active {
  background: var(--brush-silver) !important; color: #0d0d0f !important;
}

.g-chip { min-height: 42px !important; font-size: 13px !important; padding-left: 18px !important; padding-right: 18px !important; }
.g-search input, .g-sort select { min-height: 42px; border-radius: var(--btn-radius); }
.tb-add { min-height: 42px !important; font-size: 12px !important; padding-left: 16px !important; padding-right: 16px !important; }
.gv-nav { border-radius: var(--btn-radius) !important; width: 40px; height: 40px; min-height: 0 !important; padding: 0 !important; }
.gv-close { border-radius: var(--btn-radius) !important; width: 38px; height: 38px; min-height: 0 !important; padding: 0 !important; }
.g-full-back { min-height: 46px !important; }
/* the picture gets the space the smaller controls give back */
.gv-media img, .gv-media video { max-height: calc(100vh - var(--tb-h) - 302px); }

/* =========================================================================
   Phone header for the experience: the supplied strip on top, actions beneath.
   This file loads after floor.css, so the height lives here or it gets reset.
   ========================================================================= */
@media (max-width: 767px) {
  :root { --tb-h: 104px; }
  .topbar-inner { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 0; }
  .tb-brand { order: 1; width: 100%; overflow: visible; }
  .tb-mark, .tb-event { display: none; }
  .tb-strip { display: block; width: 100%; height: auto; }
  .tb-nav { order: 2; justify-content: flex-end; gap: 0.6rem; padding: 8px 14px 0; }
}

/* =========================================================================
   The Add Your Moment panel · an invitation, not a form.
   Textured black, brushed gold frame, gold numerals, empty fields in black
   with gold outlines. Loads after floor.css so these win.
   ========================================================================= */
#uploader {
  width: 620px; max-width: 92vw; border: 0; border-radius: 14px; padding: 3px;
  background: linear-gradient(150deg, #e8cd85 0%, #8a6c25 22%, #f6e2a4 46%, #8a6c25 72%, #e8cd85 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .75);
}
#uploader .sheet {
  border-radius: 11px; padding: clamp(1.4rem, 3.4vw, 2.4rem);
  background:
    radial-gradient(60% 45% at 8% 0%, rgba(240, 200, 110, .16), transparent 70%),
    linear-gradient(rgba(5, 4, 3, .62), rgba(5, 4, 3, .78)),
    url("/memories/experience/media/panel-texture.webp") center / cover no-repeat, #060504;
}
#uploader h2#upTitle {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3rem); line-height: 1.05; text-align: left; margin: 0 0 .45rem;
  /* bolder within the same face: a hairline of the same gold thickens the strokes */
  -webkit-text-stroke: .6px #e6cd8c;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
  background: linear-gradient(180deg, #fff6d8 0%, #f3e0a8 30%, #d7b25f 58%, #f6e5ae 80%, #c39a3c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#uploader .sub { text-align: left; font-size: 16px; line-height: 1.45; color: #efeadf; margin: 0 0 1.5rem; max-width: 30rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px auto 22px; max-width: 18rem; }
.ornament .rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(215,178,95,.75), transparent); }
.ornament .gem { width: 9px; height: 9px; transform: rotate(45deg); background: linear-gradient(135deg, #f6e5ae, #c39a3c); }

/* numbered steps */
#uploader .steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
#uploader .steps > li { position: relative; padding-left: 62px; }
#uploader .steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 22px; font-weight: 700; color: #1a1408;
  background: linear-gradient(180deg, #fbeab4 0%, #efd694 34%, #cfa94f 78%, #e8cd85 100%);
  box-shadow: 0 0 0 1px rgba(255,246,210,.6), 0 6px 14px rgba(0,0,0,.5);
}
#uploader .steps h3 {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.55rem;
  color: #fbf6ea; margin: 0 0 .7rem; letter-spacing: .01em; text-shadow: 0 1px 8px rgba(0, 0, 0, .7);
}
#uploader .steps h3 span { font-family: var(--font-ui, "Manrope", sans-serif); font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.5); margin-left: .5rem; text-transform: none; }

/* fields: black, brushed gold outline, left empty */
#uploader .input {
  width: 100%; background: rgba(2,2,2,.78); border: 1px solid rgba(219,183,103,.8); border-radius: 8px;
  color: #f4f1e9; font-size: 16px; padding: 14px 16px; min-height: 54px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
#uploader textarea.input { min-height: 116px; line-height: 1.5; resize: vertical; }
#uploader .input::placeholder { color: rgba(255,255,255,.38); }
#uploader .input:focus { outline: none; border-color: #e8cd85; box-shadow: 0 0 0 3px rgba(215,178,95,.16); }

/* choose photos & videos */
#uploader .choose-btn, #uploader .share-btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  border-radius: 8px !important; border: 1px solid rgba(150,115,40,.75) !important;
  background: var(--brush-gold) !important; color: #171308 !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-weight: 700 !important; letter-spacing: .01em !important; text-transform: none !important;
  box-shadow: 0 1px 0 rgba(255,250,225,.75) inset, 0 10px 24px rgba(0,0,0,.5) !important;
}
#uploader .choose-btn { min-height: 62px !important; font-size: 1.45rem !important; }
#uploader .picker:hover .choose-btn { background: var(--brush-gold-bright) !important; }
.file-limit { text-align: center; color: rgba(255,255,255,.62); font-size: 13.5px; margin-top: .6rem; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.up-details { border-top: 1px solid rgba(215,178,95,.28); margin-top: .9rem; }
.up-details > summary { color: rgba(243,224,168,.92); }

/* share my moment */
#uploader .form-msg:empty { margin: 0; min-height: 0; }
#uploader .share-btn { min-height: 64px !important; font-size: 1.7rem !important; margin-top: .9rem; }

/* questions line, between two short rules */
#uploader .sheet-help {
  display: block; text-align: center; font-size: 14px; color: rgba(255,255,255,.66); margin-top: 1.1rem;
}
#uploader .sheet-help::before, #uploader .sheet-help::after {
  content: ""; display: inline-block; vertical-align: middle; width: 42px; height: 1px; margin: 0 12px;
  background: linear-gradient(90deg, transparent, rgba(215,178,95,.8), transparent);
}
/* on a narrow phone the line has no room for its rules, so it goes without them */
@media (max-width: 480px) { #uploader .sheet-help::before, #uploader .sheet-help::after { display: none; } }

/* close, worded as in the reference */
#uploader .close-btn {
  position: absolute; top: 18px; right: 18px; width: auto; height: 44px; padding: 0 18px;
  display: inline-flex; align-items: center; gap: 10px; border-radius: 24px;
  border: 1px solid rgba(215,178,95,.65); background: rgba(0,0,0,.55); color: #f3e0a8;
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; font-weight: 700; letter-spacing: .02em;
}
#uploader .close-btn::after { content: "\00d7"; font-size: 22px; line-height: 1; }
#uploader .close-btn:hover { background: rgba(215,178,95,.16); }
#uploader .sheet { position: relative; }

@media (max-width: 767px) {
  #uploader { width: 100%; max-width: 100%; height: 100svh; max-height: 100svh; border-radius: 0; padding: 0; }
  #uploader .sheet { border-radius: 0; padding: 1.2rem 1rem 2rem; }
  #uploader h2#upTitle { font-size: 2.05rem; }
  #uploader .steps > li { padding-left: 54px; }
  #uploader .steps > li::before { width: 36px; height: 36px; font-size: 19px; }
  #uploader .choose-btn { font-size: 1.3rem !important; min-height: 58px !important; }
}

/* ---------- Panel fixes found on screen ---------- */
/* the page already increments the step counter on the li, so the pseudo-element must not */
#uploader .steps > li::before { counter-increment: none; }
/* the sheet fills the gold frame instead of leaving a band down one side */
#uploader .sheet { width: 100%; max-width: 100%; box-sizing: border-box; border: 0; }
@media (min-width: 768px) { #uploader { max-height: 92vh; } #uploader .sheet { max-height: calc(92vh - 6px); } }
/* a laptop screen is shorter than a monitor: the panel closes up so it is read in one view */
@media (min-width: 768px) and (max-height: 980px) {
  #uploader .sheet { padding: 1.5rem 2rem 1.6rem; }
  #uploader h2#upTitle { font-size: 2.15rem; }
  #uploader .sub { font-size: 15px; }
  .ornament { margin: 10px auto 14px; }
  #uploader .steps { gap: .9rem; }
  #uploader .steps h3 { margin-bottom: .5rem; }
  #uploader .choose-btn { min-height: 56px !important; }
  #uploader textarea.input { min-height: 92px; }
  #uploader .share-btn { margin-top: .9rem; }
  #uploader .sheet-help { margin-top: .8rem; }
}
/* shorter still (a small laptop): closer again, so nothing important sits below the fold */
@media (min-width: 768px) and (max-height: 860px) {
  #uploader .sheet { padding: 1.1rem 1.8rem 1.2rem; }
  #uploader h2#upTitle { font-size: 2rem; }
  #uploader .steps h3 { font-size: 1.4rem; }
  #uploader .choose-btn { min-height: 50px !important; font-size: 1.3rem !important; }
  #uploader textarea.input { min-height: 78px; }
  #uploader .input { min-height: 48px; padding: 11px 14px; }
  #uploader .share-btn { min-height: 54px !important; }
}
/* on a phone the panel is the screen, so no gold band is left under it */
@media (max-width: 767px) { #uploader .sheet { height: 100svh; max-height: 100svh; } }
/* the cloud mark is an SVG inside a button that the page styles for text only */
#uploader .choose-btn .cloud { display: block; width: 34px; height: 24px; color: #f3e0a8; overflow: visible; }
#uploader .picker input { z-index: 2; }
/* a little tighter so the action sits inside the frame on a laptop */
#uploader .steps { gap: 1.15rem; }
#uploader .steps > li { margin-top: 0; }
#uploader h2#upTitle { margin-right: 7rem; font-size: clamp(2.1rem, 4.2vw, 2.8rem); }
#uploader .share-btn { margin-top: 1.2rem; min-height: 58px !important; }
