/* Constructor standalone style */

.constructor-body{
  background:#130806;
  color:#f5d28a;
}

.constructor-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:42px 24px 80px;
}

.constructor-wrap h1{
  font-size:clamp(46px, 8vw, 76px);
  line-height:1;
  margin:24px 0 38px;
  color:#ffd27a;
  text-shadow:0 0 20px rgba(255,190,90,.28);
}

.constructor-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
  align-items:start;
}

.constructor-card{
  background:rgba(15,5,2,.78);
  border:1px solid rgba(255,190,90,.32);
  border-radius:22px;
  padding:24px;
  box-shadow:0 0 26px rgba(0,0,0,.28);
}

.constructor-card h2{
  color:#ffd27a;
  font-size:clamp(30px, 4.8vw, 44px);
  line-height:1.1;
  margin:0 0 22px;
}

.constructor-card label{
  display:block;
  margin:14px 0 7px;
  color:#f3d7a3;
  font-size:20px;
}

.constructor-card input,
.constructor-card select{
  width:100%;
  min-height:44px;
  box-sizing:border-box;
  background:#24100a;
  color:#f5d28a;
  border:1px solid rgba(255,190,90,.28);
  border-radius:12px;
  padding:8px 12px;
  font-size:18px;
}

.constructor-card button,
button{
  background:linear-gradient(#b75b3f,#8b2d22);
  color:#ffe1a3;
  border:1px solid rgba(255,210,122,.45);
  border-radius:14px;
  padding:10px 16px;
  font-weight:bold;
  cursor:pointer;
}

.constructor-card button:hover,
button:hover{
  filter:brightness(1.08);
}

.race-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 12px;
}

.race-tabs button,
.active-mode{
  border-radius:12px;
}

.active-mode{
  box-shadow:0 0 14px rgba(255,190,90,.35);
}

.skills-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:14px;
}

.skill-line{
  border:1px solid rgba(255,190,90,.18);
  border-radius:10px;
  padding:8px;
  background:rgba(0,0,0,.18);
}

.auto-skills-box,
.feature-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 12px;
}

.auto-skill-pill,
.feature-pill{
  display:inline-flex;
  align-items:center;
  background:rgba(102,63,25,.75);
  border:1px solid rgba(255,190,90,.35);
  border-radius:999px;
  color:#ffd27a;
  padding:6px 10px;
  font-weight:bold;
}

.clean-stat-row{
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,190,90,.2);
  border-radius:14px;
  padding:14px;
  margin-bottom:14px;
}

.clean-stat-name{
  color:#ffd27a;
  font-size:24px;
  margin-bottom:10px;
}

.clean-stat-controls{
  display:flex;
  align-items:center;
  gap:10px;
}

.clean-stat-controls button{
  width:42px;
  height:42px;
  padding:0;
  font-size:24px;
}

.clean-stat-value{
  min-width:70px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#070403;
  border:1px solid rgba(255,190,90,.28);
  color:#ffd27a;
  font-size:24px;
  font-weight:bold;
}

.clean-stat-desc{
  color:#f3d7a3;
  margin-top:8px;
  font-size:16px;
}

.adventurer-card-wide{
  grid-column:1 / -1;
}

#adventurerCard,
#sheet{
  width:100%;
}

.adventurer-preview{
  width:100%;
}

.equipment-clean-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px;
}

.clean-equipment-list{
  color:#f3d7a3;
  line-height:1.5;
}

@media(max-width:800px){
  .constructor-wrap{
    padding:30px 16px 70px;
  }

  .constructor-grid{
    grid-template-columns:1fr;
  }

  .constructor-card{
    padding:18px;
    border-radius:18px;
  }

  .skills-list{
    grid-template-columns:1fr;
  }

  .equipment-clean-grid{
    grid-template-columns:1fr;
  }

  #randomNameBtn{
    width:100%;
    margin-top:10px;
  }
}

/* === COMPACT CONSTRUCTOR FIX === */

.constructor-wrap{
  max-width:1100px !important;
  padding:26px 18px 60px !important;
}

.constructor-wrap h1{
  font-size:42px !important;
  margin:18px 0 24px !important;
}

.constructor-card{
  padding:16px !important;
  border-radius:16px !important;
}

.constructor-card h2{
  font-size:26px !important;
  margin-bottom:14px !important;
}

.constructor-card label{
  font-size:16px !important;
  margin:10px 0 5px !important;
}

.constructor-card input,
.constructor-card select{
  min-height:38px !important;
  font-size:15px !important;
  padding:6px 10px !important;
}

.constructor-card button,
button{
  font-size:15px !important;
  padding:8px 12px !important;
}

.clean-stat-name{
  font-size:18px !important;
}

.clean-stat-row{
  padding:10px !important;
  margin-bottom:10px !important;
}

.clean-stat-controls button{
  width:34px !important;
  height:34px !important;
  font-size:20px !important;
}

.clean-stat-value{
  height:34px !important;
  min-width:58px !important;
  font-size:19px !important;
}

.clean-stat-desc{
  font-size:13px !important;
}

.skills-list{
  gap:6px !important;
}

.skill-line{
  padding:6px 8px !important;
  font-size:14px !important;
}

.auto-skill-pill,
.feature-pill{
  padding:4px 8px !important;
  font-size:13px !important;
}

.clean-equipment-list{
  font-size:14px !important;
}

