:root{--text:#1b1410;--rail:22}
*{box-sizing:border-box}html,body{margin:0}
body{font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto;color:var(--text);
  background:#e7c98f url('/assets/map-bg.jpg') center/cover fixed no-repeat;}
.wrap{max-width:1150px;margin:0 auto;padding:0.6rem 1.2rem}
.page-title{margin:.2rem 0 .4rem;font-size:clamp(2rem,4vw,3rem)}.brand{display:flex;align-items:center;gap:.8rem}.brand-sub{color:#3D2B12}
.accent{color:#b91c1c}
.rail{position:absolute;inset:0;z-index:0;pointer-events:none}
#railPolyline{fill:none;stroke:#5a3d1b;stroke-width:var(--rail);stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:14 18;opacity:.9;filter:drop-shadow(0 3px 10px rgba(0,0,0,.35))}
.rail .xmark{stroke:#2b1a0a;stroke-width:6;stroke-linecap:round}
.rail .decor{opacity:.9}
.rail .check{fill:#0b8d2a;stroke:#111827;stroke-width:2}
.timeline{list-style:none;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem;padding:0.8rem 1rem;position:relative;z-index:1}
.station{display:grid;grid-template-columns:72px 1fr;gap:.8rem;align-items:flex-start}
.scroll{background:rgba(251,244,222,.88);
  border:1px solid rgba(66,41,10,.25);
  border-radius:12px;
  padding:1rem .9rem;
  box-shadow:0 8px 24px rgba(0,0,0,.22);
  position:relative;
  overflow:hidden}
.scroll:before,.scroll:after{content:'';position:absolute;inset:0;border-radius:12px;pointer-events:none}
.scroll:before{background:radial-gradient(120px 40px at 20px 10px, rgba(255,255,255,.35), transparent 60%),
                         radial-gradient(120px 40px at calc(100% - 20px) calc(100% - 10px), rgba(0,0,0,.06), transparent 60%)}
.scroll:after{border:1px dashed rgba(66,41,10,.25)}
.icon img{width:56px;height:56px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.25))}
.txt h2{margin:.1rem 0 .35rem;font-size:1.2rem}
.txt p{margin:0;color:#2c241c}
.walker{position:absolute;left:0;top:0;transform:translate(-9999px,-9999px);pointer-events:none;z-index:2;display:flex;align-items:flex-start;gap:.4rem}
.walker img{width:118px;height:118px;display:block}
.bubble{position:absolute;left:0;top:-34px;transform:translateX(6px);background:rgba(0,0,0,.55);color:#fff;padding:.24rem .6rem;border-radius:999px;font-weight:700;white-space:nowrap;border:1px solid rgba(255,255,255,.45)}
.buddy{display:none}
.treasure img{width:86px;height:auto;display:block;margin-top:.5rem;object-fit:contain}
.coins{position:absolute;pointer-events:none}
.coin{position:absolute;width:18px;height:18px;background:radial-gradient(circle at 30% 30%, #ffe37a, #c19a35);border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.25);animation:bounce 1.2s ease-out forwards}
@keyframes bounce{0%{transform:translateY(-10px) scale(.6);opacity:0}30%{opacity:1}60%{transform:translateY(-40px)}100%{transform:translateY(0);opacity:0}}
.site-footer{margin:10px 0 0;padding:6px 0;color:#333;position:relative}
.ecap-mark{position:fixed;right:12px;bottom:10px;color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.6);opacity:.95;font-size:.9rem}
@media(max-width:780px){
  .timeline{grid-template-columns:1fr}
  .station{grid-template-columns:56px 1fr}
  .walker img{width:94px;height:94px}
  .bubble{top:-26px;font-size:.9rem}
  :root{--rail:18}
}

/* === overrides by task === */
.page-title{margin-left:12px}
#railPolyline{stroke:#ffffff !important}


/* first letter visibility safeguard */
.page-title{padding-left:8px}


/* === trail: revert to thin white line === */
#railPolyline{stroke:#ffffff !important; stroke-width:6px !important; opacity:0.95}


/* desktop: center title */
@media (min-width: 900px){  .page-title{ text-align:center; margin:.1rem 0 0;} }
}


@media (min-width: 900px){  .page-title{ text-align:center; margin:.1rem 0 0;} }
  .page-title{ text-align:center; margin: .1rem 0 0; }
}


/* === ECAP logo (with claim) === */


/* desktop layout: left shift to avoid compass */
@media (min-width: 900px){
  
}

/* === ECAP logo size (closer to site.ecap / ecap.ch) === */
.brand-logo{ display:block; height:auto; max-height: 40px; }
@media (max-width: 640px){
  .brand-logo{ max-height: 28px; }
}


/* === mast banner: left-aligned container for logo + title (blog-like) === */

.brand-logo{
  display:block;
  height:auto;
  max-height: 40px;
}
.page-title{ text-align:left; margin:.3rem 0 0; }

@media (min-width: 900px){
  
  .page-title{ font-size: clamp(26px, 3.8vw, 54px); }
}
@media (max-width: 640px){
  .brand-logo{ max-height: 28px; }
}

/* === FIX: solid banner fill visible === */
.site-header .mast-banner{
  display:grid;
  gap:.5rem;
  justify-items:start;
  align-items:start;
  background: linear-gradient(180deg,#f7f5e6,#f3efd8) !important;
  border:1px solid #e7e1c2;
  border-radius:18px;
  box-shadow:0 6px 18px rgba(0,0,0,.14);
  padding:clamp(10px,2vw,18px) clamp(14px,3vw,26px);
  margin:12px clamp(10px,4vw,22px);
  position:relative; z-index:2;
}
.brand-logo{ display:block; height:auto; max-height:40px; }
.page-title{ text-align:left; margin:.3rem 0 0; }

@media (min-width: 900px){
  .site-header .mast-banner{ margin-left:clamp(18px,6vw,140px); margin-right:auto; max-width:min(980px,60vw); }
  .page-title{ font-size: clamp(26px,3.8vw,54px); }
}
@media (max-width: 640px){
  .brand-logo{ max-height:28px; }
}

/* === force header left alignment like blog === */
.wrap.head{ display:flex; justify-content:flex-start !important; }
.site-header .mast-banner{
  display:grid; gap:.5rem; justify-items:start; align-items:start;
  background: linear-gradient(180deg,#f7f5e6,#f3efd8);
  border:1px solid #e7e1c2; border-radius:18px; box-shadow:0 6px 18px rgba(0,0,0,.14);
  padding:clamp(10px,2vw,18px) clamp(14px,3vw,26px);
  margin:12px clamp(10px,4vw,22px);
  position:relative; z-index:2; max-width:min(980px,60vw);
}
.brand-logo{ display:block; height:auto; max-height:40px; }
.page-title{ text-align:left; margin:.3rem 0 0; }
@media (max-width:640px){ .brand-logo{ max-height:28px; } }


/* === Start overlay/button === */
.start-overlay{
  position:absolute;
  left:50%; top:12px; transform:translateX(-50%);
  z-index: 5;
}
.start-btn{
  transform-origin: 50% 50%;

  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font: 600 16px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.25);
  background: linear-gradient(#fff,#f2f2f2);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  cursor: pointer;
}
.start-btn:hover{ filter: brightness(0.98); }
.start-btn:active{ transform: scale(0.98); }
.start-overlay.hidden{ display:none !important; }

/* keep header positioned for absolute overlay */
.site-header{ position:relative; }

/* === Celebration animations === */
.walker.dance #walkerSprite{
  animation: wiggle 600ms ease-in-out infinite alternate,
             hop 680ms ease-in-out infinite alternate;
  transform-origin: 50% 80%;
}
@keyframes wiggle{ from{ transform: rotate(-8deg); } to{ transform: rotate(8deg); } }
@keyframes hop{ 0%{ transform: translateY(0); } 50%{ transform: translateY(-10px);} 100%{ transform: translateY(0);} }

/* === coin rain + confetti === */
.coin{ position:absolute; width:18px; height:18px; border-radius:50%;
  pointer-events:none; z-index:60;
  background: radial-gradient( circle at 30% 30%, #fff 0%, #ffe27a 25%, #ffc531 55%, #d19c00 100%);
  box-shadow: 0 0 8px rgba(255,215,0,.65);
  animation: coinFall var(--t,1400ms) ease-in forwards, coinSpin 700ms linear infinite;
  opacity: .95;
}
@keyframes coinFall{ from{ transform: translateY(0); } to{ transform: translateY(var(--fall,320px)); opacity:.9; } }
@keyframes coinSpin{ from{ transform: translateY(var(--y,0)) rotate(0deg); } to{ transform: translateY(var(--y,0)) rotate(360deg); } }

.confetti{ position:absolute; width:8px; height:12px; pointer-events:none; z-index:61;
  background: var(--c,#ff3b3b); border-radius:2px;
  animation: confettiFall var(--t,1600ms) ease-out forwards, confettiTwist 700ms ease-in-out infinite;
  opacity:.95; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
@keyframes confettiFall{ from{ transform: translateY(0); } to{ transform: translateY(var(--fall,380px)); opacity:.75; } }
@keyframes confettiTwist{ from{ transform: rotate(-20deg); } to{ transform: rotate(20deg);} }

/* Скрываем верхнюю кнопку Start */
.start-btn {
  display: none !important;
}

/* FORCE-HIDE the top Start overlay & button (even if JS/inline styles try to show it) */
.start-overlay,
.site-header .start-overlay,
.start-btn,
.site-header .start-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Hide debug buttons in production */
.audio-toggle-btn, .audio-debug-btn { display: none !important; }
