/* DRY Records memory game. Loaded only by [dry_records_memory_game]. */

.dry-records-memory{
  --memory-bg:#f7f8fb;
  --memory-ink:#101828;
  --memory-muted:#667085;
  --memory-line:#d0d5dd;
  --memory-panel:#ffffff;
  --memory-green:#059669;
  --memory-red:#e11d48;
  --memory-blue:#2563eb;
  width:100%;
  max-width:100%;
  min-height:100svh;
  margin:0;
  overflow-x:hidden;
  color:var(--memory-ink);
  background:
    radial-gradient(900px 500px at 15% -8%, rgba(37,99,235,.08), transparent 58%),
    radial-gradient(900px 500px at 85% -8%, rgba(5,150,105,.08), transparent 58%),
    var(--memory-bg);
  font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dry-records-memory,
.dry-records-memory *{
  box-sizing:border-box;
}


:where(.entry-content, .wp-block-post-content, .wp-block-group, .wp-block-column) > .dry-records-memory{
  width:100%;
  max-width:100%;
  margin-top:0 !important;
  margin-bottom:0 !important;
}

.dry-records-memory button,
.dry-records-memory a{
  -webkit-tap-highlight-color:transparent;
}

.dry-records-memory .memoryTopbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:72px;
  padding:14px clamp(18px, 4vw, 54px);
  border-bottom:1px solid rgba(16,24,40,.10);
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
}

.dry-records-memory .memoryBack{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border:1px solid var(--memory-line);
  border-radius:50%;
  color:var(--memory-ink);
  text-decoration:none;
  font-size:27px;
  line-height:1;
  background:#fff;
}

.dry-records-memory .memoryBack:hover{
  background:#f2f4f7;
}

.dry-records-memory .memoryBrand{
  display:flex;
  flex-direction:column;
  gap:2px;
  text-align:center;
}

