:root {
  --gold: #f7d989;
  --gold-dark: #8f6326;
  --gold-soft: #c89a43;
  --purple: #261034;
  --purple-light: #56206d;
  --green: #9bea3a;
  --green-dark: #335906;
  --red: #ff3030;
  --cream: #f5e2b8;
  --parchment: #e8c98f;
  --parchment-light: #f8e7bd;
  --ink: #1d1023;
  --wood: #1a0d06;
  --wood-light: #39200f;
  --shadow: #030104;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 0%, rgba(54, 34, 88, .45), transparent 34rem),
    radial-gradient(circle at 20% 20%, rgba(54, 110, 42, .24), transparent 20rem),
    linear-gradient(180deg, #04050d 0%, #080613 44%, #020208 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.72) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255,212,94,.55) 0 1px, transparent 1.4px);
  background-position:
    0 0,
    40px 55px;
  background-size:
    110px 120px,
    150px 140px;
  opacity: .24;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 25%, rgba(246, 210, 90, .15), transparent 14rem),
    radial-gradient(circle at 90% 50%, rgba(113, 255, 64, .09), transparent 18rem);
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  border-left: 1px solid rgba(180, 122, 42, .42);
  border-right: 1px solid rgba(180, 122, 42, .42);
  background:
    linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.25)),
    url("../images/backgrounds/header-wood.jpg"),
    linear-gradient(90deg, #160c06, #3a2110 48%, #120804);
  background-size: cover;
  box-shadow: 0 0 48px rgba(0,0,0,.7);
}

.topbar {
  min-height: 150px;
  display: grid;
  grid-template-columns: 330px 1fr 210px;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 3rem .75rem;
  border-bottom: 2px solid rgba(201, 149, 64, .65);
  background:
    linear-gradient(90deg, rgba(0,0,0,.34), rgba(255,255,255,.03), rgba(0,0,0,.34));
}

.logo-wrap {
  display: block;
}

.site-logo {
  width: 295px;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.45));
}

.top-centre {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: .5rem;
  text-align: left;
  align-self: start;
  padding-top: .5rem;
}

.socials {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.socials .login-plaque {
  margin-top: 0;
}
.site-tagline {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 700;
  text-shadow: 0 3px 3px rgba(0,0,0,.85);
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.socials a {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition:
    transform .18s ease,
    filter .18s ease;
}

.socials .login-plaque {
  width: 300px;
  height: auto;
  display: inline-block;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.socials a:hover {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.12);
}

.socials a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 4px 6px rgba(0,0,0,.75))
    drop-shadow(0 0 10px rgba(255, 200, 80, .15));
}

.login-plaque {
  justify-self: end;
  display: block;
}

.top-centre .login-plaque {
  margin-top: 0;
}

.login-plaque img {
  width: 90px;
  height: auto;
  display: block;

  filter:
    drop-shadow(0 6px 10px rgba(0,0,0,.65));

  transition:
    transform .18s ease,
    filter .18s ease;
}

.login-plaque:hover img {
  transform: translateY(-2px) scale(1.02);

  filter:
    brightness(1.06)
    drop-shadow(0 8px 14px rgba(0,0,0,.7))
    drop-shadow(0 0 12px rgba(117,255,83,.18));
}


/* ── Oddmap header logo (homepage only, right of Login button) ── */
.oddmap-header-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  width: auto !important;
  height: auto !important;
}

.oddmap-header-link img {
  height: 104px !important;
  width: auto !important;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.6));
  transition: transform .18s ease, filter .18s ease;
}

.oddmap-header-link:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.7));
}

