/* assets/userstyle.css */

.userpage-grid{
  grid-template-columns: 260px minmax(560px, 1fr) 320px;
  align-items:start;
}

@media (max-width: 1220px){
  .userpage-grid{
    grid-template-columns: 240px 1fr;
  }

  .userpanel--side{
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px){
  .userpage-grid{
    grid-template-columns: 1fr;
  }
}

.user-maincol{
  display:grid;
  gap:14px;
}

.userpanel{
  padding:16px;
  border-radius:24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(78,161,255,.10), transparent 45%),
    rgba(255,255,255,.03);
}

.userpanel--nav,
.userpanel--side{
  position: sticky;
  top: 88px;
}

@media (max-width: 860px){
  .userpanel--nav,
  .userpanel--side{
    position: static;
  }
}

.userpanel__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}

.userpanel__eyebrow{
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.userpanel__title{
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.1;
}

.userpanel__stack{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.userpanel__stack--block{
  display:grid;
  gap:10px;
}

.mini-stat{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.mini-stat span{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:800;
}

.mini-stat strong{
  display:block;
  font-size:15px;
  font-weight:900;
}

/* sidebar nav works for both old solo markup and newer pages */
.usernav{
  display:grid;
  gap:12px;
}

.usernav--better{
  gap:12px;
}

.usernav .hub-item,
.usernav__item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:18px;
  text-decoration:none;
  color:inherit;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.035);
  transition:.18s ease;
}

.usernav .hub-item:hover,
.usernav__item:hover{
  transform:translateY(-1px);
  border-color:rgba(98,181,255,.28);
  background:rgba(255,255,255,.06);
}

.usernav .hub-item.is-active,
.usernav__item.is-active{
  border-color:rgba(57,255,106,.28);
  background:
    linear-gradient(135deg, rgba(57,255,106,.14), rgba(98,181,255,.08)),
    rgba(255,255,255,.06);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}

.usernav .hub-ico,
.usernav__icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:18px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.10);
  flex:0 0 42px;
}

.usernav .hub-item > span:last-child,
.usernav__text{
  display:grid;
  gap:3px;
  min-width:0;
}

.usernav .hub-item > span:last-child{
  font-size:16px;
  line-height:1.1;
  font-weight:900;
}

.usernav__text strong{
  font-size:16px;
  line-height:1.1;
}

.usernav__text small{
  color:var(--muted);
  font-size:12px;
  line-height:1.2;
}

.userhero{
  min-height:220px;
}

.userhero--solo::after{
  background: radial-gradient(circle at 30% 30%, rgba(78,161,255,.22), transparent 60%);
}

.userhero--shop::after{
  background: radial-gradient(circle at 30% 30%, rgba(57,255,106,.18), transparent 60%);
}

.route-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
}

@media (max-width: 1100px){
  .route-grid{
    grid-template-columns:1fr;
  }
}

.route-card{
  padding:22px;
  min-height:260px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 15% 0%, rgba(98,181,255,.14), transparent 46%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
  display:flex;
  flex-direction:column;
}

.route-card--room{
  background:
    radial-gradient(circle at 15% 0%, rgba(130,110,255,.16), transparent 46%),
    rgba(255,255,255,.04);
}

.route-card--ranked{
  background:
    radial-gradient(circle at 15% 0%, rgba(255,72,120,.12), transparent 46%),
    rgba(255,255,255,.04);
}

.route-card.is-locked{
  opacity:.94;
}

.route-card__top{
  margin-bottom:14px;
}

.route-card h3{
  margin:0 0 10px;
  font-size:30px;
  line-height:1.02;
  font-weight:950;
}

.route-card p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.55;
  max-width:34ch;
}

.route-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:18px;
}

.route-card__meta span{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  font-size:12px;
  font-weight:800;
  color:rgba(238,243,255,.86);
}

.route-card__actions{
  margin-top:auto;
}

.feature-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 1080px){
  .feature-grid{
    grid-template-columns: 1fr;
  }
}

.feature-tile{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 15% 0%, rgba(139,92,255,.10), transparent 45%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
}

.feature-tile--shop{
  background:
    radial-gradient(circle at 15% 0%, rgba(57,255,106,.12), transparent 45%),
    rgba(255,255,255,.04);
}

.feature-tile__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.feature-tile h3{
  margin:0 0 8px;
  font-size:18px;
  font-weight:950;
}

.feature-tile p{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}

.split-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

@media (max-width: 980px){
  .split-grid{
    grid-template-columns:1fr;
  }
}

.info-block{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 10% 0%, rgba(78,161,255,.10), transparent 45%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
}

.info-block__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.info-block__head h3{
  margin:0;
  font-size:18px;
  font-weight:950;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.form-grid > div{
  min-width:0;
}

@media (max-width: 700px){
  .form-grid{
    grid-template-columns:1fr;
  }
}

.stack-list{
  display:grid;
  gap:10px;
}

.stack-card{
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.stack-card strong{
  display:block;
  margin-bottom:6px;
  font-size:14px;
}

.stack-card span{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.stack-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  font-size:14px;
}

.stack-row span{
  color:rgba(238,243,255,.86);
}

.stack-row strong{
  font-weight:900;
}

.checklist{
  display:grid;
  gap:10px;
}

.checklist__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.checklist__row .ok{
  color:rgba(57,255,106,.95);
}

.checklist__row .bad{
  color:rgba(255,77,109,.95);
}

.shop-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.shop-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  text-decoration:none;
  color:inherit;
  font-weight:800;
}

.shop-tab.is-active{
  background:rgba(57,255,106,.16);
  border-color:rgba(57,255,106,.30);
}

.store-hero-grid{
  display:grid;
  grid-template-columns:1.35fr .85fr;
  gap:14px;
  margin-bottom:14px;
}

@media (max-width: 980px){
  .store-hero-grid{
    grid-template-columns:1fr;
  }
}

.store-banner{
  padding:22px;
  min-height:240px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 15% 0%, rgba(57,255,106,.14), transparent 42%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
}

.store-banner h3{
  margin:14px 0 10px;
  font-size:30px;
  line-height:1.04;
  font-weight:950;
}

.store-banner p{
  margin:0 0 16px;
  color:var(--muted);
  max-width:42ch;
  line-height:1.55;
}

.store-banner__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.store-wallet{
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 15% 0%, rgba(98,181,255,.12), transparent 42%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
}

.store-samples{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 1200px){
  .store-samples{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .store-samples{
    grid-template-columns: 1fr;
  }
}

.sample-card{
  padding:16px;
  min-height:210px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  display:flex;
  flex-direction:column;
  box-shadow:var(--shadowSoft);
}

.sample-card--credit{
  background:
    radial-gradient(circle at 15% 0%, rgba(57,255,106,.12), transparent 42%),
    rgba(255,255,255,.04);
}

.sample-card h3{
  margin:14px 0 8px;
  font-size:20px;
  font-weight:950;
}

.sample-card p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.5;
}

.sample-card .btn{
  margin-top:auto;
}

.category-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:14px;
}

.category-pill{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  font-size:13px;
  font-weight:800;
}

.category-pill.is-active{
  background:rgba(98,181,255,.15);
  border-color:rgba(98,181,255,.28);
}

.pill-good{
  border-color: rgba(57,255,106,.35);
  background: rgba(57,255,106,.12);
}

.pill-warn{
  border-color: rgba(139,92,255,.35);
  background: rgba(139,92,255,.12);
}

/* shop page polish */

.shoppage-grid{
  grid-template-columns: 260px minmax(0, 1fr);
  align-items:start;
}

@media (max-width: 1220px){
  .shoppage-grid{
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 860px){
  .shoppage-grid{
    grid-template-columns: 1fr;
  }
}

.shop-shell--clean{
  display:grid;
  gap:16px;
}

.shop-hero--wide{
  display:grid;
  grid-template-columns:minmax(0, 1.4fr) 280px;
  gap:16px;
  padding:24px;
  border-radius:26px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 14% 0%, rgba(57,255,106,.12), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(98,181,255,.14), transparent 30%),
    rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
}

@media (max-width: 980px){
  .shop-hero--wide{
    grid-template-columns:1fr;
  }
}

.shop-tabsbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:6px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
}

.shop-tabsbar__item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border-radius:12px;
  text-decoration:none;
  color:inherit;
  font-weight:800;
  background:transparent;
  border:1px solid transparent;
}

.shop-tabsbar__item:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.08);
}

.shop-tabsbar__item.is-active{
  background:rgba(57,255,106,.15);
  border-color:rgba(57,255,106,.22);
}

.shop-pane{
  padding:20px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 10% 0%, rgba(98,181,255,.08), transparent 34%),
    rgba(255,255,255,.035);
  box-shadow:var(--shadowSoft);
}

.shop-pane__head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.shop-pane__head h2{
  margin:0 0 4px;
  font-size:28px;
  line-height:1.05;
  font-weight:950;
}

.shop-pane__head p{
  margin:0;
  color:var(--muted);
}

.shop-showcase{
  display:grid;
  gap:16px;
}

.shop-banner-card{
  min-height:260px;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 18% 18%, rgba(57,255,106,.18), transparent 24%),
    radial-gradient(circle at 72% 28%, rgba(98,181,255,.16), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow:var(--shadowSoft);
  display:flex;
  align-items:end;
}

.shop-banner-card__content{
  padding:22px;
  width:100%;
  max-width:620px;
}

