#homeHow {
  --guide-ink: #f3f0ff;
  --guide-muted: #b9b7d2;
  --guide-accent: #d2b9ff;
  --guide-line: #a28bc637;
  --guide-surface: #15162a;
  --guide-portal: url("/assets/play5on-portal.webp");
  color: var(--guide-ink);
  padding-top: clamp(2.25rem, 4.4vw, 4rem);
  scroll-margin-top: 86px;
}

.play-guide [hidden],
body:not(.signed-in) .play-guide-signed,
body.signed-in .play-guide-guest { display: none; }

.play-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.play-guide-intro .play-guide-label {
  color: var(--guide-accent);
  margin: 0 0 .65rem;
  font-size: .83rem;
  font-weight: 750;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.play-guide-intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -.054em;
  text-wrap: balance;
}

.play-guide-intro h2 em {
  color: var(--guide-accent);
  background: linear-gradient(100deg, #e2c9ff 8%, #969cff 90%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}

.play-guide-intro p,
.play-guide-steps p,
.play-guide-panel p {
  color: var(--guide-muted);
  line-height: 1.57;
}

.play-guide-intro p {
  max-width: 33rem;
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.13rem);
}

.play-guide-steps {
  display: grid;
  gap: 1.05rem;
  position: relative;
  list-style: none;
  padding: 0;
  margin: 1.65rem 0;
}

.play-guide-steps::before {
  position: absolute;
  content: "";
  inset: 1rem auto 2rem 1.18rem;
  width: 1px;
  background: linear-gradient(#8c69ce94, #6b6cc74d 75%, transparent);
}

.play-guide-steps li {
  display: grid;
  position: relative;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  align-items: start;
  gap: .9rem;
}

.play-guide-number {
  display: grid;
  place-items: center;
  width: 2.4rem;
  aspect-ratio: 1;
  border: 1px solid #9c81d360;
  border-radius: .75rem;
  background: linear-gradient(145deg, #34254c, #201e39);
  color: #e7d6ff;
  font-size: .92rem;
  font-weight: 800;
}

.play-guide-steps h3 {
  margin: .17rem 0 .22rem;
  font-size: 1.08rem;
  letter-spacing: -.015em;
}

.play-guide-steps p { margin: 0; font-size: .94rem; }

.play-guide-actions,
.play-guide-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; }

.play-guide-actions .btn,
.play-guide-dialog-actions .btn { gap: .55rem; }

.play-guide-actions .icon,
.play-guide-dialog-actions .icon { width: 1.1rem; height: 1.1rem; }

.play-guide-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--guide-accent);
  font-weight: 700;
  text-underline-offset: .27em;
}

.play-guide-link:hover { text-decoration: underline; }

.play-guide-preview {
  min-width: 0;
  margin: 0;
  padding: .62rem;
  border: 1px solid var(--guide-line);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #1c1932, #121424 75%);
  box-shadow: 0 20px 48px #05051150, 0 0 64px #7864ec10;
}

.play-guide-cover {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  width: 100%;
  min-height: 13.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  text-align: left;
  gap: .75rem;
  padding: clamp(.8rem, 2vw, 1.55rem);
  border: 1px solid #b29deb52;
  border-radius: 1rem;
  background: #14112e;
  color: var(--guide-ink);
  cursor: pointer;
}

.play-guide-cover-image {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, #0b091bf5, #100b1f00 55%), var(--guide-portal) 68% center / cover no-repeat;
  transition: scale var(--play5on-motion-reveal) var(--play5on-motion-ease);
}

