/* Plain Card — a faithful translation of plain-card-approved/styles.css into
   the Weddings 103 theme architecture. Structural/visual rules below are
   adapted directly from the approved reference package; class names and
   layering match it exactly where the reference showed them. Additions not
   present in the static reference (passcode overlay, RSVP forms, empty
   states, publish/danger-zone controls, admin-preview banner) use the same
   token language (--ink/--paper/--gold/--muted/--cut) rather than inventing
   a new visual system. */
:root {
  --ink: #241f1a;
  --paper: rgba(250, 247, 240, 0.91);
  --paper-deep: #f4eee5;
  --gold: #a98456;
  --gold-soft: rgba(169, 132, 86, 0.4);
  --muted: #70675e;
  --white: #fffdf9;
  --cut: 28px;
  /* input_20 Phase 4 alias — see admin-shared.css's own comment on this
     variable name. Not loaded on Plain Card's dashboard (it has its own
     complete shell, unlike the other three themes' shared bb-admin-* nav
     scaffolding), kept only for any future shared consumer. */
  --bb-admin-radius: var(--cut);
}

* {
  box-sizing: border-box;
}

html.pc-page,
body.pc-page {
  min-height: 100%;
  margin: 0;
}

body.pc-page {
  background: #2a231e;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

.invitation-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(22px, 5vw, 72px);
}

/* Three-layer background: a gradient fallback (always present, lowest
   z-index), the real image layer (event.card_image if the event has one,
   else the approved local fallback — set via inline style in the template,
   never hardcoded here), then the readability overlay on top. Splitting the
   fallback into its own div means a failed/missing image simply leaves the
   image layer transparent, revealing the gradient underneath — no CSS
   shorthand conflict with the inline style. */
.background-fallback,
.background-image,
.background-overlay {
  position: absolute;
  inset: -30px;
  pointer-events: none;
}

.background-fallback {
  z-index: -4;
  background: linear-gradient(135deg, #4b382d, #201a17 55%, #6f5944);
}

.background-image {
  z-index: -3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.09);
}

.background-overlay {
  z-index: -2;
  background:
    linear-gradient(
      135deg,
      rgba(24, 19, 15, 0.73),
      rgba(51, 39, 30, 0.5) 48%,
      rgba(22, 17, 14, 0.75)
    );
}

