/* R7362, public index only. All mobile galleries, menu, cards and PCB unchanged. */
@media (min-width:821px){
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #top{order:1!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #wszystkie-czelendze{order:2!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > .home-auth-section{order:3!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #galeria{order:4!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #mini-gry{order:5!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #faq{order:6!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > .home-promo-section{order:7!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > #homeDesktopMore{order:8!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > .home-r8-final-puzzle-stage{order:9!important}
  html[data-home-r7363="1"] body.home-desktop-r7 #main > .home-story-final{order:10!important}

  body.home-story-v2.home-desktop-r7 #top.home-refresh-hero{
    min-height:0!important;height:auto!important;margin:0!important;padding:0 0 28px!important;
    display:block!important;overflow:visible!important;
  }
  body.home-desktop-r7 #top .home-refresh-hero__inner{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    width:100%!important;max-width:1460px!important;min-height:0!important;
    padding:0 clamp(20px,3vw,48px) 0 max(29%,calc((100% - 1460px)/2 + 420px))!important;
    margin:0 auto!important;gap:0!important;
  }
  body.home-desktop-r7 #top .home-refresh-hero__visual,
  body.home-desktop-r7 #top .home-refresh-hero__copy{
    width:100%!important;max-width:none!important;margin:0!important;min-height:0!important;padding:0!important;
  }
  body.home-desktop-r7 #top .home-refresh-hero__visual{
    display:flex!important;justify-content:flex-start!important;align-items:center!important;
    overflow:visible!important;
  }
  body.home-desktop-r7 #top .home-r3-hero-carousel{
    display:flex!important;align-items:center!important;justify-content:center!important;
    width:min(500px,100%)!important;max-width:100%!important;aspect-ratio:1!important;
    min-height:min(500px,100vw)!important;height:auto!important;margin:0 auto!important;overflow:visible!important;
  }
  body.home-desktop-r7 #top img.home-r3-hero-photo{
    width:100%!important;height:auto!important;max-height:500px!important;max-width:none!important;
    aspect-ratio:1!important;object-fit:contain!important;object-position:center center!important;cursor:pointer;
    touch-action:manipulation!important;pointer-events:auto!important;user-select:none!important;-webkit-user-drag:none!important;
  }
  body.home-desktop-r7 #top img.home-r3-hero-photo:focus-visible{outline:3px solid var(--orange);outline-offset:5px;border-radius:22px}
  body.home-desktop-r7 #top .home-r8-hero-arrow,
  body.home-desktop-r7 #top .home-r3-hero-indicators{display:none!important}
  body.home-desktop-r7 #top .home-refresh-hero__copy{margin-top:-4px!important;max-width:700px!important;margin-left:34px!important}
  body.home-desktop-r7 #top h1{font-size:clamp(22px,2.55vw,39px)!important;max-width:640px!important}
  body.home-desktop-r7 #top .home-refresh-hero__lead{font-size:clamp(12px,1.05vw,15px)!important;line-height:1.52!important;max-width:640px!important}
  body.home-desktop-r7 #top .home-hero-actions{margin-top:16px!important;display:flex!important}
  body.home-desktop-r7 #top .home-hero-actions>a:not(.home-marta-about-cta){display:none!important}
  body.home-desktop-r7 #top .home-hero-actions .home-marta-about-cta{
    display:inline-flex!important;min-height:48px!important;max-width:100%!important;
    padding:12px clamp(18px,2.3vw,28px)!important;font-size:clamp(12px,1vw,14px)!important;
    border-radius:15px!important;line-height:1.3!important;white-space:normal!important;
    background:var(--orange)!important;color:#fff!important;border-color:var(--orange)!important;
  }
  body.home-story-v2 .home-story-puzzle[data-anchor="hero-right"]{
    --story-left:16vw!important;--story-top:45vh!important;
    --story-width:clamp(210px,25vw,340px)!important;--story-rotate:-3deg!important;
  }
  body.home-story-v2 #wszystkie-czelendze{padding-top:30px!important}

  /* Exactly two panels in the same section: calendar/manipulator and registration. */
  body.home-story-v2 .home-auth-section{padding:45px 0 36px!important}
  body.home-story-v2 .home-auth-section__grid{
    display:grid!important;grid-template-columns:minmax(0,1.06fr) minmax(360px,.94fr)!important;
    gap:clamp(20px,3vw,48px)!important;align-items:start!important;
    width:min(1210px,calc(100% - 46px))!important;max-width:1210px!important;
  }
  body.home-story-v2 .home-r7362-demo-column{min-width:0;max-width:100%;position:relative;z-index:5}
  body.home-story-v2 .home-r7362-demo-column #zapis-dnia-podglad{
    width:100%!important;max-width:100%!important;min-width:0!important;
    margin:0!important;padding:0!important;overflow:visible!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-controls-demo__head{
    display:block!important;margin:0 0 13px!important;padding:0!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-controls-demo__head h2{
    font-size:clamp(22px,2.2vw,32px)!important;line-height:1.12!important;max-width:100%!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-controls-demo__lead{
    margin:10px 0 0!important;font-size:12px!important;line-height:1.55!important;max-width:100%!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-control-card{
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding:clamp(10px,1.6vw,18px)!important;overflow:visible!important;
    display:flex!important;flex-direction:column!important;gap:7px!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-control-card__copy{
    width:100%!important;max-width:100%!important;min-width:0!important;position:relative!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-control-card__copy h3{font-size:clamp(18px,1.7vw,24px)!important}
  body.home-story-v2 .home-r7362-demo-column .home-control-card__copy p{font-size:11px!important;line-height:1.5!important;margin:5px 0 0!important}
  body.home-story-v2 .home-r7362-demo-column .home-control-card__visual{
    width:100%!important;min-width:0!important;min-height:235px!important;margin:0!important;
    overflow:visible!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-demo-calendar{
    width:100%!important;left:0!important;right:0!important;top:3px!important;gap:5px!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-control-device-shell{
    width:min(100%,520px)!important;max-width:100%!important;margin-top:55px!important;
  }
  body.home-story-v2 .home-r7362-demo-column .home-controls-demo__actions{
    display:none!important;
  }
  body.home-story-v2 .home-auth-section__grid>.landing-side{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
  }
  body.home-story-v2 .home-auth-section__grid>.landing-side .auth-card{
    width:100%!important;max-width:100%!important;min-width:0!important;position:relative!important;top:auto!important;
    min-height:660px!important;padding-bottom:20px!important;
  }
  body.home-story-v2 .home-r7362-auth-more,
  body.home-story-v2 .home-r7362-games-more{
    border:1px solid var(--border);background:var(--surface);border-radius:16px;
    margin:13px 0 0;padding:12px 16px;color:var(--text);
  }
  body.home-story-v2 .home-r7362-auth-more summary,
  body.home-story-v2 .home-r7362-games-more summary{font-size:12px;font-weight:800;cursor:pointer;color:var(--text)}
  body.home-story-v2 .home-r7362-auth-more .home-auth-section__copy{
    margin:12px 0 0;max-width:none!important;
  }
  body.home-story-v2 .home-r7362-auth-more .home-auth-section__copy h2{font-size:21px!important}
  body.home-story-v2 .home-r7362-auth-more .home-auth-section__copy p{font-size:12px!important;margin-top:8px!important}

  /* Gallery platform remains before Marta story, with its original rail and modal. */
  body.home-story-v2 #galeria{padding-top:22px!important;padding-bottom:24px!important}
  body.home-story-v2 #galeria .home-r7355-story-short__link span[aria-hidden]{display:none!important}
  body.home-story-v2 #galeria .home-r7355-story-short__link::after{content:none!important}
  body.home-story-v2 #galeria .home-r7355-story-short{margin-top:22px!important}

  /* Game titles on one compact band, full explanations in foldout below gallery. */
  body.home-story-v2 #mini-gry{padding-top:38px!important;padding-bottom:26px!important}
  body.home-story-v2 #mini-gry .home-r7362-games-band{
    width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
    gap:24px;align-items:center;margin-bottom:16px;padding:16px clamp(18px,2.5vw,30px);
    background:var(--surface);border:1px solid var(--border);border-radius:20px;
  }
  body.home-story-v2 #mini-gry .home-r7362-games-band .home-games-head,
  body.home-story-v2 #mini-gry .home-r7362-games-band .home-gallery-head{
    display:block!important;grid-template-columns:none!important;margin:0!important;padding:0!important;
    min-width:0!important;width:100%!important;
  }
  body.home-story-v2 #mini-gry .home-r7362-games-band h2{font-size:clamp(20px,2.1vw,30px)!important;line-height:1.13!important}
  body.home-story-v2 #mini-gry .home-r7362-games-band h3{font-size:clamp(18px,1.95vw,27px)!important;line-height:1.16!important}
  body.home-story-v2 #mini-gry .home-r7362-games-more{margin:15px 0 16px}
  body.home-story-v2 #mini-gry .home-r7362-games-more>.home-marta-games-lead{font-size:13px;line-height:1.6;margin:12px 0}
  body.home-story-v2 #mini-gry .home-r7362-games-more .home-r8-gallery-copy{font-size:13px;line-height:1.55;margin:0}
  body.home-story-v2 #faq{padding-top:32px!important;padding-bottom:40px!important}
  body.home-story-v2 #homeDesktopMore{margin-top:10px!important;margin-bottom:25px!important}
  body.home-story-v2 .home-promo-section{padding:30px 0 20px!important}

  /* The final piece is docked well above the title, no counters over badge/title. */
  body.home-story-v2 .home-story-final{
    min-height:850px!important;padding-top:clamp(470px,48vh,640px)!important;
    padding-bottom:90px!important;overflow:visible!important;align-items:flex-end!important;
  }
  body.home-story-v2 .home-story-final__inner{z-index:15!important;padding-top:14px!important}
  body.home-story-v2 .home-story-final__badge{position:relative;z-index:16;line-height:1.35;white-space:normal}
  body.home-story-v2 .home-story-puzzle.is-complete .home-story-puzzle__hint{display:none!important}
  body.home-story-v2 .home-story-puzzle.is-final-docked .home-story-puzzle__controls{bottom:-36px!important}
}
@media (min-width:821px) and (max-width:1080px){
  body.home-desktop-r7 #top .home-refresh-hero__inner{padding-left:35%!important;padding-right:18px!important}
  body.home-desktop-r7 #top .home-r3-hero-carousel{width:min(600px,100%)!important}
  body.home-story-v2 .home-auth-section__grid{grid-template-columns:minmax(0,1fr) minmax(350px,.95fr)!important;gap:18px!important}
  body.home-story-v2 .home-r7362-demo-column .home-control-card__visual{min-height:208px!important}
}


@media (min-width:821px){
  body.home-story-v2 .home-story-puzzle.is-manual-top{z-index:1400!important;filter:drop-shadow(0 28px 36px rgba(17,24,39,.2))!important}
  body.home-story-v2 .home-r7362-demo-column,
  body.home-story-v2 .home-r7362-demo-column #zapis-dnia-podglad,
  body.home-story-v2 .home-r7362-demo-column .home-control-card,
  body.home-story-v2 .home-r7362-demo-column .home-control-card__visual,
  body.home-story-v2 .home-r7362-demo-column .home-control-device-shell{position:relative!important;z-index:60!important}
  body.home-story-v2 .home-r7362-demo-column .home-control-device{position:absolute!important;z-index:62!important}
  body.home-story-v2 .home-r7362-demo-column .home-control-device.is-active{z-index:64!important}
  body.home-story-v2 .home-auth-section__grid>.landing-side{position:relative!important;z-index:5!important}

  body.home-desktop-r7 .home-r7-gallery-shell{display:block!important;margin-top:12px!important}
  body.home-desktop-r7 .home-r7-gallery-viewport{padding:18px 0 20px!important}
  body.home-desktop-r7 .home-r7-gallery-nav{display:flex!important;align-items:center;justify-content:center;gap:10px;margin:4px 0 0}
  body.home-desktop-r7 .home-r7-gallery-meta{display:inline-flex!important;align-items:center;justify-content:center;min-width:74px;padding:0!important;color:var(--muted)!important;font-size:11px!important;font-weight:800!important}
  body.home-desktop-r7 .home-r7-gallery-arrow{position:static!important;top:auto!important;left:auto!important;right:auto!important;transform:none!important;width:42px!important;height:42px!important;font-size:27px!important}

  body.home-story-v2 #mini-gry .home-r7362-games-band{display:block!important;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;margin-bottom:12px!important}
  body.home-story-v2 #mini-gry .home-r7362-games-band .home-gallery-head{display:none!important}
  body.home-story-v2 #mini-gry .home-r7362-games-band .home-games-head{display:block!important;margin:0 0 10px!important;padding:0!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy{margin:18px 0 0!important;padding:0!important;width:100%!important;color:var(--text)!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy .home-r7363-games-question{display:block!important;margin:0 0 12px!important;font-size:clamp(24px,2vw,30px)!important;line-height:1.2!important;font-weight:900!important;font-style:italic!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy p{margin:0 0 16px!important;max-width:none!important;font-size:15px!important;line-height:1.75!important;color:var(--text)!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy .home-r7363-games-subquestion{display:block!important;margin:18px 0 10px!important;font-size:clamp(19px,1.55vw,25px)!important;line-height:1.32!important;font-weight:900!important;font-style:italic!important}
  body.home-story-v2 #mini-gry .home-r7362-games-more{display:none!important}

  body.home-story-v2 .home-r8-final-puzzle-stage{height:clamp(570px,64vh,690px)!important;min-height:570px!important}
  body.home-story-v2 .home-story-puzzle[data-anchor="final"]{--story-final-width:clamp(450px,43vw,630px)!important}
  body.home-story-v2 .home-story-final{min-height:620px!important;padding-top:clamp(340px,35vh,430px)!important;padding-bottom:72px!important}
  body.home-story-v2 .home-story-final__badge{background:#fff1e9!important;color:#1d232b!important;border-color:rgba(255,90,0,.24)!important;box-shadow:0 8px 20px rgba(15,23,42,.12)!important}
}

@media (min-width:821px) and (max-width:1080px){
  body.home-desktop-r7 #top .home-refresh-hero__inner{padding-left:29%!important;padding-right:18px!important}
  body.home-desktop-r7 #top .home-r3-hero-carousel{width:min(430px,100%)!important;min-height:min(430px,100vw)!important}
  body.home-desktop-r7 #top img.home-r3-hero-photo{max-height:430px!important}
}


@media (min-width:821px){
  body.home-story-v2 #mini-gry .home-r7363-games-copy details{display:block!important;margin:18px 0 0!important;border:1px solid var(--border)!important;border-radius:18px!important;background:var(--surface)!important;overflow:hidden!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy summary{list-style:none!important;cursor:pointer!important;padding:15px 18px!important;font-size:13px!important;font-weight:800!important;color:var(--text)!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy summary::-webkit-details-marker{display:none!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy details[open] summary{border-bottom:1px solid var(--border)!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy .home-r7364-games-fold__body{padding:16px 18px 18px!important}
  body.home-story-v2 #mini-gry .home-r7363-games-copy .home-r7364-games-fold__body p{margin:0 0 14px!important}
}
