/* =========================================================
   Christmas Town Library — library.html, reindeer-rag.html,
   coloring-corner.html
   The Library's accent is pine (--pine, set in style.css),
   alongside the Post Office's cranberry, the Radio Station's
   frost and the Gift Shop's gold.
========================================================= */

/* =========================================================
   Venue frame (same pattern as the Post Office)
========================================================= */
.library-experience { padding: 2.2rem 0 3rem; }

.library-stage {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
}

.venue-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #0e1c17;
  box-shadow: 0 30px 60px -24px rgba(20, 36, 32, 0.5);
}

.venue-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.venue-view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.5s ease, visibility 0s;
}
.venue-view picture { display: block; width: 100%; height: 100%; }

.venue-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.7s ease;
}

.venue-hotspot {
  position: absolute;
  display: block;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease;
}
.venue-hotspot:hover,
.venue-hotspot:focus-visible,
.venue-hotspot.is-active { transform: scale(1.015); }
.venue-hotspot:focus-visible { outline: none; }

.venue-hotspot-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(228, 199, 122, 0);
  box-shadow: 0 0 0 0 rgba(228, 199, 122, 0);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.venue-hotspot:hover .venue-hotspot-glow,
.venue-hotspot:focus-visible .venue-hotspot-glow,
.venue-hotspot.is-active .venue-hotspot-glow {
  background: rgba(228, 199, 122, 0.16);
  box-shadow: 0 0 0 2px rgba(228, 199, 122, 0.55), 0 0 22px 4px rgba(228, 199, 122, 0.35);
}

/* Gentle pulse while the Librarian mentions each spot */
.venue-hotspot-glow.is-illuminated { animation: library-glow-pulse 2.2s ease-out; }
@keyframes library-glow-pulse {
  0%   { background: rgba(228, 199, 122, 0); box-shadow: 0 0 0 0 rgba(228, 199, 122, 0); }
  30%  { background: rgba(228, 199, 122, 0.22); box-shadow: 0 0 0 3px rgba(228, 199, 122, 0.6), 0 0 34px 10px rgba(228, 199, 122, 0.4); }
  100% { background: rgba(228, 199, 122, 0); box-shadow: 0 0 0 0 rgba(228, 199, 122, 0); }
}

/* "Click the Librarian to say hello" */
.library-hello {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(31, 65, 52, 0.88);
  color: var(--cream);
  border: 1px solid rgba(228, 199, 122, 0.45);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background-color 0.2s ease;
}
.library-hello svg { width: 15px; height: 15px; }
.library-hello:hover { background: rgba(31, 65, 52, 1); }
.library-hello.d-none { display: none; }