/* ── Logged-in logout state ───────────────────────────────── */
.login-plaque.logged-in {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.login-plaque.logged-in img {
  filter:
    sepia(0.3) hue-rotate(-10deg) saturate(1.4)
    drop-shadow(0 6px 10px rgba(0,0,0,.65))
    drop-shadow(0 0 8px rgba(117,255,83,.3));
}

.logout-label {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold, #c89a43);
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
  text-transform: uppercase;
  pointer-events: none;
}

/* The member's WIZARD name under the plaque — never their real name. Sits in the
   same slot the old logout caption used, so the header keeps its shape. */
.plaque-name {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold, #c89a43);
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
  pointer-events: none;
  /* Long wizard names ("Borin The Magnificent") must read in full. The plaque is
     300px wide, so allow the name to wrap onto a second line and only clamp
     beyond that, rather than cutting every name at 11 characters. */
  max-width: 24ch;
  margin-inline: auto;          /* keep it centred under the plaque */
  text-align: center;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* ── Admin site link (visible only to admin users, injected by JS) ── */
a.admin-site-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  background: rgba(107, 45, 139, 0.85);
  border: 1px solid #b06aea;
  border-radius: 6px;
  color: #f7d989;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s;
  align-self: center;
}
a.admin-site-link:hover {
  background: rgba(107, 45, 139, 1);
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  color: var(--gold);
  background: rgba(0,0,0,.45);
  border: 1px solid var(--gold-dark);
  border-radius: .25rem;
  cursor: pointer;
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem 1rem;
  overflow-x: visible;
}

.nav.top-header-nav {
  background: transparent;
  padding: .25rem 0 0;
  gap: 1rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.nav a {
  display: block;
  transition:
    transform .18s ease,
    filter .18s ease;
}
.nav a:hover {
  transform: translateY(-4px);

  filter:
    brightness(1.08)
    drop-shadow(0 0 12px rgba(255,210,120,.35));
}

.nav a.active {
  color: white;
}


.nav img {
  width: 70px;
  max-width: 70px;
  height: auto;
  display: block;

  filter:
    drop-shadow(0 4px 6px rgba(0,0,0,.7));

  transition:
    transform .18s ease,
    filter .18s ease;
}

.nav.top-header-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .65rem .45rem .45rem;
  min-width: 85px;
  min-height: 100px;
  box-sizing: border-box;
  background: rgba(26, 15, 4, .45);
  border-radius: .9rem;
  border: 1px solid rgba(201, 149, 64, .95);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 170, .18),
    0 12px 20px rgba(0, 0, 0, .42),
    0 0 0 1px rgba(255, 225, 135, .08);
  transition:
    transform .18s ease,
    filter .18s ease,
    box-shadow .18s ease;
}

.nav.top-header-nav a:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 170, .25),
    0 16px 28px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 225, 135, .12);
}

.nav.top-header-nav a span {
  color: var(--gold);
  font-family: 'Georgia', serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}

.nav.top-header-nav a.active span {
  color: #fff;
}

@media (max-width: 760px) {
  .nav a {
    min-height: 54px;
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    border-bottom: 1px solid rgba(201, 149, 64, .25);
    padding: .75rem 0;
  }

  .nav a span {
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}


.hero {
  position: relative;
  min-height: 545px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  align-items: center;
  gap: 1rem;
  padding: 4.5rem 4rem 5.5rem;
  background:
    linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.58) 38%, rgba(0,0,0,.2) 100%),
    url("../images/backgrounds/hero-tavern.webp"),
    radial-gradient(circle at 70% 42%, #193a42 0%, #06040a 55%, #030204 100%);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 23% 42%, rgba(255, 206, 86, .12), transparent 12rem),
    radial-gradient(circle at 74% 42%, rgba(128, 255, 70, .16), transparent 16rem);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(3.2rem, 6vw, 5.9rem);
  line-height: .92;
  text-shadow:
    0 4px 4px rgba(0,0,0,.9),
    0 0 18px rgba(250, 205, 103, .12);
}

.hero h1 span {
  display: block;
  margin-bottom: .45rem;
  font-size: clamp(2rem, 3vw, 3rem);
}

.hero-subtitle {
  max-width: 390px;
  margin: 1.25rem 0 1rem;
  color: white;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.35;
}

.hero-subtitle strong {
  color: var(--green);
}

