.game-page{
  min-height:100dvh;
  background:
    radial-gradient(circle at 18% 15%, rgba(253,176,34,.09), transparent 28rem),
    var(--rr-ink);
}

.skip-link{
  position:fixed;
  left:1rem;
  top:.75rem;
  z-index:100;
  transform:translateY(-160%);
  padding:.7rem 1rem;
  border-radius:10px;
  background:var(--rr-gold);
  color:var(--rr-outline);
  font-weight:900;
}
.skip-link:focus{ transform:none; }

.game-page .nav-links a[aria-current="page"]{ color:var(--rr-gold); }
.game-page main{ padding-top:var(--nav-h); }

.game-access-section{
  min-height:calc(100dvh - var(--nav-h));
  display:grid;
  align-items:center;
  padding:clamp(2rem, 6vh, 5rem) 0;
}
.game-access-section[hidden]{ display:none; }

.gate-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.08fr) minmax(340px, .92fr);
  align-items:stretch;
  border:2.5px solid var(--rr-outline);
  border-radius:28px;
  background:var(--rr-panel);
  box-shadow:0 10px 0 var(--rr-outline);
  overflow:hidden;
}

.gate-art{
  position:relative;
  min-height:560px;
  background:#0a100c;
}
.gate-art img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.gate-art-shade{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, transparent 42%, rgba(8,14,10,.9) 100%);
}
.gate-art-label{
  position:absolute;
  inset:auto clamp(1.25rem, 4vw, 2.25rem) clamp(1.5rem, 4vw, 2.5rem);
  display:flex;
  align-items:center;
  gap:1rem;
  flex-wrap:wrap;
  color:#fff;
  font-weight:900;
  text-shadow:0 2px 10px #000;
}

.gate-panel{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:clamp(2rem, 5vw, 4.5rem);
}
.gate-panel h1{
  margin:.75rem 0 1.1rem;
  font-size:clamp(2.45rem, 5vw, 4.5rem);
}
.gate-panel .lead{
  margin:0;
  max-width:38rem;
}

.gate-status{
  display:grid;
  grid-template-columns:24px 1fr;
  gap:.8rem;
  margin-top:1.4rem;
  padding:1rem 1.1rem;
  border:1px solid var(--rr-line-2);
  border-radius:14px;
  background:rgba(0,0,0,.18);
}
.gate-status[hidden]{ display:none; }
.gate-status strong,
.gate-status span{ display:block; }
.gate-status strong{ color:var(--ink-1); line-height:1.3; }
.gate-status span:last-child{ margin-top:.2rem; color:var(--ink-2); font-size:.92rem; line-height:1.45; }
.gate-status.is-error{ border-color:rgba(229,68,59,.55); background:rgba(229,68,59,.1); }
.gate-status.is-success{ border-color:rgba(253,176,34,.5); background:rgba(253,176,34,.09); }

.status-icon{
  position:relative;
  width:22px;
  height:22px;
  border:2px solid var(--rr-gold);
  border-radius:50%;
  margin-top:.1rem;
}
.is-loading .status-icon{
  border-right-color:transparent;
  animation:gate-spin .75s linear infinite;
}
.is-error .status-icon{
  border-color:#ff8a82;
}
.is-error .status-icon::before,
.is-error .status-icon::after{
  content:"";
  position:absolute;
  left:9px;
  top:3px;
  width:2px;
  height:12px;
  border-radius:2px;
  background:#ff8a82;
  transform:rotate(45deg);
}
.is-error .status-icon::after{ transform:rotate(-45deg); }
.is-success .status-icon::before{
  content:"";
  position:absolute;
  left:5px;
  top:4px;
  width:7px;
  height:4px;
  border-left:2px solid var(--rr-gold);
  border-bottom:2px solid var(--rr-gold);
  transform:rotate(-45deg);
}
@keyframes gate-spin{ to{ transform:rotate(360deg); } }

.wallet-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  margin-top:1rem;
  padding:.75rem 1rem;
  border-left:3px solid var(--rr-gold);
  background:rgba(253,176,34,.07);
}
.wallet-summary[hidden]{ display:none; }
.wallet-summary span{
  display:block;
  color:var(--ink-3);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.wallet-summary strong{
  display:block;
  margin-top:.15rem;
  color:var(--ink-1);
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:.86rem;
  overflow-wrap:anywhere;
}
.wallet-manage{
  flex:0 0 auto;
  min-height:40px;
  padding:.35rem;
}

.gate-actions{
  display:flex;
  gap:.85rem;
  flex-wrap:wrap;
  margin-top:1.6rem;
}
.gate-actions .btn{ justify-content:center; }
.gate-actions .btn[disabled]{ transform:none; box-shadow:0 4px 0 var(--rr-outline); }

.gate-privacy{
  display:flex;
  align-items:flex-start;
  gap:.6rem;
  margin:1.4rem 0 0;
  color:var(--ink-3);
  font-size:.82rem;
  line-height:1.45;
}
.gate-privacy svg{
  flex:0 0 auto;
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.game-stage{
  min-height:calc(100dvh - var(--nav-h));
  padding:clamp(2.5rem, 5vh, 4rem) 0 3rem;
}
.game-stage[hidden]{ display:none; }
.game-stage-head{
  display:flex;
  align-items:end;
  gap:1.5rem;
  margin-bottom:1.5rem;
}
.game-stage-head h1{
  margin:.45rem 0 0;
  font-size:clamp(2.3rem, 5vw, 4.3rem);
}
.game-frame{
  position:relative;
  width:min(1140px, 92vw);
  height:auto;
  aspect-ratio:16 / 9;
  max-height:none;
  padding:0;
  overflow:hidden;
  border:2.5px solid var(--rr-outline);
  border-radius:22px;
  background:#000;
  box-shadow:0 8px 0 var(--rr-outline);
}
#canvas{
  display:block;
  width:100% !important;
  height:100% !important;
  margin:0;
  padding:0;
  border:0;
  background:#000;
  touch-action:none;
}
#canvas:focus-visible{ outline:3px solid var(--rr-gold); outline-offset:-5px; }

#status,
#status-splash{
  position:absolute;
  inset:0;
}
#status{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  background:#1a120d;
  visibility:hidden;
}
#status-splash{
  max-width:100%;
  max-height:100%;
  margin:auto;
}
#status-splash.show-image--false{ display:none; }
#status-splash.fullsize--true{
  width:100%;
  height:100%;
  object-fit:contain;
}
#status-splash.use-filter--false{ image-rendering:pixelated; }
#status-progress,
#status-notice{ display:none; }
#status-progress{
  position:absolute;
  left:25%;
  right:25%;
  bottom:9%;
  width:50%;
  height:12px;
  accent-color:var(--rr-gold);
}
#status-notice{
  position:relative;
  z-index:1;
  max-width:min(34rem, 80%);
  padding:1rem;
  border:1px solid #9b3943;
  border-radius:.5rem;
  background:#5b3943;
  color:#fff;
  text-align:center;
}

