/* Expansões 20x20 até 60x60 — módulo independente */
.castle-expansion-ground{position:absolute;display:block;background:linear-gradient(135deg,#ffffff19,transparent 36%,#17201628 78%),url('../assets/castle/courtyard_texture.jpg') center/cover no-repeat;filter:drop-shadow(0 10px 11px #14201655) saturate(.94) contrast(1.04);pointer-events:none}
.castle-expansion-ground>i{position:absolute;inset:0;background:radial-gradient(ellipse at 24% 31%,#d7c68e28 0 7%,transparent 18%),radial-gradient(ellipse at 72% 67%,#654a2c25 0 8%,transparent 19%);box-shadow:inset 0 0 50px #20291d4d}
.castle-expansion-ground.is-initial{filter:drop-shadow(0 12px 13px #14201666) saturate(.96) contrast(1.06)}
.castle-expansion-panel{display:grid;gap:14px;min-width:min(880px,80vw)}
.castle-expansion-summary{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:8px}
.castle-expansion-summary>div{border:1px solid #765b30;border-radius:7px;background:#efe0bd;padding:9px 11px;display:flex;flex-direction:column;color:#4b3821}
.castle-expansion-summary span{font-size:11px}.castle-expansion-summary strong{font-size:17px;color:#2d2115;margin-top:3px}
.castle-expansion-map{display:grid;gap:5px;padding:12px;border:2px solid #75552c;border-radius:9px;background:linear-gradient(#788b51,#526d3e);box-shadow:inset 0 0 28px #26341f88}
.expansion-row{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.expansion-middle{display:grid;grid-template-columns:2fr 2fr 2fr;gap:5px;min-height:130px}.expansion-side{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.expansion-center{display:flex;flex-direction:column;align-items:center;justify-content:center;border:3px solid #d2b66c;border-radius:7px;background:linear-gradient(145deg,#cbb777,#9e864e);box-shadow:inset 0 0 20px #47361d88;color:#2a2116;text-shadow:0 1px #f7e7b3}.expansion-center strong{font-size:18px}.expansion-center span{font-weight:800;font-size:16px}.expansion-center small{font-size:11px}
.castle-expansion-plot{min-height:74px;border:2px solid #5f4a2c;border-radius:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-family:inherit;transition:.14s;box-shadow:0 3px 6px #0005}.castle-expansion-plot b{font-size:15px}.castle-expansion-plot span{font-weight:800}.castle-expansion-plot em{font-style:normal;font-size:9px}.castle-expansion-plot.purchased{background:#bba76d;color:#46371f;opacity:.82}.castle-expansion-plot.available{background:linear-gradient(#a9d14b,#659d28);color:#1f3210;cursor:pointer;animation:expansion-ready 1.2s ease-in-out infinite alternate}.castle-expansion-plot.available:hover{transform:translateY(-3px);filter:brightness(1.12)}.castle-expansion-plot.locked{background:#40463d;color:#a8aea2;opacity:.65}.castle-expansion-note{border-left:4px solid #c69736;background:#f0e2bf;padding:9px 12px;color:#4c3922}
.castle-expansion-purchase{display:grid;gap:15px;min-width:min(680px,75vw)}.castle-expansion-selected{display:flex;flex-direction:column;border:1px solid #816133;border-radius:7px;background:#ecdcba;padding:12px}.castle-expansion-selected strong{font-size:19px;color:#392819}.castle-expansion-selected span{color:#6b5130;margin-top:3px}.castle-expansion-payments{display:grid;grid-template-columns:1fr auto 1fr;align-items:stretch;gap:12px}.castle-expansion-payments>article{border:1px solid #78592f;border-radius:8px;background:#f3e5c5;padding:14px;display:flex;flex-direction:column;gap:10px;align-items:center}.castle-expansion-payments>article h4{margin:0;color:#44301c}.castle-expansion-payments>b{align-self:center;color:#71572f}.castle-expansion-instant{text-align:center;margin:0;color:#517326;font-weight:700}
@keyframes expansion-ready{from{box-shadow:0 3px 6px #0005,0 0 0 0 #d6f77555}to{box-shadow:0 3px 6px #0005,0 0 0 5px #d6f77520}}
@media(max-width:900px){.castle-expansion-summary{grid-template-columns:repeat(2,1fr)}.castle-expansion-panel{min-width:0}.castle-expansion-map{overflow:auto}.castle-expansion-payments{grid-template-columns:1fr}.castle-expansion-payments>b{text-align:center}}
/* v0.1.101 — expansões sem scroll horizontal */
.castle-expansion-modal{width:min(940px,96vw)!important;overflow:hidden auto!important;}
.castle-expansion-modal .modal-body{overflow-x:hidden!important;box-sizing:border-box;}
.castle-expansion-panel{display:grid;gap:14px;min-width:0!important;width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden;}
.castle-expansion-panel p{margin:0;line-height:1.45;overflow-wrap:break-word;}
.castle-expansion-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:100%;box-sizing:border-box;}
.castle-expansion-summary>div{min-width:0;}
.castle-expansion-summary span{white-space:normal;}
.castle-expansion-summary strong{word-break:keep-all;}
.castle-expansion-map{display:grid;gap:5px;padding:10px;border:2px solid #75552c;border-radius:9px;background:linear-gradient(#788b51,#526d3e);box-shadow:inset 0 0 28px #26341f88;width:100%;max-width:100%;box-sizing:border-box;overflow:hidden!important;}
.expansion-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;min-width:0;}
.expansion-middle{display:grid;grid-template-columns:minmax(0,1fr) minmax(170px,1.25fr) minmax(0,1fr);gap:5px;min-height:120px;min-width:0;}
.expansion-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-width:0;}
.expansion-center{min-width:0;}
.castle-expansion-plot{min-width:0!important;width:100%;box-sizing:border-box;padding:5px 2px;min-height:68px;}
.castle-expansion-plot b{font-size:14px;line-height:1;}
.castle-expansion-plot span{font-size:15px;line-height:1.05;}
.castle-expansion-plot em{font-size:9px;line-height:1.05;}
.castle-expansion-note{box-sizing:border-box;width:100%;overflow-wrap:break-word;}
@media(max-width:900px){
  .castle-expansion-modal{width:96vw!important;}
  .castle-expansion-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .expansion-middle{grid-template-columns:minmax(0,1fr) minmax(140px,1.1fr) minmax(0,1fr);min-height:112px;}
  .castle-expansion-map{padding:8px;gap:4px;}
  .expansion-row,.expansion-side,.expansion-middle{gap:4px;}
  .castle-expansion-plot{min-height:62px;}
  .expansion-center strong{font-size:16px;}.expansion-center span{font-size:14px;}.expansion-center small{font-size:10px;}
}
@media(max-width:640px){
  .castle-expansion-summary{grid-template-columns:1fr!important;}
  .castle-expansion-map{padding:6px;}
  .expansion-row{grid-template-columns:repeat(3,minmax(0,1fr));}
  .expansion-middle{grid-template-columns:1fr;}
  .expansion-side{grid-template-columns:repeat(2,minmax(0,1fr));}
}
/* v0.1.103 — comprar expansão sem scroll lateral */
.castle-expansion-purchase-modal{
  width:min(780px,96vw)!important;
  max-width:96vw!important;
  overflow:hidden auto!important;
}
.castle-expansion-purchase-modal > .modal-body{
  overflow-x:hidden!important;
  box-sizing:border-box;
  max-width:100%;
}
.castle-expansion-purchase-modal > .modal-actions{
  box-sizing:border-box;
  max-width:100%;
  flex-wrap:wrap;
}
.castle-expansion-purchase{
  min-width:0!important;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:hidden;
}
.castle-expansion-selected{
  min-width:0;
  box-sizing:border-box;
  overflow-wrap:break-word;
}
.castle-expansion-payments{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
  gap:12px;
  overflow-x:hidden;
}
.castle-expansion-payments>article{
  min-width:0;
  box-sizing:border-box;
  padding:14px 12px;
}
.castle-expansion-payments .costs{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:5px;
  max-width:100%;
}
.castle-expansion-payments .action-btn{
  max-width:100%;
  white-space:normal;
  text-align:center;
}
.castle-expansion-payments>b{
  padding:0 2px;
  min-width:26px;
  text-align:center;
}
.castle-expansion-instant{
  max-width:100%;
  overflow-wrap:break-word;
  padding:0 8px;
  box-sizing:border-box;
}
@media(max-width:700px){
  .castle-expansion-purchase-modal{width:96vw!important;}
  .castle-expansion-payments{grid-template-columns:1fr!important;gap:10px;}
  .castle-expansion-payments>b{padding:0;text-align:center;}
}