.ornament {
  width: 250px;
  height: 22px;
  margin: 1.2rem 0 1.35rem;
  background:
    linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .8;
  mask-image:
    radial-gradient(circle at 50% 50%, #000 0 7px, transparent 8px),
    linear-gradient(#000, #000);
  mask-size:
    22px 22px,
    100% 2px;
  mask-position:
    50% 50%,
    center;
  mask-repeat:
    no-repeat,
    no-repeat;
}

.hero-body {
  max-width: 390px;
  margin: 0 0 1.5rem;
  color: #fff4d2;
  font-size: 1.17rem;
  line-height: 1.45;
  text-shadow: 0 2px 2px black;
}

.button,
.card a,
.signup-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 42px;
  padding: .75rem 1.45rem;
  color: white;
  border: 1px solid var(--gold-soft);
  border-radius: .25rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -3px 0 rgba(0,0,0,.28),
    0 4px 0 rgba(0,0,0,.65),
    0 0 12px rgba(0,0,0,.55);
  transition: transform .18s ease, filter .18s ease;
}

.button:hover,
.card a:hover,
.signup-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.button-purple,
.card a {
  background:
    linear-gradient(#5b266f, #260d3b);
}

.button-green,
.signup-form button {
  background:
    linear-gradient(#78a82c, #315b0a);
}

.hero-enter-button {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: auto;
  z-index: 2;
  transition: transform .22s ease, filter .22s ease;
}

.hero-enter-button:hover {
  transform: translateX(-50%) scale(1.04);
  filter: brightness(1.12);
}

.hero-enter-button img {
  width: 240px;
  height: auto;
  display: block;
  /* warm lantern glow from inside + strong ground shadow to root it in the scene */
  filter:
    drop-shadow(0 0 28px rgba(190, 110, 10, .45))
    drop-shadow(0 14px 22px rgba(0,0,0,.9));
}

.hero-art {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: end;
  width: min(580px, 100%);
}

.hero-art img {
  width: 100%;
  filter:
    drop-shadow(0 20px 18px rgba(0,0,0,.7))
    drop-shadow(0 0 35px rgba(111, 255, 76, .18));
}

.status-strip--flat {
  margin-top: 2rem;
}

.status-strip {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 3rem));
  margin: -2.2rem auto 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--gold-dark);
  border-radius: .4rem;
  background:
    linear-gradient(90deg, #271034, #331850 50%, #271034);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.55),
    0 10px 22px rgba(0,0,0,.55);
  overflow: hidden;
}

.status-strip article {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .75rem 1rem;
  border-right: 1px solid rgba(209, 164, 88, .45);
}

.status-strip article:last-child {
  border-right: 0;
}

.status-strip img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  color: #fff2cd;
  font-size: 1rem;
}

.status-strip span {
  color: var(--green);
  font-size: .98rem;
}

.status-strip .online {
  color: var(--green);
}