.play-guide-cover-caption { display: flex; align-items: center; min-width: 0; gap: .85rem; }
.play-guide-cover-caption strong { display: block; font-size: clamp(1.07rem, 1.65vw, 1.4rem); }
.play-guide-cover-caption small { display: block; margin-top: .2rem; color: #d5cbe9; font-size: .87rem; }

.play-guide-play {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(2.7rem, 4.4vw, 3.65rem);
  aspect-ratio: 1;
  border: 1px solid #ebdeffb0;
  border-radius: 50%;
  background: linear-gradient(145deg, #e4ceff, #afa1fd);
  color: #21143f;
  box-shadow: 0 0 26px #be98fd5c;
  transition: scale var(--play5on-motion-quick), box-shadow var(--play5on-motion-panel);
}

.play-guide-play::before {
  content: "";
  margin-left: .18rem;
  border: .44rem solid transparent;
  border-right: 0;
  border-left: .67rem solid currentColor;
}

.play-guide-cover > .play-guide-cover-arrow { width: 1.3rem; height: 1.3rem; margin-block: auto .28rem; color: #e1c9ff; flex: none; }

.play-guide-cover:focus-visible { outline-offset: 3px; }

@media (hover: hover) {
  .play-guide-cover:hover { border-color: #cab3ff; }
  .play-guide-cover:hover .play-guide-cover-image { scale: 1.045; }
  .play-guide-cover:hover .play-guide-play { scale: 1.08; box-shadow: 0 0 34px #c0a3ff8f; }
}

.play-guide-connection {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr minmax(0, 1.65fr) 1fr;
  gap: .25rem;
  padding: .9rem .3rem .4rem;
}

.play-guide-node {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  font-size: .94rem;
  font-weight: 750;
  color: #e9dfff;
}

.play-guide-node .icon { width: 1.15rem; height: 1.15rem; color: var(--guide-accent); }
.play-guide-signal { display: grid; color: var(--guide-muted); text-align: center; line-height: 1.15; font-size: .75rem; }
.play-guide-signal span + span { border-top: 1px solid #b39ae734; }
.play-guide-signal span { padding-block: .22rem; }
.play-guide-signal b { color: var(--guide-accent); font-size: .9rem; }

.play-guide-faq {
  display: grid;
  grid-template-columns: minmax(0, .64fr) minmax(0, 1.36fr);
  align-items: start;
  gap: 1.2rem 2.6rem;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  padding-top: clamp(1.4rem, 3vw, 2.4rem);
  border-top: 1px solid var(--guide-line);
}

.play-guide-faq h3 { margin: .25rem 0; font-size: clamp(1.32rem, 2.2vw, 1.85rem); letter-spacing: -.028em; }

.play-guide-dialog {
  width: min(39rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #9c81d380;
  border-radius: 1.42rem;
  background: #141528;
  color: var(--guide-ink);
  box-shadow: 0 28px 95px #050510c9;
}

.play-guide-dialog::backdrop { background: #06060de0; backdrop-filter: blur(7px); }
.play-guide-dialog-body { padding: clamp(.85rem, 4vw, 1.65rem); }
.play-guide-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.play-guide-dialog-head h3 { margin: 0; font-size: clamp(1.16rem, 3.5vw, 1.6rem); letter-spacing: -.025em; }

.play-guide-close {
  display: grid;
  width: 2.75rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--guide-line);
  border-radius: .75rem;
  color: var(--guide-ink);
  background: #221e36;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.play-guide-close:hover { background: #33284b; }

.play-guide-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  list-style: none;
  margin: .9rem 0;
  padding: .28rem;
  border: 1px solid var(--guide-line);
  border-radius: .85rem;
  background: #101020;
}

.play-guide-progress button {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .15rem .2rem;
  border: 1px solid transparent;
  border-radius: .6rem;
  background: transparent;
  color: var(--guide-muted);
  font-size: clamp(.74rem, 2.65vw, .87rem);
  font-weight: 760;
  cursor: pointer;
}

.play-guide-progress button:hover { color: var(--guide-ink); background: #29213f; }
.play-guide-progress button[aria-current="step"] { border-color: #a583e066; color: #f2e4ff; background: #37284f; }
.play-guide-progress button span { color: var(--guide-accent); }
.play-guide-panel:not([hidden]) { animation: play5on-panel-enter var(--play5on-motion-panel) var(--play5on-motion-ease); }
.play-guide-panel h4 { margin: .8rem 0 .25rem; font-size: 1.1rem; line-height: 1.3; }
.play-guide-panel p { margin: 0; font-size: .93rem; }

.play-guide-screen {
  position: relative;
  isolation: isolate;
  aspect-ratio: 2.2;
  min-height: 10rem;
  overflow: hidden;
  border: 1px solid #aca0e04f;
  border-radius: 1rem;
  background: radial-gradient(ellipse at 76% 32%, #3d2d65 0%, #17162c 66%);
}

.play-guide-screen-head,
.play-guide-player-bar {
  display: flex;
  gap: .45rem;
  align-items: center;
  min-height: 2.4rem;
  padding: .28rem .75rem;
  background: #131223c9;
  border-bottom: 1px solid #a38ac53b;
  color: #e0d4f6;
  font-size: .82rem;
  font-weight: 750;
}

.play-guide-screen-head .icon { width: 1rem; height: 1rem; color: var(--guide-accent); }

.play-guide-balance {
  position: absolute;
  inset: 50% auto auto 8%;
  display: grid;
  gap: .2rem;
  padding: .75rem clamp(.85rem, 3vw, 1.7rem);
  transform: translateY(-30%);
  border: 1px solid var(--guide-line);
  border-radius: .85rem;
  background: #241d3fce;
  color: var(--guide-muted);
  font-size: .85rem;
}

.play-guide-screen-account { background: linear-gradient(90deg, #131121a8, #1b133122), var(--guide-portal) 65% center / cover; }
.play-guide-balance strong { color: #f7ecff; font-size: clamp(1.7rem, 5vw, 2.7rem); line-height: 1; font-variant-numeric: tabular-nums; }

.play-guide-screen-controls img {
  position: absolute;
  inset: 2.4rem 3.5% 0 auto;
  width: 52%;
  height: calc(100% - 2.4rem);
  object-fit: contain;
  filter: drop-shadow(0 8px 12px #0b0715be);
}

.play-guide-keyboard { position: absolute; inset: 54% auto auto 7%; display: grid; grid-template-columns: repeat(3, 1fr); gap: .24rem; }

.play-guide-keyboard kbd {
  display: grid;
  place-items: center;
  width: clamp(1.35rem, 4.5vw, 1.9rem);
  aspect-ratio: 1;
  border: 1px solid #aa90d076;
  border-bottom-width: 3px;
  border-radius: .36rem;
  background: #231d3a;
  color: #f2e5ff;
  font-size: .78rem;
  font-weight: 800;
}

.play-guide-keyboard kbd:first-child { grid-column: 2; }
.play-guide-keyboard kbd:nth-child(2) { grid-column: 1; }
.play-guide-screen-player { background: var(--guide-portal) 75% center / cover; }
.play-guide-player-bar { justify-content: space-between; padding-block: .45rem; }
.play-guide-player-bar strong { color: #fff; margin-left: .14rem; font-variant-numeric: tabular-nums; }
.play-guide-player-bar span + span { border: 1px solid #8f7cb85a; border-radius: .37rem; padding: .18rem .34rem; }
.play-guide-dialog-actions { justify-content: space-between; margin-top: .95rem; }
.play-guide-dialog-actions .btn { min-height: 2.75rem; }

@media (max-width: 820px) {
  #homeHow { scroll-margin-top: 72px; }
  .play-guide-layout, .play-guide-faq { grid-template-columns: minmax(0, 1fr); }
  .play-guide-layout { gap: 1.5rem; }
  .play-guide-preview { max-width: 43rem; width: 100%; }
  .play-guide-cover { aspect-ratio: 16 / 9; }
}

@media (max-width: 450px) {
  .play-guide-connection { padding-inline: .05rem; }
  .play-guide-node { font-size: .78rem; }
  .play-guide-node .icon { width: .94rem; height: .94rem; }
  .play-guide-signal { font-size: .69rem; }
  .play-guide-progress button span { display: none; }
  .play-guide-dialog-actions .btn { padding-inline: .65rem; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .play-guide :is(.play-guide-cover-image, .play-guide-play) { transition: none; }
  .play-guide-panel:not([hidden]) { animation: none; }
}
