/* MiramiSee — public styles. Scoped to .mrs so the theme stays untouched. */
.mrs {
  --mrs-ink: #0c1f36;
  --mrs-soft: #4f6177;
  --mrs-river: #00264e;   /* brand navy */
  --mrs-blue: #008bb5;    /* brand blue */
  --mrs-river-2: #e2f3fa;
  --mrs-amber: #feaa26;   /* brand amber */
  --mrs-amber-ink: #925700;
  --mrs-amber-bg: #fff1d9;
  --mrs-paper: #f2f7fa;
  --mrs-card: #ffffff;
  --mrs-line: #dbe5ec;
  --mrs-radius: 14px;
  color: var(--mrs-ink);
  font-size: 16px;
  line-height: 1.45;
  max-width: 1180px;
  margin: 0 auto;
}
.mrs *, .mrs *::before, .mrs *::after { box-sizing: border-box; }
.mrs a { color: inherit; }
.mrs .mrs-ico { flex: none; vertical-align: -3px; }

/* Notices */
.mrs-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; }
.mrs-notice-ok { background: var(--mrs-river-2); color: var(--mrs-river); }
.mrs-notice-err { background: #fbe4e1; color: #8d2b1f; }

/* Search + filters */
.mrs-bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--mrs-paper);
  padding: 12px; margin: 0 0 18px;
  border-radius: var(--mrs-radius);
}
.mrs-search {
  width: 100%; font: inherit; padding: 11px 14px;
  border: 1px solid var(--mrs-line); border-radius: 10px; background: #fff; color: var(--mrs-ink);
}
.mrs-search:focus { outline: 2px solid var(--mrs-river); outline-offset: 1px; }
.mrs-chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.mrs-chips::-webkit-scrollbar { display: none; }
.mrs-chip {
  flex: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--mrs-line); background: #fff; color: var(--mrs-ink);
}
.mrs-chip.is-on { background: var(--mrs-river); border-color: var(--mrs-river); color: #fff; }
.mrs-chip-cat.is-on { background: var(--mrs-amber); border-color: var(--mrs-amber); color: var(--mrs-ink); }

/* Day groups */
.mrs-day { margin: 0 0 26px; }
.mrs-day[hidden] { display: none; }
.mrs .mrs-day-h {
  font-size: 15px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--mrs-blue); margin: 0 0 12px; padding: 0 4px;
}
.mrs-grid { display: grid; gap: 14px; }

