/* ==========================================================
   SHRINE HALL — ETIQUETTE CARD FORMATTING + CONTRAST FIX
   ========================================================== */

.shrines-page .shrine-hall-banners {
  align-items: stretch;
}

.shrines-page .shrine-hall-banners .shrine-hall-card {
  min-height: auto;
}

/* Keep the dark card compact, balanced, and readable. */
.shrines-page .shrine-etiquette {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  grid-template-areas:
    "symbol heading"
    "copy copy";
  align-content: center;
  align-items: center;
  column-gap: clamp(1rem, 2.4vw, 1.45rem);
  row-gap: clamp(0.9rem, 2vw, 1.15rem);
  padding: clamp(1.45rem, 3.2vw, 2.35rem);
  color: #fff6ed;
  background:
    radial-gradient(
      circle at 16% 22%,
      rgba(218, 76, 118, 0.15),
      transparent 16rem
    ),
    radial-gradient(
      circle at 82% 74%,
      rgba(53, 3, 22, 0.42),
      transparent 21rem
    ),
    linear-gradient(
      145deg,
      #8b173b 0%,
      #67102f 47%,
      #49091f 100%
    );
  border: 1px solid rgba(79, 10, 34, 0.78);
  border-radius: 1.25rem 1.25rem 2rem 1.25rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 214, 0.11),
    inset 0 -16px 30px rgba(34, 2, 14, 0.22),
    0 18px 50px rgba(87, 21, 43, 0.18);
}

.shrines-page .shrine-etiquette::before {
  content: "";
  position: absolute;
  inset: 0.62rem;
  pointer-events: none;
  border: 1px solid rgba(255, 226, 214, 0.08);
  border-radius: 0.9rem 0.9rem 1.55rem 0.9rem;
}

.shrines-page .shrine-etiquette::after {
  content: "♡";
  position: absolute;
  right: 1rem;
  bottom: -1.5rem;
  color: rgba(255, 219, 221, 0.055);
  font-family: Georgia, serif;
  font-size: clamp(6rem, 16vw, 10rem);
  line-height: 1;
  transform: rotate(-12deg);
  pointer-events: none;
}

.shrines-page .shrine-etiquette .warning-symbol {
  grid-area: symbol;
  align-self: start;
  width: 4.25rem;
  height: 4.25rem;
  margin: 0;
  color: #e4b14e;
  background:
    radial-gradient(
      circle at 36% 30%,
      rgba(255, 224, 151, 0.08),
      transparent 48%
    ),
    rgba(67, 5, 26, 0.17);
  border-color: rgba(228, 177, 78, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 238, 195, 0.035),
    0 5px 12px rgba(34, 2, 13, 0.16);
  font-size: 1.8rem;
}

.shrines-page .shrine-etiquette .shrine-banner-heading {
  grid-area: heading;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.shrines-page .shrine-etiquette .shrine-banner-heading .eyebrow {
  margin: 0 0 0.45rem;
  color: rgba(255, 205, 217, 0.82);
}

.shrines-page .shrine-etiquette .shrine-banner-heading h2 {
  max-width: 11ch;
  margin: 0;
  color: #fff5e8;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 0.98;
  text-wrap: balance;
  text-shadow:
    0 2px 0 rgba(58, 3, 22, 0.42),
    0 6px 16px rgba(33, 2, 13, 0.18);
}

.shrines-page .shrine-etiquette .shrine-banner-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  padding-top: clamp(0.85rem, 2vw, 1.05rem);
  border-top: 1px solid rgba(255, 228, 217, 0.16);
}

/* This must override the later generic Shrine Hall paragraph rule. */
.shrines-page .shrine-etiquette .shrine-banner-copy p,
.shrines-page .shrine-etiquette p:not(.eyebrow) {
  max-width: 38rem;
  margin: 0;
  color: rgba(255, 242, 232, 0.88) !important;
  font-family: Georgia, serif;
  font-size: clamp(0.92rem, 1.35vw, 1.02rem);
  line-height: 1.72;
  text-wrap: pretty;
}

