/* ==========================================================================
   Rihla — learn by journey (rihla.css)
   history.howtomuslim.org : /rihla/  and  /rihla/rightly-guided-caliphs/

   Loads AFTER pf.css. Owns rh- classes only. Never styles htm-/wtn-/cta-/
   footer- and never redefines the chrome's tokens.

   Visual language: a traveller's journal and passport on parchment, a
   dusk-coloured map, ticket stubs, rubber stamps in Silk Road inks and a
   camel (never a rider) that walks the dotted route.

   Contents
     1  Sprite + shared bits          7  Map, pins, camel token
     2  Hub hero                       8  Itinerary (stop list)
     3  How it works                   9  Passport sidebar / bottom sheet
     4  Journey tickets               10  Stop dialog + quiz + stamp slam
     5  Passport band                 11  Flyer, toast, certificate
     6  Game hero + layout            12  Responsive + reduced motion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Sprite + shared bits
   -------------------------------------------------------------------------- */
.rh-sprite{ position:absolute; width:0; height:0; overflow:hidden; }

.rh-bar{
  position:relative; height:10px; border-radius:999px; overflow:hidden;
  background:var(--pf-sand-deep); box-shadow:inset 0 1px 2px rgba(92,62,24,.14);
}
.rh-bar > span{
  display:block; height:100%; width:0; border-radius:inherit;
  background:linear-gradient(90deg, var(--pf-gold) 0%, var(--pf-ember) 100%);
  transition:width .9s var(--pf-ease);
}
/* six faint notches, one per stop */
.rh-bar::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:repeating-linear-gradient(90deg, transparent 0 calc(100%/6 - 2px), rgba(255,253,247,.75) calc(100%/6 - 2px) calc(100%/6));
}

/* Rubber stamp drawn by rihla.js (inline SVG, colour = currentColor) */
.rh-stamp-svg{ display:block; width:100%; height:auto; rotate:var(--rh-tilt, -6deg); overflow:visible; }
.rh-st-arc{ font-family:var(--pf-font-head); font-weight:700; letter-spacing:.14em; fill:currentColor; }
.rh-st-num{ font-family:var(--pf-font-serif); font-weight:700; fill:currentColor; }

/* Stamp slots (hub passport + game sidebar) */
.rh-slots{ list-style:none; margin:0; padding:0; display:grid; gap:14px 12px; }
.rh-slot{ display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; min-width:0; }
.rh-slot-ring{
  position:relative; display:grid; place-items:center; width:100%; max-width:96px; aspect-ratio:1;
  border-radius:50%; border:2px dashed var(--pf-line-strong); background:rgba(255,253,247,.55);
}
.rh-slot-num{ font-family:var(--pf-font-serif); font-weight:600; font-size:1.5rem; color:var(--pf-line-strong); line-height:1; }
.rh-slot.is-filled .rh-slot-ring{ border-color:transparent; background:transparent; }
.rh-slot.is-filled .rh-stamp-svg{ position:absolute; inset:0; }
.rh-slot.is-new .rh-stamp-svg{ animation:rh-ink .7s var(--pf-ease) both; }
.rh-slot-name{
  font-family:var(--pf-font-head); font-weight:700; font-size:.64rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--pf-ink-soft); line-height:1.25;
}
.rh-slot.is-filled .rh-slot-name{ color:var(--pf-ink); }

.rh-ico{ width:1em; height:1em; flex:none; display:inline-block; vertical-align:-.12em; }


/* --------------------------------------------------------------------------
   2. Hub hero
   -------------------------------------------------------------------------- */
.rh-hero .pf-display{ max-width:17ch; }
.rh-hero .pf-lead{ max-width:46ch; color:var(--pf-night-text); }
.rh-hero .pf-lockup{ margin-bottom:22px; }
.rh-hero .pf-hero-art{ max-width:600px; justify-self:end; width:100%; }
.rh-swing{ transform-box:fill-box; transform-origin:50% 50%; animation:rh-swing 7s var(--pf-ease) infinite; }


/* --------------------------------------------------------------------------
   3. How it works
   -------------------------------------------------------------------------- */
.rh-steps{
  list-style:none; margin:0; padding:0; position:relative;
  display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:clamp(20px, 3vw, 40px);
}
.rh-steps::before{
  content:""; position:absolute; z-index:0; top:62px; left:12.5%; right:12.5%; height:4px;
  background:radial-gradient(circle, var(--pf-dune-deep) 1.7px, transparent 2.1px) 0 50% / 13px 4px repeat-x;
}
.rh-step{ position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; text-align:center; }
.rh-step-disc{
  position:relative; width:124px; height:124px; border-radius:50%; display:grid; place-items:center;
  background:var(--rh-disc, var(--pf-star)); border:2.5px solid var(--pf-ink);
  box-shadow:6px 7px 0 -1px rgba(38,43,68,.92);
}
.rh-step-disc svg{ width:84px; height:84px; display:block; overflow:visible; }
.rh-step-num{
  position:absolute; top:-6px; left:-8px; width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center; background:var(--pf-gold); color:var(--pf-ink);
  border:2.5px solid var(--pf-ink); font-family:var(--pf-font-serif); font-weight:700; font-size:1rem; line-height:1;
}
.rh-step-title{ font-family:var(--pf-font-head); font-weight:700; font-size:1.22rem; color:var(--pf-ink); margin:24px 0 8px; }
.rh-step p{ margin:0; font-size:.97rem; line-height:1.55; color:var(--pf-ink-soft); max-width:25ch; }


/* --------------------------------------------------------------------------
   4. Journey tickets
   -------------------------------------------------------------------------- */
.rh-journeys{ --rh-notch:var(--pf-sand-light); }

/* Featured, playable journey: a ticket with a tear-off stub */
.rh-ticket{
  --rh-stub:330px;
  position:relative; display:grid; grid-template-columns:minmax(0, 1fr) var(--rh-stub);
  background:var(--pf-card); border-radius:28px;
  box-shadow:0 0 0 1.5px var(--pf-line), 0 30px 60px -34px rgba(92,62,24,.55);
  margin-bottom:clamp(48px, 6vw, 72px);
}
.rh-ticket::before, .rh-ticket::after{
  content:""; position:absolute; z-index:3; left:calc(100% - var(--rh-stub)); width:36px; height:36px;
  border-radius:50%; background:var(--rh-notch); translate:-50% 0;
}
.rh-ticket::before{ top:-18px; }
.rh-ticket::after{ bottom:-18px; }
.rh-ticket-main{ position:relative; padding:clamp(26px, 4vw, 44px) clamp(22px, 4vw, 48px) clamp(26px, 3.4vw, 40px); min-width:0; }
.rh-ticket-top{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; margin-bottom:22px; }
.rh-open{
  display:inline-flex; align-items:center; gap:7px; font-family:var(--pf-font-head); font-weight:700;
  font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color:var(--pf-oasis-deep);
}
.rh-open::before{
  content:""; width:9px; height:9px; border-radius:50%; background:var(--pf-oasis);
  box-shadow:0 0 0 4px rgba(42,112,80,.18); animation:pf-glowpulse 2.4s ease-in-out infinite;
}
.rh-ticket-title{
  font-family:var(--pf-font-head); font-weight:700; font-size:clamp(1.7rem, 3.4vw, 2.5rem);
  line-height:1.08; letter-spacing:-.02em; color:var(--pf-ink); margin:0; text-wrap:balance;
}
.rh-ticket-ar{
  font-family:var(--pf-font-arabic); font-size:1.55rem; line-height:1.4; color:var(--pf-era-1);
  margin:6px 0 14px;
}
.rh-ticket-text{ font-size:1.04rem; line-height:1.6; color:var(--pf-ink-soft); max-width:54ch; margin:0 0 26px; }