main {
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Contact page ─────────────────────────────────────────── */

.page-title-band {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 2.5rem auto 1.5rem;
  text-align: center;
}

.page-title-band h1 {
  margin: 0 0 .5rem;
  color: var(--gold);
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.05;
  text-shadow: 0 4px 8px rgba(0,0,0,.8);
}

.page-title-band h1 span {
  display: block;
  color: #fff4d2;
  font-size: .45em;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-title-band p {
  margin: 0;
  color: #d9c28a;
  font-size: 1.15rem;
}

.contact-panel {
  max-width: 820px;
}

.contact-panel h2::after {
  display: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.contact-field label {
  color: #2a103e;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .03em;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: .75rem 1rem;
  color: #2a1b12;
  font: inherit;
  border: 2px solid #b9945f;
  border-radius: .3rem;
  background: #fff4d9;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.15);
  transition: border-color .18s ease, box-shadow .18s ease;
  box-sizing: border-box;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: #7a4a00;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.15), 0 0 0 3px rgba(180,120,40,.25);
}

.contact-field textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.contact-submit {
  flex: 0 0 auto;
}

.form-status {
  flex: 1;
  margin: 0;
  font-size: .98rem;
}

.form-status--success { color: #2a5c0e; }
.form-status--error   { color: #8b1a1a; }

@media (max-width: 580px) {
  .contact-row { grid-template-columns: 1fr; }
}

/* ── End contact page ─────────────────────────────────────── */

.parchment-section {
  position: relative;
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 2rem auto;
  padding: 2rem 2.15rem 2.4rem;
  color: var(--ink);
  border: 3px solid #9a6e2c;
  border-radius: .35rem;
  background:
    radial-gradient(circle at 50% 3%, rgba(255,255,255,.85), transparent 12rem),
    radial-gradient(circle at 15% 30%, rgba(255,255,255,.25), transparent 15rem),
    url("../images/textures/paper.webp"),
    linear-gradient(#f6dfaa, #d8b675);
  /* The paper texture TILES rather than stretching: it is an even, seamless
     sheet, so `cover` would smear the grain across a tall page instead of
     keeping it the same size everywhere. The gradients above and below it
     still cover, hence the per-layer sizes. */
  background-size: cover, cover, 620px 620px, cover;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  box-shadow:
    inset 0 0 34px rgba(102, 58, 14, .38),
    inset 0 0 0 5px rgba(255,255,255,.18),
    0 10px 32px rgba(0,0,0,.65);
}

.scroll-edge {
  position: absolute;
  top: -12px;
  bottom: -12px;
  width: 45px;
  background: url("../images/scroll_side.webp") center / 100% 100% no-repeat;
}

.scroll-left {
  left: -36px;
}

.scroll-right {
  right: -36px;
}

.parchment-section h2 {
  position: relative;
  margin: 0 0 1.6rem;
  text-align: center;
  color: #2a103e;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

.parchment-section h2::before,
.parchment-section h2::after {
  content: "";
  display: inline-block;
  width: min(180px, 18vw);
  height: 2px;
  margin: 0 1rem .35rem;
  background: linear-gradient(90deg, transparent, #90652b, transparent);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.05rem 1rem 1rem;
  text-align: center;
  border: 3px double #9f7431;
  border-radius: .18rem;
  transition: box-shadow .18s ease, transform .18s ease;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.55), transparent 8rem),
    linear-gradient(#f7e5bd, #e1c48b);
  box-shadow:
    inset 0 0 24px rgba(117, 76, 21, .35),
    0 4px 10px rgba(92, 51, 14, .25);
}

.card img {
  width: 155px;
  height: 135px;
  object-fit: contain;
  margin-bottom: .45rem;
  filter: drop-shadow(0 6px 3px rgba(82, 48, 18, .22));
}

.card h3 {
  margin: .25rem 0 .4rem;
  color: #2a103e;
  font-size: 1.75rem;
  line-height: 1.05;
}

.card p {
  flex: 1;
  margin: 0;
  color: #1e1123;
  font-size: 1rem;
  line-height: 1.28;
}

.card a {
  min-width: 126px;
  min-height: 36px;
  margin-top: 1rem;
  padding: .55rem 1rem;
  font-size: .95rem;
  position: relative;
  z-index: 1;
}

/* Stretched link — makes the entire card clickable */
.card a:only-of-type::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.card:has(a:only-of-type):hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 24px rgba(117, 76, 21, .35),
    0 8px 18px rgba(92, 51, 14, .38);
}

.card a.card-img-link {
  display: block;
  min-width: 0;
  min-height: 0;
  margin-top: 0;
  margin-bottom: 10px;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  transition: transform .2s ease, filter .2s ease;
}

.card a.card-img-link:hover {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.live-panel,
.signup-panel,
.site-footer {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 2rem auto;
  border: 2px solid var(--gold-dark);
  border-radius: .45rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), transparent),
    linear-gradient(90deg, #261034, #16091f);
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.62),
    0 8px 24px rgba(0,0,0,.55);
}

.live-panel {
  display: grid;
  grid-template-columns: .95fr 1.55fr;
  gap: 1.5rem;
  padding: 1.5rem;
}

.live-copy {
  padding: .6rem .3rem .3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .75rem;
}

.live-copy p {
  margin: 0;
}

.live-copy h2 {
  margin: 0;
}

.live-dot {
  margin: 0 0 .55rem;
  color: var(--red);
  font-weight: 700;
  letter-spacing: .04em;
}

.live-panel h2,
.signup-panel h2 {
  margin: 0 0 .75rem;
  color: var(--gold);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  text-shadow: 0 3px 4px rgba(0,0,0,.8);
}

.live-panel p,
.signup-panel p {
  color: #fff0c9;
  font-size: 1.17rem;
  line-height: 1.35;
}

.viewer-row {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-top: 1.4rem;
}

.viewer-row img {
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold-soft);
  border-radius: 50%;
  object-fit: cover;
  background: #24112f;
}

.viewer-row span {
  margin-left: .6rem;
  color: #fff0c9;
  font-size: .95rem;
}

.video-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(220, 168, 80, .75);
  border-radius: .25rem;
  background: #07050b;
}

.video-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.video-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
  transition: transform .35s ease, opacity .35s ease;
}

.video-card:hover img {
  transform: scale(1.025);
  opacity: 1;
}

.youtube-play {
  position: absolute;
  width: 82px;
  height: 58px;
  display: grid;
  place-items: center;
  padding-left: .3rem;
  color: white;
  font-size: 2.1rem;
  border-radius: .8rem;
  background: #e62219;
  box-shadow: 0 8px 18px rgba(0,0,0,.5);
}

.live-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .35rem .55rem;
  color: white;
  font-weight: 700;
  border-radius: .3rem;
  background: #e62219;
}

.signup-panel {
  position: relative;
  min-height: 160px;
  display: grid;
  grid-template-columns: 170px 1fr minmax(280px, 430px) 130px;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.4rem;
  background:
    radial-gradient(circle at 56% 50%, rgba(148, 58, 190, .28), transparent 17rem),
    linear-gradient(90deg, #251030, #16091f);
}

.signup-decoration {
  max-height: 125px;
  object-fit: contain;
}

.signup-decoration.right {
  justify-self: end;
}

.signup-copy h2 {
  margin-bottom: .45rem;
}

.signup-copy p {
  margin: 0;
}

.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .55rem;
  align-items: flex-end;
}

.signup-label {
  flex: 1 0 100%;
  font-size: .8rem;
  font-weight: 600;
  color: #c9a86c;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
}

.signup-form input {
  flex: 1;
  min-width: 180px;
  height: 44px;
  padding: .55rem 1rem;
  color: #2a1b12;
  border: 2px solid #b9945f;
  border-radius: .3rem;
  background: #fff4d9;
  font-size: 1rem;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.2);
}

