/* The Bestiary page. The map deck pages' layout (copied, so neither page links the other's files) in this deck's own
   colours, read off its box and cards: parchment, woodcut ink, the red of its lions and griffins, the green of its
   damask and the gold of its plates. */

body.bs-page { background: #F0E4C4; }

/* on the body too, so the buy drawer (appended to <body>) takes the page's colours */
body.bs-page, .bs {
  --paper: #F0E4C4;
  --paper-2: #E4D5AE;
  --ink: #2B231D;
  --ink-2: #433832;
  --ink-3: #62564C;
  --line: rgba(43, 35, 29, 0.16);
  --card: #F7EDD3;
  --accent: #A33215;
  --accent-press: #862910;
  --accent-ink: #FFFFFF;
  --field: #385643;
  --rule: #A33215;
  --gold: #87794B;
  color: var(--ink);
}
@media (min-width: 1024px) { .bs { --page: 1180px; } }
.bs a:not(.btn) { color: inherit; }
.bs [hidden] { display: none !important; }   /* a hidden flex box (the price row) hides too */

/* --- The product picture first (box, deck and fanned cards) ------------------------------- */
.bs-product { margin: var(--s3) 0 0; }
.bs-product img { display: block; width: 100%; height: auto; border-radius: var(--radius-m);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }

/* --- Hero ------------------------------------------------------------------------------ */
.m-hero { padding: var(--s5) 0 var(--s4); max-width: 46rem; }
.m-kicker {
  margin: 0 0 var(--s3); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--field);
}
.m-title {
  margin: 0 0 var(--s4); font-family: var(--font-display); font-weight: 600; font-size: 2rem;
  line-height: 1.08; letter-spacing: 0.01em; text-wrap: balance;
}
.m-pitch { margin: 0 0 var(--s4); font-size: var(--text-l); line-height: 1.5; color: var(--ink-2); }
/* hb-yujig / hb-7ufxl: the pitch sits under Buy, so a phone's first screen shows the deck, its price and Buy */
#buy ~ .m-pitch { margin-top: var(--s4); }
.bs-about p { max-width: 40rem; margin: 0; font-size: var(--text-l); line-height: 1.55; color: var(--ink-2); }
.bs-about { padding-bottom: var(--s6); }

/* --- Sections -------------------------------------------------------------------------- */
.m-block { padding: var(--s8) 0 var(--s4); border-top: 1px solid var(--line); }
.m-h2 {
  margin: 0 0 var(--s4); font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl);
  letter-spacing: 0.02em;
}
.m-h2::after { content: ""; display: block; width: 44px; height: 2px; margin-top: var(--s2); background: var(--rule); }
.m-note { margin: var(--s4) 0 0; color: var(--ink-2); }
.m-specs { margin: 0; padding: 0 0 0 1.2em; line-height: 1.5; }
.m-specs li { margin-bottom: var(--s2); }
.m-specs li::marker { color: var(--rule); }

/* --- The box --------------------------------------------------------------------------- */
.bs-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 46rem; }
.bs-box figure { margin: 0; }
.bs-box img { display: block; width: 100%; height: auto; border-radius: var(--radius-s); }
.bs-caption { max-width: 40rem; margin: var(--s3) 0 0; font-family: var(--font-display); font-size: var(--text-l); text-wrap: balance;
  line-height: 1.4; }

/* --- A few of the cards ------------------------------------------------------------------ */
.m-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4) var(--s3); }
.m-cards li { min-width: 0; }
.m-cards a { display: block; border-radius: 4.7%/3.4%; }
.m-cards img {
  display: block; width: 100%; height: auto; border-radius: 4.7%/3.4%;
  box-shadow: 0 1px 2px rgba(43, 35, 29, 0.12), 0 6px 14px rgba(43, 35, 29, 0.16);
  transition: transform var(--dur-1) var(--ease-out);
}
.m-cards a:hover img { transform: translateY(-3px); }
.m-cards span { display: block; margin-top: var(--s2); font-size: var(--text-xs); line-height: 1.3; color: var(--ink-2); }
/* every card on one sheet, behind a link under the few */
.bs-sheet { margin: var(--s5) 0 0; }
.bs-sheet a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }

/* --- The viewer (cards and the sheet) ------------------------------------------------------ */
.m-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(30, 25, 21, 0.95); color: #F0E4C4;
}
.m-viewer[open] { display: flex; align-items: center; justify-content: center; }
.m-viewer::backdrop { background: transparent; }
.m-viewer figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.m-viewer img { display: block; max-width: 94vw; max-height: calc(100dvh - 120px); width: auto; height: auto;
  border-radius: var(--radius-s); }