.shop-banner-card__content h3{
  margin:14px 0 10px;
  font-size:34px;
  line-height:1.02;
  font-weight:950;
}

.shop-banner-card__content p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.55;
}

.shop-banner-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.shop-featured-strip{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
}

@media (max-width: 1180px){
  .shop-featured-strip{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .shop-featured-strip{
    grid-template-columns:1fr;
  }
}

.shop-product-tile{
  padding:14px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  box-shadow:var(--shadowSoft);
  display:flex;
  flex-direction:column;
}

.shop-product-tile__art{
  height:120px;
  border-radius:14px;
  margin-bottom:12px;
  background:
    radial-gradient(circle at 26% 22%, rgba(98,181,255,.16), transparent 28%),
    radial-gradient(circle at 76% 30%, rgba(130,110,255,.15), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.08);
}

.shop-product-tile h3{
  margin:12px 0 8px;
  font-size:20px;
  line-height:1.05;
  font-weight:950;
}

.shop-product-tile__foot{
  margin-top:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-top:12px;
}

.shop-product-tile__foot strong{
  font-size:20px;
  font-weight:950;
}

.shop-shelf--wide{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px){
  .shop-shelf--wide{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .shop-shelf--wide{
    grid-template-columns:1fr;
  }
}

.shop-rail--clean{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px){
  .shop-rail--clean{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .shop-rail--clean{
    grid-template-columns:1fr;
  }
}

/* =====================================================
PLAY MODE SELECT SCREEN
===================================================== */
.play-mode-layout{
  align-items:start;
}

.play-mode-main{
  min-width:0;
}

.play-mode-shell{
  margin-top:12px;
  display:grid;
  gap:16px;
}

.play-mode-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
}

.play-mode-head__copy h1{
  margin:12px 0 8px;
  font-size:40px;
  line-height:1.02;
  font-weight:1000;
}

.play-mode-head__copy p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}

.play-mode-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  align-items:stretch;
}

.play-mode-card{
  --mode-art:none;
  position:relative;
  min-height:620px;
  border-radius:30px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 24px 64px rgba(0,0,0,.35);
  isolation:isolate;
  display:flex;
}

.play-mode-card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(180deg, rgba(4,8,24,.12) 0%, rgba(3,7,20,.52) 46%, rgba(2,6,18,.92) 100%),
    var(--mode-art),
    linear-gradient(160deg, rgba(255,255,255,.03), rgba(255,255,255,.00));
  background-size:cover;
  background-position:center center;
}

.play-mode-card__backdrop{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
}

.play-mode-card__content{
  position:relative;
  z-index:2;
  width:100%;
  min-height:100%;
  padding:22px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.play-mode-card__top{
  display:flex;
  gap:8px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}

.play-mode-card__bottom{
  display:grid;
  gap:12px;
  align-content:end;
}

.play-mode-card__bottom h2{
  margin:0;
  font-size:58px;
  line-height:.94;
  font-weight:1000;
  letter-spacing:-.03em;
  text-shadow:0 10px 30px rgba(0,0,0,.32);
}

.play-mode-card__bottom p{
  margin:0;
  max-width:24ch;
  color:rgba(238,243,255,.86);
  font-size:17px;
  line-height:1.35;
}

.play-mode-card .btn{
  width:fit-content;
  min-width:180px;
}

.play-mode-card--quick .play-mode-card__backdrop{
  background:
    radial-gradient(circle at 18% 18%, rgba(57,255,106,.20), transparent 26%),
    radial-gradient(circle at 72% 84%, rgba(78,161,255,.16), transparent 32%);
}

.play-mode-card--quick:not(.has-art)::before{
  background:
    linear-gradient(180deg, rgba(6,14,28,.18) 0%, rgba(7,12,28,.62) 48%, rgba(4,10,18,.96) 100%),
    radial-gradient(circle at 20% 15%, rgba(57,255,106,.24), transparent 26%),
    radial-gradient(circle at 78% 85%, rgba(98,181,255,.18), transparent 32%),
    linear-gradient(180deg, #244d62 0%, #152d4d 34%, #091a25 100%);
}

.play-mode-card--rooms .play-mode-card__backdrop{
  background:
    radial-gradient(circle at 18% 18%, rgba(78,161,255,.18), transparent 28%),
    radial-gradient(circle at 74% 82%, rgba(139,92,255,.16), transparent 34%);
}

.play-mode-card--rooms:not(.has-art)::before{
  background:
    linear-gradient(180deg, rgba(6,14,28,.14) 0%, rgba(7,12,28,.60) 48%, rgba(5,10,20,.96) 100%),
    radial-gradient(circle at 20% 12%, rgba(78,161,255,.24), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(139,92,255,.16), transparent 34%),
    linear-gradient(180deg, #304a83 0%, #20365f 35%, #0d1831 100%);
}

.play-mode-card--ranked .play-mode-card__backdrop{
  background:
    radial-gradient(circle at 20% 18%, rgba(139,92,255,.22), transparent 30%),
    radial-gradient(circle at 75% 84%, rgba(255,77,109,.16), transparent 34%);
}

.play-mode-card--ranked:not(.has-art)::before{
  background:
    linear-gradient(180deg, rgba(8,12,30,.18) 0%, rgba(8,10,24,.66) 48%, rgba(7,8,20,.96) 100%),
    radial-gradient(circle at 18% 16%, rgba(139,92,255,.26), transparent 30%),
    radial-gradient(circle at 76% 84%, rgba(255,77,109,.18), transparent 34%),
    linear-gradient(180deg, #503469 0%, #332451 35%, #160f24 100%);
}

.play-mode-card.is-locked{
  filter:saturate(.92);
}

.play-mode-card:hover{
  transform:translateY(-4px) scale(1.01);
  border-color:rgba(255,255,255,.18);
  box-shadow:0 28px 72px rgba(0,0,0,.42);
}

.play-mode-side .play-side-panel{
  position:sticky;
  top:86px;
}

/* Existing play side/modal styling */
.play-side-panel{
  padding:16px;
  border-radius:calc(var(--radius) + 10px);
}

.play-note-list,
.play-check-list,
.play-room-browser{
  display:grid;
  gap:10px;
}

.play-note-card{
  display:block;
  padding:12px;
}

.play-check-panel{
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.08);
}

.play-check-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  color:var(--muted);
  font-size:13px;
}

.play-modal{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
}
.play-modal.is-open{
  display:block;
}
.play-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,6,18,.42);
  backdrop-filter:blur(8px);
}
.play-modal__dialog{
  position:relative;
  z-index:2;
  width:min(920px, calc(100vw - 32px));
  max-height:calc(100vh - 40px);
  margin:20px auto;
  overflow:auto;
  border-radius:28px;
  background:rgba(11,18,42,.88);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 30px 80px rgba(0,0,0,.48);
}
.play-modal__dialog--wide{
  width:min(1180px, calc(100vw - 32px));
}
.play-modal__body{
  padding:24px;
}
.play-modal__close{
  position:absolute;
  right:14px;
  top:14px;
  z-index:3;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-size:26px;
  cursor:pointer;
}
.play-modal__eyebrow{
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.play-modal__body h3{
  margin:8px 0 10px;
  font-size:28px;
  line-height:1.05;
}
.play-modal__lead{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}
.play-modal__header-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.play-modal__grid{
  display:grid;
  gap:12px;
  margin-top:16px;
}
.play-modal__grid--three{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}
.play-mini-card{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
}
.play-modal__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.play-inline-msg{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}
.play-inline-msg.is-error{ color:rgba(255,116,140,.95); }
.play-inline-msg.is-good{ color:rgba(111,255,155,.95); }
.play-tabbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.play-tabbar__item{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:999px;
  padding:10px 16px;
  font-weight:900;
  cursor:pointer;
}
.play-tabbar__item.is-active{
  background:rgba(57,255,106,.16);
  border-color:rgba(57,255,106,.35);
}
.play-tabpane{
  display:none;
  margin-top:18px;
}
.play-tabpane.is-active{
  display:block;
}
.play-room-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:14px;
}
.play-room-row__title{
  font-weight:950;
  font-size:18px;
}
.play-room-row__meta{
  margin-top:6px;
  font-size:13px;
  color:var(--muted);
}
.play-room-row__chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.play-empty-state{
  padding:20px;
  border-radius:20px;
  text-align:center;
}
.play-empty-state strong,
.play-empty-state span{
  display:block;
}
.play-empty-state span{
  margin-top:6px;
  color:var(--muted);
}
.play-check-list--modal{
  margin-top:16px;
}
.play-check-row--modal{
  align-items:flex-start;
}
.play-check-row__copy{
  display:grid;
  gap:6px;
}
.play-check-row__copy small{
  color:var(--muted);
  line-height:1.45;
}
.play-check-row__status{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.play-requirement-help{
  margin-top:16px;
  padding:14px;
  border-radius:18px;
  display:grid;
  gap:8px;
}
.play-requirement-help span{
  color:var(--muted);
}
.play-requirement-help__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.btn-sm{
  padding:8px 10px;
  border-radius:12px;
  font-size:13px;
}

@media (max-width: 1380px){
  .play-mode-grid{
    grid-template-columns:1fr;
  }

  .play-mode-card{
    min-height:420px;
  }

  .play-mode-card__bottom h2{
    font-size:44px;
  }
}

@media (max-width: 1180px){
  .play-mode-layout{
    grid-template-columns:240px 1fr;
  }

  .play-mode-side{
    grid-column:1 / -1;
  }

  .play-mode-side .play-side-panel{
    position:static;
  }
}

@media (max-width: 860px){
  .play-mode-layout{
    grid-template-columns:1fr;
  }

  .play-mode-head__copy h1{
    font-size:32px;
  }

  .play-modal__grid--three{
    grid-template-columns:1fr;
  }

  .play-room-row{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =====================================================
   USER PAGES LIGHT MODE OVERRIDES
===================================================== */
body[data-appearance="light"] .userpanel{
  background:
    radial-gradient(circle at 15% 0%, rgba(75,141,255,.12), transparent 42%),
    var(--panelLite);
  border:1px solid var(--border);
  box-shadow:var(--shadowSoft);
}

body[data-appearance="light"] .mini-stat,
body[data-appearance="light"] .feature-tile,
body[data-appearance="light"] .info-block,
body[data-appearance="light"] .route-card,
body[data-appearance="light"] .usercard,
body[data-appearance="light"] .shop-card,
body[data-appearance="light"] .profile-card{
  border-color:var(--border);
  background:
    radial-gradient(circle at 15% 0%, rgba(75,141,255,.10), transparent 42%),
    var(--panelLite);
  box-shadow:var(--shadowSoft);
}

body[data-appearance="light"] .usernav .hub-item,
body[data-appearance="light"] .usernav__item{
  border-color:var(--border);
  background:var(--panelLite);
  box-shadow:var(--shadowSoft);
}

body[data-appearance="light"] .usernav .hub-item:hover,
body[data-appearance="light"] .usernav__item:hover{
  border-color:rgba(75,141,255,.22);
  background:var(--panelLiteStrong);
}

body[data-appearance="light"] .usernav .hub-item.is-active,
body[data-appearance="light"] .usernav__item.is-active{
  border-color:rgba(75,141,255,.28);
  background:
    linear-gradient(135deg, rgba(75,141,255,.15), rgba(30,207,122,.08)),
    var(--panelLiteStrong);
  box-shadow:0 12px 28px rgba(64,102,168,.14);
}

body[data-appearance="light"] .usernav .hub-ico,
body[data-appearance="light"] .usernav__icon{
  background:var(--iconLite);
  border-color:rgba(75,141,255,.15);
}

body[data-appearance="light"] .route-card__meta span,
body[data-appearance="light"] .note,
body[data-appearance="light"] .mini-chip{
  background:rgba(255,255,255,.58);
  border-color:rgba(75,141,255,.16);
  color:var(--text);
}

body[data-appearance="light"] .userhero,
body[data-appearance="light"] .userhero--solo,
body[data-appearance="light"] .userhero--shop{
  border:1px solid var(--border);
  background:
    radial-gradient(circle at 82% 12%, rgba(124,134,255,.12), transparent 28%),
    radial-gradient(circle at 15% 0%, rgba(75,141,255,.12), transparent 34%),
    var(--panelLiteStrong);
}

/* =====================================================
   PROFILE / USER PAGE INLINE REPLACEMENTS
===================================================== */

.profile-hero-layout{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  position:relative;
  z-index:1;
  flex-wrap:wrap;
}

.profile-hero-main{
  display:flex;
  gap:14px;
  align-items:center;
  min-width:0;
}

.profile-avatar{
  width:72px;
  height:72px;
  border-radius:22px;
  object-fit:cover;
  border:1px solid var(--border-strong);
  background:var(--surface);
}

.profile-avatar-fallback{
  width:72px;
  height:72px;
  border-radius:22px;
  display:grid;
  place-items:center;
  font-weight:1000;
  font-size:28px;
  border:1px solid var(--border-strong);
  background:var(--surface);
}

.profile-hero-copy{
  min-width:0;
}

.profile-badge-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:8px;
}

.profile-name{
  margin:0 0 6px;
}

.profile-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.profile-action-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.alert-spaced{
  margin-bottom:12px;
}

.profile-overview-card{
  padding:16px;
}

.profile-overview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.profile-overview-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.profile-overview-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}

.profile-stat-card{
  padding:14px;
}

.profile-stat-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.profile-stat-value{
  font-weight:900;
}

.profile-stat-value--break{
  font-weight:900;
  word-break:break-word;
}

.profile-bio-wrap{
  margin-top:12px;
}

.profile-bio-pad{
  padding:14px;
}

.profile-bio-label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
}

