.modal{
  position:fixed;inset:0;z-index:1000;
  display:flex;align-items:center;justify-content:center;
  padding:max(1rem,env(safe-area-inset-top)) max(1rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(1rem,env(safe-area-inset-left));
  background:rgba(0,0,0,.76);
  animation:modal-fade .15s ease-out;
}
.modal[hidden]{display:none}
body.modal-open{overflow:hidden}

.modal-panel{
  position:relative;width:min(780px,100%);max-height:100%;overflow-y:auto;
  padding:1.8rem 1.6rem 1.6rem;text-align:center;
  background:#2b2b2b;
  box-shadow:0 0 0 4px #000,inset 0 3px 0 #5b5b5b,inset 0 -4px 0 #1a1a1a,0 18px 50px rgba(0,0,0,.6);
  animation:modal-pop .18s ease-out;
}
.modal-panel h2{
  font-family:"MinecraftTen","Minecraft",monospace;font-weight:400;font-size:clamp(1.7rem,4vw,2.3rem);
  text-shadow:0 3px 0 #000;padding:0 2.5rem;
}
.modal-sub{
  margin:.4rem auto 1.4rem;max-width:34rem;
  font-size:.95rem;line-height:1.4rem;color:#c8c8c8;text-shadow:0 2px 0 #000;
}
.modal-close{position:absolute;top:1rem;right:1rem;width:36px;height:36px;padding:.25rem;margin:0}

.wallets{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.2rem;text-align:left}
.wallet{
  --accent:#009147;
  display:flex;flex-direction:column;gap:.9rem;padding:1rem;
  background:#1c1c1c;
  box-shadow:0 0 0 3px #000,inset 0 4px 0 var(--accent),inset 0 -3px 0 #101010;
}
.wallet-head{display:flex;align-items:center;gap:.7rem;padding-top:.3rem}
.wallet-head img{width:34px;height:34px;flex:none}
.wallet-name{font-family:"MinecraftTen","Minecraft",monospace;font-size:1.4rem;text-shadow:0 3px 0 #000;line-height:1.1}
.wallet-note{font-size:.75rem;color:#9a9a9a;margin-top:.15rem}

.wallet-qr{
  align-self:center;width:min(210px,100%);aspect-ratio:1;
  background:#fff;box-shadow:0 0 0 4px #000;
}
.wallet-qr img{display:block;width:100%;height:100%;image-rendering:pixelated}

.wallet-hint{min-height:2.7em;font-size:.76rem;line-height:1.35;color:#b5b5b5;text-align:center}
.wallet-label{font-size:.75rem;color:#9a9a9a;margin-bottom:-.4rem}
.wallet-address{
  padding:.65rem .75rem;background:#101010;box-shadow:inset 0 0 0 2px #000;
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:.82rem;line-height:1.35;color:#e6e6e6;
  word-break:break-all;user-select:all;-webkit-user-select:all;
}
.wallet .copy-btn{align-self:stretch;font-size:1.05rem;padding:.5rem .8rem;margin:4px 6px 6px}
.wallet .copy-btn.done{background:linear-gradient(#27ce40,#1fa534)}

@keyframes modal-fade{from{opacity:0}to{opacity:1}}
@keyframes modal-pop{from{transform:translateY(10px) scale(.97);opacity:0}to{transform:none;opacity:1}}
@media (max-width:420px){
  .modal-panel{padding:1.4rem 1rem 1.2rem}
  .modal-panel h2{padding:0 2.2rem}
}
@media (prefers-reduced-motion:reduce){.modal,.modal-panel{animation:none}}