/* six-stop mini route */
.rh-mini{
  list-style:none; margin:0 0 30px; padding:0; position:relative;
  display:grid; grid-template-columns:repeat(6, minmax(0, 1fr));
}
.rh-mini::before{
  content:""; position:absolute; top:9px; left:calc(100% / 12); right:calc(100% / 12); height:4px;
  background:radial-gradient(circle, var(--pf-dune-deep) 1.5px, transparent 1.9px) 0 50% / 10px 4px repeat-x;
}
.rh-mini li{ position:relative; display:flex; flex-direction:column; align-items:center; gap:9px; text-align:center; min-width:0; }
.rh-mini-dot{
  position:relative; width:22px; height:22px; border-radius:50%; background:var(--pf-card);
  border:2.5px dashed var(--pf-ink-soft);
}
.rh-mini li.is-done .rh-mini-dot{ border:2.5px solid var(--pf-ink); background:var(--pf-era-1); }
.rh-mini li.is-done .rh-mini-dot::after{
  content:""; position:absolute; left:5px; top:3px; width:5px; height:9px;
  border:solid #fff; border-width:0 2.2px 2.2px 0; rotate:42deg;
}
.rh-mini li.is-current .rh-mini-dot{ border:2.5px solid var(--pf-ink); background:var(--pf-gold); box-shadow:0 0 0 5px rgba(245,184,65,.3); }
.rh-mini-label{ font-family:var(--pf-font-head); font-weight:700; font-size:.68rem; letter-spacing:.04em; color:var(--pf-ink-soft); line-height:1.25; }

.rh-ticket-foot{
  display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:18px 28px;
  padding-top:24px; border-top:1.5px dashed var(--pf-line-strong);
}
.rh-progress{ flex:1 1 220px; max-width:360px; }
.rh-progress-row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:9px; }
.rh-progress-label{ font-family:var(--pf-font-head); font-weight:700; font-size:.72rem; letter-spacing:.14em; text-transform:uppercase; color:var(--pf-ink-soft); }
.rh-progress-num{ font-family:var(--pf-font-body); font-size:.92rem; color:var(--pf-ink-soft); }
.rh-progress-num b{ font-family:var(--pf-font-serif); font-size:1.35rem; color:var(--pf-ink); }