.invitation-card {
  width: min(90%, 790px);
  min-height: min(760px, calc(100svh - 44px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 90px);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 35%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 28px 80px rgba(9, 7, 5, 0.42),
    inset 0 0 0 1px rgba(169, 132, 86, 0.15);
  clip-path: polygon(
    0 var(--cut),
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.eyebrow,
.occasion,
.detail-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.gold-line {
  width: 64px;
  height: 1px;
  margin: 22px auto 30px;
  background: var(--gold);
}

.occasion {
  color: var(--muted);
  letter-spacing: 0.17em;
}

.invitation-card h1 {
  max-width: 580px;
  margin: 18px auto 26px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 8vw, 6.3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.invitation-card h1 span {
  display: block;
  margin: 8px 0;
  color: var(--gold);
  font-size: 0.48em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.invitation-message {
  max-width: 460px;
  margin: 0 auto;
  color: var(--muted);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  font-style: italic;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.event-details {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 34px);
  margin: clamp(40px, 7vw, 68px) 0;
  padding: 23px 0;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}

.detail {
  display: grid;
  gap: 8px;
  max-width: 100%;
  text-align: center;
}

.detail strong {
  max-width: 220px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(0.92rem, 1.5vw, 1.08rem);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.detail-divider {
  width: 1px;
  background: var(--gold-soft);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: auto;
  padding-top: 10px;
}

.card-footer p {
  margin: 0;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  overflow-wrap: break-word;
}

.rsvp-button,
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  color: var(--ink);
  border: 1px solid var(--gold);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.rsvp-button:hover,
.rsvp-button:focus-visible,
.pc-btn:hover,
.pc-btn:focus-visible {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
  outline: none;
  transform: translateY(-2px);
}

.rsvp-button:focus-visible,
.pc-btn:focus-visible {
  box-shadow: 0 0 0 4px rgba(169, 132, 86, 0.32);
}

/* Passcode overlay — not present in the static prototype (which assumes an
   already-identified viewer). Same functional gate every existing theme
   already uses; visual language matches the invitation card. */
.pc-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 19, 15, 0.78);
  z-index: 10;
}
body.pc-locked { overflow: hidden; height: 100vh; }
.pc-overlay-card {
  width: 100%;
  max-width: 360px;
  padding: clamp(32px, 6vw, 48px) clamp(24px, 5vw, 32px);
  text-align: center;
  background: var(--paper-deep);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 50px rgba(9, 7, 5, 0.4);
  clip-path: polygon(
    0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px,
    100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px)
  );
}
.pc-overlay-card input[type="text"] {
  width: 100%;
  margin: 18px 0 16px;
  padding: 0.75em 1em;
  text-align: center;
  border: 1px solid var(--gold-soft);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
}
.pc-error {
  margin: 0 0 12px;
  color: #86413a;
  font-size: 0.85rem;
}

/* RSVP accept/decline — the prototype's own .rsvp-button styled a
   client-side QR toggle, not a real RSVP action. Production uses the exact
   same button class for the real accept/decline forms every other theme
   already posts to /invite/:eventId/rsvp. */
.pc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 0 26px;
}
.pc-actions form { margin: 0; }

.pc-empty {
  margin: 0;
  color: var(--muted);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
}

@media (max-width: 680px) {
  :root {
    --cut: 20px;
  }

  .invitation-page {
    align-items: start;
    padding: 16px;
  }

  .invitation-card {
    min-height: calc(100svh - 32px);
    padding: 42px 27px 30px;
  }

  .event-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 38px 0;
  }

  .detail-divider {
    width: 58px;
    height: 1px;
    margin: 0 auto;
  }

  .card-footer {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .rsvp-button,
  .pc-actions form,
  .pc-actions .pc-btn {
    width: 100%;
  }
}

.gatepass-toggle {
  display: none;
}

.gatepass-section {
  margin: 0 0 26px;
  text-align: center;
}

.gatepass-divider {
  width: min(100%, 410px);
  height: 1px;
  margin: 0 auto 24px;
  background: var(--gold-soft);
}

.gatepass-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.gatepass-copy {
  max-width: 320px;
  margin: 12px auto 18px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.qr-frame {
  display: grid;
  width: 164px;
  height: 164px;
  margin: 0 auto 14px;
  padding: 11px;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--gold-soft);
  box-shadow: 0 12px 28px rgba(36, 31, 26, 0.12);
}

.qr-code {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gatepass-code {
  margin: 0;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

@media (max-width: 680px) {
  .qr-frame {
    width: 150px;
    height: 150px;
  }
}

/* =========================================
   PLAIN CARD — GUEST SECONDARY PAGES
   (gallery / cameos / other-details — no visual reference exists in the
   approved package; extends the same ivory/gold/serif token language.) */
.pc-secondary-page {
  min-height: 100svh;
  margin: 0;
  padding: clamp(32px, 6vw, 64px) clamp(18px, 5vw, 40px);
  background: var(--paper-deep);
  color: var(--ink);
}
.pc-secondary-wrap { max-width: 720px; margin: 0 auto; text-align: center; }
.pc-secondary-wrap h2 {
  margin: 0 0 28px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
}
.pc-gallery-grid, .pc-cameo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 1.5rem;
}
.pc-gallery-grid a, .pc-cameo-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--gold-soft);
}
.pc-gallery-grid img, .pc-cameo-grid img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pc-cameo-caption {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}
.pc-back-link {
  display: inline-block;
  margin-top: 2.5rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.pc-back-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* =========================================
   PLAIN CARD — CLIENT PORTAL
   ========================================= */

.portal-body {
  min-height: 100svh;
  background: #2a231e;
}

.portal-page {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(16px, 3vw, 42px);
}

.portal-background,
.portal-overlay {
  position: fixed;
  inset: -30px;
  pointer-events: none;
}

.portal-background {
  z-index: -3;
  /* Fixed curated asset only — never event/gallery/cameo-derived. */
  background: url("portal-background.png") center / cover no-repeat,
    linear-gradient(135deg, #4b382d, #201a17 55%, #6f5944);
  transform: scale(1.09);
}

.portal-overlay {
  z-index: -2;
  background:
    linear-gradient(
      135deg,
      rgba(24, 19, 15, 0.76),
      rgba(51, 39, 30, 0.54) 48%,
      rgba(22, 17, 14, 0.8)
    );
}

.portal-shell {
  width: min(100%, 1320px);
  min-height: calc(100svh - clamp(32px, 6vw, 84px));
  margin: 0 auto;
  padding: clamp(22px, 3vw, 44px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 36%),
    rgba(250, 247, 240, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 28px 80px rgba(9, 7, 5, 0.42),
    inset 0 0 0 1px rgba(169, 132, 86, 0.15);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.pc-preview-banner {
  margin-bottom: 18px;
  padding: 0.75rem 1.25rem;
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
  text-align: center;
  font-size: 0.9rem;
}
.pc-preview-banner a { margin-left: 0.75rem; font-weight: 600; color: #664d03; }

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gold-soft);
}

.portal-brand-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.portal-brand {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.portal-mode {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.portal-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-nav a {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.portal-nav a:hover,
.portal-nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.portal-logout {
  padding: 10px 13px;
  border: 1px solid var(--gold-soft);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.portal-logout:hover, .portal-logout:focus-visible { color: var(--ink); outline: none; }
.portal-logout:focus-visible { box-shadow: 0 0 0 3px rgba(169, 132, 86, 0.32); }

.portal-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
  padding: clamp(38px, 6vw, 76px) 0 clamp(28px, 4vw, 48px);
}

.portal-eyebrow {
  margin: 0 0 11px;
  color: var(--gold);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.portal-title {
  margin: 0 0 15px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.9rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
  max-width: 100%;
}

.portal-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-status {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 11px;
  color: #7a5d35;
  background: rgba(169, 132, 86, 0.1);
  border: 1px solid var(--gold-soft);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-status-open {
  color: #405d48;
  background: rgba(72, 106, 81, 0.1);
  border-color: rgba(72, 106, 81, 0.3);
}

.portal-intro-copy {
  max-width: 370px;
  margin: 0;
  color: var(--muted);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  font-style: italic;
  line-height: 1.65;
  text-align: right;
}

@media (max-width: 680px) {
  .portal-page {
    padding: 10px;
  }

  .portal-shell {
    min-height: calc(100svh - 20px);
    padding: 22px 18px;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-nav {
    width: 100%;
    justify-content: space-between;
  }

  .portal-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
    padding: 42px 0 30px;
  }

  .portal-intro-copy {
    max-width: 100%;
    text-align: left;
  }
}

.portal-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(18px, 2.5vw, 32px);
}

.portal-left-panels {
  display: grid;
  gap: 18px;
}

.portal-panel,
.portal-preview-panel,
.portal-invites-section {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 38%),
    rgba(255, 253, 249, 0.72);
  border: 1px solid rgba(169, 132, 86, 0.3);
  box-shadow: 0 12px 30px rgba(36, 31, 26, 0.08);
  /* Two sharp corners + two chamfered corners */
  clip-path: polygon(
    0 0,
    calc(100% - 18px) 0,
    100% 18px,
    100% 100%,
    18px 100%,
    0 calc(100% - 18px)
  );
}

.portal-panel {
  padding: clamp(22px, 2.8vw, 31px);
}

.portal-panel.pc-danger {
  border-color: rgba(146, 77, 72, 0.5);
}

.portal-preview-panel {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.8vw, 31px);
}

.panel-label {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.portal-panel h2,
.portal-preview-panel h2 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.08;
  text-align: center;
}

.portal-detail-list {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.portal-detail-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(169, 132, 86, 0.18);
}

.portal-detail-line span {
  color: var(--muted);
  font-size: 0.76rem;
}

.portal-detail-line strong {
  max-width: 62%;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: right;
  overflow-wrap: break-word;
}

.portal-panel-copy {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.portal-outline-button,
.portal-dark-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.portal-outline-button {
  color: var(--ink);
  border: 1px solid var(--gold);
  background: transparent;
}

.portal-outline-button:hover,
.portal-outline-button:focus-visible {
  background: rgba(169, 132, 86, 0.12);
  outline: none;
}

.portal-dark-button {
  color: var(--white);
  border: 1px solid var(--ink);
  background: var(--ink);
}

.portal-dark-button:hover,
.portal-dark-button:focus-visible {
  border-color: #45392f;
  background: #45392f;
  outline: none;
}

.pc-danger-button {
  color: var(--white);
  border-color: #7a3a34;
  background: #7a3a34;
}
.pc-danger-button:hover, .pc-danger-button:focus-visible {
  border-color: #5e2c27;
  background: #5e2c27;
}

/* Design panel: identity/background information only — read-only, per the
   approved-scope decision not to ship the prototype's non-functional
   palette/background-picker controls (no persistence path exists). */
.portal-design-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--gold-soft);
  background: rgba(255, 253, 249, 0.42);
}

.portal-image-thumb {
  width: 54px;
  height: 42px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.portal-small-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.portal-choice-name {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.portal-preview-stage {
  position: relative;
  display: grid;
  min-height: 380px;
  margin-bottom: 20px;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(135deg, #665242, #271f1a);
  clip-path: polygon(
    0 0,
    calc(100% - 18px) 0,
    100% 18px,
    100% 100%,
    18px 100%,
    0 calc(100% - 18px)
  );
}

.portal-preview-stage::before {
  position: absolute;
  inset: -15px;
  background-size: cover;
  background-position: center;
  content: "";
  filter: blur(3px);
  opacity: 0.9;
  transform: scale(1.08);
}

.portal-preview-stage::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 22, 16, 0.58),
    rgba(69, 52, 37, 0.3)
  );
  content: "";
}

.portal-mini-card {
  position: relative;
  z-index: 1;
  width: min(78%, 360px);
  padding: 42px 26px 32px;
  text-align: center;
  background: rgba(250, 247, 240, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 16px 36px rgba(20, 15, 10, 0.3);
  clip-path: polygon(
    0 0,
    calc(100% - 16px) 0,
    100% 16px,
    100% 100%,
    16px 100%,
    0 calc(100% - 16px)
  );
}

.mini-eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.mini-gold-line {
  width: 48px;
  height: 1px;
  margin: 16px auto;
  background: var(--gold);
}

.portal-mini-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.portal-mini-card h3 span {
  display: block;
  margin: 6px 0;
  color: var(--gold);
  font-size: 0.5em;
  font-style: italic;
  font-weight: 400;
}

.portal-mini-card p {
  margin: 19px 0;
  color: var(--muted);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.84rem;
  font-style: italic;
  line-height: 1.58;
  overflow-wrap: break-word;
}

.mini-event-date {
  padding-top: 14px;
  color: var(--ink);
  border-top: 1px solid var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.portal-invites-section {
  margin-top: clamp(18px, 2.5vw, 32px);
  padding: clamp(22px, 3vw, 34px);
}

.portal-invites-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}

.portal-invites-heading h2 {
  margin-bottom: 0;
}

.portal-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--gold-soft);
}

.portal-invites-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

.portal-invites-table th,
.portal-invites-table td {
  padding: 16px 12px;
  border-bottom: 1px solid rgba(169, 132, 86, 0.18);
  text-align: left;
}

.portal-invites-table th {
  color: var(--gold);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.portal-invites-table td {
  color: var(--ink);
  font-size: 0.82rem;
}

.guest-code {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pc-copy-code {
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid var(--gold-soft);
  background: transparent;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.pc-copy-code:hover, .pc-copy-code:focus-visible { color: var(--ink); border-color: var(--gold); outline: none; }

.rsvp-status {
  display: inline-flex;
  padding: 5px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rsvp-status.accepted {
  color: #355c43;
  background: rgba(72, 106, 81, 0.12);
}

.rsvp-status.pending {
  color: #85632f;
  background: rgba(169, 132, 86, 0.13);
}

.rsvp-status.declined {
  color: #864844;
  background: rgba(146, 77, 72, 0.11);
}

.portal-add-guests textarea {
  width: 100%;
  min-height: 90px;
  margin-top: 8px;
  padding: 0.6em 0.8em;
  border: 1px solid var(--gold-soft);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
}

.portal-panel input[type="text"][readonly] {
  width: 100%;
  margin-top: 8px;
  padding: 0.6em 0.8em;
  border: 1px solid var(--gold-soft);
  background: #ece3d4;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .portal-workspace {
    grid-template-columns: 1fr;
  }

  .portal-preview-panel {
    order: -1;
  }

  .portal-preview-stage {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .portal-panel,
  .portal-preview-panel,
  .portal-invites-section {
    padding: 22px 18px;
  }

  .portal-detail-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .portal-detail-line strong {
    max-width: 100%;
    text-align: left;
  }

  .portal-preview-stage {
    min-height: 280px;
  }

  .portal-mini-card {
    width: min(84%, 340px);
    padding: 34px 21px 28px;
  }

  .portal-invites-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-invites-heading .portal-dark-button {
    width: 100%;
  }
}

/* =========================================
   PLAIN CARD — SHARED ADMIN EDIT/ASSETS PAGES
   views/admin/edit-event.ejs and views/admin/assets.ejs are reused as-is by
   every theme (input_20 Phase 4/8) — admin-shared.css, loaded before this
   file on those two pages, already supplies every layout/geometry rule for
   the shared .bb-admin-* class names; only this theme's own colors/fonts/
   backgrounds belong here, the same minimal scope every other theme's own
   block already uses. Neither shared template is modified — this is a
   CSS-only visual treatment, following the file's own load-order contract. */
.bb-admin {
  background: var(--paper-deep);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 15px;
}
.bb-admin a { color: var(--gold); }
.bb-admin h1 { font-family: "Playfair Display", serif; color: var(--ink); font-weight: 600; font-size: 2.2rem; }
.bb-admin h2 { font-family: "Playfair Display", serif; color: var(--ink); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 1.3rem; }

.bb-admin-header-inner {
  background: var(--paper);
  border: 1px solid var(--gold-soft);
}
.bb-admin-header-title { font-family: "Playfair Display", serif; font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.bb-admin-nav a { color: var(--ink); font-size: 0.8rem; font-weight: 600; }
.bb-admin-nav a:hover, .bb-admin-nav a.bb-admin-nav-active { color: var(--gold); }

.bb-admin-card, .bb-admin-tile {
  background: var(--paper);
  border: 1px solid var(--gold-soft);
}
.bb-admin-photo-panel { background: #ece3d4; }
.bb-admin-thumb { background: #ece3d4; }

.bb-admin label { font-size: 0.85rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.bb-admin input[type="text"], .bb-admin input[type="date"], .bb-admin input[type="email"],
.bb-admin input[type="password"], .bb-admin input[type="color"], .bb-admin input[type="file"],
.bb-admin textarea, .bb-admin select {
  border: 1px solid var(--gold-soft);
  background: var(--white);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
}
.bb-admin input[readonly] { background: #ece3d4; }
.bb-admin th, .bb-admin td { border-bottom: 1px solid var(--gold-soft); }
.bb-admin th { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 0.7rem; }
.bb-admin .bb-btn { font-size: 0.75rem; }
.bb-admin .bb-stats strong { font-size: 1.7rem; color: var(--gold); font-family: "Playfair Display", serif; font-weight: 600; }
.bb-admin .bb-danger { border-color: rgba(122, 58, 52, 0.5); }
.bb-admin .bb-error { color: #86413a; }

.bb-admin-gallery-item button { background: rgba(36, 31, 26, 0.72); color: var(--white); }
.bb-admin-gallery-caption { background: rgba(36, 31, 26, 0.72); color: var(--white); font-size: 0.7rem; line-height: 1.2; }

.bb-btn {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: transparent;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.bb-btn:hover, .bb-btn:focus-visible { background: var(--ink); color: var(--white); border-color: var(--ink); outline: none; transform: translateY(-1px); }

/* =========================================
   PLAIN CARD — ITINERARY (invitation card, lower area)
   No visual reference exists for this in the approved package; extends the
   same event-details token language (--muted / --gold-soft / detail-label
   letter-spacing) already used just above it in the card. */
.pc-itinerary {
  margin: 0 0 26px;
  padding-top: 22px;
  border-top: 1px solid var(--gold-soft);
  text-align: left;
}
.pc-itinerary .detail-label {
  display: block;
  margin-bottom: 10px;
  text-align: center;
}
.pc-itinerary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}
.pc-itinerary-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--gold-soft);
  overflow-wrap: break-word;
}
.pc-itinerary-list li:last-child { border-bottom: none; }

/* =========================================
   PLAIN CARD — QR PASS OVERLAY (closed events, verified guest only)
   Replaces a permanently-rendered QR code with a "Show my QR pass" trigger;
   the existing real qrDataUrl/gatepass markup only ever moves into this
   overlay — no new QR/gatepass/token mechanism is introduced. Hidden via
   the standard `hidden` attribute (not just visually) until opened, so
   nothing here ever occupies layout space or is reachable in the
   accessibility tree while closed. */
.pc-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pc-qr-modal[hidden] { display: none; }
.pc-qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 19, 15, 0.78);
}
.pc-qr-modal-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: clamp(30px, 6vw, 40px) clamp(20px, 5vw, 28px) 26px;
  text-align: center;
  background: var(--paper-deep);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 50px rgba(9, 7, 5, 0.4);
  clip-path: polygon(
    0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px,
    100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px)
  );
}
.pc-qr-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
}
.pc-qr-modal-close:hover, .pc-qr-modal-close:focus-visible { color: var(--ink); outline: none; }
body.pc-modal-open { overflow: hidden; }
@media (max-width: 420px) {
  .pc-qr-modal-card { max-width: 100%; }
}