/* ---- Librarian caption ---- */
.library-caption {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 15;
  width: min(640px, calc(100% - 2rem));
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(20, 36, 32, 0.9);
  color: var(--cream);
  border: 1px solid rgba(228, 199, 122, 0.35);
  border-radius: 16px;
  padding: 0.85rem 0.9rem 0.85rem 1.2rem;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.library-caption[hidden] { display: none; }
.library-caption-text {
  flex: 1;
  margin: 0;
  max-width: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.45;
}
.library-caption-stop {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(246, 239, 227, 0.35);
  background: transparent;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.library-caption-stop svg { width: 12px; height: 12px; }
.library-caption-stop:hover { background: rgba(246, 239, 227, 0.12); }

/* ---- "Back outside" ---- */
.venue-back {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(20, 36, 32, 0.72);
  color: var(--cream);
  border: 1px solid rgba(228, 199, 122, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background-color 0.2s ease;
}
.venue-back svg { width: 15px; height: 15px; }
.venue-back:hover { background: rgba(20, 36, 32, 0.92); }
.venue-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---- Spotlight hotspots (same as the Post Office & Radio) ----
   Nothing shows on load. On hover/focus the rest of the photo dims,
   the area glows gold, and a "Click Here to…" label appears.
   .venue-frame has overflow:hidden, so the dimming stays inside. */
.venue-hotspot--spotlight {
  box-shadow: 0 0 0 200vmax rgba(10, 20, 17, 0);
  transition: box-shadow 0.3s ease;
}
.venue-hotspot--spotlight:hover,
.venue-hotspot--spotlight:focus-visible,
.venue-hotspot--spotlight.is-active {
  z-index: 2;
  transform: none;
  box-shadow: 0 0 0 200vmax rgba(10, 20, 17, 0.5);
}
.venue-hotspot--spotlight:hover .venue-hotspot-glow,
.venue-hotspot--spotlight:focus-visible .venue-hotspot-glow,
.venue-hotspot--spotlight.is-active .venue-hotspot-glow {
  background: rgba(228, 199, 122, 0.08);
  box-shadow:
    inset 0 0 0 3px rgba(228, 199, 122, 0.85),
    inset 0 0 40px 6px rgba(255, 236, 180, 0.3),
    0 0 34px 8px rgba(228, 199, 122, 0.5);
}

.venue-hotspot-label {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: max-content;
  pointer-events: none;
  background: var(--spruce);
  color: var(--cream);
  border: 2px solid var(--gold-light);
  border-radius: 999px;
  padding: 0.5em 1.2em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.76rem, 1.3vw, 1.1rem);
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
/* areas at the left / right edge keep their label inside the photo */
.venue-hotspot--label-start .venue-hotspot-label { left: 0.6rem; translate: 0 -50%; }
.venue-hotspot--label-end   .venue-hotspot-label { left: auto; right: 0.6rem; translate: 0 -50%; }
.venue-hotspot--spotlight:hover .venue-hotspot-label,
.venue-hotspot--spotlight:focus-visible .venue-hotspot-label {
  opacity: 1;
  transform: none;
}

/* The Transporter's styles live in transporter.css (shared by every venue). */

/* =========================================================
   Hotspot calibration view (library.html?hotspots=show)
========================================================= */
.show-hotspots .venue-hotspot { outline: 2px dashed #ffd54a; outline-offset: -2px; }
.show-hotspots .venue-hotspot::after {
  content: attr(data-hotspot);
  position: absolute;
  left: 4px;
  top: 4px;
  background: #ffd54a;
  color: #1a1a1a;
  font: 700 11px/1.2 var(--font-body);
  padding: 2px 6px;
  border-radius: 4px;
}

/* =========================================================
   Copy under the frame
========================================================= */
.library-intro {
  max-width: 640px;
  margin: 2rem auto 0;
  text-align: center;
}
.library-intro .dept-title { margin-bottom: 0.6rem; }
.library-intro .dept-copy { margin: 0 auto; }

.venue-note {
  margin: 0.8rem auto 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
  max-width: 64ch;
}
.venue-note code {
  background: rgba(46, 90, 70, 0.12);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.candy-divider--pine {
  background: repeating-linear-gradient(-45deg,
    var(--pine) 0px, var(--pine) 14px,
    var(--cream) 14px, var(--cream) 28px);
}

/* =========================================================
   Library page hero + rooms
========================================================= */
.library-hero {
  background: linear-gradient(180deg, var(--pine-tint) 0%, var(--cream) 60%);
  padding: 4.5rem 0;
}

/* The Librarian avatar is a button: clicking it plays the welcome */
.library-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  max-width: 340px;
  font: inherit;
  color: inherit;
}
.library-avatar-btn .avatar-gif {
  max-width: 320px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  transition: transform 0.25s ease;
}
.library-avatar-btn:hover .avatar-gif { transform: scale(1.02); }
/* Stand-in until the Librarian has an avatar: the library interior,
   framed like the other venue photos */
.library-avatar-btn .library-avatar-photo { aspect-ratio: 4 / 3; object-position: center; }
.library-avatar-btn .speech-bubble { max-width: 320px; text-align: center; }
.library-avatar-btn .speech-bubble.is-speaking { font-size: 0.92rem; }

.library-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 0;
}
.library-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1.5px solid rgba(46, 90, 70, 0.28);
  border-radius: 999px;
  padding: 0.4rem 0.95rem 0.4rem 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.library-chip:hover { border-color: var(--pine); transform: translateY(-2px); color: var(--ink); }
.library-chip svg { width: 15px; height: 15px; color: var(--pine); flex: none; }

.library-rooms { background: var(--cream); padding: 4.5rem 0 5.5rem; }

.library-room {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(46, 90, 70, 0.16);
  border-radius: 14px;
  padding: 1.6rem 1.6rem 1.5rem;
  color: var(--ink);
  transition: border-color 0.2s ease;
}
a.library-room:hover { border-color: var(--pine); color: var(--ink); }
.library-room p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.library-room-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.library-room-cta {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--pine);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.library-room--static { background: var(--pine-tint); }
.library-room-stops { margin: 0; padding-left: 1.3rem; }
.library-room-stops li { margin-bottom: 0.25rem; }
.library-room-stops a { color: var(--pine-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.library-room-stops li::marker { font-family: var(--font-display); color: var(--pine); }

/* =========================================================
   Shared sub-page hero (Reindeer Rag, Coloring Corner)
========================================================= */
.rag-hero,
.coloring-hero {
  background: linear-gradient(180deg, var(--pine-tint) 0%, var(--cream) 85%);
  padding: 2.5rem 0 3.5rem;
}

.library-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1.8rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pine-dark);
}
.library-back svg { width: 16px; height: 16px; }
.library-back:hover { color: var(--pine); }

.rag-title {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  max-width: 14ch;
}
.coloring-hero .rag-title { max-width: none; }

.rag-name-preview {
  background: #ffffff;
  border: 1px solid rgba(46, 90, 70, 0.18);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
}
.rag-name-preview .form-label { font-weight: 600; }
.rag-name-preview-note { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }

/* =========================================================
   Reindeer Rag — the 3 × 2 version grid
   Rows: Book / Song / Song and Book Set
   Columns: Standard / Personalized
========================================================= */
.rag-section { background: var(--cream); padding: 1rem 0 5.5rem; }

.rag-matrix-head,
.rag-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) 1fr 1fr;
  gap: 1.5rem;
}

.rag-matrix-head {
  padding-bottom: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--pine-dark);
}