.signup-form input:focus {
  outline: none;
  border-color: #d4a44a;
  box-shadow: 0 0 0 3px rgba(212,164,74,.28), inset 0 2px 6px rgba(0,0,0,.2);
}

.signup-form button {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 1.5rem;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  letter-spacing: .02em;
  cursor: pointer;
  border: none;
}

.signup-feedback {
  grid-column: 1 / -1;
  color: #ffe08a;
  font-size: .9rem;
  text-align: center;
  margin-top: .5rem;
  min-height: 1.2em;
}

.site-footer {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr 1.2fr 1.2fr 130px;
  gap: 2rem;
  align-items: start;
  padding: 2rem 2rem 4.7rem;
  background:
    linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28)),
    url("../images/backgrounds/footer-wood.jpg"),
    linear-gradient(90deg, #160c06, #39200f 48%, #120804);
  background-size: cover;
}

.footer-logo img {
  width: 245px;
}

.site-footer h3 {
  margin: .2rem 0 .6rem;
  color: var(--gold);
  font-size: 1.2rem;
}

.site-footer p,
.site-footer a {
  color: #fff0c9;
  font-size: .95rem;
  line-height: 1.25;
}

.site-footer nav a {
  display: block;
  margin-bottom: .15rem;
}

.footer-socials {
  justify-content: flex-start;
  margin-top: .75rem;
  gap: .75rem;
  /* `width: 380px` alone is wider than the footer's content box on a phone,
     which gave every page on the site a horizontal scrollbar. Cap it to the
     container; desktop still resolves to the full 380px. */
  width: 380px;
  max-width: 100%;
  flex-wrap: wrap;
}