/* modal fix */
.skill-modal-backdrop,
.feature-modal-backdrop{
  position:fixed !important;
  inset:0 !important;
  z-index:99999 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:rgba(0,0,0,.65) !important;
  padding:18px !important;
}

.skill-modal,
.feature-modal{
  position:relative !important;
  width:min(92vw, 520px) !important;
  max-height:80vh !important;
  overflow:auto !important;
  margin:0 !important;
  transform:none !important;
}

@media(max-width:800px){
  .constructor-wrap{
    padding:20px 12px 50px !important;
  }

  .constructor-wrap h1{
    font-size:34px !important;
  }

  .constructor-card h2{
    font-size:22px !important;
  }
}

/* checkbox size fix */

.constructor-card input[type="checkbox"],
.constructor-card input[type="radio"]{
    width:18px !important;
    height:18px !important;
    min-height:18px !important;
    padding:0 !important;
    margin:0 10px 0 0 !important;
    accent-color:#c77b42;
    flex-shrink:0;
}

.skill-line{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    min-height:auto !important;
}

.skill-line label{
    margin:0 !important;
    font-size:15px !important;
    line-height:1.2 !important;
    cursor:pointer;
}

.skill-line input{
    display:inline-block !important;
}

/* modal visibility fix */

.skill-modal-backdrop,
.feature-modal-backdrop,
.image-modal-backdrop,
.modal-backdrop{
    background:rgba(0,0,0,.82) !important;
    backdrop-filter:blur(4px) !important;
}

.skill-modal,
.feature-modal,
.image-modal,
.modal-window{
    background:#1a0905 !important;
    border:1px solid rgba(255,190,90,.35) !important;
    box-shadow:
        0 0 0 1px rgba(255,210,120,.12),
        0 10px 40px rgba(0,0,0,.65) !important;
    opacity:1 !important;
}

.skill-modal *,
.feature-modal *,
.image-modal *,
.modal-window *{
    opacity:1 !important;
}



/* ===== CLEAN STATS BLOCK ===== */

.clean-stats-wrap{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.clean-stat-row{
    background:rgba(0,0,0,.18);
    border:1px solid rgba(255,190,90,.22);
    border-radius:16px;
    padding:14px;
}

.clean-stat-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.clean-stat-name{
    display:inline-flex;
    align-items:center;

    padding:6px 14px;

    background:linear-gradient(180deg,#a95637 0%,#7b2c1d 100%);
    border:1px solid rgba(255,210,120,.4);
    border-radius:999px;

    color:#ffd88d;
    font-size:16px;
    font-weight:700;
    line-height:1;

    cursor:pointer;
    white-space:nowrap;
}

.clean-stat-controls{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

.clean-stat-controls button{
    width:34px;
    height:34px;
    min-width:34px;

    padding:0;

    border:none;
    border-radius:10px;

    background:#a45435;
    color:#ffd27a;

    font-size:20px;
    cursor:pointer;
}

.clean-stat-value{
    width:44px;
    min-width:44px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:10px;

    background:#070403;
    border:1px solid rgba(255,180,90,.3);

    color:#ffd27a;
    font-size:16px;
    font-weight:700;
}

.clean-stat-desc{
    margin-top:10px;

    color:#f2d1a0;
    font-size:14px;
    line-height:1.3;
}

/* === FINAL AUTHORITATIVE STATS STYLE === */

#statsBox .clean-pointbuy-line{
  margin:8px 0 12px 0 !important;
  color:#f2d1a0 !important;
  font-size:15px !important;
  line-height:1.2 !important;
}

#statsBox .clean-stats-wrap{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
}

#statsBox .clean-stat-row{
  display:block !important;
  padding:12px 14px !important;
  margin:0 !important;
  border:1px solid rgba(255,190,90,.22) !important;
  border-radius:16px !important;
  background:rgba(0,0,0,.16) !important;
}

#statsBox .clean-stat-top{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

#statsBox .clean-stat-name{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:0 !important;
  height:32px !important;
  margin:0 !important;
  padding:5px 12px !important;
  border-radius:999px !important;
  background:linear-gradient(180deg,#a95637 0%,#7b2c1d 100%) !important;
  border:1px solid rgba(255,210,120,.45) !important;
  color:#ffd88d !important;
  font-size:15px !important;
  font-weight:700 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  cursor:pointer !important;
}

#statsBox .clean-stat-controls{
  display:flex !important;
  align-items:center !important;
  gap:6px !important;
  margin:0 !important;
  flex-shrink:0 !important;
}

#statsBox .clean-stat-controls button{
  width:32px !important;
  min-width:32px !important;
  height:32px !important;
  padding:0 !important;
  border-radius:9px !important;
  font-size:18px !important;
  line-height:1 !important;
}

#statsBox .clean-stat-value{
  width:42px !important;
  min-width:42px !important;
  height:32px !important;
  padding:0 !important;
  font-size:15px !important;
  line-height:1 !important;
}

#statsBox .clean-stat-desc{
  margin:8px 0 0 0 !important;
  padding:0 !important;
  color:#f2d1a0 !important;
  font-size:14px !important;
  line-height:1.3 !important;
}



/* === HIDE OLD POINTBUY LINE FOREVER === */
.clean-pointbuy-line,
#cleanPointBuyLine,
#spentPointsLine,
#pointBuyLine,
.pointbuy-info{
  display:none !important;
}