/* the sheet opens at full height and pans sideways, so a phone can read the cards */
.m-viewer.is-wide figure { max-width: 100vw; overflow-x: auto; align-items: flex-start; }
.m-viewer.is-wide img { max-width: none; max-height: none; height: min(78dvh, 1070px); border-radius: 0; }
.m-viewer.is-wide figcaption { position: sticky; left: 0; }
.m-viewer figcaption { font-family: var(--font-display); font-size: var(--text-l); text-align: center; padding: 0 var(--s4); }
.m-viewer button {
  position: absolute; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%;
  background: rgba(240, 228, 196, 0.14); color: #F0E4C4; font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.m-close { top: calc(var(--s3) + var(--safe-top)); right: var(--s3); }
.m-prev, .m-next { top: 50%; transform: translateY(-50%); }
.m-prev { left: var(--s2); }
.m-next { right: var(--s2); }

/* --- Buy: price, button, terms ---------------------------------------------------------- */
.p-price { margin: 0 0 var(--s3); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.p-price .display { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); }
.p-price-note { color: var(--ink-2); }
.p-extra { margin: calc(-1 * var(--s2)) 0 var(--s3); font-weight: 600; }   /* "Add a second deck, $25" (I-1189 B) */
.p-ships { margin: calc(-1 * var(--s1)) 0 var(--s3); font-size: var(--text-s); line-height: 1.3; color: var(--ink-2); }   /* the ship line above Buy (fold-1119) */
.p-buy { min-height: 52px; display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s4); }
.p-buy .buy-row { max-width: 26rem; }
.p-buy .pv-notify { max-width: 26rem; }
.p-buy .pv-notify .nl-label { display: block; font-weight: 600; margin-bottom: var(--s2); text-align: left; color: var(--ink-2); }
.p-buy .pv-notify .field { flex: 1; min-width: 0; }
.p-buy .pv-notify .nl-msg { text-align: left; }
.p-terms {
  max-width: 34rem; margin: 0 0 var(--s4); padding: var(--s4) var(--s5); border: 2px solid var(--field);
  border-radius: var(--radius-s); background: var(--card); line-height: 1.5;
}
.p-terms[hidden] { display: none; }
.p-terms h2 { margin: 0 0 var(--s2); font-family: var(--font-display); font-weight: 600; font-size: var(--text-l); }
.p-terms ul { margin: 0; padding: 0 0 0 1.2em; }
.p-terms li { margin-bottom: var(--s1); }
.p-terms li::marker { color: var(--field); }
.p-thanks {
  max-width: 34rem; margin: 0 0 var(--s4); padding: var(--s4); border-radius: var(--radius-s);
  background: var(--paper-2); border-left: 3px solid var(--field);
}
.p-thanks strong { display: block; font-family: var(--font-display); font-size: var(--text-l); margin-bottom: var(--s1); }
.p-thanks p { margin: var(--s1) 0 0; font-size: var(--text-s); color: var(--ink-2); }
.p-drawer-terms { margin: 0 0 var(--s3); font-size: var(--text-s); color: var(--ink-2); line-height: 1.45; }
/* one price at any quantity: the drawer's price-break tiles would show a single tile */
body.bs-page .buy-sheet .qp-breaks { display: none; }
/* The button label and its price overflow the button on a 360 px phone: a smaller label there */
@media (max-width: 400px) { .p-buy .buy-cta { padding: 0 var(--s3); font-size: var(--text-m); } }

@media (min-width: 560px) {
  .m-cards { grid-template-columns: repeat(4, 1fr); }
  .m-cards span { font-size: var(--text-s); }
}
@media (min-width: 1024px) {
  .bs-product { max-width: 780px; margin: var(--s6) auto 0; }   /* first on the page: the map pages' width, so Buy stays near the top */
  .p-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s10); align-items: start;
    padding: var(--s8) 0; }
  .p-top .m-hero { padding: 0; }
  .bs-about { padding: var(--s8) 0 0; }
  .m-title { font-size: var(--text-3xl); }
  .m-h2 { font-size: var(--text-2xl); }
  .m-cards { grid-template-columns: repeat(7, 1fr); gap: var(--s6) var(--s5); }
  .m-block { padding: var(--s10) 0 var(--s6); }
  .m-prev { left: var(--s8); }
  .m-next { right: var(--s8); }
}

/* the second Buy at the end of the page (qualia #27071) */
.p-end { border-top: 1px solid var(--rule); padding-top: var(--s5); }
.p-end .p-end-price { margin: 0 0 var(--s1); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.p-end-price .display { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); }
.p-end .p-ships-end { margin: 0 0 var(--s3); color: var(--ink-2); }
.p-end .p-buy { margin-bottom: 0; }