.holder-panel{
  display:grid;
  grid-template-columns:minmax(0, 1.7fr) minmax(130px, .5fr) auto;
  align-items:center;
  gap:clamp(1rem, 3vw, 2.5rem);
  margin-top:1.5rem;
  padding:1rem 1.2rem;
  border:1px solid var(--rr-line-2);
  border-left:4px solid var(--rr-gold);
  border-radius:16px;
  background:rgba(21,37,28,.88);
  box-shadow:0 5px 0 rgba(8,14,10,.8);
}
.holder-detail{
  min-width:0;
}
.holder-label{
  display:block;
  color:var(--ink-3);
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.holder-wallet a{
  display:flex;
  align-items:baseline;
  gap:.75rem;
  width:fit-content;
  max-width:100%;
  margin-top:.25rem;
  color:var(--ink-1);
  text-decoration:none;
}
.holder-wallet strong{
  min-width:0;
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:.84rem;
  overflow-wrap:anywhere;
}
.explorer-label{
  flex:0 0 auto;
  color:var(--rr-gold);
  font-size:.76rem;
  font-weight:900;
  text-decoration:underline;
  text-underline-offset:.2em;
}
.holder-wallet a:hover .explorer-label{ color:#ffd25a; }
.holder-wallet a:focus-visible{
  border-radius:4px;
  outline:3px solid var(--rr-gold);
  outline-offset:4px;
}
.holder-count{
  display:block;
  margin-top:.05rem;
  color:var(--rr-gold);
  font-family:"Luckiest Guy", sans-serif;
  font-size:1.8rem;
  font-weight:400;
  line-height:1;
}
.holder-manage{
  min-height:44px;
  justify-content:center;
  white-space:nowrap;
}

.game-help{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding-top:1.5rem;
  color:var(--ink-3);
  font-size:.9rem;
}
.game-help p{ margin:0; }
.text-button{
  min-height:44px;
  padding:.5rem .2rem;
  border:0;
  background:transparent;
  color:var(--rr-gold);
  font:inherit;
  font-weight:900;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:.2em;
}
.text-button:hover{ color:#ffd25a; }
.text-button:focus-visible,
.game-page .btn:focus-visible,
.game-page .nav a:focus-visible,
.game-page .nav-toggle:focus-visible{
  outline:3px solid var(--rr-gold);
  outline-offset:3px;
}

.footer-mark{
  font-family:"Luckiest Guy";
  font-size:1.4rem;
  letter-spacing:.02em;
  text-decoration:none;
  text-transform:uppercase;
  background:var(--gold-grad);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  -webkit-text-fill-color:transparent;
}

@media (max-width:900px){
  .gate-layout{ grid-template-columns:1fr; }
  .gate-art{ min-height:clamp(260px, 52vw, 440px); }
  .gate-panel{ padding:clamp(1.75rem, 6vw, 3rem); }
}

@media (max-width:640px){
  .game-access-section{ align-items:start; padding:1.25rem 0 2.5rem; }
  .gate-layout{ border-radius:20px; }
  .gate-art{ min-height:250px; }
  .gate-art-label{ align-items:flex-start; flex-direction:column; gap:.65rem; }
  .gate-actions{ flex-direction:column; }
  .gate-actions .btn{ width:100%; }
  .game-stage-head{ align-items:flex-start; flex-direction:column; }
  .game-frame{
    width:100%;
    border-radius:0;
    border-left:0;
    border-right:0;
  }
  .holder-panel{
    grid-template-columns:1fr 1fr;
    border-radius:14px;
  }
  .holder-wallet{ grid-column:1 / -1; }
  .holder-wallet a{ align-items:flex-start; flex-direction:column; gap:.2rem; }
  .holder-manage{ width:100%; }
  .game-help{ align-items:flex-start; flex-direction:column; }
}

@media (max-height:540px) and (orientation:landscape){
  .game-stage{ padding-top:1rem; }
  .game-stage-head{ display:none; }
  .game-frame{
    width:min(1140px, 94vw);
    height:auto;
    aspect-ratio:16 / 9;
  }
  .holder-panel{ display:none; }
  .game-help{ display:none; }
}

@media (prefers-reduced-motion:reduce){
  .is-loading .status-icon{ animation-duration:1.5s; }
}
