/* Shared Tibumo Play rhythm with Sokoban-specific board and target patterns. */
.sokoban-landing {
  --sokoban-mechanic-bg: #f2eee4;
  --sokoban-worlds-bg: #fff8ec;
  --sokoban-gallery-bg: #eeeafa;
  --sokoban-parents-bg: #edf5e5;
  --sokoban-card-bg: rgba(255, 250, 244, 0.88);
  --sokoban-card-border: rgba(26, 26, 26, 0.11);
  --sokoban-pattern: rgba(26, 26, 26, 0.065);
  --sokoban-path: rgba(26, 26, 26, 0.20);
}
.sokoban-landing .sokoban-section { isolation: isolate; overflow: hidden; }
.sokoban-landing .sokoban-section > .sokoban-container { position: relative; z-index: 2; }
.sokoban-landing .sokoban-mechanic,
.sokoban-landing .sokoban-worlds,
.sokoban-landing .sokoban-gallery,
.sokoban-landing .sokoban-parents,
.sokoban-landing .sokoban-final { padding-block: clamp(78px, 8vw, 108px); }
.sokoban-landing .sokoban-mechanic { background: var(--sokoban-mechanic-bg); }
.sokoban-landing .sokoban-worlds { background: var(--sokoban-worlds-bg); }
.sokoban-landing .sokoban-gallery { background: var(--sokoban-gallery-bg); }
.sokoban-landing .sokoban-parents { background: var(--sokoban-parents-bg); }
.sokoban-landing .sokoban-hero {
  background:
    radial-gradient(circle at 8% 18%, rgba(105, 166, 35, 0.15), transparent 24%),
    radial-gradient(circle at 88% 76%, rgba(131, 53, 206, 0.14), transparent 26%),
    linear-gradient(135deg, #fffaf4, #f6f0e6 58%, #f2eadf);
}
.sokoban-landing .sokoban-hero::before {
  position: absolute;
  inset: 72px 0 0;
  background:
    linear-gradient(90deg, transparent 48%, rgba(26, 26, 26, 0.035) 49% 51%, transparent 52%),
    linear-gradient(transparent 48%, rgba(26, 26, 26, 0.035) 49% 51%, transparent 52%);
  background-size: 84px 84px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}
.sokoban-landing .sokoban-mechanic::after,
.sokoban-landing .sokoban-worlds::after,
.sokoban-landing .sokoban-gallery::after,
.sokoban-landing .sokoban-parents::after,
.sokoban-landing .sokoban-final::after {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: min(calc(100vw - 80px), 1120px);
  height: 9px;
  border-radius: 999px;
  background: url('../img/brand/tibumo-color-bar.png') center / 100% 100% no-repeat;
  box-shadow: 0 1px 3px rgba(26, 26, 26, 0.12);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}
.sokoban-landing .sokoban-worlds::after { background-image: url('../img/brand/tibumo-color-bar-universes.png'); }
.sokoban-landing .sokoban-gallery::after { background-image: url('../img/brand/tibumo-color-bar-showcase.png'); }
.sokoban-landing .sokoban-parents::after { background-image: url('../img/brand/tibumo-color-bar-safety.png'); }
.sokoban-landing .sokoban-final::after { background-image: url('../img/brand/tibumo-color-bar-games.png'); }
.sokoban-landing .sokoban-mechanic::before,
.sokoban-landing .sokoban-worlds::before,
.sokoban-landing .sokoban-gallery::before,
.sokoban-landing .sokoban-parents::before,
.sokoban-landing .sokoban-final::before {
  position: absolute;
  inset: 28px 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}
.sokoban-landing .sokoban-mechanic::before {
  background:
    url('../img/sokoban/screens/ipad/shared/01-jardin-plateau.jpg?v=20260903-dbd4cb45d9f2') right 5% center / min(34vw, 430px) auto no-repeat,
    radial-gradient(circle at 12% 24%, rgba(105, 166, 35, 0.20), transparent 22%),
    radial-gradient(circle at 88% 70%, rgba(235, 118, 36, 0.16), transparent 24%),
    repeating-linear-gradient(90deg, transparent 0 47px, var(--sokoban-pattern) 48px 50px),
    repeating-linear-gradient(0deg, transparent 0 47px, var(--sokoban-pattern) 48px 50px);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  opacity: 0.22;
}
.sokoban-landing .sokoban-worlds::before {
  background:
    url('../img/sokoban/screens/ipad/shared/02-atelier-plateau.jpg?v=20260903-dbd4cb45d9f2') left 4% center / min(31vw, 390px) auto no-repeat,
    radial-gradient(circle at 13% 72%, rgba(105, 166, 35, 0.24), transparent 24%),
    radial-gradient(circle at 50% 18%, rgba(68, 153, 249, 0.20), transparent 22%),
    radial-gradient(circle at 88% 70%, rgba(131, 53, 206, 0.20), transparent 25%);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  opacity: 0.18;
}
.sokoban-landing .sokoban-gallery::before {
  background:
    url('../img/sokoban/app-icon.png') right 7% center / min(25vw, 270px) auto no-repeat,
    radial-gradient(circle at 76% 18%, rgba(131, 53, 206, 0.17), transparent 23%),
    linear-gradient(90deg, var(--sokoban-pattern) 1px, transparent 1px),
    linear-gradient(var(--sokoban-pattern) 1px, transparent 1px);
  background-size: min(25vw, 270px) auto, auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0.14;
}
.sokoban-landing .sokoban-parents::before {
  background:
    url('../img/sokoban/screens/ipad/shared/03-bibliotheque-plateau.jpg?v=20260903-dbd4cb45d9f2') left 5% center / min(32vw, 400px) auto no-repeat,
    radial-gradient(circle at 18% 22%, rgba(245, 190, 50, 0.20), transparent 23%),
    radial-gradient(circle at 82% 78%, rgba(68, 153, 249, 0.16), transparent 24%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 31px, var(--sokoban-pattern) 32px 34px, transparent 35px 64px);
  mask-image: linear-gradient(180deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  opacity: 0.18;
}
.sokoban-landing .sokoban-final::before {
  background:
    url('../img/sokoban/app-icon.png') right 8% center / min(24vw, 250px) auto no-repeat,
    radial-gradient(circle at 18% 22%, rgba(245, 190, 50, 0.20), transparent 23%),
    radial-gradient(circle at 82% 78%, rgba(68, 153, 249, 0.16), transparent 24%);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0.13;
}
.sokoban-landing .sokoban-section__head { margin-inline: auto; text-align: center; }
.sokoban-landing .sokoban-section__head > p:last-child { margin-inline: auto; }
.sokoban-landing .sokoban-kicker {
  display: table;
  margin: 0 auto 16px;
  padding: 7px 14px;
  border: 1px dashed rgba(131, 53, 206, 0.30);
  border-radius: 7px;
  background: rgba(255, 250, 244, 0.68);
  color: var(--tibumo-purple);
  transform: rotate(-1deg);
}
.sokoban-landing .rainbow-title span { text-shadow: none; }
.sokoban-landing .rainbow-title span:nth-child(5n+1) { color: var(--tibumo-blue); }
.sokoban-landing .rainbow-title span:nth-child(5n+2) { color: var(--tibumo-green); }
.sokoban-landing .rainbow-title span:nth-child(5n+3) { color: var(--tibumo-orange); }
.sokoban-landing .rainbow-title span:nth-child(5n+4) { color: var(--tibumo-purple); }
.sokoban-landing .rainbow-title span:nth-child(5n+5) { color: #d94f8c; }
.sokoban-landing .sokoban-steps { position: relative; gap: clamp(16px, 2vw, 26px); }
.sokoban-landing .sokoban-steps::before {
  position: absolute;
  top: 42px;
  right: 11%;
  left: 11%;
  z-index: -1;
  border-top: 4px dashed var(--sokoban-path);
  content: "";
}
.sokoban-landing .sokoban-steps article,
.sokoban-landing .sokoban-parent-grid article {
  border: 1px solid var(--sokoban-card-border);
  border-top: 5px solid var(--tibumo-blue);
  border-radius: 18px 7px 18px 7px;
  background: var(--sokoban-card-bg);
  box-shadow: 0 14px 32px rgba(26, 26, 26, 0.08);
  backdrop-filter: blur(8px);
}
.sokoban-landing .sokoban-steps article:nth-child(1) { transform: rotate(-0.7deg); }
.sokoban-landing .sokoban-steps article:nth-child(2) { transform: translateY(12px); }
.sokoban-landing .sokoban-steps article:nth-child(3) { transform: rotate(0.7deg); }
.sokoban-landing .sokoban-world-grid { position: relative; gap: 18px; }
.sokoban-landing .sokoban-world-grid::before {
  position: absolute;
  top: 44%;
  right: 4%;
  left: 4%;
  z-index: -1;
  border-top: 5px dashed var(--sokoban-path);
  content: "";
}
.sokoban-landing .sokoban-world {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sokoban-card-border);
  border-top: 6px solid var(--tibumo-green);
  border-radius: 22px 8px 22px 8px;
  background: var(--sokoban-card-bg);
  box-shadow: 0 18px 38px rgba(26, 26, 26, 0.11);
}
.sokoban-landing .sokoban-world--garden { transform: translateY(0); }
.sokoban-landing .sokoban-world--workshop { transform: translateY(18px); }
.sokoban-landing .sokoban-world--library { transform: translateY(36px); }
.sokoban-landing .sokoban-world__visual { position: relative; overflow: hidden; }
.sokoban-landing .sokoban-world__visual::after {
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(18, 19, 32, 0.42));
  content: "";
  pointer-events: none;
}
.sokoban-landing .sokoban-world img {
  height: auto;
  aspect-ratio: 16 / 9;
  object-position: center 42%;
  transition: transform 240ms ease;
}
.sokoban-landing .sokoban-world:hover img { transform: scale(1.025); }
.sokoban-world__count {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: white;
  font-family: var(--brand-font);
  font-size: 36px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.54);
}
.sokoban-landing .sokoban-world__body { padding: 18px 19px 20px; }
.sokoban-landing .sokoban-world h3 { color: var(--tibumo-green); }
.sokoban-landing .sokoban-world--workshop h3 { color: var(--tibumo-orange); }
.sokoban-landing .sokoban-world--library h3 { color: var(--tibumo-purple); }
.sokoban-landing .sokoban-world p { font-size: 15px; line-height: 1.48; }
.sokoban-landing .sokoban-world ul { margin-top: 13px; }
.sokoban-landing .sokoban-gallery__shell {
  overflow: hidden;
  border: 1px solid var(--sokoban-card-border);
  border-radius: 24px 8px 24px 8px;
  background: var(--sokoban-card-bg);
  box-shadow: 0 20px 48px rgba(26, 26, 26, 0.14);
}
.sokoban-landing .sokoban-gallery__viewport { min-height: 0; }
.sokoban-landing .sokoban-gallery__devices {
  padding: clamp(22px, 3vw, 34px);
  background:
    radial-gradient(circle at 86% 12%, rgba(131, 53, 206, 0.32), transparent 26%),
    radial-gradient(circle at 12% 88%, rgba(105, 166, 35, 0.22), transparent 24%),
    #171821;
}
.sokoban-landing .sokoban-gallery__phone { width: min(100%, 270px); }
.sokoban-landing .sokoban-gallery figcaption { background: var(--sokoban-card-bg); }
.sokoban-landing .sokoban-gallery__controls { padding-bottom: 18px; }
.sokoban-landing .sokoban-parent-grid { gap: 18px; }
.sokoban-landing .sokoban-parent-grid article { min-height: 176px; }
.sokoban-landing .sokoban-final {
  background:
    radial-gradient(circle at 12% 22%, rgba(245, 190, 50, 0.38), transparent 24%),
    radial-gradient(circle at 88% 76%, rgba(68, 153, 249, 0.28), transparent 25%),
    linear-gradient(135deg, rgba(105, 166, 35, 0.24), rgba(131, 53, 206, 0.20)),
    var(--tibumo-cream);
}
.sokoban-landing .sokoban-final__inner {
  max-width: 980px;
  border: 1px solid var(--sokoban-card-border);
  border-radius: 28px 10px 28px 10px;
  background: var(--sokoban-card-bg);
  box-shadow: 0 20px 50px rgba(26, 26, 26, 0.13);
  text-align: center;
}
.sokoban-landing .sokoban-final .sokoban-stores { justify-content: center; }
:root[data-theme="dark"] .sokoban-landing {
  --sokoban-mechanic-bg: #1e2026;
  --sokoban-worlds-bg: #191c21;
  --sokoban-gallery-bg: #20202b;
  --sokoban-parents-bg: #1b211d;
  --sokoban-card-bg: rgba(249, 246, 241, 0.075);
  --sokoban-card-border: rgba(249, 246, 241, 0.15);
  --sokoban-pattern: rgba(249, 246, 241, 0.055);
  --sokoban-path: rgba(249, 246, 241, 0.20);
}
:root[data-theme="dark"] .sokoban-landing .sokoban-kicker {
  border-color: rgba(245, 190, 50, 0.30);
  background: rgba(249, 246, 241, 0.08);
  color: var(--tibumo-yellow);
}
:root[data-theme="dark"] .sokoban-landing .rainbow-title span:nth-child(5n+5) { color: var(--tibumo-yellow); }
:root[data-theme="dark"] .sokoban-landing .sokoban-hero {
  background:
    radial-gradient(circle at 8% 18%, rgba(105, 166, 35, 0.12), transparent 24%),
    radial-gradient(circle at 88% 76%, rgba(131, 53, 206, 0.12), transparent 26%),
    #1a1a1a;
}
:root[data-theme="dark"] .sokoban-landing .sokoban-final { background-color: var(--tibumo-black); }
:root[data-theme="dark"] .sokoban-landing .sokoban-final__inner { background: rgba(26, 26, 26, 0.78); }
:root[data-theme="dark"] .sokoban-landing .sokoban-section::before { filter: brightness(0.72) saturate(0.86); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sokoban-landing {
    --sokoban-mechanic-bg: #1e2026;
    --sokoban-worlds-bg: #191c21;
    --sokoban-gallery-bg: #20202b;
    --sokoban-parents-bg: #1b211d;
    --sokoban-card-bg: rgba(249, 246, 241, 0.075);
    --sokoban-card-border: rgba(249, 246, 241, 0.15);
    --sokoban-pattern: rgba(249, 246, 241, 0.055);
    --sokoban-path: rgba(249, 246, 241, 0.20);
  }
  :root:not([data-theme="light"]) .sokoban-landing .sokoban-kicker {
    border-color: rgba(245, 190, 50, 0.30);
    background: rgba(249, 246, 241, 0.08);
    color: var(--tibumo-yellow);
  }
  :root:not([data-theme="light"]) .sokoban-landing .rainbow-title span:nth-child(5n+5) { color: var(--tibumo-yellow); }
  :root:not([data-theme="light"]) .sokoban-landing .sokoban-hero {
    background:
      radial-gradient(circle at 8% 18%, rgba(105, 166, 35, 0.12), transparent 24%),
      radial-gradient(circle at 88% 76%, rgba(131, 53, 206, 0.12), transparent 26%),
      #1a1a1a;
  }
  :root:not([data-theme="light"]) .sokoban-landing .sokoban-final { background-color: var(--tibumo-black); }
  :root:not([data-theme="light"]) .sokoban-landing .sokoban-final__inner { background: rgba(26, 26, 26, 0.78); }
  :root:not([data-theme="light"]) .sokoban-landing .sokoban-section::before { filter: brightness(0.72) saturate(0.86); }
}
@media (max-width: 980px) {
  .sokoban-landing .sokoban-world-grid {
    display: grid;
    grid-auto-columns: min(78vw, 560px);
    grid-auto-flow: column;
    grid-template-columns: none;
    margin-right: calc((100vw - min(1180px, calc(100vw - 40px))) / -2);
    padding: 4px max(24px, calc((100vw - 1180px) / 2)) 28px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--tibumo-orange) transparent;
    scrollbar-width: thin;
  }
  .sokoban-landing .sokoban-world { display: block; scroll-snap-align: start; transform: none; }
  .sokoban-landing .sokoban-world-grid::before { display: none; }
}
@media (max-width: 700px) {
  .sokoban-landing .sokoban-mechanic,
  .sokoban-landing .sokoban-worlds,
  .sokoban-landing .sokoban-gallery,
  .sokoban-landing .sokoban-parents,
  .sokoban-landing .sokoban-final { padding-block: 70px; }
  .sokoban-landing .sokoban-mechanic::after,
  .sokoban-landing .sokoban-worlds::after,
  .sokoban-landing .sokoban-gallery::after,
  .sokoban-landing .sokoban-parents::after,
  .sokoban-landing .sokoban-final::after { width: calc(100vw - 32px); height: 7px; }
  .sokoban-landing .sokoban-section__head { margin-bottom: 30px; }
  .sokoban-landing .sokoban-steps { gap: 14px; }
  .sokoban-landing .sokoban-steps::before { display: none; }
  .sokoban-landing .sokoban-steps article { transform: none; }
  .sokoban-landing .sokoban-world-grid { grid-auto-columns: min(86vw, 420px); margin-right: -14px; }
  .sokoban-landing .sokoban-world img { aspect-ratio: 3 / 2; }
  .sokoban-landing .sokoban-gallery__devices { gap: 18px; }
  .sokoban-landing .sokoban-gallery__phone { width: min(58vw, 230px); }
  .sokoban-landing .sokoban-parent-grid article { min-height: 0; }
  .sokoban-landing .sokoban-section::before { opacity: 0.11; }
  .sokoban-landing .sokoban-mechanic::before { background-size: 230px auto, auto, auto, 50px 50px, 50px 50px; }
  .sokoban-landing .sokoban-worlds::before { background-size: 220px auto, auto, auto, auto; }
  .sokoban-landing .sokoban-gallery::before { background-size: 180px auto, auto, 42px 42px, 42px 42px; }
  .sokoban-landing .sokoban-parents::before { background-size: 220px auto, auto, auto, auto; }
  .sokoban-landing .sokoban-final::before { background-size: 170px auto, auto, auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sokoban-landing .sokoban-world img { transition: none; }
  .sokoban-landing .sokoban-world:hover img { transform: none; }
}