.dry-records-memory .memoryBrand span,
.dry-records-memory .memoryScore span,
.dry-records-memory .memoryKicker,
.dry-records-memory .memoryStats span{
  color:var(--memory-muted);
  font-size:12px;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.dry-records-memory .memoryBrand strong{
  color:var(--memory-ink);
  font-size:18px;
}

.dry-records-memory .memoryScore{
  min-width:72px;
  text-align:right;
}

.dry-records-memory .memoryScore strong{
  display:block;
  margin-top:2px;
  color:var(--memory-ink);
  font-size:26px;
  line-height:1;
}

.dry-records-memory .memoryShell{
  width:min(1180px, calc(100% - 34px));
  min-height:calc(100svh - 72px);
  margin:0 auto;
  padding:clamp(28px, 5vw, 58px) 0 48px;
}

.dry-records-memory .memoryIntro,
.dry-records-memory .memoryEnd{
  min-height:calc(100svh - 170px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.dry-records-memory h1,
.dry-records-memory h2,
.dry-records-memory p{
  margin:0;
}

.dry-records-memory h1{
  max-width:900px;
  margin-top:10px;
  font-size:clamp(45px, 8vw, 94px);
  line-height:.94;
  letter-spacing:0;
}

.dry-records-memory h2{
  margin-top:10px;
  font-size:clamp(38px, 6vw, 72px);
  line-height:.96;
  letter-spacing:0;
}

.dry-records-memory .memoryIntro p:not(.memoryKicker),
.dry-records-memory .memoryEnd p{
  max-width:720px;
  margin-top:18px;
  color:#475467;
  font-size:clamp(18px, 2vw, 23px);
  line-height:1.4;
}

.dry-records-memory .memoryModes,
.dry-records-memory .memoryActions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:26px;
}

.dry-records-memory .memoryModes button,
.dry-records-memory .memoryActions button{
  min-height:40px;
  padding:0 14px;
  border:1px solid var(--memory-line);
  border-radius:8px;
  color:var(--memory-ink);
  background:#fff;
  cursor:pointer;
  font:850 15px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dry-records-memory .memoryModes button:hover,
.dry-records-memory .memoryActions button:hover{
  border-color:#98a2b3;
  background:#f9fafb;
}

.dry-records-memory .memoryStatus{
  margin-top:20px;
  color:var(--memory-muted);
  font-size:14px;
}

.dry-records-memory .memoryPlay[hidden],
.dry-records-memory .memoryIntro[hidden],
.dry-records-memory .memoryEnd[hidden]{
  display:none !important;
}

.dry-records-memory .memoryStats{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(16,24,40,.10);
}

.dry-records-memory .memoryStats strong{
  color:var(--memory-ink);
}

.dry-records-memory .memoryBoardHint{
  min-height:24px;
  margin:0 0 14px;
  color:#475467;
  font-size:16px;
  font-weight:750;
  line-height:1.4;
}

.dry-records-memory .memoryBoard{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(118px, 1fr));
  gap:12px;
}

.dry-records-memory .memoryBoard.is-nine-card{
  width:min(620px, 100%);
  margin:0 auto;
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.dry-records-memory .memoryTile{
  position:relative;
  width:100%;
  aspect-ratio:3 / 4;
  border:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  perspective:900px;
}

.dry-records-memory .memoryBoard.is-nine-card .memoryTile{
  aspect-ratio:1 / 1;
}

.dry-records-memory .memoryTile:focus-visible{
  outline:3px solid rgba(37,99,235,.50);
  outline-offset:3px;
}

.dry-records-memory .memoryTileInner{
  position:absolute;
  inset:0;
  display:block;
  transform-style:preserve-3d;
  transition:transform .46s cubic-bezier(.2,.8,.2,1);
}

.dry-records-memory .memoryTile:not(.is-flipped):not(.is-matched):hover .memoryTileInner{
  transform:translateY(-3px);
}

.dry-records-memory .memoryTile:not(.is-flipped):not(.is-matched):active .memoryTileInner{
  transform:translateY(0) scale(.985);
}

.dry-records-memory .memoryTileFace{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid var(--memory-line);
  border-radius:12px;
  box-shadow:0 14px 30px rgba(16,24,40,.08);
  backface-visibility:hidden;
  transform-style:preserve-3d;
  transition:border-color .18s ease, box-shadow .18s ease;
  pointer-events:none;
}

.dry-records-memory .memoryTileBack{
  color:#fff;
  background:
    linear-gradient(135deg, rgba(37,99,235,.92), rgba(15,23,42,.96)),
    #111827;
  transform:rotateY(0deg);
}

.dry-records-memory .memoryTileBack span{
  font-size:clamp(34px, 6vw, 58px);
  font-weight:900;
  line-height:1;
}

.dry-records-memory .memoryTileFront{
  color:var(--memory-ink);
  background:#fff;
  transform:rotateY(180deg);
}

.dry-records-memory .memoryTileFront.is-text-tile{
  background:linear-gradient(180deg, #ffffff, #f8fafc);
}

.dry-records-memory .memoryTileFront.is-bonus-tile{
  color:#032012;
  background:
    radial-gradient(circle at 20% 16%, rgba(255,255,255,.9), transparent 34%),
    linear-gradient(135deg, #bbf7d0, #22c55e);
}

.dry-records-memory .memoryTile.is-flipped .memoryTileInner,
.dry-records-memory .memoryTile.is-matched .memoryTileInner{
  transform:rotateY(180deg);
}

.dry-records-memory .memoryTile.is-bonus .memoryTileFace{
  border-color:rgba(5,150,105,.50);
  box-shadow:0 0 0 2px rgba(5,150,105,.16), 0 18px 36px rgba(5,150,105,.16);
}

.dry-records-memory .memoryTileFront img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.dry-records-memory .memoryTileFront .memoryTileType{
  position:absolute;
  top:10px;
  left:10px;
  right:10px;
  color:var(--memory-muted);
  font-size:11px;
  font-weight:850;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.dry-records-memory .memoryTileFront strong{
  display:block;
  width:100%;
  padding:30px 12px 12px;
  font-size:clamp(14px, 1.7vw, 18px);
  line-height:1.18;
  text-align:center;
  overflow-wrap:anywhere;
}

.dry-records-memory .memoryTileFront.is-text-tile strong{
  padding:34px 14px 14px;
  font-size:clamp(17px, 2.2vw, 24px);
  line-height:1.08;
}

.dry-records-memory .memoryTile.is-matched .memoryTileFace{
  border-color:rgba(5,150,105,.45);
  box-shadow:0 0 0 2px rgba(5,150,105,.16), 0 14px 30px rgba(16,24,40,.08);
}

.dry-records-memory .memoryTile.is-miss .memoryTileFace{
  border-color:rgba(225,29,72,.45);
  box-shadow:0 0 0 2px rgba(225,29,72,.14), 0 14px 30px rgba(16,24,40,.08);
}

.dry-records-memory .memoryTile:disabled{
  cursor:default;
}

.dry-records-memory .memoryBoard.is-previewing .memoryTile,
.dry-records-memory .memoryBoard.is-shuffling .memoryTile{
  pointer-events:none;
}

.dry-records-memory .memoryBoard.is-shuffling .memoryTileInner{
  animation:memoryTileShuffle .78s cubic-bezier(.2,.8,.2,1) both;
  animation-delay:calc(var(--tile-order, 0) * 38ms);
}

@keyframes memoryTileShuffle{
  0%{
    opacity:0;
    transform:translate3d(0, -18px, 0) rotateY(0deg) scale(.84);
  }
  28%{
    opacity:1;
    transform:translate3d(var(--shuffle-x, 0), 8px, 0) rotateZ(var(--shuffle-rot, 0deg)) scale(1.04);
  }
  58%{
    transform:translate3d(var(--shuffle-x-alt, 0), -6px, 0) rotateZ(var(--shuffle-rot-alt, 0deg)) scale(.98);
  }
  100%{
    opacity:1;
    transform:translate3d(0, 0, 0) rotateY(0deg) rotateZ(0deg) scale(1);
  }
}

@media (max-width:760px){
  .dry-records-memory .memoryTopbar{
    min-height:64px;
    padding:10px 14px;
  }

  .dry-records-memory .memoryBack{
    width:40px;
    height:40px;
  }

  .dry-records-memory .memoryBrand strong{
    font-size:15px;
  }

  .dry-records-memory .memoryScore strong{
    font-size:22px;
  }

  .dry-records-memory .memoryShell{
    width:min(100% - 24px, 1180px);
    min-height:calc(100svh - 64px);
    padding:26px 0 36px;
  }

  .dry-records-memory .memoryBoard{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px;
  }

  .dry-records-memory .memoryTileFace{
    border-radius:9px;
  }

  .dry-records-memory .memoryTileFront .memoryTileType{
    top:7px;
    left:7px;
    right:7px;
    font-size:9px;
  }

  .dry-records-memory .memoryTileFront strong{
    padding:25px 7px 7px;
    font-size:12px;
  }

  .dry-records-memory .memoryModes,
  .dry-records-memory .memoryActions{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:7px;
    width:100%;
  }

  .dry-records-memory .memoryModes button,
  .dry-records-memory .memoryActions button{
    width:100%;
    min-height:38px;
    padding:0 8px;
    font-size:13px;
  }
}