/* the stub */
.rh-ticket-stub{
  position:relative; isolation:isolate; overflow:hidden; min-width:0;
  display:flex; flex-direction:column; padding:30px 30px 0;
  border-radius:0 28px 28px 0; color:var(--pf-night-text);
  background:
    radial-gradient(90% 55% at 50% 108%, rgba(242,166,78,.75) 0%, rgba(242,166,78,0) 70%),
    linear-gradient(180deg, #12163A 0%, #262A5C 42%, #5A3A6E 78%, #A94F5E 100%);
}
.rh-ticket-stub::before{
  content:""; position:absolute; left:0; top:26px; bottom:26px; width:0;
  border-left:2.5px dashed rgba(255,244,210,.42);
}
.rh-stub-kicker{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0;
  font-family:var(--pf-font-head); font-weight:700; font-size:.7rem; letter-spacing:.22em; text-transform:uppercase; color:var(--pf-gold-glow);
}
.rh-stub-kicker span{ color:var(--pf-night-soft); letter-spacing:.12em; }
.rh-stub-dl{ display:grid; grid-template-columns:1fr 1fr; gap:16px 18px; margin:20px 0 0; }
.rh-stub-dl div{ min-width:0; }
.rh-stub-dl dt{ font-family:var(--pf-font-head); font-weight:700; font-size:.62rem; letter-spacing:.18em; text-transform:uppercase; color:var(--pf-night-soft); }
.rh-stub-dl dd{ margin:3px 0 0; font-family:var(--pf-font-serif); font-weight:600; font-size:1.32rem; color:var(--pf-star); line-height:1.15; }
.rh-stub-art{ margin:auto -30px 0; padding-top:12px; }
.rh-stub-art svg{ display:block; width:100%; height:auto; }

/* Coming-soon journeys */
.rh-horizon{
  display:flex; align-items:center; gap:16px; margin:0 0 26px;
  font-family:var(--pf-font-head); font-weight:700; font-size:.78rem; letter-spacing:.18em; text-transform:uppercase; color:var(--pf-gold-deep);
}
.rh-horizon::after{
  content:""; flex:1; height:4px;
  background:radial-gradient(circle, var(--pf-line-strong) 1.5px, transparent 1.9px) 0 50% / 10px 4px repeat-x;
}
.rh-tix{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:26px; }
.rh-tix > li{ min-width:0; display:flex; }
.rh-tk{
  --rh-art:132px;
  position:relative; flex:1; display:flex; flex-direction:column; min-width:0;
  background:var(--pf-card); border-radius:22px;
  box-shadow:0 0 0 1.5px var(--pf-line), 0 18px 38px -26px rgba(92,62,24,.45);
}
.rh-tk::before, .rh-tk::after{
  content:""; position:absolute; z-index:3; top:var(--rh-art); width:26px; height:26px; border-radius:50%;
  background:var(--rh-notch); translate:0 -50%;
}
.rh-tk::before{ left:-13px; }
.rh-tk::after{ right:-13px; }
.rh-tk-art{
  position:relative; height:var(--rh-art); overflow:hidden; border-radius:22px 22px 0 0;
  background:
    radial-gradient(70% 90% at 80% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--pf-accent) 78%, #10162F) 0%, var(--pf-accent) 100%);
}
.rh-tk-art svg{ display:block; width:100%; height:100%; }
.rh-tk-art::after{
  content:""; position:absolute; left:18px; right:18px; bottom:0; height:0;
  border-bottom:2px dashed rgba(255,253,247,.0);
}
.rh-tk-seal{
  position:absolute; top:12px; right:12px; z-index:2; width:38px; height:38px; border-radius:50%;
  display:grid; place-items:center; background:rgba(255,253,247,.94); color:var(--pf-ink);
  box-shadow:0 6px 14px -6px rgba(0,0,0,.45);
}
.rh-tk-seal svg{ width:17px; height:17px; }
.rh-tk-body{
  flex:1; display:flex; flex-direction:column; gap:10px; padding:22px 24px 20px;
  border-top:2px dashed var(--pf-line);
}
.rh-tk-kicker{ font-family:var(--pf-font-head); font-weight:700; font-size:.68rem; letter-spacing:.16em; text-transform:uppercase; color:var(--pf-accent); }
.rh-tk .pf-card-title{ font-size:1.22rem; }
.rh-tk-foot{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px;
  margin-top:auto; padding-top:14px;
}
.rh-tk-when{ font-family:var(--pf-font-head); font-weight:700; font-size:.78rem; color:var(--pf-ink); }
.rh-tk--more{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  text-align:center; padding:32px 26px; border-radius:22px; border:2px dashed var(--pf-line-strong);
  background:rgba(255,253,247,.45); color:var(--pf-ink-soft);
}
.rh-tk--more svg{ width:58px; height:58px; }
.rh-tk--more h3{ font-family:var(--pf-font-head); font-weight:700; font-size:1.08rem; color:var(--pf-ink); margin:4px 0 0; }
.rh-tk--more p{ margin:0; font-size:.93rem; line-height:1.5; max-width:26ch; }


/* --------------------------------------------------------------------------
   5. Passport band (hub)
   -------------------------------------------------------------------------- */
.rh-passport{
  display:grid; grid-template-columns:minmax(250px, 320px) minmax(0, 1fr);
  border-radius:30px; overflow:hidden; background:var(--pf-parchment);
  box-shadow:0 0 0 2.5px var(--pf-ink), 12px 12px 0 2.5px var(--pf-dune);
}
.rh-pp-cover{
  position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:16px; padding:48px 30px; text-align:center; color:var(--pf-star);
  background:
    radial-gradient(80% 50% at 50% 42%, rgba(127,196,194,.30) 0%, rgba(127,196,194,0) 70%),
    linear-gradient(165deg, #10808C 0%, #0B5866 48%, #0E3346 100%);
}
.rh-pp-cover::before{
  content:""; position:absolute; inset:16px; z-index:-1; border-radius:18px;
  border:1.5px solid rgba(255,211,110,.55);
  box-shadow:inset 0 0 0 5px rgba(255,211,110,0), inset 0 0 0 6.5px rgba(255,211,110,.22);
}
.rh-pp-kicker{ font-family:var(--pf-font-head); font-weight:700; font-size:.68rem; letter-spacing:.34em; text-transform:uppercase; color:var(--pf-gold-glow); margin-right:-.34em; }
.rh-pp-emblem{
  width:112px; height:112px; border-radius:50%; display:grid; place-items:center;
  box-shadow:0 0 0 3px #FFD36E, 0 0 0 10px rgba(255,211,110,.14), 0 0 0 11.5px rgba(255,211,110,.55);
}
.rh-pp-emblem img{ width:100%; height:100%; display:block; border-radius:50%; }
.rh-pp-word{ font-family:var(--pf-font-head); font-weight:700; font-size:1.5rem; letter-spacing:.42em; text-transform:uppercase; color:#FFD36E; margin-right:-.42em; line-height:1; }
.rh-pp-name{ display:flex; align-items:baseline; gap:12px; font-family:var(--pf-font-serif); font-style:italic; font-size:1.35rem; color:var(--pf-star); }
.rh-pp-name [lang="ar"]{ font-family:var(--pf-font-arabic); font-style:normal; font-size:1.5rem; color:var(--pf-gold-glow); }
.rh-pp-page{
  position:relative; min-width:0; padding:clamp(28px, 4vw, 52px);
  background:
    repeating-radial-gradient(circle at 110% -10%, rgba(201,154,94,.09) 0 1px, transparent 1.5px 13px),
    var(--pf-parchment);
}
.rh-pp-page::before{
  content:""; position:absolute; left:0; top:0; bottom:0; width:34px; pointer-events:none;
  background:linear-gradient(90deg, rgba(92,62,24,.16), rgba(92,62,24,0));
}
.rh-pp-page .pf-h2{ margin-bottom:.3em; }
.rh-pp-summary{ color:var(--pf-ink-soft); max-width:56ch; margin:0; }
.rh-visa{
  margin-top:26px; padding:20px 22px 22px; border:1.5px dashed var(--pf-line-strong); border-radius:20px;
  background:rgba(255,253,247,.62);
}
.rh-visa-head{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:6px 14px; margin-bottom:18px; }
.rh-visa-head h3{ font-family:var(--pf-font-head); font-weight:700; font-size:1.04rem; color:var(--pf-ink); margin:0; }
.rh-visa-count{ font-family:var(--pf-font-body); font-size:.9rem; color:var(--pf-ink-soft); }
.rh-visa-count b{ font-family:var(--pf-font-serif); font-size:1.2rem; color:var(--pf-ink); }
.rh-slots--row{ grid-template-columns:repeat(6, minmax(0, 1fr)); }
.rh-soon-slots{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:14px 12px; }
.rh-soon-slot{ display:flex; flex-direction:column; align-items:center; gap:7px; text-align:center; min-width:0; }
.rh-soon-ring{
  display:grid; place-items:center; width:100%; max-width:76px; aspect-ratio:1; border-radius:50%;
  border:2px dashed color-mix(in srgb, var(--pf-accent) 55%, transparent); color:var(--pf-accent);
  background:color-mix(in srgb, var(--pf-accent) 7%, transparent);
}
.rh-soon-ring svg{ width:20px; height:20px; }
.rh-soon-name{ font-family:var(--pf-font-head); font-weight:700; font-size:.62rem; letter-spacing:.06em; text-transform:uppercase; color:var(--pf-ink-soft); line-height:1.3; }
.rh-pp-more{ margin:26px 0 0; }


/* --------------------------------------------------------------------------
   6. Game hero + layout
   -------------------------------------------------------------------------- */
.rh-ghero .pf-display{ max-width:11ch; margin-bottom:.1em; }
.rh-ghero .pf-lead{ max-width:46ch; color:var(--pf-night-text); }
.rh-ghero-ar{ font-family:var(--pf-font-arabic); font-size:clamp(1.5rem, 2.6vw, 1.9rem); color:var(--pf-gold-glow); margin:0 0 14px; line-height:1.5; }
.rh-ghero .pf-hero-art{ max-width:520px; justify-self:end; width:100%; }
.rh-ghero .pf-lockup{ margin-bottom:22px; }

.rh-game{ --rh-pin:44px; }
.rh-game-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:18px 32px; margin-bottom:clamp(24px, 3vw, 36px); }
.rh-game-head .pf-title{ margin:0; }
.rh-nojs{
  margin:0 0 24px; padding:14px 18px; border-radius:14px; background:var(--pf-star);
  border:1.5px dashed var(--pf-line-strong); font-size:.95rem; color:var(--pf-ink-body);
}
.rh-on .rh-nojs{ display:none; }
.rh-js-only{ display:none; }
.rh-on .rh-js-only{ display:revert; }
.rh-layout{ display:grid; grid-template-columns:minmax(0, 1fr) 340px; gap:clamp(24px, 3vw, 40px); align-items:start; }
.rh-board{ min-width:0; }


/* --------------------------------------------------------------------------
   7. Map, pins, camel token
   -------------------------------------------------------------------------- */
.rh-mapwrap{
  position:relative; border-radius:26px; background:#F1DFB9;
  box-shadow:0 0 0 2.5px var(--pf-ink), 10px 10px 0 2.5px var(--pf-dune);
}
.rh-map{ border-radius:26px; overflow:hidden; }
.rh-map svg{ display:block; width:100%; height:auto; }
.rh-m-label{
  font-family:var(--pf-font-head); font-weight:700; font-size:21px; letter-spacing:.01em;
  fill:var(--pf-ink); paint-order:stroke; stroke:#F2E1BE; stroke-width:6px; stroke-linejoin:round;
}
.rh-m-region{ font-family:var(--pf-font-head); font-weight:700; font-size:24px; letter-spacing:.42em; fill:#8C6A3E; opacity:.5; }
.rh-m-sea{ font-family:var(--pf-font-serif); font-style:italic; font-size:24px; fill:#FFF4D2; opacity:.78; }
.rh-m-n{ font-family:var(--pf-font-head); font-weight:700; font-size:17px; fill:#8C6A3E; }
.rh-m-cart-t{ font-family:var(--pf-font-head); font-weight:700; font-size:17px; fill:var(--pf-ink); }
.rh-m-cart-ar{ font-family:var(--pf-font-arabic); font-size:24px; fill:#8C5D12; }
.rh-m-cart-d{ font-family:var(--pf-font-head); font-weight:700; font-size:12.5px; letter-spacing:.12em; fill:#6A5E4D; }
.rh-seg{ fill:none; stroke:#8C6A3E; stroke-opacity:.6; stroke-width:4; stroke-linecap:round; stroke-dasharray:0.1 12; }
.rh-trav-glow{ fill:none; stroke:#F5B841; stroke-opacity:.45; stroke-width:12; stroke-linecap:round; }
.rh-trav-dots{ fill:none; stroke:#A84F33; stroke-width:6.5; stroke-linecap:round; stroke-dasharray:0.1 13; }

/* camel token */
.rh-token .o{ fill:none; stroke:#262B44; stroke-width:7; stroke-linecap:round; stroke-linejoin:round; }
.rh-token .f{ fill:none; stroke:#C99A5E; stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
.rh-token .f2{ fill:none; stroke:#A9773F; stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
.rh-leg{ transform-box:fill-box; transform-origin:50% 0; }
.rh-token-bob{ transform-box:fill-box; }
.rh-token.is-walking .rh-leg-a{ animation:rh-leg .44s ease-in-out infinite alternate; }
.rh-token.is-walking .rh-leg-b{ animation:rh-leg .44s ease-in-out infinite alternate-reverse; }
.rh-token.is-walking .rh-token-bob{ animation:rh-bob .44s ease-in-out infinite alternate; }

/* HTML pins laid over the SVG (positions are % of the 1000×800 map) */
.rh-pins{ position:absolute; inset:0; pointer-events:none; }
.rh-game:not(.rh-on) .rh-pins{ display:none; }
.rh-pin{
  pointer-events:auto; position:absolute; z-index:2;
  left:calc(var(--x) * 1%); top:calc(var(--y) * 1%);
  width:var(--rh-pin); height:var(--rh-pin); translate:-50% -50%;
  display:grid; place-items:center; padding:0; margin:0; cursor:pointer;
  border-radius:50%; border:2.5px solid var(--pf-ink); background:var(--pf-card); color:var(--pf-ink);
  font-family:var(--pf-font-serif); font-weight:700; font-size:calc(var(--rh-pin) * .42); line-height:1;
  box-shadow:0 4px 0 var(--pf-ink);
  transition:transform .2s var(--pf-ease), background-color .25s ease, box-shadow .2s ease;
}
.rh-pin:hover{ transform:translateY(-3px); }
.rh-pin:focus-visible{ outline:3px solid var(--pf-night); outline-offset:4px; z-index:4; }
.rh-pin.is-locked{
  background:#EADBBE; color:#6A5E4D; border-style:dashed; border-color:#6A5E4D; box-shadow:none; cursor:not-allowed;
}
.rh-pin.is-locked:hover{ transform:none; }
.rh-pin.is-current{ background:var(--pf-gold); z-index:3; }
.rh-pin.is-current::before{
  content:""; position:absolute; inset:-9px; border-radius:50%; border:3px solid var(--pf-gold);
  animation:rh-pulse 1.9s ease-out infinite; pointer-events:none;
}
.rh-pin.is-done{ background:var(--pf-era-1); color:#FFFDF7; }
.rh-pin.is-done::after, .rh-pin.is-locked::after{
  content:""; position:absolute; right:-6px; bottom:-5px; width:19px; height:19px; border-radius:50%;
  border:2px solid var(--pf-ink); background-color:var(--pf-gold); background-position:center; background-repeat:no-repeat; background-size:11px;
}
.rh-pin.is-done::after{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.4 4.8 9 9.8 3.2' fill='none' stroke='%23262B44' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.rh-pin.is-locked::after{ background-color:#FFFDF7; border-color:#6A5E4D; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2.5' y='5.2' width='7' height='5.3' rx='1.2' fill='%236A5E4D'/%3E%3Cpath d='M4 5.2V3.8a2 2 0 0 1 4 0v1.4' fill='none' stroke='%236A5E4D' stroke-width='1.4'/%3E%3C/svg%3E"); }
.rh-pin.is-shake{ animation:rh-shake .45s ease; }
.rh-pin.is-pop{ animation:rh-popin .6s var(--pf-ease); }
.rh-pin-tip{
  position:absolute; left:50%; bottom:calc(100% + 14px); translate:-50% 4px; z-index:5;
  white-space:nowrap; pointer-events:none; opacity:0;
  font-family:var(--pf-font-head); font-weight:700; font-size:.78rem; line-height:1.2;
  color:var(--pf-star); background:var(--pf-ink); padding:8px 12px; border-radius:10px;
  box-shadow:0 10px 20px -10px rgba(16,22,47,.6);
  transition:opacity .15s ease, translate .15s ease;
}
.rh-pin-tip::after{ content:""; position:absolute; left:50%; top:100%; translate:-50% 0; border:6px solid transparent; border-top-color:var(--pf-ink); }
.rh-pin:hover .rh-pin-tip, .rh-pin:focus-visible .rh-pin-tip{ opacity:1; translate:-50% 0; }

.rh-legend{
  display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px; margin:22px 6px 0;
  font-family:var(--pf-font-body); font-weight:600; font-size:.85rem; color:var(--pf-ink-soft);
}
.rh-legend span{ display:inline-flex; align-items:center; gap:8px; }
.rh-legend i{ width:16px; height:16px; border-radius:50%; border:2px solid var(--pf-ink); flex:none; }
.rh-legend .l-cur{ background:var(--pf-gold); }
.rh-legend .l-done{ background:var(--pf-era-1); }
.rh-legend .l-lock{ background:#EADBBE; border-style:dashed; border-color:#6A5E4D; }
.rh-legend .l-route{ width:28px; height:4px; border:0; border-radius:0; background:radial-gradient(circle, #A84F33 2px, transparent 2.4px) 0 50% / 8px 4px repeat-x; }


/* --------------------------------------------------------------------------
   8. Itinerary (the stop list). Without JS it is the full lesson text.
   -------------------------------------------------------------------------- */
.rh-itin-head{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 18px; margin:44px 0 16px; }
.rh-itin-title{ font-family:var(--pf-font-head); font-weight:700; font-size:1.25rem; color:var(--pf-ink); margin:0; }
.rh-itin-note{ font-size:.9rem; color:var(--pf-ink-soft); margin:0; }
.rh-stops{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; }
.rh-stop{ min-width:0; display:flex; }
.rh-stop-card{
  position:relative; flex:1; min-width:0; display:flex; flex-direction:column; gap:8px;
  padding:20px 22px; border-radius:20px; background:var(--pf-card);
  box-shadow:0 0 0 1.5px var(--pf-line), 0 14px 30px -24px rgba(92,62,24,.5);
  transition:box-shadow .2s ease, transform .2s var(--pf-ease);
}
.rh-stop-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.rh-stop-num{
  width:36px; height:36px; border-radius:50%; display:grid; place-items:center; flex:none;
  font-family:var(--pf-font-serif); font-weight:700; font-size:1rem; color:var(--pf-ink);
  background:var(--pf-sand-deep); border:2px solid var(--pf-ink);
}
.rh-stop-status{
  font-family:var(--pf-font-head); font-weight:700; font-size:.66rem; letter-spacing:.12em; text-transform:uppercase;
  padding:5px 10px; border-radius:999px; color:var(--pf-ink-soft); background:var(--pf-sand-light); border:1.5px solid var(--pf-line);
  white-space:nowrap;
}
.rh-stop-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:4px 0 0; font-family:var(--pf-font-head); font-weight:700; font-size:.8rem; color:var(--pf-ink-soft); }
.rh-stop-place{ display:inline-flex; align-items:center; gap:5px; }
.rh-stop-place::before{
  content:""; width:10px; height:12px; background:var(--pf-terracotta); flex:none;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M5 0a4.5 4.5 0 0 1 4.5 4.5C9.5 8 5 12 5 12S.5 8 .5 4.5A4.5 4.5 0 0 1 5 0Zm0 3a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M5 0a4.5 4.5 0 0 1 4.5 4.5C9.5 8 5 12 5 12S.5 8 .5 4.5A4.5 4.5 0 0 1 5 0Zm0 3a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rh-stop-title{ font-family:var(--pf-font-head); font-weight:700; font-size:1.12rem; line-height:1.28; color:var(--pf-ink); margin:2px 0 0; text-wrap:balance; }
.rh-stop-lesson p{ margin:.4em 0 0; font-size:1rem; line-height:1.65; color:var(--pf-ink-body); }
.rh-stop-dyk{ margin-top:8px; padding:12px 16px; border-radius:14px; background:var(--pf-star); border:1.5px dashed rgba(140,93,18,.35); }
.rh-stop-dyk-h{ margin:0; font-family:var(--pf-font-serif); font-style:italic; font-weight:600; color:var(--pf-gold-deep); }
.rh-stop-dyk-body p{ margin:.3em 0 0; font-size:.96rem; line-height:1.6; }

/* JS mode: compact cards, the whole card opens the stop */
.rh-on .rh-stops{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; }
.rh-on .rh-stop-lesson, .rh-on .rh-stop-dyk{ display:none; }
.rh-on .rh-stop-card{ padding:16px 18px 18px; }
.rh-on .rh-stop-card:hover{ transform:translateY(-3px); box-shadow:0 0 0 1.5px var(--pf-gold), 0 18px 34px -22px rgba(92,62,24,.55); }
.rh-stop-btn{
  all:unset; cursor:pointer; color:inherit; font:inherit; text-align:left; display:inline;
}
.rh-stop-btn::after{ content:""; position:absolute; inset:0; border-radius:20px; }
.rh-stop-btn:focus-visible{ outline:none; }
.rh-stop-card:has(.rh-stop-btn:focus-visible){ outline:3px solid var(--pf-night); outline-offset:3px; }
.rh-stop.is-done .rh-stop-num{ background:var(--pf-era-1); color:#FFFDF7; }
.rh-stop.is-done .rh-stop-status{ color:#FFFDF7; background:var(--pf-era-1); border-color:var(--pf-era-1); }
.rh-stop.is-current .rh-stop-card{ box-shadow:0 0 0 2.5px var(--pf-gold), 0 18px 34px -22px rgba(140,93,18,.6); background:#FFF9EA; }
.rh-stop.is-current .rh-stop-num{ background:var(--pf-gold); }
.rh-stop.is-current .rh-stop-status{ color:var(--pf-ink); background:var(--pf-gold); border-color:var(--pf-gold); }
.rh-stop.is-locked .rh-stop-card{ background:rgba(255,253,247,.5); box-shadow:0 0 0 1.5px var(--pf-line); }
.rh-stop.is-locked .rh-stop-num{ border-style:dashed; color:var(--pf-ink-soft); background:transparent; }
.rh-stop.is-locked .rh-stop-title{ color:var(--pf-ink-soft); }
.rh-stop.is-locked .rh-stop-btn{ cursor:not-allowed; }


/* --------------------------------------------------------------------------
   9. Passport sidebar (desktop) / bottom sheet (under 1024px)
   -------------------------------------------------------------------------- */
.rh-side{ position:sticky; top:24px; min-width:0; }
.rh-game:not(.rh-on) .rh-side{ display:none; }
.rh-game:not(.rh-on) .rh-layout{ grid-template-columns:minmax(0, 1fr); }
.rh-pass{
  border-radius:26px; overflow:hidden; background:var(--pf-parchment);
  box-shadow:0 0 0 2.5px var(--pf-ink), 10px 10px 0 2.5px var(--pf-dune);
}
.rh-pass-head{
  position:relative; display:flex; align-items:center; gap:14px; padding:18px 20px;
  color:var(--pf-star);
  background:
    radial-gradient(70% 120% at 90% 0%, rgba(127,196,194,.28) 0%, rgba(127,196,194,0) 70%),
    linear-gradient(160deg, #10808C 0%, #0B5866 55%, #0E3346 100%);
}
.rh-pass-head::after{ content:""; position:absolute; left:14px; right:14px; bottom:7px; border-bottom:1.5px dashed rgba(255,211,110,.45); }
.rh-pass-emblem{ width:46px; height:46px; flex:none; border-radius:50%; box-shadow:0 0 0 2px #FFD36E, 0 0 0 5px rgba(255,211,110,.18); }
.rh-pass-emblem img{ width:100%; height:100%; display:block; border-radius:50%; }
.rh-pass-headtext{ flex:1; min-width:0; }
.rh-pass-kicker{ margin:0; font-family:var(--pf-font-head); font-weight:700; font-size:.62rem; letter-spacing:.24em; text-transform:uppercase; color:var(--pf-gold-glow); }
.rh-pass-title{ margin:2px 0 0; font-family:var(--pf-font-head); font-weight:700; font-size:1.12rem; color:var(--pf-star); line-height:1.2; }
.rh-pass-count{ margin:0; font-family:var(--pf-font-serif); font-weight:600; font-size:2rem; line-height:1; color:var(--pf-star); white-space:nowrap; }
.rh-pass-count span{ font-size:1.05rem; color:var(--pf-night-soft); }
.rh-sheet-toggle{
  display:none; flex:none; width:40px; height:40px; border-radius:50%; padding:0; cursor:pointer;
  place-items:center; color:var(--pf-star); background:rgba(255,253,247,.10); border:1.5px solid rgba(255,244,210,.45);
}
.rh-sheet-toggle svg{ width:18px; height:18px; transition:rotate .25s var(--pf-ease); }
.rh-side.is-open .rh-sheet-toggle svg{ rotate:180deg; }
.rh-sheet-toggle:focus-visible{ outline:3px solid var(--pf-gold-glow); outline-offset:2px; }
.rh-pass-barwrap{ padding:18px 20px 0; }
.rh-pass-barwrap p{ margin:0 0 8px; font-size:.86rem; color:var(--pf-ink-soft); }
.rh-pass-body{ padding:18px 20px 20px; }
.rh-slots--grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
.rh-next{
  margin-top:20px; padding:16px; border-radius:16px; background:var(--pf-sand-light);
  border:1.5px dashed var(--pf-line-strong);
}
.rh-next-kicker{ margin:0; font-family:var(--pf-font-head); font-weight:700; font-size:.64rem; letter-spacing:.18em; text-transform:uppercase; color:var(--pf-gold-deep); }
.rh-next-title{ margin:4px 0 12px; font-family:var(--pf-font-head); font-weight:700; font-size:1rem; line-height:1.3; color:var(--pf-ink); }
.rh-donebox{
  margin-top:20px; padding:16px; border-radius:16px; text-align:center;
  background:var(--pf-oasis-soft); border:1.5px solid rgba(42,112,80,.35);
}
.rh-donebox p{ margin:0 0 12px; font-family:var(--pf-font-head); font-weight:700; color:var(--pf-oasis-deep); }
.rh-restart{
  display:block; margin:16px auto 0; padding:6px 10px; border:0; background:none; cursor:pointer;
  font-family:var(--pf-font-head); font-weight:700; font-size:.8rem; color:var(--pf-ink-soft);
  text-decoration:underline; text-decoration-color:var(--pf-line-strong); text-underline-offset:3px;
}
.rh-restart:hover{ color:var(--pf-terracotta); }
.rh-restart.is-confirm{ color:var(--pf-terracotta); text-decoration-color:currentColor; }


/* --------------------------------------------------------------------------
   10. Stop dialog, quiz and the stamp slam
   -------------------------------------------------------------------------- */
html.rh-modal-open{ overflow:hidden; }
.rh-dialog{
  width:min(720px, calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px);
  margin:auto; padding:0; border:0; background:transparent; overflow:visible; color:var(--pf-ink-body);
}
.rh-dialog::backdrop{ background:rgba(16,22,47,.66); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); }
.rh-dialog[open]{ animation:rh-pop .38s var(--pf-ease); }
.rh-card{
  position:relative; max-height:calc(100dvh - 24px); overflow-y:auto; overscroll-behavior:contain;
  border-radius:26px; background:var(--pf-parchment);
  box-shadow:0 0 0 2.5px var(--pf-ink), 0 40px 90px -30px rgba(0,0,0,.7);
}
.rh-card.is-thud{ animation:rh-thud .32s ease; }
.rh-card-head{ padding:20px 26px 72px; overflow:hidden; }
.rh-card-head > *{ position:relative; z-index:1; }
.rh-card-head .pf-starfield{ position:absolute; z-index:0; }
.rh-card-big{
  position:absolute !important; z-index:0 !important; right:22px; top:4px;
  font-family:var(--pf-font-serif); font-weight:700; font-size:7.5rem; line-height:1;
  color:rgba(255,244,210,.08); pointer-events:none;
}
.rh-card-dunes{ position:absolute !important; z-index:0 !important; left:0; right:0; bottom:-1px; height:56px; }
.rh-card-dunes svg{ display:block; width:100%; height:100%; }
.rh-card-top{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.rh-card-num{
  display:inline-flex; align-items:center; gap:10px; font-family:var(--pf-font-head); font-weight:700;
  font-size:.72rem; letter-spacing:.2em; text-transform:uppercase; color:var(--pf-gold-glow);
}
.rh-card-num::before{ content:""; width:26px; height:4px; background:radial-gradient(circle, currentColor 1.5px, transparent 1.9px) 0 50% / 7px 4px repeat-x; }
.rh-x{
  flex:none; width:42px; height:42px; border-radius:50%; display:grid; place-items:center; padding:0; cursor:pointer;
  color:var(--pf-star); background:rgba(255,253,247,.10); border:1.5px solid rgba(255,244,210,.5);
  transition:background-color .15s ease, transform .15s ease;
}
.rh-x:hover{ background:rgba(255,253,247,.2); transform:rotate(90deg); }
.rh-x svg{ width:16px; height:16px; }
.rh-x:focus-visible{ outline:3px solid var(--pf-gold-glow); outline-offset:2px; }
.rh-x--ink{ color:var(--pf-ink); background:var(--pf-card); border-color:var(--pf-ink); position:absolute; top:22px; right:22px; z-index:3; }
.rh-x--ink:focus-visible{ outline-color:var(--pf-night); }
.rh-card-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:0 0 10px; }
.rh-card-place{ display:inline-flex; align-items:center; gap:7px; font-family:var(--pf-font-head); font-weight:700; font-size:.92rem; color:var(--pf-star); }
.rh-card-place svg{ width:13px; height:16px; color:var(--pf-gold-glow); }
.rh-card-title{
  margin:0; font-family:var(--pf-font-head); font-weight:700; font-size:clamp(1.45rem, 3.6vw, 2rem);
  line-height:1.15; letter-spacing:-.01em; color:var(--pf-star); max-width:22ch; text-wrap:balance;
}
.rh-card-title:focus{ outline:none; }
.rh-card-title:focus-visible{ outline:3px solid var(--pf-gold-glow); outline-offset:4px; border-radius:6px; }
.rh-card-body{ padding:6px clamp(20px, 4vw, 34px) clamp(22px, 4vw, 32px); }
.rh-lesson p{ margin:0 0 .8em; font-size:1.06rem; line-height:1.72; color:var(--pf-ink-body); }
.rh-dyk{
  position:relative; margin:18px 0 28px; padding:16px 20px 16px 66px; border-radius:18px;
  background:var(--pf-star); border:1.5px dashed rgba(140,93,18,.38);
}
.rh-dyk::before{
  content:""; position:absolute; left:18px; top:16px; width:34px; height:34px; background:var(--pf-gold);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 0l5.4 7 8.7-1.1L33 14.6 40 20l-7 5.4 1.1 8.7-8.7-1.1L20 40l-5.4-7-8.7 1.1L7 25.4 0 20l7-5.4-1.1-8.7L14.6 7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 0l5.4 7 8.7-1.1L33 14.6 40 20l-7 5.4 1.1 8.7-8.7-1.1L20 40l-5.4-7-8.7 1.1L7 25.4 0 20l7-5.4-1.1-8.7L14.6 7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rh-dyk::after{ content:"!"; position:absolute; left:18px; top:16px; width:34px; height:34px; display:grid; place-items:center; font-family:var(--pf-font-serif); font-weight:700; font-size:1.05rem; color:var(--pf-ink); }
.rh-dyk-h{ margin:0 0 4px; font-family:var(--pf-font-serif); font-style:italic; font-weight:600; font-size:1.08rem; color:var(--pf-gold-deep); }
.rh-dyk p{ margin:0; font-size:.98rem; line-height:1.62; color:var(--pf-ink-body); }

.rh-quiz{ padding-top:24px; border-top:2px dashed var(--pf-line); }
.rh-quiz-h{ display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin:0 0 18px; font-family:var(--pf-font-head); font-weight:700; font-size:1.2rem; color:var(--pf-ink); }
.rh-quiz-h span{ font-family:var(--pf-font-body); font-weight:500; font-size:.92rem; color:var(--pf-ink-soft); }
.rh-q{ margin:0 0 22px; }
.rh-q-text{ display:flex; gap:12px; align-items:flex-start; margin:0 0 12px; font-family:var(--pf-font-head); font-weight:700; font-size:1.02rem; line-height:1.4; color:var(--pf-ink); }
.rh-q-n{
  flex:none; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; margin-top:-2px;
  font-family:var(--pf-font-serif); font-size:.92rem; color:var(--pf-star); background:var(--pf-ink);
}
.rh-opts{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.rh-opt{
  display:flex; align-items:center; gap:12px; width:100%; min-height:54px; text-align:left; cursor:pointer;
  padding:11px 14px; border-radius:15px; border:2px solid var(--pf-line-strong); background:var(--pf-card);
  font-family:var(--pf-font-body); font-weight:600; font-size:.98rem; line-height:1.3; color:var(--pf-ink);
  transition:border-color .15s ease, background-color .15s ease, transform .15s var(--pf-ease), opacity .2s ease;
}
.rh-opt:hover:not([aria-disabled="true"]){ border-color:var(--pf-gold); background:#FFF8E4; transform:translateY(-2px); }
.rh-opt:focus-visible{ outline:3px solid var(--pf-night); outline-offset:2px; }
.rh-opt-key{
  flex:none; width:30px; height:30px; border-radius:50%; display:grid; place-items:center;
  font-family:var(--pf-font-head); font-weight:700; font-size:.82rem; color:var(--pf-ink); background:var(--pf-sand-deep);
  transition:background-color .15s ease, color .15s ease;
}
.rh-opt[aria-disabled="true"]{ cursor:default; }
.rh-opt[aria-disabled="true"]:not(.is-right):not(.is-wrong){ opacity:.5; }
.rh-opt.is-wrong{ border-color:var(--pf-dusk-rose); background:#FBEAE8; color:#7A2E36; animation:rh-shake .42s ease; }
.rh-opt.is-wrong .rh-opt-key{ background:var(--pf-dusk-rose); color:#fff; }
.rh-opt.is-right{ border-color:var(--pf-oasis); background:var(--pf-oasis-soft); color:var(--pf-oasis-deep); }
.rh-opt.is-right .rh-opt-key{ background:var(--pf-oasis); color:#fff; animation:rh-popin .45s var(--pf-ease); }
.rh-fb{ min-height:1.45em; margin:10px 2px 0; font-family:var(--pf-font-body); font-weight:600; font-size:.94rem; line-height:1.45; }
.rh-fb.is-right{ color:var(--pf-oasis-deep); }
.rh-fb.is-wrong{ color:var(--pf-terracotta); }

.rh-collect{
  display:grid; grid-template-columns:136px minmax(0, 1fr); align-items:center; gap:22px;
  margin-top:10px; padding:20px; border-radius:22px; border:2px dashed var(--pf-line-strong); background:var(--pf-sand-light);
  transition:border-color .3s ease, background-color .3s ease;
}
.rh-collect.is-ready{ border-color:var(--pf-gold); background:#FFF5D8; }
.rh-collect.is-done{ border-style:solid; border-color:rgba(42,112,80,.35); background:#F1F5E9; }
.rh-slam{
  position:relative; width:136px; aspect-ratio:1; border-radius:50%; display:grid; place-items:center;
  border:2px dashed var(--pf-line-strong); background:rgba(255,253,247,.7);
}
.rh-slam-ghost{ font-family:var(--pf-font-serif); font-weight:600; font-size:2.8rem; color:var(--pf-line-strong); line-height:1; }
.rh-slam.has-stamp{ border-color:transparent; background:transparent; }
.rh-slam .rh-stamp-svg{ position:absolute; inset:0; }
.rh-slam.is-slam .rh-stamp-svg{ animation:rh-slam .6s cubic-bezier(.3,1.35,.5,1) both; }
.rh-slam.is-slam::after{
  content:""; position:absolute; inset:-6px; border-radius:50%; border:3px solid var(--pf-gold);
  animation:rh-ring .7s ease-out .32s both; pointer-events:none;
}
.rh-collect-msg{ margin:0 0 12px; font-family:var(--pf-font-head); font-weight:700; font-size:1rem; color:var(--pf-ink); line-height:1.35; }
.rh-collect-sub{ margin:-6px 0 14px; font-size:.9rem; color:var(--pf-ink-soft); }
.rh-collect-actions{ display:flex; flex-wrap:wrap; gap:10px; }
.rh-collect-btn.is-ready{ animation:rh-ready 1.8s ease-in-out infinite; }


/* --------------------------------------------------------------------------
   11. Flyer, toast, certificate
   -------------------------------------------------------------------------- */
.rh-flyer{ position:fixed; z-index:2000; pointer-events:none; will-change:transform; }
.rh-flyer .rh-stamp-svg{ width:100%; height:100%; }

.rh-toast{
  position:fixed; left:50%; bottom:24px; z-index:1500; translate:-50% 12px; opacity:0; pointer-events:none;
  max-width:calc(100vw - 32px); width:max-content; text-align:center;
  padding:12px 20px; border-radius:999px; background:var(--pf-ink); color:var(--pf-star);
  font-family:var(--pf-font-body); font-weight:600; font-size:.93rem; line-height:1.35;
  box-shadow:0 16px 34px -14px rgba(16,22,47,.7);
  transition:opacity .2s ease, translate .25s var(--pf-ease);
}
.rh-toast.is-on{ opacity:1; translate:-50% 0; }

.rh-dialog--cert{ width:min(660px, calc(100vw - 24px)); }
.rh-cert{
  position:relative; max-height:calc(100dvh - 24px); overflow-y:auto; overscroll-behavior:contain;
  padding:14px; border-radius:24px;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(245,184,65,.28) 0%, rgba(245,184,65,0) 70%),
    repeating-radial-gradient(circle at 50% 120%, rgba(201,154,94,.08) 0 1px, transparent 1.5px 12px),
    var(--pf-parchment);
  box-shadow:0 0 0 2.5px var(--pf-ink), 0 40px 90px -30px rgba(0,0,0,.7);
}
.rh-cert-frame{
  position:relative; text-align:center; padding:46px clamp(18px, 5vw, 44px) 34px; border-radius:14px;
  border:2.5px solid var(--pf-ink); box-shadow:inset 0 0 0 6px var(--pf-parchment), inset 0 0 0 7.5px var(--pf-gold-deep);
}
.rh-cert-corner{ position:absolute; width:30px; height:30px; color:var(--pf-gold); }
.rh-cert-corner svg{ width:100%; height:100%; display:block; }
.rh-cert-corner.tl{ top:-15px; left:-15px; } .rh-cert-corner.tr{ top:-15px; right:-15px; }
.rh-cert-corner.bl{ bottom:-15px; left:-15px; } .rh-cert-corner.br{ bottom:-15px; right:-15px; }
.rh-cert-emblem{ position:relative; display:inline-block; margin-bottom:14px; }
.rh-cert-emblem img{ display:block; width:84px; height:84px; border-radius:50%; box-shadow:0 0 0 3px var(--pf-gold), 0 0 0 9px rgba(245,184,65,.2); }
.rh-cert-emblem svg{ position:absolute; inset:-34px; width:calc(100% + 68px); height:calc(100% + 68px); overflow:visible; }
.rh-cert-title{ margin:4px 0 10px; font-family:var(--pf-font-head); font-weight:700; font-size:clamp(1.9rem, 6vw, 2.7rem); line-height:1.05; letter-spacing:-.02em; color:var(--pf-ink); }
.rh-cert-title:focus{ outline:none; }
.rh-cert-line{ margin:0; font-size:1rem; line-height:1.6; color:var(--pf-ink-soft); }
.rh-cert-journey{ margin:6px 0 0; font-family:var(--pf-font-serif); font-style:italic; font-weight:600; font-size:clamp(1.45rem, 4.4vw, 2rem); line-height:1.15; color:var(--pf-era-1); }
.rh-cert-ar{ margin:2px 0 8px; font-family:var(--pf-font-arabic); font-size:1.55rem; color:var(--pf-gold-deep); line-height:1.5; }
.rh-cert-stamps{ display:flex; flex-wrap:wrap; justify-content:center; gap:4px 6px; margin:22px auto 18px; max-width:480px; }
.rh-cert-stamps > span{ width:68px; height:68px; display:block; }
.rh-cert-date{ margin:0 0 22px; font-family:var(--pf-font-head); font-weight:700; font-size:.76rem; letter-spacing:.16em; text-transform:uppercase; color:var(--pf-ink-soft); }
.rh-cert-date time{ color:var(--pf-ink); }
.rh-cert-actions{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }


/* --------------------------------------------------------------------------
   Keyframes (all stopped by pf.css under prefers-reduced-motion)
   -------------------------------------------------------------------------- */
@keyframes rh-swing{ 0%,100%{ rotate:-10deg; } 50%{ rotate:14deg; } }
@keyframes rh-pulse{ 0%{ opacity:.9; scale:.85; } 100%{ opacity:0; scale:1.45; } }
@keyframes rh-shake{ 0%,100%{ translate:0 0; } 20%{ translate:-6px 0; } 40%{ translate:5px 0; } 60%{ translate:-3px 0; } 80%{ translate:2px 0; } }
@keyframes rh-popin{ 0%{ scale:.4; } 60%{ scale:1.18; } 100%{ scale:1; } }
@keyframes rh-leg{ from{ rotate:-13deg; } to{ rotate:13deg; } }
@keyframes rh-bob{ from{ translate:0 0; } to{ translate:0 -2.5px; } }
@keyframes rh-pop{ from{ opacity:0; translate:0 18px; scale:.97; } to{ opacity:1; translate:0 0; scale:1; } }
@keyframes rh-thud{ 0%,100%{ translate:0 0; } 30%{ translate:0 5px; } 60%{ translate:0 -2px; } }
@keyframes rh-slam{
  0%{ opacity:0; scale:2.4; rotate:calc(var(--rh-tilt, -6deg) - 28deg); filter:blur(2px); }
  55%{ opacity:1; scale:.9; rotate:var(--rh-tilt, -6deg); filter:blur(0); }
  75%{ scale:1.05; }
  100%{ opacity:1; scale:1; rotate:var(--rh-tilt, -6deg); }
}
@keyframes rh-ring{ from{ opacity:.9; scale:.9; } to{ opacity:0; scale:1.5; } }
@keyframes rh-ink{ 0%{ opacity:0; scale:1.6; } 60%{ opacity:1; scale:.94; } 100%{ opacity:1; scale:1; } }
@keyframes rh-ready{ 0%,100%{ box-shadow:0 0 0 0 rgba(245,184,65,.55); } 50%{ box-shadow:0 0 0 9px rgba(245,184,65,0); } }


/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width:1100px){
  .rh-ticket{ --rh-stub:290px; }
  .rh-tix{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* game: sidebar becomes a sticky bottom sheet */
@media (max-width:1023px){
  .rh-layout{ grid-template-columns:minmax(0, 1fr); }
  .rh-on .rh-stops{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .rh-side{ position:sticky; top:auto; bottom:0; z-index:40; width:100%; max-width:560px; margin-inline:auto; }
  .rh-pass{ border-radius:24px 24px 0 0; box-shadow:0 0 0 2.5px var(--pf-ink), 0 -16px 36px -18px rgba(16,22,47,.45); }
  .rh-pass-head{ padding:12px 14px 14px 16px; gap:12px; }
  .rh-pass-head::after{ bottom:5px; }
  .rh-pass-emblem{ width:38px; height:38px; }
  .rh-pass-count{ font-size:1.6rem; }
  .rh-sheet-toggle{ display:grid; }
  .rh-pass-barwrap{ padding:12px 16px 14px; }
  .rh-pass-barwrap p{ display:none; }
  .rh-pass-body{ display:none; padding-top:6px; max-height:min(58vh, 520px); overflow-y:auto; }
  .rh-side.is-open .rh-pass-body{ display:block; }
  .rh-slots--grid{ grid-template-columns:repeat(6, minmax(0, 1fr)); gap:10px 8px; }
  .rh-toast{ bottom:120px; }
}

@media (max-width:900px){
  .rh-steps{ grid-template-columns:repeat(2, minmax(0, 1fr)); row-gap:44px; }
  .rh-steps::before{ display:none; }
  .rh-ticket{ grid-template-columns:minmax(0, 1fr); }
  .rh-ticket::before, .rh-ticket::after{ display:none; }
  .rh-ticket-stub{ border-radius:0 0 28px 28px; padding:28px 26px 0; }
  .rh-ticket-stub::before{ left:22px; right:22px; top:0; bottom:auto; width:auto; border-left:0; border-top:2.5px dashed rgba(255,244,210,.42); }
  .rh-stub-dl{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .rh-stub-art{ margin-inline:-26px; }
  .rh-passport{ grid-template-columns:minmax(0, 1fr); }
  .rh-pp-cover{ flex-direction:row; flex-wrap:wrap; justify-content:center; gap:14px 22px; padding:30px 24px; }
  .rh-pp-emblem{ width:84px; height:84px; }
  .rh-pp-cover-words{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
  .rh-pp-page::before{ display:none; }
}

@media (max-width:720px){
  .rh-tix{ grid-template-columns:minmax(0, 1fr); }
  .rh-slots--row{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .rh-soon-slots{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .rh-mini-label{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .rh-mini li:first-child .rh-mini-label, .rh-mini li:last-child .rh-mini-label{ position:static; width:auto; height:auto; overflow:visible; clip:auto; }
  .rh-mini li:first-child{ align-items:flex-start; }
  .rh-mini li:last-child{ align-items:flex-end; }
  .rh-game{ --rh-pin:34px; }
  .rh-m-label{ font-size:28px; stroke-width:8px; }
  .rh-m-region{ font-size:28px; }
  .rh-m-sea{ font-size:28px; }
  .rh-collect{ grid-template-columns:minmax(0, 1fr); justify-items:center; text-align:center; }
  .rh-collect-actions{ justify-content:center; }
  .rh-pin-tip{ display:none; }
}

@media (max-width:600px){
  .rh-steps{ grid-template-columns:minmax(0, 1fr); row-gap:26px; }
  .rh-steps::before{
    display:block; top:46px; bottom:46px; left:44px; right:auto; width:4px; height:auto;
    background:radial-gradient(circle, var(--pf-dune-deep) 1.7px, transparent 2.1px) 50% 0 / 4px 13px repeat-y;
  }
  .rh-step{ display:grid; grid-template-columns:92px minmax(0, 1fr); column-gap:20px; align-items:center; text-align:left; }
  .rh-step-disc{ width:88px; height:88px; grid-row:1 / span 2; box-shadow:4px 5px 0 -1px rgba(38,43,68,.92); }
  .rh-step-disc svg{ width:60px; height:60px; }
  .rh-step-num{ width:32px; height:32px; font-size:.86rem; top:-6px; left:-8px; }
  .rh-step-title{ margin:0 0 4px; align-self:end; }
  .rh-step p{ align-self:start; max-width:none; }
  .rh-on .rh-stops{ grid-template-columns:minmax(0, 1fr); }
  .rh-game{ --rh-pin:28px; }
  .rh-m-label{ font-size:34px; stroke-width:9px; }
  .rh-m-region{ font-size:30px; letter-spacing:.3em; }
  .rh-m-sea{ font-size:32px; }
  .rh-m-cart{ display:none; }
  .rh-pin.is-done::after, .rh-pin.is-locked::after{ width:14px; height:14px; right:-5px; bottom:-4px; background-size:8px; border-width:1.5px; }
  .rh-pin.is-current::before{ inset:-6px; border-width:2.5px; }
  .rh-mapwrap{ border-radius:18px; box-shadow:0 0 0 2px var(--pf-ink), 6px 6px 0 2px var(--pf-dune); }
  .rh-map{ border-radius:18px; }
  .rh-side{ margin-inline:calc(var(--pf-gutter) * -1); width:auto; max-width:none; }
  .rh-pass{ border-radius:20px 20px 0 0; }
  .rh-pass-title{ font-size:1rem; }
  .rh-slots--grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px 14px; padding-inline:6px; }
  .rh-slots--grid .rh-slot-ring{ max-width:78px; }
  .rh-opts{ grid-template-columns:minmax(0, 1fr); }
  .rh-card-head{ padding:16px 18px 62px; }
  .rh-card-big{ font-size:5.5rem; right:14px; }
  .rh-dyk{ padding:14px 16px 14px 56px; }
  .rh-dyk::before, .rh-dyk::after{ left:13px; top:14px; width:30px; height:30px; }
  .rh-ticket-stub{ padding:24px 22px 0; }
  .rh-stub-dl{ grid-template-columns:1fr 1fr; }
  .rh-stub-art{ margin-inline:-22px; }
  .rh-ticket-foot .pf-btn{ width:100%; }
  .rh-pp-cover{ flex-direction:column; }
  .rh-pp-cover-words{ align-items:center; }
  .rh-cert-stamps > span{ width:56px; height:56px; }
}


/* --------------------------------------------------------------------------
   Reduced motion: pf.css already stops every animation inside .pf-main;
   these cover the parts rihla.js moves itself.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .rh-dialog[open], .rh-card.is-thud, .rh-slam.is-slam .rh-stamp-svg, .rh-slam.is-slam::after,
  .rh-slot.is-new .rh-stamp-svg, .rh-pin.is-current::before, .rh-pin.is-shake, .rh-pin.is-pop,
  .rh-opt.is-wrong, .rh-opt.is-right .rh-opt-key, .rh-collect-btn.is-ready, .rh-swing, .rh-open::before,
  .rh-token .rh-leg, .rh-token .rh-token-bob{ animation:none !important; }
  .rh-bar > span, .rh-toast, .rh-pin, .rh-opt, .rh-stop-card, .rh-x{ transition:none !important; }
  .rh-pin:hover, .rh-opt:hover:not([aria-disabled="true"]), .rh-on .rh-stop-card:hover, .rh-x:hover{ transform:none !important; }
}

@media print{
  .rh-side, .rh-pins, .rh-dialog, .rh-toast{ display:none !important; }
  .rh-on .rh-stop-lesson, .rh-on .rh-stop-dyk{ display:block; }
}


/* --------------------------------------------------------------------------
   13. Page-level additions (onward band, small helpers)
   -------------------------------------------------------------------------- */
.rh-onward{ text-align:center; }
.rh-onward .pf-lead{ margin-inline:auto; max-width:52ch; }
.rh-onward .pf-h3{ margin:0 0 .4em; }
.rh-onward .pf-actions{ justify-content:center; }
.rh-collect-copy{ min-width:0; }
.rh-opt-text{ min-width:0; }
.rh-hero .pf-hero-art svg, .rh-ghero .pf-hero-art svg{ overflow:visible; }
.rh-ticket-ar, .rh-ghero-ar{ text-align:left; }
.rh-card-title:focus-visible, .rh-cert-title:focus-visible{ outline:none; }
/* itinerary: two columns while the board sits beside the passport but is narrow */
@media (min-width:1024px) and (max-width:1199px){
  .rh-on .rh-stops{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
.rh-nowrap{ white-space:nowrap; }


/* --------------------------------------------------------------------------
   14. Polish pass
   -------------------------------------------------------------------------- */
/* The closing band meets the footer: the chrome footer keeps a 64px top
   margin (site-chrome.css, not ours to edit), so the band pulls the footer up
   and pads itself by the same amount. No sand strip between the two. */
.rh-onward{ margin-bottom:-64px; padding-bottom:calc(clamp(36px, 5vw, 64px) + 64px); }