@media (max-width: 860px) {
  .shrines-page .shrine-hall-banners {
    grid-template-columns: 1fr;
  }

  .shrines-page .shrine-etiquette {
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .shrines-page .shrine-etiquette {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    padding: 1.25rem;
    border-radius: 1rem 1rem 1.5rem 1rem;
  }

  .shrines-page .shrine-etiquette .warning-symbol {
    width: 3.6rem;
    height: 3.6rem;
    font-size: 1.5rem;
  }

  .shrines-page .shrine-etiquette .shrine-banner-heading h2 {
    max-width: none;
    font-size: clamp(1.72rem, 9vw, 2.35rem);
  }

  .shrines-page .shrine-etiquette .shrine-banner-copy {
    padding-top: 0.8rem;
  }
}

/* ==========================================================
   SHRINE HALL — VINTAGE ROOM-KEY DIRECTORY
   ========================================================== */

.shrines-page .shrine-room-directory {
  position: relative;
  overflow: visible;
  align-self: center;
  justify-self: stretch;
  width: min(100%, 25rem);
  min-height: 0;
  margin-inline: auto;
  padding: clamp(1.2rem, 2.7vw, 1.65rem);
  background:
    linear-gradient(
      rgba(255, 248, 241, 0.92),
      rgba(250, 231, 222, 0.94)
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 23px,
      rgba(91, 52, 60, 0.045) 23px 24px
    );
  border: 1px solid rgba(108, 37, 57, 0.34);
  border-radius: 1rem 1rem 1.5rem 1rem;
  box-shadow:
    7px 9px 0 rgba(107, 48, 60, 0.11),
    0 18px 34px rgba(77, 24, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  transform: rotate(0.65deg);
}

.shrines-page .shrine-room-directory::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  pointer-events: none;
  border: 1px dashed rgba(157, 36, 63, 0.22);
  border-radius: 0.72rem 0.72rem 1.15rem 0.72rem;
}

.shrines-page .shrine-room-directory::after {
  content: "KEYS";
  position: absolute;
  right: 0.8rem;
  top: -0.72rem;
  padding: 0.26rem 0.5rem;
  color: #694327;
  background: linear-gradient(180deg, #ebc67e, #bd873b);
  border: 1px solid #8a5e20;
  border-radius: 0.28rem;
  box-shadow:
    2px 3px 0 rgba(92, 48, 20, 0.18),
    inset 0 1px 0 rgba(255, 247, 219, 0.55);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.shrines-page .room-directory-pin {
  position: absolute;
  z-index: 3;
  top: -0.65rem;
  left: 1.45rem;
  width: 1.05rem;
  height: 1.05rem;
  background:
    radial-gradient(circle at 35% 30%, #f3d28e, #b77929 68%);
  border: 2px solid #86591d;
  border-radius: 50%;
  box-shadow:
    0 3px 5px rgba(72, 36, 10, 0.28),
    inset 0 1px 0 rgba(255, 244, 207, 0.52);
}

.shrines-page .room-directory-heading {
  position: relative;
  z-index: 1;
  padding: 0.1rem 0.15rem 0.85rem;
  border-bottom: 1px dashed rgba(111, 50, 66, 0.25);
}

.shrines-page .room-directory-heading .eyebrow {
  margin-bottom: 0.35rem;
}

.shrines-page .room-directory-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.05;
}

.shrines-page .room-key-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem 0 0.75rem;
}

.shrines-page .room-key-entry {
  position: relative;
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem 0.72rem 0.75rem 0.62rem;
  color: var(--ink);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.48),
      rgba(255, 247, 240, 0.22)
    );
  border: 1px solid rgba(103, 39, 57, 0.19);
  border-radius: 0.72rem 0.72rem 0.95rem 0.72rem;
  box-shadow:
    3px 4px 0 rgba(92, 37, 52, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transform: translateZ(0);
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease,
    background 170ms ease;
}

.shrines-page .room-key-entry:hover,
.shrines-page .room-key-entry:focus-visible {
  border-color: rgba(157, 36, 63, 0.38);
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.7),
      rgba(255, 235, 232, 0.5)
    );
  box-shadow:
    5px 7px 0 rgba(92, 37, 52, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transform: translate(-2px, -2px) rotate(-0.18deg);
}

.shrines-page .room-key-entry:focus-visible {
  outline: 2px dashed rgba(157, 36, 63, 0.56);
  outline-offset: 0.22rem;
}

.shrines-page .room-key-hook {
  position: absolute;
  left: 1.58rem;
  top: -0.45rem;
  width: 0.48rem;
  height: 0.85rem;
  border: 2px solid #9a6b2a;
  border-bottom: 0;
  border-radius: 0.55rem 0.55rem 0 0;
  opacity: 0.8;
}