.rag-row {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(46, 90, 70, 0.18);
  align-items: stretch;
}

.rag-row-label h3 { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.35rem; }
.rag-row-label p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

.rag-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(46, 90, 70, 0.16);
  border-radius: 14px;
  overflow: hidden;
}
.rag-card--personal { border-color: rgba(200, 155, 60, 0.55); }

.rag-art {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rag-card--personal .rag-art { background: #f6ecd6; }

.rag-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.2rem 1.2rem;
}
.rag-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.rag-card-tag { color: var(--ink-soft); font-size: 0.9rem; flex: 1; margin-bottom: 0.9rem; }
.rag-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.rag-price { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

.rag-order-btn {
  background: var(--pine);
  color: var(--cream);
  font-size: 0.9rem;
  padding: 0.55rem 1.2rem;
}
.rag-order-btn:hover { background: var(--pine-dark); color: var(--cream); }
.rag-card--personal .rag-order-btn { background: var(--cranberry); }
.rag-card--personal .rag-order-btn:hover { background: var(--cranberry-dark); }

.rag-footnote { margin: 2rem auto 0; text-align: center; color: var(--ink-soft); font-size: 0.95rem; }
.rag-footnote a { color: var(--pine-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Covers (pure CSS, so the name preview can live-update) ----
   Sized with container units so the same markup works on the card
   and as the small thumbnail in the order modal. */
.rag-cover {
  container-type: inline-size;
  position: relative;
  flex: none;
}

.rag-cover--book {
  height: 82%;
  aspect-ratio: 3 / 4;
  background: var(--pine-dark);
  color: var(--cream);
  border-radius: 3px 8px 8px 3px;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.22), 0 14px 26px -12px rgba(20, 36, 32, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
}
/* No padding on the cover itself: it is its own size container,
   so its children are kept off the edges with max-width instead. */
.rag-cover--book > * { max-width: 76cqi; }
.rag-cover--book::before {
  content: "";
  position: absolute;
  inset: 5cqi 5cqi 5cqi 8cqi;
  border: 1px solid rgba(228, 199, 122, 0.6);
  border-radius: 2px 5px 5px 2px;
  pointer-events: none;
}

.rag-antlers {
  width: 46cqi;
  margin-bottom: 5cqi;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rag-star { width: 22cqi; fill: var(--gold-light); stroke: none; }

.rag-cover-kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 7.5cqi;
  line-height: 1.2;
  color: rgba(246, 239, 227, 0.85);
}
.rag-cover-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14cqi;
  line-height: 1.02;
  margin-top: 1.5cqi;
}
.rag-cover-star {
  margin-top: 6cqi;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 7cqi;
  color: var(--gold-light);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.rag-cover-star b { font-style: normal; font-weight: 700; font-size: 8.5cqi; display: block; }

.rag-cover--crayon { background: var(--cranberry-dark); }
.rag-cover--town { background: var(--frost-dark); }
.rag-cover--town .rag-cover-title { font-size: 11cqi; }

/* Song: a record with a cranberry label */
.rag-cover--song {
  height: 76%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 21%, rgba(255, 255, 255, 0.05) 21.5% 22%, transparent 22.5%),
    repeating-radial-gradient(circle, #1d1d1b 0 1.5cqi, #2a2a27 1.5cqi 2.2cqi);
  box-shadow: 0 14px 26px -12px rgba(20, 36, 32, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rag-disc-label {
  width: 46%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--cranberry);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4cqi;
}
.rag-disc-title { font-family: var(--font-display); font-weight: 700; font-size: 6.5cqi; line-height: 1.05; }
.rag-disc-star { font-family: var(--font-display); font-style: italic; font-size: 4.5cqi; color: var(--gold-light); margin-top: 1.5cqi; overflow-wrap: anywhere; }
.rag-disc-star b { font-style: normal; display: block; font-size: 5.5cqi; }

/* Set: the record slides out from behind the book */
.rag-art--set .rag-cover--book { transform: translateX(-16%); z-index: 1; }
.rag-cover--behind {
  position: absolute;
  height: 64%;
  left: 50%;
  top: 50%;
  transform: translate(-6%, -50%);
}

/* =========================================================
   Coloring Corner
========================================================= */
.coloring-section { background: var(--cream); padding: 3.5rem 0 4.5rem; }
.coloring-section--books { padding-bottom: 5.5rem; }

.coloring-section-head { margin-bottom: 2rem; }
.coloring-section-head .dept-title { margin-bottom: 0.4rem; }

.sheet-card { margin: 0; }
.sheet-paper {
  aspect-ratio: 8.5 / 11;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(20, 36, 32, 0.08), 0 14px 28px -18px rgba(20, 36, 32, 0.45);
  padding: 6%;
  overflow: hidden;
}
.sheet-paper img { width: 100%; height: 100%; object-fit: contain; display: block; }

.sheet-card figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.sheet-name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.sheet-download {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  border-color: var(--pine);
  color: var(--pine-dark);
  background: transparent;
}
.sheet-download:hover { background: var(--pine); color: var(--cream); }

.coloring-print-tip { margin: 2rem 0 0; font-size: 0.88rem; color: var(--ink-soft); }

.coloring-books-row { max-width: 860px; margin-left: auto; margin-right: auto; }

/* =========================================================
   Order modal
========================================================= */
#orderModal .modal-dialog { max-width: 460px; }
#orderModal .modal-content { border-radius: 14px; border: none; }
#orderModal .modal-header { border-bottom: 1px solid rgba(46, 90, 70, 0.15); }
#orderModal .modal-title { font-family: var(--font-display); font-weight: 600; }
#orderModal fieldset[hidden],
#orderModal [data-show-if][hidden] { display: none; }

.order-preview {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--cream-2);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.2rem;
}
.order-preview-cover {
  flex: none;
  width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-preview-cover .rag-cover { height: auto; width: 100%; }
.order-preview-cover .rag-cover--book { transform: none; }
.order-preview-name { margin: 0; font-family: var(--font-display); font-weight: 600; }
.order-preview-sub { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }

.modal-field-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 1.1rem 0 0.6rem;
  float: none;
  width: auto;
  padding: 0;
}
#orderForm fieldset:first-of-type .modal-field-section-label { margin-top: 0; }

.modal-address-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
@media (max-width: 420px) { .modal-address-row { grid-template-columns: 1fr; } }

.qty-row { display: flex; align-items: center; gap: 0.9rem; }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(46, 90, 70, 0.3);
  border-radius: 999px;
  overflow: hidden;
}
.qty-stepper button {
  border: none;
  background: #fff;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.qty-stepper button:hover:not(:disabled) { background: var(--cream-2); }
.qty-stepper button:disabled { color: rgba(34, 32, 27, 0.3); cursor: default; }
.qty-stepper span { min-width: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty-line-total { color: var(--ink-soft); font-size: 0.9rem; }

.order-submit-btn { margin-top: 0.4rem; background: var(--cranberry); color: var(--cream); }
.order-submit-btn:hover { background: var(--cranberry-dark); color: var(--cream); }

.order-spinner { text-align: center; padding: 1.5rem 0; color: var(--ink-soft); }
.order-spinner .spinner-border { color: var(--pine); margin-bottom: 0.75rem; }

.order-success-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
#orderSuccessText { text-align: center; color: var(--ink-soft); margin: 0 auto 1.2rem; }
.order-again-btn { background: var(--pine); color: var(--cream); }
.order-again-btn:hover { background: var(--pine-dark); color: var(--cream); }

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 991.98px) {
  .rag-matrix-head { display: none; }
  .rag-row { grid-template-columns: 1fr 1fr; }
  .rag-row-label { grid-column: 1 / -1; }
}

@media (max-width: 767.98px) {
  .library-experience { padding-top: 1rem; }
  .venue-frame { border-radius: 12px; }
  .venue-hotspot { min-width: 40px; min-height: 40px; }

  .library-hello { top: 0.5rem; right: 0.5rem; padding: 0.35rem 0.75rem; font-size: 0.74rem; }

  /* Caption moves below the (small) picture instead of covering it */
  .library-caption {
    position: static;
    transform: none;
    width: auto;
    margin-top: 0.8rem;
  }
  .library-caption-text { font-size: 0.98rem; }


  .library-hero { padding: 3rem 0; }
  .library-avatar-btn .avatar-gif { max-width: 240px; }
}

@media (max-width: 520px) {
  .rag-row { grid-template-columns: 1fr; }
}
/* =========================================================
   Reindeer Rag — product groups with the real cover art
   (replaces the old 3 × 2 matrix)
========================================================= */
.rag-group {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(46, 90, 70, 0.18);
}
.rag-group-head { margin-bottom: 1.25rem; }
.rag-group-head h3 { font-size: 1.45rem; font-weight: 600; margin-bottom: 0.35rem; }
.rag-group-head p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

.rag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* two cards per row */
  gap: 1.75rem;
}
@media (max-width: 575.98px) { .rag-grid { grid-template-columns: 1fr; } }

/* Book and song cards: the whole image, edge to edge, in its own shape */
.rag-art--full {
  display: block;
  aspect-ratio: auto;
  padding: 0;
}
.rag-art--full .rag-cover {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  box-shadow: none;
  border-radius: 0;
  transform: none;
}
.rag-art--full .rag-cover--book-img::after { display: none; }
.rag-art--full .rag-cover img {
  width: 100%;
  height: auto;
  object-fit: initial;
}

/* Image covers */
.rag-cover--book-img,
.rag-cover--album {
  overflow: hidden;
  box-shadow: 0 14px 26px -12px rgba(20, 36, 32, 0.6);
}
.rag-cover--book-img img,
.rag-cover--album img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rag-cover--book-img {
  height: 86%;
  aspect-ratio: 1232 / 1390;   /* the front cover's own shape */
  border-radius: 3px 8px 8px 3px;
}
.rag-cover--book-img::after {   /* spine shading */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4%;
  background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0));
  pointer-events: none;
}
.rag-cover--album {
  height: 82%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
}

/* Set: the song art peeks out from behind the book */
.rag-art--set .rag-cover--book-img { transform: translateX(-14%); z-index: 1; }
.rag-art--set .rag-cover--album.rag-cover--behind {
  height: 66%;
  transform: translate(-4%, -50%) rotate(4deg);
}

/* Name ribbon on the personalized covers (live-updates with the preview) */
.rag-name-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6cqi;
  margin: 0 auto;
  width: max-content;
  max-width: 88cqi;
  padding: 1.6cqi 4.5cqi;
  border-radius: 999px;
  background: rgba(20, 36, 32, 0.88);
  border: 1px solid var(--gold-light);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 5.5cqi;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.6);
}
.rag-name-ribbon b { font-style: normal; font-weight: 700; font-size: 6.5cqi; color: var(--cream); }

/* "starring / for <name>" line under the card title (live-updates with the preview) */
.rag-card-name {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--cranberry);
}
.rag-card-name b { font-style: normal; font-weight: 700; color: var(--ink); }

/* Order modal thumbnail */
.order-preview-cover .rag-cover--book-img,
.order-preview-cover .rag-cover--album { height: auto; width: 100%; transform: none; }
.order-preview-cover .rag-name-ribbon { display: none; }