.profile-bio-text{
  line-height:1.6;
  color:var(--text);
}

.profile-bio-empty{
  color:var(--muted);
}

.profile-side-card{
  padding:16px;
  border-radius:calc(var(--radius) + 10px);
}

.profile-side-stack{
  margin-top:12px;
  display:grid;
  gap:10px;
}

.profile-side-row{
  padding:12px;
}

.profile-side-row__split{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

@media (max-width: 720px){
  .profile-overview-grid{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   PROFILE PAGE REBUILD / BLEED FIX
===================================================== */
.profile-maincol{
  min-width:0;
}

.profile-nav-meta{
  padding-top:14px;
  border-top:1px solid var(--border);
}

.profile-pill-pending{
  border-color:rgba(255,205,102,.45);
  background:rgba(255,205,102,.10);
}

.profile-pill-danger{
  border-color:rgba(255,77,109,.40);
  background:rgba(255,77,109,.10);
}

.profile-alert{
  padding:14px;
}

.profile-alert--good{
  border-color:rgba(57,255,106,.28);
  background:rgba(57,255,106,.10);
}

.profile-alert--bad{
  border-color:rgba(255,77,109,.28);
  background:rgba(255,77,109,.10);
}

.profile-hero-card{
  min-width:0;
}

.profile-section-card{
  padding:16px;
  min-width:0;
}

.profile-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.profile-section-head--solo{
  justify-content:flex-start;
}

.profile-section-title{
  margin:0;
  font-size:28px;
  line-height:1.50;
  font-weight:950;
}

.profile-avatar-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:220px minmax(0, 1fr);
  gap:16px;
}

.profile-avatar-preview{
  padding:16px;
  display:grid;
  place-items:center;
}

.profile-avatar-preview__img{
  width:156px;
  height:156px;
  border-radius:28px;
  object-fit:cover;
  border:1px solid var(--border-strong);
  background:var(--surface);
}

.profile-avatar-preview__fallback{
  width:156px;
  height:156px;
  border-radius:28px;
  display:grid;
  place-items:center;
  font-weight:1000;
  font-size:54px;
  border:1px solid var(--border-strong);
  background:var(--surface);
}

.profile-form-stack{
  display:grid;
  gap:12px;
}

.profile-form-stack--tight{
  gap:10px;
}

.profile-form-card{
  padding:20px;
  min-width:0;
}

.profile-form-title{
  font-weight:900;
  margin-bottom:10px;
}

.profile-field-label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:0 0 8px;
}

.profile-textarea{
  width:100%;
  min-height:120px;
  resize:vertical;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--inputBg);
  color:var(--text);
  font-family:inherit;
  font-size:14px;
  line-height:1.5;
}

.profile-counter{
  margin-top:6px;
  font-size:11px;
  color:var(--muted);
}