.shrines-page .room-key-tag {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.15rem;
  height: 2.1rem;
  color: #5b351c;
  background:
    radial-gradient(
      circle at 33% 28%,
      rgba(255, 246, 207, 0.56),
      transparent 38%
    ),
    linear-gradient(155deg, #ebc77c, #bd8437 70%);
  border: 1px solid #895b1e;
  border-radius: 0.72rem 0.72rem 0.72rem 0.28rem;
  box-shadow:
    2px 3px 0 rgba(102, 57, 18, 0.17),
    inset 0 1px 0 rgba(255, 247, 219, 0.56);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.shrines-page .room-key-ring {
  position: absolute;
  left: -0.38rem;
  top: 50%;
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid #956524;
  border-radius: 50%;
  background: #f5dc9b;
  box-shadow: inset 0 0 0 2px rgba(122, 72, 22, 0.11);
  transform: translateY(-50%);
}

.shrines-page .room-key-number {
  transform: translateX(0.08rem);
}

.shrines-page .room-key-copy {
  min-width: 0;
}

.shrines-page .room-key-copy strong,
.shrines-page .room-key-copy small {
  display: block;
}

.shrines-page .room-key-copy strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(0.98rem, 1.8vw, 1.17rem);
  line-height: 1.08;
}

.shrines-page .room-key-copy small {
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-size: 0.56rem;
  letter-spacing: 0.055em;
  line-height: 1.35;
  text-transform: uppercase;
}

.shrines-page .room-key-status {
  align-self: center;
  padding: 0.27rem 0.42rem;
  color: #8b2746;
  background: rgba(255, 219, 228, 0.66);
  border: 1px solid rgba(157, 36, 63, 0.16);
  border-radius: 999px;
  font-size: 0.52rem;
  line-height: 1;
  white-space: nowrap;
}

.shrines-page .mac-room-key .room-key-tag {
  background:
    radial-gradient(
      circle at 33% 28%,
      rgba(255, 246, 207, 0.56),
      transparent 38%
    ),
    linear-gradient(155deg, #e5bd75, #b87835 70%);
}

.shrines-page .emre-room-key .room-key-tag {
  background:
    radial-gradient(
      circle at 33% 28%,
      rgba(255, 252, 226, 0.58),
      transparent 38%
    ),
    linear-gradient(155deg, #ead49c, #b69b61 70%);
}

.shrines-page .room-directory-footer {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-top: 0.72rem;
  color: rgba(105, 55, 70, 0.72);
  border-top: 1px dashed rgba(111, 50, 66, 0.23);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 860px) {
  .shrines-page .shrine-room-directory {
    justify-self: start;
    width: min(100%, 30rem);
    margin-inline: 0;
  }
}

@media (max-width: 520px) {
  .shrines-page .shrine-room-directory {
    width: 100%;
    padding: 1.15rem 1rem;
    transform: none;
  }

  .shrines-page .room-key-entry {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .shrines-page .room-key-tag {
    width: 2.85rem;
  }

  .shrines-page .room-key-status {
    grid-column: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shrines-page .room-key-entry {
    transition: none;
  }
}

/* ==========================================================
   ROOM-KEY DIRECTORY — NARROW-COLUMN NAME FIT FIX
   ========================================================== */

/* The occupancy badge always sits beneath the copy instead of
   competing with names for horizontal room. */
.shrines-page .room-key-entry {
  grid-template-columns: 3.35rem minmax(0, 1fr) !important;
  grid-template-areas:
    "tag copy"
    "tag status";
  column-gap: 0.75rem;
  row-gap: 0.38rem;
}

.shrines-page .room-key-tag {
  grid-area: tag;
  align-self: center;
}

.shrines-page .room-key-copy {
  grid-area: copy;
  padding-right: 0.1rem;
}

.shrines-page .room-key-copy strong {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  font-size: clamp(0.92rem, 1.65vw, 1.12rem);
}

.shrines-page .room-key-copy small {
  max-width: 20ch;
}

.shrines-page .room-key-status {
  grid-area: status;
  justify-self: start;
  align-self: start;
  margin-top: 0.02rem;
}

/* The hooks remain centered above the brass tags. */
.shrines-page .room-key-hook {
  left: 1.48rem;
}

@media (max-width: 390px) {
  .shrines-page .shrine-room-directory {
    padding-inline: 0.82rem;
  }

  .shrines-page .room-key-entry {
    grid-template-columns: 2.75rem minmax(0, 1fr) !important;
    column-gap: 0.62rem;
    padding-inline: 0.5rem;
  }

  .shrines-page .room-key-tag {
    width: 2.65rem;
    height: 2rem;
  }

  .shrines-page .room-key-hook {
    left: 1.28rem;
  }

  .shrines-page .room-key-copy strong {
    font-size: 0.92rem;
  }

  .shrines-page .room-key-copy small {
    font-size: 0.51rem;
    letter-spacing: 0.035em;
  }

  .shrines-page .room-key-status {
    font-size: 0.49rem;
  }
}

/* ==========================================================
   ROOM-KEY DIRECTORY — FULL MACCREADY NAME
   ========================================================== */

/* Allow Robert MacCready to wrap only at the space between names,
   never inside MacCready itself. */
.shrines-page .mac-room-key .room-key-copy strong {
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
  max-width: 12ch;
}