.footer-socials a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-socials a img {
  width: 100%;
  height: auto;
  display: block;
}

.footer-cauldron {
  width: 120px;
  align-self: end;
}

.footer-bottom {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(209, 164, 88, .28);
  padding-top: .8rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--gold);
}

.footer-bottom span {
  margin: 0 .5rem;
  color: var(--gold-dark);
}

@media (max-width: 1050px) {
  .topbar {
    grid-template-columns: 240px 1fr 170px;
    padding-inline: 1.5rem;
  }

  .site-logo {
    width: 230px;
  }

  .nav {
    padding-inline: 1rem;
    gap: .15rem;
  }

  .nav a {
    min-width: auto;
    flex: 1;
  }

  .hero {
    padding-inline: 2rem;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .signup-panel {
    grid-template-columns: 120px 1fr;
  }

  .signup-form {
    grid-column: 2;
  }

  .signup-decoration.right {
    display: none;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-cauldron {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header,
  main {
    max-width: none;
  }

  /* Allow the mobile nav dropdown to extend below the header */
  .site-header {
    overflow: visible;
  }

  .topbar {
    min-height: auto;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    padding: 1rem;
    /* Anchor the `top: 100%` dropdown below to the bar itself. Without this it
       resolves against .site-header, which on pages that wrap the hero is
       ~930px tall — so the menu opened far below the fold and tapping the
       hamburger looked like it did nothing. */
    position: relative;
  }

  .logo-wrap {
    max-width: 210px;
  }

  .site-logo {
    width: 100%;
  }

  .top-centre,
  .login-panel {
    display: none;
  }

  /* When the hamburger is triggered, .top-centre escapes its hidden state and
     drops down below the full header as an absolute-positioned overlay */
  .top-centre.open {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 200;
    padding: 0 0 .75rem;
    border-top: 1px solid rgba(201, 149, 64, .35);
    border-bottom: 2px solid rgba(201, 149, 64, .55);
    background:
      linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28)),
      url("../images/backgrounds/header-wood.jpg"),
      linear-gradient(90deg, #160c06, #3a2110 48%, #120804);
    background-size: cover;
  }

  /* Hide the socials row inside the mobile dropdown */
  .top-centre.open .socials {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav {
    display: none;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1rem 1rem;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    min-height: 54px;
    flex-direction: row;
    justify-content: flex-start;
    gap: .75rem;
    border-bottom: 1px solid rgba(201, 149, 64, .25);
  }

  .nav a.active::after {
    left: 0;
    right: auto;
    bottom: 0;
    width: 42px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 3rem 1.4rem 4.5rem;
    text-align: center;
  }

  .hero-subtitle,
  .hero-body,
  .ornament {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-art {
    justify-self: center;
    max-width: 430px;
  }

  /* The hero collapses to one centred column here, so the absolutely-positioned
     tavern door stopped sitting beside the copy and started sitting on top of
     it. Put it back in the flow, below the text. */
  .hero-enter-button {
    position: static;
    transform: none;
    margin: .5rem auto 0;
  }

  .hero-enter-button:hover {
    transform: scale(1.04);
  }

  .hero-enter-button img {
    width: 200px;
    margin: 0 auto;
  }

  /* The footer links stack at ~19px tall here, well under the ~44px a thumb
     needs, and sit close enough together to mis-tap. Give them room. */
  .site-footer nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 0;
  }

  /* Absolute + `bottom: 1rem` leaves no space for taller links, so let this
     row sit in the normal flow under the columns instead. */
  .footer-bottom {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 1.25rem;
  }

  .footer-bottom a {
    display: inline-block;
    padding: .5rem .25rem;
  }

  .site-footer {
    padding-bottom: 2rem;
  }

  /* Single tall column + `background-size: cover` blows the lantern artwork up
     behind the footer text. Darken it so the links stay readable. */
  .site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 5, 2, .58);
    pointer-events: none;
    z-index: 0;
  }

  .site-footer > * {
    position: relative;
    z-index: 1;
  }

  .status-strip {
    width: calc(100% - 1.5rem);
    grid-template-columns: 1fr;
    margin-top: -2rem;
  }

  .status-strip article {
    border-right: 0;
    border-bottom: 1px solid rgba(209, 164, 88, .45);
  }

  .status-strip article:last-child {
    border-bottom: 0;
  }

  .parchment-section,
  .live-panel,
  .signup-panel,
  .site-footer {
    width: calc(100% - 1.5rem);
  }

  .scroll-edge {
    display: none;
  }

  .parchment-section {
    padding: 1.4rem 1rem;
  }

  .parchment-section h2::before,
  .parchment-section h2::after {
    display: none;
  }

  .cards,
  .live-panel,
  .signup-panel,
  .site-footer {
    /* minmax(0, …) rather than a bare 1fr: a grid track defaults to a
       min-content floor, so one wide child stretches the column past the
       viewport instead of being made to fit. */
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    min-height: auto;
  }


  .signup-decoration.left {
    display: none;
  }

  .signup-form {
    grid-column: auto;
  }
  .signup-form input,
  .signup-form button {
    width: 100%;
    flex: none;
  }

  .footer-bottom {
    position: static;
    flex-direction: column;
    padding-top: 1rem;
  }
}
/* ============================================================
   Commercial polish layer (P10) — additive, non-destructive.
   Accessibility, motion-safety, micro-interactions, utilities.
   ============================================================ */

/* Accessibility: clear keyboard focus without affecting mouse users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #c8a96e;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Smooth, subtle micro-interactions on the main interactive elements */
.button, .card, .hero-enter-button, .signup-form button, .course-card, .product-card {
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.button:hover, .signup-form button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.button:active, .signup-form button:active {
  transform: translateY(0);
  filter: brightness(.97);
}
.card:hover, .course-card:hover, .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

/* Gentle fade-in for lazily-loaded imagery (perceived performance) */
img[loading="lazy"] {
  animation: rwFadeIn .5s ease both;
}
@keyframes rwFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Loading skeleton shimmer utility */
.rw-skeleton {
  background: linear-gradient(90deg, rgba(200,169,110,.10) 25%, rgba(200,169,110,.22) 37%, rgba(200,169,110,.10) 63%);
  background-size: 400% 100%;
  animation: rwShimmer 1.3s ease infinite;
  border-radius: 8px;
  min-height: 1rem;
}
@keyframes rwShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Friendly empty-state utility */
.rw-empty {
  text-align: center;
  padding: 2.4rem 1rem;
  color: #7a5a2e;
  font-family: Georgia, 'Times New Roman', serif;
}
.rw-empty .rw-empty-emoji { font-size: 2.2rem; display: block; margin-bottom: .5rem; }

/* Success / error inline message helpers */
.rw-msg-success { color: #2e7d32; background: #eef8ee; border: 1px solid #a9d3a9; padding: .5rem .8rem; border-radius: 8px; }
.rw-msg-error   { color: #a3271f; background: #fbeeed; border: 1px solid #e0b1ac; padding: .5rem .8rem; border-radius: 8px; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile: comfortable tap targets + no accidental horizontal scroll */
@media (max-width: 600px) {
  .button, .signup-form button, .nav a { min-height: 44px; }
  body { overflow-x: hidden; }

  /* iOS auto-zooms the whole page when a focused input's text is under 16px.
     Several forms across the site use ~15px inputs, so tapping a field made
     the layout lurch and zoom. Floor mobile form controls at 16px to stop it.
     Mobile-only, so desktop input sizing is unchanged. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  textarea,
  select {
    font-size: max(16px, 1rem);
  }
}

/* ── Member menu (logged-in plaque dropdown, built by scripts/script.js) ── */
.member-nav {
  position: relative;
  display: inline-block;
}

/* The plaque keeps its glow, but now reads as a menu button. */
.member-nav .login-plaque {
  cursor: pointer;
}

/* The header clips its wood texture with overflow:hidden, which also guillotined
   this dropdown at the header's bottom edge. Un-clip it only while the menu is
   open, so nothing else is free to bleed out of the header the rest of the time.
   scripts/script.js sets .member-menu-open; the :has() rule is the CSS-only
   equivalent and must stay a separate rule (browsers without :has() throw away
   any selector list containing it). */
.site-header.member-menu-open {
  overflow: visible;
}
.site-header:has(.member-nav.open) {
  overflow: visible;
}

.member-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  z-index: 200;
  width: max-content;
  min-width: 250px;
  max-width: min(320px, calc(100vw - 2rem));
  padding: .45rem;
  text-align: left;
  border: 2px solid var(--gold-dark, #8a6420);
  border-radius: .5rem;
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), transparent),
    linear-gradient(180deg, #261034, #130820);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.55),
    0 12px 30px rgba(0,0,0,.65);
}

.member-menu[hidden] { display: none; }

.member-menu-hello {
  margin: .2rem .3rem .45rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid rgba(201,149,64,.32);
  color: #c8b8e8;
  font-size: .78rem;
  line-height: 1.35;
}

.member-menu-hello strong {
  display: block;
  color: var(--gold, #c89a43);
  font-size: 1rem;
}

/* Reset the .socials a { width:52px } sizing these links would otherwise inherit. */
.member-menu a,
.member-menu .member-menu-logout {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .55rem;
  border: none;
  border-radius: .3rem;
  background: none;
  box-shadow: none;
  color: #e8d8aa;
  font-family: inherit;
  font-size: .92rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.member-menu a:hover,
.member-menu a:focus-visible,
.member-menu .member-menu-logout:hover,
.member-menu .member-menu-logout:focus-visible {
  background: rgba(201,149,64,.16);
  color: #fff3d0;
  transform: none;       /* cancel the .socials a:hover lift */
  filter: none;
}

.member-menu .mm-icon {
  flex: 0 0 auto;
  width: 1.5rem;
  font-size: 1.1rem;
  text-align: center;
}

.member-menu .mm-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.member-menu .mm-text em {
  color: #a596c4;
  font-size: .74rem;
  font-style: normal;
}

.member-menu a.is-admin strong { color: #d9a6ff; }

.member-menu .member-menu-logout {
  margin-top: .35rem;
  padding-top: .6rem;
  border-top: 1px solid rgba(201,149,64,.32);
  border-radius: 0 0 .3rem .3rem;
  color: #ef9a90;
  font-weight: 700;
}

.member-menu .member-menu-logout:hover {
  background: rgba(192,57,43,.22);
  color: #ffc9c2;
}

/* On narrow screens the header stacks, so centre the menu under the plaque. */
@media (max-width: 900px) {
  .member-menu {
    right: 50%;
    transform: translateX(50%);
  }
}

/* ============================================================
   "Watch our Live Show" sign (videos.html)
   Replaces the old text button in the live panel, and doubles
   as the artwork on the Gobble Inn Live category card.
   ============================================================ */

/* The panel version is the link itself — no button chrome, just the sign. */
.live-show-sign {
  display: block;
  width: min(100%, 430px);
  margin-top: .2rem;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  transition: transform .2s ease, filter .2s ease;
}

.live-show-sign img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6));
}

.live-show-sign:hover,
.live-show-sign:focus-visible {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

/* The card version is a plain <img> so the card keeps exactly one <a> and the
   stretched-link rule above ( .card a:only-of-type::after ) keeps the WHOLE
   card clickable. Overrides the square 155x135 .card img box. */
.card .live-show-sign-img {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: .35rem;
}

@media (prefers-reduced-motion: reduce) {
  .live-show-sign {
    transition: none;
  }
  .live-show-sign:hover,
  .live-show-sign:focus-visible {
    transform: none;
  }
}

/* Whole-card link. The older `.card a:only-of-type::after` rule above never
   actually worked: `.card a` is `position: relative`, so the ::after's
   `inset: 0` resolved against the BUTTON, not the card. Taking the anchor out
   of the positioning flow lets the overlay size to `.card` (position: relative)
   and makes the entire card one click target. */
.card.card-linked {
  cursor: pointer;
}

.card.card-linked > a {
  position: static;
}

.card.card-linked > a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}