/* Card — mobile: poster left, info right */
.mrs-card {
  display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 0;
  background: var(--mrs-card); border: 1px solid var(--mrs-line);
  border-radius: var(--mrs-radius); overflow: hidden;
}
.mrs-card[hidden] { display: none; }
.mrs-poster {
  display: block; position: relative; overflow: hidden; min-width: 0;
  background: #eae6dd; min-height: 180px;
}
.mrs-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.mrs-poster-empty { display: flex; align-items: center; justify-content: center; color: #b9b2a4; }
.mrs-poster-empty .mrs-ico { width: 40px; height: 40px; }
.mrs-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mrs-when { font-size: 13px; font-weight: 700; color: var(--mrs-amber-ink); text-transform: uppercase; letter-spacing: .02em; }
.mrs .mrs-title { font-size: 17px; line-height: 1.25; margin: 0; font-weight: 800; }
.mrs .mrs-title a { text-decoration: none; }
.mrs .mrs-title a:hover { text-decoration: underline; }
.mrs-where { font-size: 14px; font-weight: 600; }
.mrs-addr { display: block; font-weight: 400; color: var(--mrs-soft); }
.mrs-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mrs-tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--mrs-paper); color: var(--mrs-soft); }
.mrs-tag-price { background: var(--mrs-amber-bg); color: var(--mrs-amber-ink); }
.mrs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.mrs-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; text-decoration: none !important;
  padding: 8px 12px; border-radius: 10px; line-height: 1.1;
  border: 1px solid var(--mrs-line); background: #fff; color: var(--mrs-ink) !important;
}
.mrs-btn:hover { border-color: var(--mrs-river); }
.mrs-btn-main { background: var(--mrs-river); border-color: var(--mrs-river); color: #fff !important; }
.mrs-btn-main:hover { background: #003a72; }
.mrs-btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.mrs-credit { font-size: 12px; color: var(--mrs-soft); }
.mrs-credit a { font-weight: 600; }
.mrs-credit .mrs-ico { margin-left: 3px; }
.mrs-credit .mrs-ico { width: 13px; height: 13px; }

@media (max-width: 420px) {
  .mrs-card { grid-template-columns: minmax(0, 34%) minmax(0, 1fr); }
  .mrs-btn { padding: 8px 10px; font-size: 13px; }
}

/* Desktop: poster on top, grid of cards */
@media (min-width: 720px) {
  .mrs-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
  .mrs-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .mrs-poster { aspect-ratio: 4 / 5; min-height: 0; width: 100%; }
  .mrs-body { padding: 14px 16px 16px; }
}

.mrs-empty { text-align: center; padding: 40px 12px; color: var(--mrs-soft); }

/* Subscribe box — highlighted with a coloured background */
.mrs-sub {
  margin: 28px 0 18px; padding: 22px; border-radius: var(--mrs-radius);
  background: var(--mrs-river); color: #fff;
  display: grid; gap: 14px;
}
.mrs .mrs-sub h2 { color: #fff; font-size: 21px; margin: 0 0 4px; display: flex; gap: 8px; align-items: center; }
.mrs-sub p { margin: 0; opacity: .9; }
.mrs-sub-form { display: grid; gap: 10px; }
.mrs-sub-form input[type=email] {
  font: inherit; padding: 12px 14px; border-radius: 10px; border: 0; width: 100%; color: var(--mrs-ink);
}
.mrs-freq { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.mrs-freq label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.mrs-sub .mrs-btn-main { background: var(--mrs-amber); border-color: var(--mrs-amber); color: var(--mrs-ink) !important; justify-content: center; padding: 12px; font-size: 16px; }
.mrs-sub .mrs-btn-main:hover { background: #e59526; }
.mrs-hp { position: absolute !important; left: -9999px; }
@media (min-width: 820px) {
  .mrs-sub { grid-template-columns: 1fr 1.1fr; align-items: center; padding: 28px; }
}

/* Install */
.mrs-install {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--mrs-radius); background: var(--mrs-amber-bg); font-weight: 600;
}
.mrs-install[hidden], .mrs-ios[hidden] { display: none; }
.mrs-ios { font-size: 14px; color: var(--mrs-soft); text-align: center; }

/* Poster lightbox */
.mrs-lb {
  position: fixed; inset: 0; z-index: 99999; background: rgba(8, 20, 24, .92);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.mrs-lb[hidden] { display: none; }
.mrs-lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.mrs-lb-close {
  position: absolute; top: 10px; right: 12px; width: 44px; height: 44px;
  font-size: 30px; line-height: 1; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff;
}

/* Single event page */
.mrs-single { margin: 0 0 24px; }
.mrs-single-box {
  background: var(--mrs-paper); border-radius: var(--mrs-radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.mrs-single-box .mrs-when { font-size: 15px; }
.mrs-single-poster img { display: block; width: 100%; max-width: 640px; height: auto; margin: 18px auto 0; border-radius: 10px; }
.mrs-back a { font-weight: 600; }

/* Phone "add event" form */
.mrs-add { max-width: 560px; }
.mrs-form { display: grid; gap: 12px; }
.mrs-form label { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.mrs-form input[type=text], .mrs-form input[type=url], .mrs-form input[type=email], .mrs-form input[type=datetime-local],
.mrs-form select, .mrs-form textarea {
  font: inherit; font-weight: 400; padding: 11px 12px; width: 100%;
  border: 1px solid var(--mrs-line); border-radius: 10px; background: #fff; color: var(--mrs-ink);
}
.mrs-form .mrs-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.mrs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mrs-file {
  padding: 16px; border-radius: var(--mrs-radius); background: var(--mrs-river-2); text-align: center;
}
.mrs-file-preview { max-width: 100%; max-height: 260px; margin: 8px auto 0; border-radius: 8px; }
.mrs-file-preview[hidden] { display: none; }

/* ================= Home ================= */
.mrs-home .mrs-btn-lg { padding: 12px 18px; font-size: 16px; border-radius: 12px; }
.mrs-hero {
  display: grid; grid-template-columns: 1fr 34%; grid-template-areas: "logo logo" "text mascot";
  align-items: center; gap: 4px 12px;
  background: linear-gradient(180deg, #e2f3fa 0%, #ffffff 100%);
  border-radius: 22px; padding: 22px 18px 18px; margin: 0 0 18px; overflow: hidden;
}
.mrs-hero-logo { grid-area: logo; width: 100%; max-width: 420px; height: auto; display: block; }
.mrs-hero-text { grid-area: text; min-width: 0; }
.mrs .mrs-hero h1 {
  font-size: clamp(22px, 5.6vw, 44px); line-height: 1.12; font-weight: 800; letter-spacing: -0.01em;
  color: var(--mrs-river); margin: 10px 0 8px;
}
.mrs-hero p { margin: 0 0 14px; color: var(--mrs-soft); font-size: clamp(15px, 1.6vw, 19px); }
.mrs-hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.mrs .mrs-hero-stat { margin: 14px 0 0; font-size: 14px; }
.mrs-hero-stat strong { color: var(--mrs-blue); font-size: 17px; }
.mrs-hero-mascot { grid-area: mascot; width: 100%; height: auto; display: block; align-self: end; }

@media (min-width: 820px) {
  .mrs-hero {
    grid-template-columns: 1fr 38%; grid-template-areas: "logo mascot" "text mascot";
    padding: 40px 44px 30px; gap: 0 32px;
  }
  .mrs-hero-logo { max-width: 520px; align-self: end; }
  .mrs-hero-mascot { max-width: 380px; justify-self: center; }
}

/* Category tiles */
.mrs-tiles {
  /* phone: one swipeable row so the events stay close to the top */
  display: grid; grid-auto-flow: column; grid-auto-columns: 108px; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 0 26px; padding: 2px 2px 6px;
}
.mrs-tiles::-webkit-scrollbar { display: none; }
.mrs-tile { scroll-snap-align: start; }
.mrs-tile {
  font: inherit; cursor: pointer; text-align: center; color: var(--mrs-ink);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px 12px; border-radius: 16px;
  background: var(--mrs-card); border: 2px solid var(--mrs-line);
  transition: transform .15s ease, border-color .15s ease;
}
.mrs-tile-img { position: relative; display: block; width: 100%; max-width: 120px; aspect-ratio: 1 / 1; }
.mrs .mrs-tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.mrs-tile-name { font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; color: var(--mrs-river); }
.mrs-tile-count { font-size: 12px; color: var(--mrs-soft); white-space: nowrap; }
@media (max-width: 819px) { .mrs-tile-name { font-size: 13px; } }
.mrs-tile:hover { transform: translateY(-2px); border-color: var(--mrs-blue); }
.mrs-tile.is-on { border-color: var(--mrs-amber); background: var(--mrs-amber-bg); }
.mrs-tile:focus-visible { outline: 3px solid var(--mrs-blue); outline-offset: 2px; }
@media (min-width: 820px) {
  .mrs-tiles { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); gap: 14px; overflow: visible; }
  .mrs-tile-img { max-width: 140px; }
}
.mrs .mrs-section-h { font-size: 26px; font-weight: 800; color: var(--mrs-river); margin: 0 0 10px; padding: 0 4px; scroll-margin-top: 12px; }

/* Subscribe box mascot */
.mrs-sub { position: relative; }
.mrs-sub-mascot { width: 96px; height: auto; display: block; }
@media (min-width: 820px) {
  .mrs-sub { grid-template-columns: 130px 1fr 1.1fr; }
  .mrs-sub-mascot { width: 130px; }
}

/* Portal pages: use the full width even inside narrow theme content columns, hide the theme title */
.mrs-portal-page .wp-block-post-title,
.mrs-portal-page .entry-title,
.mrs-portal-page .page-title,
.mrs-portal-page .entry-header { display: none !important; }
/* Full width: the portal breaks out of the theme's content column to the window edges.
   --mrs-pad = side gutter; content stays readable (max ~1600px) on very wide screens. */
body.mrs-portal-page { overflow-x: clip; }
.mrs-portal-page main, .mrs-portal-page .wp-site-blocks > main { margin-top: 0 !important; padding-top: 0 !important; }
.mrs-portal-page .entry-content, .mrs-portal-page .wp-block-post-content { margin-top: 0 !important; }
.mrs-portal-page .mrs:not(.mrs-single):not(.mrs-add) {
  --mrs-pad: max(clamp(16px, 4vw, 56px), calc((100vw - 1600px) / 2));
  width: 100vw; box-sizing: border-box;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: 0 !important;
  padding-left: var(--mrs-pad); padding-right: var(--mrs-pad);
}
/* Hero background runs edge to edge */
.mrs-portal-page .mrs-hero {
  margin-left: calc(-1 * var(--mrs-pad)); margin-right: calc(-1 * var(--mrs-pad));
  padding-left: var(--mrs-pad); padding-right: var(--mrs-pad);
  border-radius: 0;
}
/* Subscribe box also edge to edge on phones */
@media (max-width: 639px) {
  .mrs-portal-page .mrs-sub {
    margin-left: calc(-1 * var(--mrs-pad)); margin-right: calc(-1 * var(--mrs-pad));
    padding-left: var(--mrs-pad); padding-right: var(--mrs-pad); border-radius: 0;
  }
}

/* Unfolded foldables (Z Fold inner screen) and small tablets: 640–819px */
@media (min-width: 640px) and (max-width: 819px) {
  .mrs-tiles { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); gap: 10px; overflow: visible; }
  .mrs-tile { padding: 8px 4px 10px; }
  .mrs-tile-name { font-size: 12px; }
  .mrs-tile-count { font-size: 11px; }
  .mrs-hero { grid-template-columns: 1fr 30%; }
  .mrs-hero-logo { max-width: 380px; }
}
/* Very narrow cover screens (Z Fold closed, ~344px) */
@media (max-width: 370px) {
  .mrs-hero { grid-template-columns: 1fr 30%; gap: 4px 8px; }
  .mrs .mrs-hero h1 { font-size: 21px; }
  .mrs-home .mrs-btn-lg { padding: 10px 14px; font-size: 15px; }
  .mrs-tiles { grid-auto-columns: 96px; }
  .mrs-card { grid-template-columns: minmax(0, 32%) minmax(0, 1fr); }
  .mrs-body { padding: 10px 10px 12px; }
  .mrs-btn { padding: 7px 9px; font-size: 13px; }
}
/* Wide screens: hero gets more air, tiles bigger */
@media (min-width: 1400px) {
  .mrs-hero { padding-top: 56px; padding-bottom: 44px; grid-template-columns: 1fr 34%; }
  .mrs-hero-logo { max-width: 600px; }
  .mrs-hero-mascot { max-width: 440px; }
  .mrs .mrs-hero h1 { font-size: 56px; }
  .mrs-hero p { font-size: 21px; }
  .mrs-home .mrs-btn-lg { font-size: 17px; padding: 14px 22px; }
}

/* ================= 404 ================= */
body.mrs-404-page {
  margin: 0; color: #0c1f36;
  background: linear-gradient(180deg, #e2f3fa 0%, #ffffff 420px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mrs-404 { padding: 24px 16px 40px; }
.mrs-404-logo { display: block; width: 200px; margin: 0 auto 8px; }
.mrs-404-logo img { width: 100%; height: auto; display: block; }
.mrs-404-hero {
  display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center;
  gap: 8px; margin: 0 auto 36px; max-width: 920px;
}
.mrs-404-mascot { width: 180px; height: auto; }
.mrs-404-code { font-size: 15px; font-weight: 800; letter-spacing: .2em; color: #008bb5; margin: 0; }
.mrs .mrs-404-text h1 { font-size: clamp(28px, 6vw, 48px); line-height: 1.1; font-weight: 800; color: #00264e; margin: 6px 0 10px; }
.mrs-404-text p { color: #4f6177; font-size: 17px; margin: 0 0 18px; }
.mrs-404 .mrs-hero-ctas { justify-content: center; }
.mrs-404 .mrs-btn-lg { padding: 12px 18px; font-size: 16px; border-radius: 12px; }
.mrs-404-next { margin: 0 auto; }
.mrs-404-foot { text-align: center; font-size: 13px; color: #4f6177; margin: 36px 0 0; }
.mrs-404-foot a { color: #008bb5; }
@media (min-width: 820px) {
  .mrs-404 { padding: 32px 32px 56px; }
  .mrs-404-logo { width: 240px; }
  .mrs-404-hero { grid-template-columns: 300px 1fr; justify-items: start; text-align: left; gap: 40px; align-items: center; margin-top: 24px; }
  .mrs-404-mascot { width: 300px; }
  .mrs-404 .mrs-hero-ctas { justify-content: flex-start; }
}
.mrs-404-next .mrs-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; }
.mrs-404-next .mrs-section-h { text-align: center; }

/* ================= Hero banner (photo with the Miramichi bridge) ================= */
.mrs .mrs-hero.mrs-hero-banner {
  display: block; padding: 0; gap: 0; background: none; border-radius: 0; overflow: hidden;
  margin-bottom: 22px;
}
.mrs-portal-page .mrs .mrs-hero.mrs-hero-banner { padding-left: 0; padding-right: 0; }
.mrs-hero-img { display: block; width: 100%; height: auto; max-width: none; }
.mrs-hero-panel { padding: 14px var(--mrs-pad, 16px) 0; display: grid; gap: 10px; }
.mrs-hero-banner .mrs-hero-text p { margin: 0; }
.mrs-hero-banner .mrs-hero-stat { margin: 10px 0 0; }
.mrs .mrs-hero-banner h1 { margin: 2px 0 6px; font-size: clamp(22px, 6vw, 34px); }

@media (min-width: 640px) {
  .mrs-hero-panel { grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding-top: 18px; }
  .mrs-hero-side { text-align: right; }
  .mrs-hero-banner .mrs-hero-ctas { justify-content: flex-end; }
}
/* Big screens: the whole picture always fits the screen height (nothing cut),
   the sides are filled with the same sky, blurred. The tagline is readable in the image,
   so the h1 stays for SEO/screen readers only. */
@media (min-width: 1000px) {
  .mrs-hero-media {
    position: relative; overflow: hidden; background: #cfe6f5;
    height: clamp(340px, calc(100svh - 330px), 46.6vw);
  }
  .mrs-hero-media::before {
    /* same photo, with its left/right edges stretched out: sky and river continue to the screen edges */
    content: ""; position: absolute; inset: 0;
    background: var(--mrs-hero-bg) center / auto 100% no-repeat;
  }
  .mrs-hero-media::after {
    /* white fade at the bottom, matching the fade inside the picture */
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12%;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
  }
  .mrs-hero-img {
    position: relative; z-index: 1; display: block;
    height: 100%; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain;
  }
  .mrs .mrs-hero-banner h1 {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
  }
  .mrs-hero-banner .mrs-hero-text p { font-size: 19px; }
  .mrs-hero-panel { padding-top: 10px; }
  .mrs-hero-banner .mrs-hero-stat { margin-top: 6px; }
  .mrs .mrs-hero.mrs-hero-banner { margin-bottom: 16px; }
  /* Compact category row so it fits in the first screen */
  .mrs-tiles { margin-bottom: 24px; }
  .mrs-tile { padding: 8px 6px 10px; gap: 0; }
  .mrs-tile-img { max-width: 104px; }
}
.mrs-hero-panel > .mrs-hero-text, .mrs-hero-panel > .mrs-hero-side { grid-area: auto; min-width: 0; }

/* ================= Clean hero: everything fits the first screen on desktop ================= */
@media (min-width: 1000px) {
  .mrs .mrs-hero.mrs-hero-clean {
    padding-top: clamp(20px, 3vh, 40px); padding-bottom: clamp(16px, 2.5vh, 32px);
    grid-template-columns: 1fr auto; column-gap: 40px;
  }
  .mrs-hero-clean .mrs-hero-logo { max-width: min(560px, 100%); max-height: clamp(130px, 22svh, 200px); width: auto; }
  .mrs-hero-clean .mrs-hero-mascot { width: auto; max-width: none; height: clamp(250px, calc(100svh - 420px), 440px); }
  .mrs .mrs-hero-clean h1 { font-size: clamp(30px, 3vw, 52px); margin: 6px 0 6px; }
  .mrs-hero-clean p { margin-bottom: 12px; }
  .mrs-hero-clean .mrs-hero-stat { margin-top: 10px; }
  .mrs .mrs-hero.mrs-hero-clean { margin-bottom: 16px; }
}

/* ================= Submit an event ================= */
.mrs-section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.mrs-section-row .mrs-section-h { margin: 0; }
.mrs .mrs-btn-add { background: var(--mrs-amber); border-color: var(--mrs-amber); color: var(--mrs-ink) !important; }
.mrs .mrs-btn-add:hover { background: #f59c10; border-color: #f59c10; }
.mrs-submit { margin: 0 auto; }
.mrs-submit-intro { font-size: 17px; color: var(--mrs-soft); margin: 0 0 16px; }
.mrs .mrs-form-h { font-size: 17px; font-weight: 800; color: var(--mrs-river); margin: 10px 0 0; }
.mrs-form-h small, .mrs-form label small { font-weight: 400; color: var(--mrs-soft); }
.mrs-submit-note { font-size: 13px; color: var(--mrs-soft); text-align: center; margin: 4px 0 0; }
.mrs-submit .mrs-check { align-items: flex-start; }
.mrs-submit .mrs-check input { margin-top: 3px; }
.mrs-submit .mrs-notice + p { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) { .mrs-submit .mrs-row { grid-template-columns: 1fr; } }

/* ---- v1.6.2 fixes ---- */
/* Sticky search/filters only on large screens; on phones/foldables it covered the cards */
.mrs-bar { position: static; }
@media (min-width: 1000px) {
  .mrs-bar { position: sticky; top: 0; }
  .admin-bar .mrs-bar { top: 32px; }
}
/* Theme link colours must not recolour event titles */
.mrs .mrs-title a, .mrs .mrs-title a:visited { color: var(--mrs-ink) !important; text-decoration: none; }
.mrs .mrs-title a:hover { color: var(--mrs-river) !important; text-decoration: underline; }
/* Poster letterbox in brand colour instead of beige */
.mrs-poster { background: var(--mrs-paper); }

/* ================= Event modal ================= */
html.mrs-noscroll { overflow: hidden; }
.mrs-modal {
  position: fixed; inset: 0; z-index: 99990; background: rgba(0, 20, 40, .62);
  display: flex; align-items: flex-end; justify-content: center;
}
.mrs-modal[hidden] { display: none; }
.mrs-modal-panel {
  position: relative; background: #fff; width: 100%; max-height: 94vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  animation: mrs-up .22s ease-out;
}
@keyframes mrs-up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.mrs-modal-close {
  position: sticky; top: 10px; float: right; margin: 10px 10px -54px 0; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--mrs-ink); font-size: 28px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.mrs-m-poster { display: block; background: var(--mrs-paper); }
.mrs-m-poster[hidden] { display: none; }
.mrs-m-poster img { display: block; width: 100%; max-height: 62vh; object-fit: contain; margin: 0 auto; }
.mrs-m-body { padding: 18px 18px 26px; display: flex; flex-direction: column; gap: 8px; }
.mrs .mrs-m-title { font-size: 24px; line-height: 1.2; font-weight: 800; margin: 0; color: var(--mrs-ink); }
.mrs-m-where[hidden], .mrs-m-tags[hidden], .mrs-m-credit[hidden], .mrs-m-desc[hidden], .mrs-m-actions [hidden] { display: none; }
.mrs-m-desc { white-space: pre-line; margin: 6px 0 0; color: var(--mrs-ink); font-size: 16px; line-height: 1.55; }
.mrs-m-actions { padding-top: 4px; }
.mrs-m-toast { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--mrs-river-2); color: var(--mrs-river); font-weight: 600; font-size: 14px; }
.mrs-m-toast[hidden] { display: none; }
.mrs-lb { z-index: 100000; }
@media (min-width: 820px) {
  .mrs-modal { align-items: center; padding: 24px; }
  .mrs-modal-panel {
    width: min(980px, 100%); max-height: 88vh; border-radius: 20px;
    display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
  }
  .mrs-modal-close { position: absolute; top: 12px; right: 12px; margin: 0; float: none; }
  .mrs-m-poster { height: 100%; max-height: 88vh; display: flex; align-items: center; }
  .mrs-m-poster img { max-height: 88vh; }
  .mrs-m-body { padding: 28px 28px 30px; overflow-y: auto; max-height: 88vh; }
  .mrs-modal-panel:not(:has(.mrs-m-poster:not([hidden]))) { grid-template-columns: 1fr; width: min(640px, 100%); }
}

/* ================= Event page (own template) ================= */
body.mrs-event-page {
  margin: 0; color: #0c1f36;
  background: linear-gradient(180deg, #e2f3fa 0%, #ffffff 360px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mrs-ev { padding: 14px 16px 36px; }
.mrs-ev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.mrs-ev-logo { display: block; width: 170px; }
.mrs-ev-logo img { width: 100%; height: auto; display: block; }
.mrs-ev-main > .mrs-notice { margin-bottom: 14px; }
.mrs-ev-card {
  background: #fff; border: 1px solid var(--mrs-line); border-radius: 20px; overflow: hidden;
  display: grid; grid-template-columns: 1fr;
}
.mrs-ev-poster { display: block; background: var(--mrs-paper); }
.mrs-ev-poster img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; margin: 0 auto; }
.mrs-ev-info { padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.mrs .mrs-ev-title { font-size: clamp(26px, 6vw, 38px); line-height: 1.12; font-weight: 800; color: var(--mrs-river); margin: 0; }
.mrs-ev-info .mrs-when { font-size: 15px; }
.mrs-ev-info .mrs-where { font-size: 16px; }
.mrs-ev-desc { font-size: 16px; line-height: 1.6; margin: 8px 0 4px; overflow-wrap: anywhere; }
.mrs-ev-next { margin: 34px 0 0; }
.mrs-ev-more { text-align: center; margin: 18px 0 0; }
.mrs-ev .mrs-sub { margin-top: 34px; }
@media (min-width: 820px) {
  .mrs-ev { padding: 22px 32px 48px; }
  .mrs-ev-logo { width: 210px; }
  .mrs-ev-card { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); }
  .mrs-ev-poster { display: flex; align-items: center; }
  .mrs-ev-poster img { max-height: 82vh; }
  .mrs-ev-info { padding: 30px 32px; }
  .mrs-ev-card:not(:has(.mrs-ev-poster)) { grid-template-columns: 1fr; }
}
.mrs-m-body .mrs-actions, .mrs-ev-info .mrs-actions { margin-top: 4px; }
