/* Guide-page pop-up (js/guide-popup.js). Same packing-slip look as guide.css: paper, 2px ink, tape, Geist.
   A small card bottom-right on desktop, a bottom sheet on phones; never covers the whole guide.
   The card itself never scrolls (so the tape can stick out over its top edge); .gp-in scrolls if a screen is very short. */
.gp { position: fixed; z-index: 60; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 24px)); box-sizing: border-box;
  display: flex; flex-direction: column; max-height: calc(100vh - 48px); background: var(--paper, #fbfaf5); color: var(--ink, #1d1a1f);
  border: 2px solid var(--ink, #1d1a1f); border-radius: 18px; box-shadow: 7px 7px 0 var(--ink, #1d1a1f);
  padding: 26px 0 0; font-family: 'Geist', system-ui, sans-serif; overflow-wrap: break-word;
  transform: translateY(calc(100% + 60px)); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.25,1.15), opacity .3s; }
.gp.open { transform: none; opacity: 1; }
.gp *, .gp *::before, .gp *::after { box-sizing: border-box; }
.gp-in { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 14px; min-height: 0; }
.gp-tape { position: absolute; top: 0; left: 18px; transform: translateY(-50%) rotate(-2deg); background: var(--tape, #ffd23f);
  border: 2px solid var(--ink, #1d1a1f); padding: 3px 12px; font-weight: 900; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.gp-x { position: absolute; top: 8px; right: 10px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink, #1d1a1f);
  background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink, #1d1a1f); padding: 0; }
.gp-x:hover { background: var(--tape, #ffd23f); }
.gp-head { display: flex; gap: 12px; align-items: center; margin: 0 34px 8px 0; }
.gp-pg { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--ink, #1d1a1f); background: var(--note, #fff1a6); object-fit: cover; }
.gp-title { margin: 0; min-width: 0; font-size: 1.12rem; line-height: 1.22; font-weight: 900; letter-spacing: -.01em; }
.gp-sub { margin: 0 0 12px; font-size: .9rem; line-height: 1.45; color: var(--ink-soft, #4a4450); }
.gp-hero { display: block; border: 2px solid var(--ink, #1d1a1f); border-radius: 12px; overflow: hidden; aspect-ratio: 1200 / 630; background: var(--kraft, #c99a62); }
.gp-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; transition: transform .3s; }
.gp-hero:hover img { transform: scale(1.03); }
.gp-hero { position: relative; }
.gp-hero-label { position: absolute; left: 10px; bottom: 10px; background: var(--paper, #fbfaf5); color: var(--ink, #1d1a1f);
  border: 1.5px solid var(--ink, #1d1a1f); border-radius: 100px; padding: 3px 10px; font-size: .72rem; font-weight: 800; }
.gp-strip { display: flex; gap: 6px; align-items: center; margin: 8px 0 12px; }
.gp-strip img { width: 46px; aspect-ratio: 16 / 10; object-fit: cover; border: 1.5px solid var(--ink, #1d1a1f); border-radius: 6px; }
.gp-strip span { font-size: .72rem; font-weight: 800; color: var(--ink-soft, #4a4450); white-space: nowrap; }
.gp-quote { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; background: #fff;
  border: 1.5px dashed var(--rule, #c9bfae); border-radius: 12px; }
.gp-quote > div { min-width: 0; }
.gp-quote img { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ink, #1d1a1f); object-fit: cover; }
.gp-quote blockquote { margin: 0 0 3px; padding: 0; border: 0; font-size: .84rem; line-height: 1.4; font-style: italic; }
.gp-quote figcaption { font-size: .74rem; color: var(--ink-soft, #4a4450); }
.gp-cta { display: block; text-align: center; background: var(--ink, #1d1a1f); color: var(--paper, #fbfaf5) !important; text-decoration: none;
  font-weight: 800; font-size: 1rem; padding: 13px 16px; border-radius: 100px; border: 2px solid var(--ink, #1d1a1f); box-shadow: 0 4px 0 var(--kraft-deep, #a8783f); }
.gp-cta:hover { background: var(--tape, #ffd23f); color: var(--ink, #1d1a1f) !important; }
.gp-later { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--ink-soft, #4a4450); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; }
/* Phones: a bottom sheet, kept short so the guide stays visible above it. No strip; a wider, shorter thumbnail. */
@media (max-width: 560px) {
  .gp { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: calc(100vh - 90px); padding-top: 24px; box-shadow: 4px 4px 0 var(--ink, #1d1a1f); }
  .gp-in { padding: 0 14px 10px; }
  .gp-head { gap: 10px; margin-bottom: 6px; }
  .gp-pg { width: 46px; height: 46px; }
  .gp-title { font-size: 1rem; }
  .gp-sub { font-size: .84rem; margin-bottom: 10px; }
  .gp-hero { aspect-ratio: 1200 / 480; }
  .gp-hero img { object-position: center bottom; }   /* the course name sits at the bottom of every thumbnail */
  .gp-strip { display: none; }
  .gp-quote { margin: 10px 0 12px; padding: 8px 10px; }
  .gp-quote blockquote { font-size: .8rem; }
  .gp-cta { padding: 12px 14px; }
  .gp-later { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .gp { transition: opacity .2s; transform: none; } }