.profile-copy-muted{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.profile-choice-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.profile-choice-card{
  padding:14px;
  cursor:pointer;
  border:1px solid var(--border2);
  display:grid;
  gap:8px;
  min-width:0;
}

.profile-choice-card__top{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
}

.profile-choice-card__meta{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.profile-split-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.profile-dashed-box{
  padding:14px;
  border-radius:16px;
  border:1px dashed var(--border);
  background:rgba(255,255,255,.03);
}

.profile-inline-form{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}

.profile-inline-form:first-of-type{
  margin-top:0;
}

.profile-code-input{
  max-width:180px;
}

.profile-password-list{
  margin:0 0 0 18px;
  padding:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.profile-two-col-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.profile-session-row{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-start;
}

.profile-session-title{
  font-weight:900;
}

.profile-danger-card{
  border-color:rgba(255,77,109,.18);
}

.profile-stats-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:12px;
}

.profile-stat-number{
  font-size:24px;
  font-weight:1000;
}

.profile-side-title{
  font-size:24px;
}

.profile-side-row span,
.profile-side-row strong{
  display:block;
}

.profile-side-row span{
  min-width:0;
}

@media (max-width: 1100px){
  .profile-stats-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 980px){
  .profile-avatar-grid,
  .profile-two-col-grid,
  .profile-choice-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .profile-stats-grid{
    grid-template-columns:1fr;
  }
}

/* =====================================================
   RESPONSIVE STANDARDIZATION PASS - USER / SHOP / SOLO
===================================================== */

/* Desktop / laptop user pages */
@media (min-width:1281px){
  .userpage-grid{
    grid-template-columns:260px minmax(0, 1fr) 320px;
    gap:14px;
  }

  .shoppage-grid{
    grid-template-columns:260px minmax(0, 1fr);
    gap:14px;
  }

  .userpanel--side{
    grid-column:auto;
  }
}

/* Normal laptops */
@media (max-width:1280px){
  .userpage-grid{
    grid-template-columns:240px minmax(0, 1fr);
    gap:12px;
  }

  .shoppage-grid{
    grid-template-columns:240px minmax(0, 1fr);
    gap:12px;
  }

  .userpanel--side{
    grid-column:1 / -1;
  }

  .userpanel--nav,
  .userpanel--side{
    top:78px;
  }

  .route-card{
    min-height:220px;
  }

  .route-card h3{
    font-size:26px;
  }
}

/* Keep route/feature cards usable on laptops instead of stacking too early */
@media (min-width:1101px){
  .route-grid,
  .feature-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:1100px){
  .route-grid,
  .feature-grid{
    grid-template-columns:1fr;
  }

  .route-card{
    min-height:0;
  }
}

/* Tablet: side navigation becomes normal content */
@media (max-width:1024px){
  .userpage-grid,
  .shoppage-grid{
    grid-template-columns:1fr;
  }

  .userpanel--nav,
  .userpanel--side{
    position:static;
  }

  .usernav,
  .usernav--better{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .shop-hero--wide,
  .store-hero-grid{
    grid-template-columns:1fr;
  }

  .shop-pane__head,
  .info-block__head,
  .profile-overview-head{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* Mobile compression */
@media (max-width:860px){
  .user-maincol,
  .shop-shell--clean{
    gap:10px;
  }

  .userpanel,
  .info-block,
  .feature-tile,
  .route-card,
  .shop-pane,
  .store-banner,
  .store-wallet,
  .sample-card,
  .shop-product-tile,
  .profile-overview-card{
    padding:12px;
    border-radius:20px;
  }

  .userpanel__head{
    flex-direction:column;
    gap:8px;
  }

  .userpanel__title{
    font-size:22px;
  }

  .usernav,
  .usernav--better{
    grid-template-columns:1fr;
    gap:8px;
  }

  .usernav .hub-item,
  .usernav__item{
    padding:11px;
    border-radius:15px;
  }

  .usernav .hub-ico,
  .usernav__icon{
    width:36px;
    height:36px;
    flex-basis:36px;
    border-radius:12px;
  }

  .userhero{
    min-height:0;
  }

  .route-card h3{
    font-size:24px;
  }

  .route-card p{
    max-width:none;
  }

  .route-card__meta span{
    padding:7px 10px;
    font-size:12px;
  }

  .split-grid,
  .form-grid,
  .profile-overview-grid{
    grid-template-columns:1fr;
  }

  .stack-row,
  .checklist__row{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }

  .shop-tabs,
  .shop-tabsbar,
  .category-strip{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:2px;
  }

  .shop-tab,
  .shop-tabsbar__item,
  .category-pill{
    white-space:nowrap;
  }

  .shop-hero--wide{
    padding:14px;
    border-radius:22px;
  }

  .shop-pane__head h2,
  .store-banner h3,
  .shop-banner-card__content h3{
    font-size:26px;
  }

  .shop-banner-card{
    min-height:220px;
    border-radius:20px;
  }

  .shop-banner-card__content{
    padding:16px;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean,
  .store-samples{
    grid-template-columns:1fr;
    gap:10px;
  }

  .profile-hero-layout{
    flex-direction:column;
  }

  .profile-hero-main{
    align-items:flex-start;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:60px;
    height:60px;
    border-radius:18px;
    font-size:24px;
  }

  .profile-action-row .btn,
  .profile-overview-actions .btn{
    flex:1 1 140px;
  }
}

/* Phone */
@media (max-width:640px){
  .userpanel__stack{
    display:grid;
    grid-template-columns:1fr;
  }

  .mini-stat{
    padding:10px 12px;
    border-radius:14px;
  }

  .route-card{
    padding:14px;
  }

  .route-card .btn,
  .feature-tile .btn,
  .sample-card .btn,
  .shop-product-tile .btn{
    width:100%;
  }

  .shop-product-tile__art{
    height:96px;
  }

  .shop-product-tile__foot{
    align-items:flex-start;
    flex-direction:column;
  }

  .profile-hero-main{
    flex-direction:column;
  }

  .profile-meta-row,
  .profile-badge-row{
    gap:6px;
  }
}

/* Very tight phones */
@media (max-width:480px){
  .userpanel,
  .info-block,
  .feature-tile,
  .route-card,
  .shop-pane,
  .store-banner,
  .store-wallet,
  .sample-card,
  .shop-product-tile{
    padding:10px;
    border-radius:18px;
  }

  .userpanel__title,
  .route-card h3,
  .shop-pane__head h2,
  .store-banner h3,
  .shop-banner-card__content h3{
    font-size:22px;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:54px;
    height:54px;
    border-radius:16px;
  }
}

/* =====================================================
   SHOP COMING SOON OVERLAYS
   Only Credits/Zeny is active for now.
===================================================== */

.shop-pane--coming-soon{
  position:relative;
  overflow:hidden;
}

.shop-pane--coming-soon > *:not(.shop-coming-soon-overlay){
  filter:blur(1.5px) saturate(.75) brightness(.72);
  opacity:.58;
  pointer-events:none;
  user-select:none;
}

.shop-coming-soon-overlay{
  position:absolute;
  inset:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    radial-gradient(circle at 50% 35%, rgba(57,255,106,.10), transparent 38%),
    linear-gradient(180deg, rgba(5,8,24,.18), rgba(5,8,24,.58));
  backdrop-filter:blur(2px);
}

.shop-coming-soon-card{
  width:min(460px, 100%);
  padding:20px;
  border-radius:24px;
  border:1px solid rgba(57,255,106,.26);
  background:
    radial-gradient(circle at 15% 0%, rgba(57,255,106,.14), transparent 42%),
    radial-gradient(circle at 90% 15%, rgba(78,161,255,.14), transparent 45%),
    rgba(8,12,28,.92);
  box-shadow:0 24px 70px rgba(0,0,0,.42);
  text-align:center;
}

.shop-coming-soon-card__eyebrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(57,255,106,.24);
  background:rgba(57,255,106,.10);
  color:var(--softText);
  font-size:11px;
  font-weight:950;
  letter-spacing:.10em;
  margin-bottom:10px;
}

.shop-coming-soon-card h3{
  margin:0 0 8px;
  font-size:28px;
  line-height:1.1;
  font-weight:950;
}

.shop-coming-soon-card p{
  margin:0 auto 14px;
  max-width:38ch;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

.shop-pane--coming-soon button[disabled]{
  opacity:.7;
  cursor:not-allowed;
}

body[data-appearance="light"] .shop-coming-soon-overlay{
  background:
    radial-gradient(circle at 50% 35%, rgba(25,217,124,.10), transparent 38%),
    linear-gradient(180deg, rgba(220,235,255,.20), rgba(220,235,255,.62));
}

body[data-appearance="light"] .shop-coming-soon-card{
  background:
    radial-gradient(circle at 15% 0%, rgba(25,217,124,.14), transparent 42%),
    radial-gradient(circle at 90% 15%, rgba(59,130,246,.14), transparent 45%),
    rgba(244,248,255,.94);
  box-shadow:0 24px 60px rgba(44,84,154,.18);
}

@media (max-width:860px){
  .shop-coming-soon-overlay{
    padding:14px;
  }

  .shop-coming-soon-card{
    padding:16px;
    border-radius:20px;
  }

  .shop-coming-soon-card h3{
    font-size:24px;
  }
}

/* =====================================================
   SHOP CREDIT PACK IMAGES
   Uses image when available, keeps gradient fallback if not.
===================================================== */

.shop-product-tile__art--image{
  padding:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 30% 20%, rgba(57,255,106,.12), transparent 42%),
    rgba(255,255,255,.04);
}

.shop-product-tile__art--image img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.shop-product-tile__art--image.shop-product-tile__art--contain img{
  object-fit:contain;
  padding:10px;
}

body[data-appearance="light"] .shop-product-tile__art--image{
  background:
    radial-gradient(circle at 30% 20%, rgba(25,217,124,.12), transparent 42%),
    rgba(255,255,255,.72);
}

/* =====================================================
   DEPLOYMENT RESPONSIVE PATCH - USER / SHOP / PLAY
   Append at bottom of assets/userstyle.css
===================================================== */

.userpage-grid,
.shoppage-grid,
.play-mode-layout,
.route-grid,
.feature-grid,
.split-grid,
.store-hero-grid,
.store-samples,
.shop-hero--wide,
.shop-featured-strip,
.shop-shelf--wide,
.shop-rail--clean,
.play-mode-grid,
.profile-overview-grid{
  min-width:0;
}

.userpage-grid > *,
.shoppage-grid > *,
.play-mode-layout > *,
.route-grid > *,
.feature-grid > *,
.split-grid > *,
.store-hero-grid > *,
.store-samples > *,
.shop-hero--wide > *,
.shop-featured-strip > *,
.shop-shelf--wide > *,
.shop-rail--clean > *,
.play-mode-grid > *,
.profile-overview-grid > *{
  min-width:0;
}

.userpanel,
.shop-pane,
.shop-banner-card,
.shop-product-tile,
.sample-card,
.route-card,
.feature-tile,
.info-block,
.play-mode-card,
.play-side-panel,
.profile-section-card,
.profile-hero-card{
  min-width:0;
}

.userpanel__title,
.route-card h3,
.shop-pane__head h2,
.shop-product-tile h3,
.shop-banner-card__content h3,
.play-mode-head__copy h1,
.play-mode-card__bottom h2,
.profile-name{
  overflow-wrap:anywhere;
}

/* Desktop/laptop standardization */
@media (max-width:1500px){
  .userpage-grid{
    grid-template-columns:240px minmax(0, 1fr) 300px;
    gap:12px;
  }

  .shoppage-grid{
    grid-template-columns:240px minmax(0, 1fr);
    gap:12px;
  }

  .play-mode-layout{
    gap:12px;
  }

  .play-mode-head__copy h1{
    font-size:clamp(30px, 3vw, 42px);
  }

  .play-mode-card{
    min-height:clamp(360px, 54vh, 520px);
    border-radius:26px;
  }

  .play-mode-card__content{
    padding:18px;
  }

  .play-mode-card__bottom h2{
    font-size:clamp(38px, 3.5vw, 54px);
  }

  .play-mode-card__bottom p{
    font-size:15px;
  }

  .play-mode-card .btn{
    min-width:150px;
  }

  .shop-pane{
    padding:18px;
  }

  .shop-pane__head h2{
    font-size:clamp(24px, 2.4vw, 28px);
  }

  .shop-product-tile__foot{
    align-items:flex-start;
    flex-direction:column;
  }

  .shop-product-tile__foot .btn{
    width:100%;
  }
}

/* Keep 3 play cards on normal laptops but make them sane */
@media (max-width:1380px){
  .play-mode-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
  }

  .play-mode-card{
    min-height:390px;
  }

  .play-mode-card__bottom h2{
    font-size:38px;
  }

  .play-mode-card__bottom p{
    font-size:14px;
    max-width:28ch;
  }
}

/* Medium laptops/tablets */
@media (max-width:1180px){
  .userpage-grid,
  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:220px minmax(0, 1fr);
  }

  .userpanel--side,
  .play-mode-side{
    grid-column:1 / -1;
  }

  .userpanel--side,
  .play-mode-side .play-side-panel{
    position:static;
  }

  .play-mode-grid{
    grid-template-columns:1fr;
  }

  .play-mode-card{
    min-height:300px;
  }

  .play-mode-card__bottom h2{
    font-size:42px;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean,
  .store-samples{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .shop-hero--wide{
    grid-template-columns:1fr;
  }
}

/* Tablet/mobile one-column */
@media (max-width:860px){
  .userpage-grid,
  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:1fr;
    gap:10px;
  }

  .userpanel--nav,
  .userpanel--side,
  .play-mode-side .play-side-panel{
    position:static;
  }

  .usernav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .usernav .hub-item,
  .usernav__item{
    padding:11px;
    gap:10px;
  }

  .usernav .hub-ico,
  .usernav__icon{
    width:36px;
    height:36px;
    flex-basis:36px;
  }

  .usernav .hub-item > span:last-child,
  .usernav__text strong{
    font-size:14px;
  }

  .play-mode-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .play-mode-head__copy h1{
    font-size:30px;
  }

  .play-mode-head__copy p{
    font-size:14px;
  }

  .play-mode-card{
    min-height:260px;
    border-radius:22px;
  }

  .play-mode-card__bottom h2{
    font-size:34px;
  }

  .play-mode-card .btn{
    width:100%;
    min-width:0;
  }

  .play-side-panel{
    padding:12px;
  }

  .play-check-row{
    align-items:flex-start;
    flex-direction:column;
  }

  .shop-tabsbar{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:6px;
  }

  .shop-tabsbar__item{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .shop-pane{
    padding:14px;
    border-radius:20px;
  }

  .shop-pane__head{
    align-items:flex-start;
    flex-direction:column;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean,
  .store-samples{
    grid-template-columns:1fr;
  }

  .shop-banner-card{
    min-height:210px;
  }

  .shop-banner-card__content{
    padding:16px;
  }

  .shop-banner-card__content h3{
    font-size:28px;
  }

  .profile-hero-layout,
  .profile-hero-main{
    align-items:flex-start;
    flex-direction:column;
  }

  .profile-action-row,
  .profile-overview-actions{
    width:100%;
  }

  .profile-action-row .btn,
  .profile-overview-actions .btn{
    flex:1 1 140px;
  }
}

/* Small mobile */
@media (max-width:560px){
  .userpanel,
  .shop-pane,
  .play-side-panel,
  .profile-section-card,
  .profile-side-card{
    padding:12px;
    border-radius:18px;
  }

  .usernav{
    grid-template-columns:1fr;
  }

  .userpanel__title{
    font-size:21px;
  }

  .mini-stat,
  .stack-row,
  .checklist__row{
    padding:10px 11px;
  }

  .stack-row,
  .checklist__row{
    align-items:flex-start;
    flex-direction:column;
  }

  .play-mode-shell{
    gap:10px;
  }

  .play-mode-card{
    min-height:230px;
  }

  .play-mode-card__content{
    padding:14px;
  }

  .play-mode-card__bottom{
    gap:9px;
  }

  .play-mode-card__bottom h2{
    font-size:30px;
  }

  .play-mode-card__bottom p{
    font-size:13px;
  }

  .play-modal__dialog,
  .play-modal__dialog--wide{
    width:calc(100vw - 18px);
    max-height:calc(100vh - 18px);
    margin:9px auto;
    border-radius:20px;
  }

  .play-modal__body{
    padding:16px;
  }

  .play-modal__body h3{
    font-size:23px;
  }

  .play-tabbar{
    flex-wrap:nowrap;
    overflow-x:auto;
  }

  .play-tabbar__item{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .play-room-row{
    padding:12px;
  }

  .shop-tabsbar{
    margin-left:-2px;
    margin-right:-2px;
  }

  .shop-tabsbar__item{
    min-height:38px;
    padding:0 12px;
    font-size:13px;
  }

  .shop-pane__head h2{
    font-size:24px;
  }

  .shop-product-tile,
  .sample-card{
    padding:12px;
    border-radius:18px;
  }

  .shop-product-tile__art{
    height:100px;
  }

  .shop-product-tile__foot strong{
    font-size:18px;
  }

  .store-banner{
    padding:16px;
    min-height:190px;
  }

  .store-banner h3{
    font-size:25px;
  }

  .profile-overview-grid{
    grid-template-columns:1fr;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:60px;
    height:60px;
    border-radius:18px;
  }
}

/* =====================================================
   BATCH 1 PATCH - PROFILE OVERFLOW / ACTION CLEANUP
   Prevents long guest/user names and bios from bleeding out.
===================================================== */

.profile-name,
.profile-stat-value,
.profile-stat-value--break,
.profile-bio-text,
.profile-side-row span,
.profile-side-row strong,
.profile-copy-muted,
.topnav-profile__name{
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.profile-bio-text{
  white-space:normal;
}

.profile-inline-action-form{
  display:inline-flex;
  margin:0;
}

.profile-inline-action-form .btn{
  width:auto;
}

.profile-form-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:12px;
}

.profile-form-card input,
.profile-form-card textarea{
  min-width:0;
}

.profile-overview-grid > *,
.profile-stats-grid > *,
.profile-side-stack > *{
  min-width:0;
}

/* =====================================================
   MEGA PATCH - PROFILE ACCOUNT BUTTON SPACING
===================================================== */

.profile-form-card > .profile-two-col-grid + .profile-form-actions{
  margin-top:20px;
  padding-top:4px;
}

.profile-form-actions .btn{
  min-height:44px;
}

/* =====================================================
   LOGIA FINAL USER / PROFILE / SHOP / PLAY PATCH
   Paste at bottom of assets/userstyle.css
===================================================== */

/* Global user page safety */
.userpage-grid,
.shoppage-grid,
.play-mode-layout,
.route-grid,
.feature-grid,
.split-grid,
.store-hero-grid,
.store-samples,
.shop-hero--wide,
.shop-featured-strip,
.shop-shelf--wide,
.shop-rail--clean,
.play-mode-grid,
.profile-overview-grid,
.form-grid{
  min-width:0;
}

.userpage-grid > *,
.shoppage-grid > *,
.play-mode-layout > *,
.route-grid > *,
.feature-grid > *,
.split-grid > *,
.store-hero-grid > *,
.store-samples > *,
.shop-hero--wide > *,
.shop-featured-strip > *,
.shop-shelf--wide > *,
.shop-rail--clean > *,
.play-mode-grid > *,
.profile-overview-grid > *,
.form-grid > *{
  min-width:0;
}

.userpanel,
.shop-pane,
.shop-banner-card,
.shop-product-tile,
.sample-card,
.route-card,
.feature-tile,
.info-block,
.play-mode-card,
.play-side-panel,
.profile-section-card,
.profile-hero-card,
.profile-side-card,
.profile-overview-card,
.profile-stat-card{
  min-width:0;
}

/* Text breaking */
.userpanel__title,
.route-card h3,
.shop-pane__head h2,
.shop-product-tile h3,
.shop-banner-card__content h3,
.play-mode-head__copy h1,
.play-mode-card__bottom h2,
.profile-name,
.profile-section-title,
.profile-stat-value,
.profile-stat-value--break{
  overflow-wrap:anywhere;
}

/* Profile form spacing fix: button no longer kisses the inputs */
.profile-section-card form,
.profile-overview-card form,
.info-block form,
.userpanel form{
  display:grid;
  gap:14px;
}

.profile-section-card .form-grid,
.profile-overview-card .form-grid,
.info-block .form-grid,
.userpanel .form-grid{
  gap:14px;
}

.profile-section-card label,
.profile-overview-card label,
.info-block label,
.userpanel label{
  margin-bottom:7px;
}

.profile-section-card input,
.profile-section-card select,
.profile-section-card textarea,
.profile-overview-card input,
.profile-overview-card select,
.profile-overview-card textarea,
.info-block input,
.info-block select,
.info-block textarea,
.userpanel input,
.userpanel select,
.userpanel textarea{
  min-height:46px;
}

.profile-section-card form > .btn,
.profile-overview-card form > .btn,
.info-block form > .btn,
.userpanel form > .btn,
.profile-section-card .form-grid + .btn,
.profile-overview-card .form-grid + .btn,
.info-block .form-grid + .btn,
.userpanel .form-grid + .btn{
  margin-top:4px;
  width:fit-content;
  min-width:150px;
}

/* Make profile action areas breathe */
.profile-action-row,
.profile-overview-actions,
.profile-security-actions,
.profile-form-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

/* Desktop/laptop layout correction */
.userpage-grid{
  grid-template-columns:250px minmax(0, 1fr) minmax(280px, 320px);
  gap:14px;
}

.shoppage-grid{
  grid-template-columns:250px minmax(0, 1fr);
  gap:14px;
}

.play-mode-layout{
  gap:14px;
}

/* Play cards: no more 620px monsters */
.play-mode-card{
  min-height:clamp(340px, 50vh, 500px);
}

.play-mode-card__bottom h2{
  font-size:clamp(34px, 4vw, 52px);
}

.play-mode-card__bottom p{
  font-size:clamp(14px, 1.3vw, 16px);
}

.play-mode-card .btn{
  min-width:150px;
}

/* Shop cards: prevent skinny button crushing */
.shop-product-tile__foot{
  align-items:flex-start;
}

.shop-product-tile__foot .btn{
  flex-shrink:0;
}

.shop-product-tile__art{
  min-height:100px;
}

/* Better tab behavior */
.shop-tabsbar,
.play-tabbar,
.category-strip,
.shop-tabs{
  min-width:0;
}

/* Laptop */
@media (max-width:1380px){
  .userpage-grid{
    grid-template-columns:230px minmax(0, 1fr);
  }

  .userpanel--side{
    grid-column:1 / -1;
  }

  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:230px minmax(0, 1fr);
  }

  .play-mode-side{
    grid-column:1 / -1;
  }

  .play-mode-side .play-side-panel{
    position:static;
  }

  .play-mode-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
  }

  .play-mode-card{
    min-height:380px;
    border-radius:26px;
  }

  .play-mode-card__content{
    padding:18px;
  }

  .play-mode-card__bottom h2{
    font-size:38px;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

/* Smaller laptops/tablets */
@media (max-width:1180px){
  .userpage-grid,
  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:220px minmax(0, 1fr);
    gap:12px;
  }

  .play-mode-grid{
    grid-template-columns:1fr;
  }

  .play-mode-card{
    min-height:280px;
  }

  .play-mode-card__bottom h2{
    font-size:40px;
  }

  .shop-hero--wide,
  .store-hero-grid{
    grid-template-columns:1fr;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean,
  .store-samples{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .shop-product-tile__foot{
    flex-direction:column;
  }

  .shop-product-tile__foot .btn{
    width:100%;
  }

  .route-grid,
  .feature-grid{
    grid-template-columns:1fr;
  }
}

/* Tablet/mobile */
@media (max-width:860px){
  .userpage-grid,
  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:1fr;
    gap:10px;
  }

  .userpanel--nav,
  .userpanel--side,
  .play-mode-side .play-side-panel{
    position:static;
  }

  .usernav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .usernav .hub-item,
  .usernav__item{
    padding:11px;
    gap:10px;
  }

  .usernav .hub-ico,
  .usernav__icon{
    width:36px;
    height:36px;
    flex-basis:36px;
  }

  .usernav .hub-item > span:last-child,
  .usernav__text strong{
    font-size:14px;
  }

  .profile-hero-layout,
  .profile-hero-main,
  .profile-section-head,
  .profile-overview-head,
  .shop-pane__head,
  .play-mode-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .profile-action-row,
  .profile-overview-actions{
    width:100%;
  }

  .profile-action-row .btn,
  .profile-overview-actions .btn,
  .profile-section-card form > .btn,
  .profile-overview-card form > .btn,
  .info-block form > .btn,
  .userpanel form > .btn{
    width:100%;
  }

  .profile-overview-grid,
  .form-grid,
  .split-grid{
    grid-template-columns:1fr;
  }

  .play-mode-head__copy h1{
    font-size:30px;
  }

  .play-mode-head__copy p{
    font-size:14px;
  }

  .play-mode-card{
    min-height:250px;
    border-radius:22px;
  }

  .play-mode-card__bottom h2{
    font-size:32px;
  }

  .play-mode-card .btn{
    width:100%;
    min-width:0;
  }

  .play-side-panel,
  .shop-pane,
  .userpanel,
  .profile-section-card,
  .profile-side-card{
    padding:14px;
    border-radius:20px;
  }

  .play-check-row,
  .stack-row,
  .checklist__row{
    align-items:flex-start;
    flex-direction:column;
  }

  .shop-tabsbar,
  .play-tabbar,
  .category-strip,
  .shop-tabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:4px;
  }

  .shop-tabsbar__item,
  .play-tabbar__item,
  .category-pill,
  .shop-tab{
    white-space:nowrap;
    flex:0 0 auto;
  }

  .shop-featured-strip,
  .shop-shelf--wide,
  .shop-rail--clean,
  .store-samples{
    grid-template-columns:1fr;
  }

  .shop-banner-card{
    min-height:210px;
  }

  .shop-banner-card__content{
    padding:16px;
  }

  .shop-banner-card__content h3{
    font-size:28px;
  }
}

/* Small phones */
@media (max-width:560px){
  .userpanel,
  .shop-pane,
  .play-side-panel,
  .profile-section-card,
  .profile-side-card,
  .profile-overview-card{
    padding:12px;
    border-radius:18px;
  }

  .usernav{
    grid-template-columns:1fr;
  }

  .userpanel__title,
  .profile-section-title{
    font-size:21px;
  }

  .mini-stat,
  .stack-row,
  .checklist__row,
  .profile-stat-card{
    padding:10px 11px;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:60px;
    height:60px;
    border-radius:18px;
  }

  .profile-name{
    font-size:26px;
  }

  .play-mode-shell{
    gap:10px;
  }

  .play-mode-card{
    min-height:220px;
  }

  .play-mode-card__content{
    padding:14px;
  }

  .play-mode-card__bottom{
    gap:9px;
  }

  .play-mode-card__bottom h2{
    font-size:28px;
  }

  .play-mode-card__bottom p{
    font-size:13px;
  }

  .play-modal__dialog,
  .play-modal__dialog--wide{
    width:calc(100vw - 18px);
    max-height:calc(100vh - 18px);
    margin:9px auto;
    border-radius:20px;
  }

  .play-modal__body{
    padding:16px;
  }

  .play-modal__body h3{
    font-size:23px;
  }

  .shop-tabsbar__item{
    min-height:38px;
    padding:0 12px;
    font-size:13px;
  }

  .shop-pane__head h2{
    font-size:24px;
  }

  .shop-product-tile,
  .sample-card{
    padding:12px;
    border-radius:18px;
  }

  .shop-product-tile__art{
    height:100px;
  }

  .shop-product-tile__foot strong{
    font-size:18px;
  }

  .store-banner{
    padding:16px;
    min-height:190px;
  }

  .store-banner h3{
    font-size:25px;
  }
}

/* =====================================================
   PROFILE COMPRESSION + APPEARANCE CARD FIX
   Paste at bottom of assets/userstyle.css
===================================================== */

.profile-maincol{
  gap:12px;
}

.profile-hero-card{
  min-height:0;
  padding:16px;
  border-radius:24px;
}

.profile-hero-card.hub-hero{
  min-height:150px;
}

.profile-hero-card .profile-hero-layout{
  align-items:center;
}

.profile-avatar,
.profile-avatar-fallback{
  width:62px;
  height:62px;
  border-radius:18px;
}

.profile-name{
  font-size:28px;
  line-height:1.05;
}

.profile-badge-row,
.profile-meta-row{
  gap:7px;
}

.profile-action-row .btn{
  min-height:40px;
  padding:9px 12px;
}

.profile-section-card{
  padding:16px;
  border-radius:22px;
}

.profile-section-title{
  font-size:26px;
  line-height:1.08;
}

.profile-form-stack{
  gap:12px;
}

.profile-form-card{
  padding:16px;
  border-radius:18px;
}

.profile-two-col-grid{
  gap:14px;
}

/* Appearance tab: stop the radio + text from becoming stupid narrow */
.profile-choice-grid{
  grid-template-columns:repeat(2, minmax(220px, 1fr));
  gap:12px;
}

.profile-choice-card{
  padding:14px;
  border-radius:18px;
}

.profile-choice-card__top{
  display:grid;
  grid-template-columns:42px minmax(0, 1fr);
  align-items:center;
  gap:12px;
}

.profile-choice-card__top input[type="radio"]{
  width:42px;
  height:42px;
  min-height:42px;
  margin:0;
  justify-self:center;
}

.profile-choice-card__top strong{
  display:block;
  min-width:0;
  white-space:normal;
  overflow-wrap:normal;
  word-break:normal;
  line-height:1.1;
}

.profile-choice-card__meta{
  display:block;
  line-height:1.35;
}

/* Account/security forms: cleaner spacing */
.profile-section-card form,
.profile-form-card form{
  display:grid;
  gap:12px;
}

.profile-section-card .profile-form-actions,
.profile-form-card .profile-form-actions{
  margin-top:2px;
}

/* Stats tab */
.profile-stats-grid{
  margin-top:12px;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
}

.profile-stat-card{
  padding:12px 14px;
  border-radius:18px;
}

.profile-stat-label{
  font-size:12px;
}

.profile-stat-number{
  font-size:24px;
  line-height:1;
}

.profile-match-list{
  margin-top:12px;
  display:grid;
  gap:10px;
}

.profile-match-row{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:var(--surface);
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
}

.profile-match-place{
  min-width:46px;
  height:34px;
  padding:0 10px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
  border:1px solid rgba(57,255,106,.28);
  background:rgba(57,255,106,.10);
}

.profile-match-copy{
  min-width:0;
}

.profile-match-title{
  font-weight:950;
  line-height:1.2;
}

.profile-match-meta{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.profile-match-xp{
  font-weight:950;
  white-space:nowrap;
  color:var(--primary);
}

@media (max-width:1180px){
  .profile-hero-card .profile-hero-layout{
    align-items:flex-start;
  }

  .profile-action-row{
    width:100%;
  }
}

@media (max-width:860px){
  .profile-hero-card{
    padding:14px;
  }

  .profile-hero-card.hub-hero{
    min-height:0;
  }

  .profile-name{
    font-size:25px;
  }

  .profile-choice-grid{
    grid-template-columns:1fr;
  }

  .profile-stats-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .profile-match-row{
    grid-template-columns:auto minmax(0, 1fr);
  }

  .profile-match-xp{
    grid-column:2;
    justify-self:start;
  }
}

@media (max-width:560px){
  .profile-hero-main{
    align-items:flex-start;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:54px;
    height:54px;
    border-radius:16px;
  }

  .profile-section-card,
  .profile-form-card{
    padding:12px;
    border-radius:18px;
  }

  .profile-stats-grid{
    grid-template-columns:1fr;
  }

  .profile-action-row .btn,
  .profile-form-actions .btn{
    width:100%;
  }
}

/* =====================================================
   PROFILE TEXT / TAB / OPTION SPACING FIX
   Paste at VERY BOTTOM of assets/userstyle.css
===================================================== */

/* Top profile tabs: Avatar / Appearance / Security */
.profile-action-row{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.profile-action-row .btn{
  min-width:118px;
  min-height:44px;
  padding:0 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
  word-break:normal;
  overflow-wrap:normal;
  line-height:1;
  text-align:center;
}

/* Prevent the tab words from looking compressed */
.profile-action-row .btn,
.profile-action-row .btn *,
.profile-choice-card,
.profile-choice-card *,
.profile-form-actions .btn,
.profile-form-actions .btn *{
  letter-spacing:0;
  word-spacing:normal;
}

/* Section headers should breathe */
.profile-section-head{
  gap:14px;
  margin-bottom:16px;
}

.profile-section-title{
  line-height:1.12;
  letter-spacing:-0.02em;
}

/* Appearance option grid */
.profile-choice-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(260px, 1fr));
  gap:14px;
}

.profile-choice-card{
  min-width:0;
  padding:16px;
  border-radius:18px;
  display:grid;
  gap:12px;
  cursor:pointer;
}

/* Radio + label row */
.profile-choice-card__top{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  min-width:0;
  width:100%;
  font-weight:950;
}

/* Fix oversized/default browser radio alignment */
.profile-choice-card__top input[type="radio"]{
  flex:0 0 42px;
  width:42px;
  height:42px;
  min-width:42px;
  min-height:42px;
  margin:0;
}

/* This is the main fix for Default / Light text */
.profile-choice-card__top strong{
  display:block;
  flex:1 1 auto;
  min-width:0;
  max-width:100%;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
  line-height:1.2;
  font-size:14px;
  text-align:left;
}

/* Description below the option */
.profile-choice-card__meta{
  display:block;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
}

/* Forms/buttons inside profile should not smash into each other */
.profile-form-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.profile-form-actions .btn{
  min-width:120px;
  min-height:44px;
  padding:0 18px;
  white-space:nowrap;
  line-height:1;
}

/* Inline OTP forms in security tab */
.profile-inline-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.profile-inline-form input{
  flex:1 1 180px;
  min-width:160px;
}

.profile-inline-form .btn{
  flex:0 0 auto;
  min-width:110px;
}

/* Notes and pills spacing */
.profile-meta-row,
.profile-badge-row{
  gap:8px;
}

.profile-meta-row .note,
.profile-badge-row .pill{
  white-space:normal;
  line-height:1.2;
}

/* Desktop: keep hero tabs from getting squeezed */
.profile-hero-layout{
  gap:18px;
}

.profile-hero-main{
  flex:1 1 420px;
}

.profile-action-row{
  flex:0 0 auto;
}

/* Tablet/mobile */
@media (max-width:860px){
  .profile-hero-layout{
    align-items:flex-start;
    flex-direction:column;
  }

  .profile-action-row{
    width:100%;
    justify-content:flex-start;
  }

  .profile-action-row .btn{
    flex:1 1 150px;
  }

  .profile-choice-grid{
    grid-template-columns:1fr;
  }

  .profile-form-actions{
    width:100%;
  }

  .profile-form-actions .btn{
    flex:1 1 150px;
  }
}

/* Small phones */
@media (max-width:520px){
  .profile-action-row{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }

  .profile-action-row .btn{
    width:100%;
    min-width:0;
  }

  .profile-choice-card__top{
    gap:12px;
  }

  .profile-choice-card__top input[type="radio"]{
    flex-basis:38px;
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
  }

  .profile-inline-form{
    display:grid;
    grid-template-columns:1fr;
  }

  .profile-inline-form input,
  .profile-inline-form .btn{
    width:100%;
    min-width:0;
  }
}

/* =====================================================
   FINAL PROFILE SIDEBAR + APPEARANCE SELECTOR POLISH
   Paste at VERY BOTTOM of assets/userstyle.css
===================================================== */

/* 1. Fix PROFILE label being too close to the first nav card */
.userpanel--nav .userpanel__head,
.userpanel--nav .hub-sidebar__title,
.userpanel--nav .notif-sidebar__title{
  margin-bottom:18px;
}

.userpanel--nav .userpanel__eyebrow,
.userpanel--nav .hub-sidebar__title,
.userpanel--nav .notif-sidebar__title{
  display:block;
  padding-left:2px;
  margin-bottom:16px;
  font-size:12px;
  line-height:1.2;
  letter-spacing:.10em;
}

.userpanel--nav .usernav,
.userpanel--nav .usernav--better{
  margin-top:4px;
}

/* Slightly cleaner profile side nav cards */
.userpanel--nav .usernav .hub-item,
.userpanel--nav .usernav__item{
  min-height:64px;
  padding:13px 14px;
  gap:13px;
}

.userpanel--nav .usernav .hub-ico,
.userpanel--nav .usernav__icon{
  flex:0 0 42px;
}


/* 2. Replace appearance selector look */
.profile-choice-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:14px !important;
}

.profile-choice-card{
  position:relative;
  overflow:hidden;
  min-height:112px;
  padding:16px 16px 14px !important;
  border-radius:20px !important;
  border:1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 12% 0%, rgba(98,181,255,.10), transparent 40%),
    rgba(255,255,255,.035);
  display:grid !important;
  gap:10px !important;
  cursor:pointer;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}

.profile-choice-card:hover{
  transform:translateY(-1px);
  border-color:rgba(98,181,255,.30);
  background:
    radial-gradient(circle at 12% 0%, rgba(98,181,255,.14), transparent 40%),
    rgba(255,255,255,.055);
}

.profile-choice-card:has(input[type="radio"]:checked){
  border-color:rgba(57,255,106,.42);
  background:
    radial-gradient(circle at 12% 0%, rgba(57,255,106,.16), transparent 42%),
    radial-gradient(circle at 90% 0%, rgba(98,181,255,.10), transparent 38%),
    rgba(255,255,255,.06);
  box-shadow:
    0 0 0 1px rgba(57,255,106,.10) inset,
    0 14px 34px rgba(0,0,0,.18);
}

/* Hide ugly default radio, replace with custom dot */
.profile-choice-card__top input[type="radio"]{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.profile-choice-card__top{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  min-width:0;
  width:100%;
}

/* Custom selector circle */
.profile-choice-card__top::before{
  content:"";
  flex:0 0 22px;
  width:22px;
  height:22px;
  border-radius:999px;
  border:2px solid rgba(238,243,255,.56);
  background:rgba(0,0,0,.18);
  box-shadow:0 0 0 4px rgba(255,255,255,.04);
}

.profile-choice-card:has(input[type="radio"]:checked) .profile-choice-card__top::before{
  border-color:rgba(57,255,106,.92);
  background:
    radial-gradient(circle at center, rgba(57,255,106,.95) 0 38%, transparent 42%),
    rgba(0,0,0,.18);
  box-shadow:0 0 0 4px rgba(57,255,106,.12);
}

/* Main option text */
.profile-choice-card__top strong{
  display:block;
  min-width:0;
  font-size:16px;
  line-height:1.15;
  font-weight:950;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
  color:var(--text);
}

/* Description text */
.profile-choice-card__meta{
  padding-left:34px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  max-width:52ch;
}

/* Add selected pill on checked option */
.profile-choice-card:has(input[type="radio"]:checked)::after{
  content:"Selected";
  position:absolute;
  top:14px;
  right:14px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(57,255,106,.28);
  background:rgba(57,255,106,.12);
  color:var(--text);
  font-size:11px;
  font-weight:950;
}

/* Make the Apply area less lonely / better aligned */
.profile-section-card:has(.profile-choice-grid) .profile-form-actions,
.profile-section-card:has(.profile-choice-grid) form > .profile-form-actions{
  margin-top:4px;
}

.profile-section-card:has(.profile-choice-grid) .btn,
.profile-section-card:has(.profile-choice-grid) button[type="submit"]{
  min-width:120px;
}

/* Light mode support */
body[data-appearance="light"] .profile-choice-card{
  border-color:var(--border);
  background:
    radial-gradient(circle at 12% 0%, rgba(75,141,255,.10), transparent 40%),
    var(--panelLite);
  box-shadow:var(--shadowSoft);
}

body[data-appearance="light"] .profile-choice-card:hover{
  border-color:rgba(75,141,255,.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(75,141,255,.14), transparent 40%),
    var(--panelLiteStrong);
}

body[data-appearance="light"] .profile-choice-card:has(input[type="radio"]:checked){
  border-color:rgba(30,207,122,.38);
  background:
    radial-gradient(circle at 12% 0%, rgba(30,207,122,.13), transparent 42%),
    var(--panelLiteStrong);
}

body[data-appearance="light"] .profile-choice-card__top::before{
  border-color:rgba(18,35,63,.36);
  background:rgba(255,255,255,.70);
  box-shadow:0 0 0 4px rgba(18,35,63,.05);
}

/* Mobile */
@media (max-width:860px){
  .profile-choice-grid{
    grid-template-columns:1fr !important;
  }

  .profile-choice-card{
    min-height:100px;
  }

  .profile-choice-card__meta{
    padding-left:34px;
  }
}

@media (max-width:520px){
  .userpanel--nav .userpanel__eyebrow,
  .userpanel--nav .hub-sidebar__title,
  .userpanel--nav .notif-sidebar__title{
    margin-bottom:12px;
  }

  .profile-choice-card{
    padding:14px !important;
  }

  .profile-choice-card:has(input[type="radio"]:checked)::after{
    position:static;
    width:max-content;
    margin-left:34px;
  }
}

/* =====================================================
   FINAL FIX - PLAYER DASHBOARD / SOLO SIDEBAR OVERLAY
   Fixes sidebar overlay on 861px–1180px widths and zoomed browsers
   Paste at VERY BOTTOM of assets/userstyle.css
===================================================== */

/* Make sure user pages always behave like real grids */
.userpage-grid,
.shoppage-grid,
.play-mode-layout{
  display:grid;
  align-items:start;
  min-width:0;
}

.userpage-grid > *,
.shoppage-grid > *,
.play-mode-layout > *{
  min-width:0;
}

/* Prevent sidebar panels from floating above main content weirdly */
.userpanel--nav,
.userpanel--side,
.play-mode-side .play-side-panel{
  z-index:1;
}

.user-maincol,
.play-mode-main,
.shop-shell--clean{
  position:relative;
  z-index:0;
  min-width:0;
}

/* 
   This is the actual important fix.
   From 1180px downward, stop using side-by-side sidebar layout.
   This catches laptops/tablets/browser zoom where 1024 rules were being overridden later.
*/
@media (max-width:1180px){
  .userpage-grid,
  .shoppage-grid,
  .play-mode-layout{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .userpanel--nav,
  .userpanel--side,
  .play-mode-side .play-side-panel{
    position:static !important;
    top:auto !important;
    grid-column:auto !important;
    width:100% !important;
    max-width:100% !important;
    transform:none !important;
  }

  .user-maincol,
  .play-mode-main{
    grid-column:auto !important;
    width:100% !important;
    max-width:100% !important;
  }

  /* Turn side menu into compact tiles instead of a tall sticky overlay */
  .usernav,
  .usernav--better{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:10px !important;
  }

  .usernav .hub-item,
  .usernav__item{
    min-height:56px !important;
    padding:11px 12px !important;
  }
}

/* Smaller screens: one button per row */
@media (max-width:620px){
  .usernav,
  .usernav--better{
    grid-template-columns:1fr !important;
  }
}

/* Extra safety: if browser zoom creates horizontal overflow, hide it */
body.hub,
body{
  overflow-x:hidden;
}

/* =====================================================
   FINAL PROFILE RATIO FIX
   Fixes profile sidebar/right panel overlay on small laptops,
   zoomed browsers, Opera sidebar, and weird viewport ratios.
   Paste at VERY BOTTOM of assets/userstyle.css
===================================================== */

/* Profile/user pages need predictable columns */
.userpage-grid{
  display:grid !important;
  align-items:start !important;
  min-width:0 !important;
}

.userpage-grid > *,
.user-maincol,
.profile-maincol,
.userpanel--nav,
.userpanel--side{
  min-width:0 !important;
}

/* Desktop: 3 columns only when there is actually enough room */
@media (min-width:1381px){
  .userpage-grid{
    grid-template-columns:
      minmax(220px, 250px)
      minmax(0, 1fr)
      minmax(280px, 320px) !important;
    gap:14px !important;
  }

  .userpanel--nav{
    grid-column:1 !important;
    grid-row:1 !important;
    position:sticky !important;
    top:84px !important;
    z-index:1 !important;
  }

  .user-maincol,
  .profile-maincol{
    grid-column:2 !important;
    grid-row:1 !important;
  }

  .userpanel--side{
    grid-column:3 !important;
    grid-row:1 !important;
    position:sticky !important;
    top:84px !important;
    z-index:1 !important;
  }
}

/*
   Critical range:
   Small laptops / 125% zoom / Opera sidebar.
   Keep left nav in column 1, but put profile content in column 2.
   Put right-side panel below the profile content, NOT across both columns.
*/
@media (min-width:1025px) and (max-width:1380px){
  .userpage-grid{
    grid-template-columns:minmax(210px, 230px) minmax(0, 1fr) !important;
    gap:12px !important;
  }

  .userpanel--nav{
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
    position:sticky !important;
    top:84px !important;
    max-height:calc(100vh - 104px) !important;
    overflow:auto !important;
    z-index:1 !important;
  }

  .user-maincol,
  .profile-maincol{
    grid-column:2 !important;
    grid-row:1 !important;
    width:100% !important;
    max-width:100% !important;
    position:relative !important;
    z-index:0 !important;
  }

  .userpanel--side{
    grid-column:2 !important;
    grid-row:2 !important;
    position:relative !important;
    top:auto !important;
    width:100% !important;
    max-width:100% !important;
    z-index:0 !important;
  }

  .profile-hero-card,
  .profile-section-card,
  .profile-overview-card,
  .profile-side-card,
  .userpanel{
    padding:14px !important;
    border-radius:22px !important;
  }

  .profile-name{
    font-size:26px !important;
  }

  .profile-section-title{
    font-size:24px !important;
  }

  .profile-action-row .btn{
    min-width:108px !important;
    padding:0 14px !important;
  }

  .profile-stats-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Tablet and below: stack everything; no sticky sidebars */
@media (max-width:1024px){
  .userpage-grid{
    grid-template-columns:1fr !important;
    gap:12px !important;
  }

  .userpanel--nav,
  .userpanel--side,
  .user-maincol,
  .profile-maincol{
    grid-column:auto !important;
    grid-row:auto !important;
    position:static !important;
    top:auto !important;
    width:100% !important;
    max-width:100% !important;
    max-height:none !important;
    overflow:visible !important;
    transform:none !important;
  }

  .usernav,
  .usernav--better{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:10px !important;
  }

  .usernav .hub-item,
  .usernav__item{
    min-height:58px !important;
    padding:10px 11px !important;
  }

  .usernav .hub-item > span:last-child,
  .usernav__text strong{
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
}

/* Smaller tablets */
@media (max-width:760px){
  .usernav,
  .usernav--better{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  .profile-hero-layout,
  .profile-hero-main,
  .profile-section-head,
  .profile-overview-head{
    align-items:flex-start !important;
    flex-direction:column !important;
  }

  .profile-action-row,
  .profile-overview-actions,
  .profile-form-actions{
    width:100% !important;
  }

  .profile-action-row .btn,
  .profile-overview-actions .btn,
  .profile-form-actions .btn{
    flex:1 1 140px !important;
  }

  .profile-stats-grid,
  .profile-overview-grid,
  .profile-two-col-grid,
  .profile-choice-grid{
    grid-template-columns:1fr !important;
  }
}

/* Phones */
@media (max-width:520px){
  .usernav,
  .usernav--better{
    grid-template-columns:1fr !important;
  }

  .profile-hero-card,
  .profile-section-card,
  .profile-overview-card,
  .profile-side-card,
  .userpanel{
    padding:12px !important;
    border-radius:18px !important;
  }

  .profile-avatar,
  .profile-avatar-fallback{
    width:54px !important;
    height:54px !important;
    border-radius:16px !important;
  }

  .profile-name{
    font-size:24px !important;
  }

  .profile-action-row{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  .profile-action-row .btn{
    width:100% !important;
    min-width:0 !important;
  }
}