/* The Cape Cod Map Deck page. The Forty-Eight page's layout (copied, so neither page
   links the other's files) in the map's own colours: cream paper, navy ink, road red, sea green. */

body.cc-page { background: #F2EBDA; }

/* on the body too, so the buy drawer (appended to <body>) takes the page's red */
body.cc-page, .cc {
  --paper: #F2EBDA;
  --paper-2: #E8DEC6;
  --ink: #1F2A44;
  --ink-2: #3D4660;
  --ink-3: #5E6478;
  --line: rgba(31, 42, 68, 0.16);
  --card: #FBF7EC;
  --accent: #B8312A;
  --accent-press: #9C2822;
  --accent-ink: #FFFFFF;
  --road: #B8312A;
  --sea: #9CC5BC;
  color: var(--ink);
}
@media (min-width: 1024px) { .cc { --page: 1180px; } }
.cc a:not(.btn) { color: inherit; }
.cc [hidden] { display: none !important; }   /* a hidden flex box (the price row) hides too */

/* --- The 52 faces laid out: the first picture ------------------------------------------- */
/* the product picture first (box, deck and fanned cards), then the 52-card map under Buy */
.cc-product { margin: var(--s3) 0 0; }
.cc-product img { display: block; width: 100%; height: auto; border-radius: var(--radius-m);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
.cc-layout { margin: var(--s3) calc(-1 * var(--gutter, var(--s5))) 0; }   /* full width on a phone */
.cc-layout a { display: block; }
.cc-layout img { display: block; width: 100%; height: auto; }
.cc-layout figcaption { margin: var(--s2) var(--gutter, var(--s5)) 0; font-size: var(--text-s); color: var(--ink-3); }

/* --- 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(--road);
}
.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); }
.cc-about p { max-width: 40rem; margin: 0; font-size: var(--text-l); line-height: 1.55; color: var(--ink-2); }
.cc-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(--road); }
.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(--road); }

/* --- The box --------------------------------------------------------------------------- */
.cc-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 46rem; }
.cc-box figure { margin: 0; }
.cc-box img { display: block; width: 100%; height: auto; border-radius: var(--radius-s); }
.cc-caption { max-width: 40rem; margin: var(--s3) 0 0; font-family: var(--font-display); font-size: var(--text-l);
  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(20, 30, 50, 0.12), 0 6px 14px rgba(20, 30, 50, 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); }

/* --- The viewer (cards and the layout) ------------------------------------------------------ */
.m-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(16, 22, 36, 0.92); color: #F2EBDA;
}
.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 layout 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(242, 235, 218, 0.14); color: #F2EBDA; 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); }

/* --- Pre-order: 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-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(--road);
  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(--road); }
.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(--road);
}
.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 "$30 1+" */
body.cc-page .buy-sheet .qp-breaks { display: none; }
/* "Pre-order this deck · $30" overflows its button on a 360 px phone: a smaller label there */
/* Phones: the "tap the map" line sits on the map's empty top-left corner, not under it, so the whole
   Buy button is on the first screen of a 650 px phone (hb-0l1fe: Buy's bottom was at 632-663 px). */
@media (max-width: 1023px) {
  .cc-layout { position: relative; }
  .cc-layout figcaption { position: absolute; top: var(--s3); left: var(--gutter, var(--s5)); margin: 0;
    padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.88); color: var(--ink-2);
    font-size: var(--text-xs); pointer-events: none; }
  .m-hero { padding-top: var(--s4); }
}
@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) {
  .cc-product { max-width: 780px; margin: var(--s6) auto 0; }
  .cc-layout { max-width: 780px; margin: var(--s6) auto 0; }   /* first on the page (qualia #21132): the box shot's width, so Buy stays near the top */
  .cc-layout img { border-radius: var(--radius-s); box-shadow: 0 0 0 1px var(--line), var(--shadow-1); }
  .cc-layout figcaption { margin: var(--s2) 0 0; }
  .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; }
  .cc-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); }
}
