
.ohsbe-launch-wrap{margin:20px 0}
.ohsbe-launch,.ohsbe-btn{background:linear-gradient(180deg,#203f6d 0%,#132f54 100%);color:#fff;border:1px solid rgba(255,255,255,.12);padding:12px 16px;border-radius:12px;font-weight:700;cursor:pointer}
.ohsbe-overlay[hidden]{display:none!important}.ohsbe-overlay{position:fixed;inset:0;z-index:999999}
.ohsbe-embedded{position:relative;z-index:1;margin:24px 0}
.ohsbe-backdrop{position:absolute;inset:0;background:rgba(3,8,20,.82);backdrop-filter:blur(4px)}
.ohsbe-modal{position:relative;z-index:2;display:flex;align-items:center;justify-content:center;width:100%;height:100%}
.ohsbe-inner{width:min(97vw,1600px);height:94vh;max-height:94vh;overflow:auto;background:radial-gradient(circle at top center, rgba(73,124,199,.12), transparent 34%),linear-gradient(180deg,#07111f 0%,#0a1526 58%,#09111c 100%);color:#edf3ff;border-radius:24px;border:1px solid rgba(255,255,255,.12);padding:18px;box-shadow:0 28px 80px rgba(0,0,0,.5)}
.ohsbe-modal.ohsbe-fullscreen .ohsbe-inner{width:100vw;height:100vh;max-height:100vh;border-radius:0}
.ohsbe-topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:16px}.ohsbe-kicker{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:#86b6ff}.ohsbe-title{font-size:34px;font-weight:800}.ohsbe-top-actions{display:flex;gap:10px;align-items:center}
.ohsbe-close{width:42px;height:42px;border-radius:50%;border:0;background:#13233f;color:#fff;font-size:28px;cursor:pointer}
.ohsbe-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px}.ohsbe-sidebar{display:flex;flex-direction:column;gap:16px}
.ohsbe-card{background:linear-gradient(180deg,#091525 0%,#0b182b 100%);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:16px;box-shadow:0 16px 38px rgba(0,0,0,.28)}.ohsbe-card h3{margin:0 0 12px;font-size:18px}
.ohsbe-stats{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}.ohsbe-stats li{display:flex;justify-content:space-between;gap:12px;background:rgba(0,0,0,.18);border-radius:12px;padding:10px 12px}
.ohsbe-order-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ohsbe-ability-grid{grid-template-columns:1fr 1fr 1fr;margin-top:10px}.ohsbe-note{margin-top:10px;font-size:13px;color:#b8cae6;line-height:1.45}.ohsbe-source-select{width:100%;padding:10px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:#14233c;color:#fff}
.ohsbe-main{display:flex;flex-direction:column;gap:12px}.ohsbe-canvas-wrap{background:linear-gradient(180deg,#08111d,#0d1d34);border:1px solid rgba(255,255,255,.1);border-radius:22px;padding:10px;box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 18px 40px rgba(0,0,0,.25)}.ohsbe-canvas{width:100%;height:auto;display:block;border-radius:16px;background:#0b1625;cursor:crosshair}
.ohsbe-legend{display:flex;gap:18px;flex-wrap:wrap;color:#c7d6ef;font-size:13px}.ohsbe-swatch{display:inline-block;width:14px;height:14px;border-radius:4px;margin-right:6px;vertical-align:-2px}.ohsbe-swatch-player{background:#69d3ff}.ohsbe-swatch-enemy{background:#ff7b7b}.ohsbe-swatch-structure{background:#c4b08d}
@media (max-width:1100px){.ohsbe-layout{grid-template-columns:1fr}.ohsbe-title{font-size:28px}.ohsbe-ability-grid{grid-template-columns:1fr}}


/* v3.7.0 layout cleanup */
.ohsbe-btn{width:100%;min-width:0;text-align:center;line-height:1.15}
.ohsbe-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ohsbe-ability-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.ohsbe-card .ohsbe-source-select{margin-top:6px}
.ohsbe-note{word-break:break-word}
.ohsbe-card h3{line-height:1.1}
.ohsbe-top-actions .ohsbe-btn{width:auto}
@media (max-width: 900px){
  .ohsbe-sidebar{gap:12px}
  .ohsbe-card{padding:14px}
  .ohsbe-order-grid{grid-template-columns:1fr 1fr}
}
@media (max-width: 640px){
  .ohsbe-inner{padding:12px}
  .ohsbe-topbar{align-items:flex-start}
  .ohsbe-title{font-size:24px}
  .ohsbe-order-grid,.ohsbe-ability-grid{grid-template-columns:1fr}
  .ohsbe-layout{gap:12px}
}


/* v4.0 siege polish */
.ohsbe-btn{width:100%;min-width:0;text-align:center;line-height:1.15;white-space:normal}
.ohsbe-order-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ohsbe-ability-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.ohsbe-top-actions .ohsbe-btn{width:auto}
.ohsbe-card{overflow:hidden}
.ohsbe-source-select{max-width:100%}
.ohsbe-note{word-break:break-word}
@media (max-width: 720px){
  .ohsbe-order-grid,.ohsbe-ability-grid{grid-template-columns:1fr}
  .ohsbe-inner{padding:12px}
  .ohsbe-title{font-size:24px}
}
.ohsbe-tcgfx-host{
  position:fixed;
  inset:0;
  z-index:1000001;
  pointer-events:none;
}
.ohsbe-tcgfx-host .tcg-vs{
  position:absolute;
  inset:0;
}
.ohsbe-tcgfx-host .tcg-side{
  position:absolute;
  inset:0;
}
.ohsbe-tcgfx-host .tcg-card{
  position:fixed !important;
  width:120px;
  height:160px;
  border-radius:18px;
  opacity:.95;
  box-shadow:0 18px 60px rgba(0,0,0,.45);
}

.ohsbe-order-grid .ohsbe-btn[data-ohsbe-view]{min-height:44px}
.ohsbe-card .ohsbe-order-grid{align-items:stretch}

.ohsbe-canvas{background:radial-gradient(circle at 50% 35%, rgba(85,120,170,.22), rgba(6,14,24,0) 34%), linear-gradient(180deg,#0b1322 0%,#122235 52%,#0b1322 100%); border:1px solid rgba(125,211,252,.18); box-shadow:0 22px 48px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.03);}
.ohsbe-card h3{letter-spacing:.02em;}
.ohsbe-btn[data-ohsbe-view]{min-width:150px;}


/* v4.2.3 mature siege art */
.ohsbe-inner{background:radial-gradient(circle at top center, rgba(214,156,66,.10), transparent 32%),linear-gradient(180deg,#07111f 0%,#0a1422 48%,#0b121d 100%)}
.ohsbe-canvas-wrap{background:linear-gradient(180deg,#0c1520,#142132);border:1px solid rgba(217,179,109,.22);box-shadow:inset 0 1px 0 rgba(255,255,255,.03),0 20px 44px rgba(0,0,0,.34)}
.ohsbe-card{background:linear-gradient(180deg,#0a1523 0%,#0d1726 100%);border:1px solid rgba(214,191,146,.10)}
.ohsbe-btn{background:linear-gradient(180deg,#5a4020 0%,#2c476d 100%);border-color:rgba(245,219,164,.16)}
.ohsbe-legend{color:#d7e0ec}

.ohsbe-note{line-height:1.45}.ohsbe-canvas{background:radial-gradient(circle at 30% 20%, rgba(255,255,255,.06), transparent 30%), linear-gradient(180deg, rgba(7,14,24,.35), rgba(7,14,24,.05)); box-shadow:0 16px 40px rgba(0,0,0,.35)}

.ohsbe-embedded .ohsbe-inner{width:100%;height:auto;max-height:none}
.ohsbe-embedded .ohsbe-top-actions{justify-content:flex-end}
.ohsbe-embedded .ohsbe-backdrop,.ohsbe-embedded .ohsbe-close{display:none}
.ohsbe-embedded .ohsbe-canvas{cursor:crosshair}


/* v5.1.0 cleaner control layout */
.ohsbe-toolbar{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}
.ohsbe-controls-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.ohsbe-btn-primary{
  background:linear-gradient(180deg,#2d6cdf 0%,#1846a3 100%);
}
.ohsbe-launch-wrap{
  margin:20px 0 10px;
}
.ohsbe-launch{
  width:100%;
  max-width:340px;
  font-size:16px;
  padding:14px 18px;
  border-radius:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.ohsbe-card h3{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
@media (max-width: 640px){
  .ohsbe-toolbar,
  .ohsbe-controls-grid{
    grid-template-columns:1fr;
  }
}


.ohsbe-bottom-controls{
  margin-top:14px;
}
.ohsbe-card-bottom{
  padding:14px 16px;
}
.ohsbe-main .ohsbe-card-bottom h3{
  margin-bottom:10px;
}
.ohsbe-main .ohsbe-toolbar{
  max-width:420px;
}
@media (max-width: 760px){
  .ohsbe-main .ohsbe-toolbar,
  .ohsbe-controls-grid{
    max-width:none;
    grid-template-columns:1fr;
  }
}


/* v5.2.17 unit type picker */
.ohsbe-toolbar-unit-picker{
  grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(0,1fr));
  align-items:stretch;
}
.ohsbe-toolbar-unit-picker .ohsbe-source-select{
  margin-top:0;
  height:100%;
}
@media (max-width: 760px){
  .ohsbe-toolbar-unit-picker{grid-template-columns:1fr;}
}

.ohsbe-modal-deployment{max-width:1120px;width:min(1120px,96vw)}
.ohsbe-deployment-shell{display:flex;flex-direction:column;gap:14px}
.ohsbe-deployment-grid{display:grid;grid-template-columns:220px repeat(6,1fr);gap:12px}
.ohsbe-deployment-panel{background:linear-gradient(180deg,#102443,#071628);border:1px dashed rgba(125,211,252,.28);border-radius:16px;padding:12px;min-height:360px}
.ohsbe-deployment-panel h4{margin:0 0 10px;font-size:20px;color:#fff}
.ohsbe-deployment-list{display:flex;flex-direction:column;gap:10px}
.ohsbe-deploy-chip{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid rgba(125,211,252,.18);background:#12396a;color:#fff;padding:10px 12px;border-radius:999px;font-weight:700;width:100%}
.ohsbe-deploy-chip.is-selected{outline:2px solid #7dd3fc;background:#1d4f8f}
.ohsbe-deploy-chip.is-zone{background:#0f2e54;border-style:solid}
.ohsbe-deploy-chip button{border:none;background:rgba(255,255,255,.12);color:#fff;border-radius:999px;width:26px;height:26px;font-size:18px;line-height:1;cursor:pointer}
.ohsbe-deployment-actions{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}
.ohsbe-deployment-drop{display:flex;align-items:center;gap:10px;color:#fff;font-weight:700}
.ohsbe-deployment-drop input{width:90px;background:#0b1b31;border:1px solid rgba(125,211,252,.25);color:#fff;border-radius:10px;padding:10px 12px}
@media (max-width: 1100px){.ohsbe-deployment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 700px){.ohsbe-deployment-grid{grid-template-columns:1fr}.ohsbe-modal-deployment{width:96vw}}

.ohsbe-deploy-chip.is-zone button + button{margin-left:6px;}

.ohsbe-deploy-chip.is-zone button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
.ohsbe-deploy-chip.is-zone{flex-wrap:wrap}


/* v5.3.4 button text fit cleanup */
.ohsbe-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:10px 12px;
  font-size:13px;
  line-height:1.15;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  text-wrap:balance;
}
.ohsbe-sidebar .ohsbe-btn{
  font-size:12px;
  min-height:44px;
  padding:9px 10px;
}
.ohsbe-main .ohsbe-btn{
  font-size:12px;
}
.ohsbe-order-grid,
.ohsbe-ability-grid,
.ohsbe-toolbar{
  align-items:stretch;
}
.ohsbe-toolbar-unit-picker{
  grid-template-columns:minmax(0,1.5fr) repeat(2,minmax(120px,1fr));
}
.ohsbe-toolbar-unit-picker .ohsbe-btn{
  font-size:11.5px;
  letter-spacing:.01em;
}
.ohsbe-main .ohsbe-toolbar{
  max-width:560px;
}
.ohsbe-card-bottom .ohsbe-btn{
  border-radius:10px;
}
@media (max-width: 960px){
  .ohsbe-main .ohsbe-toolbar{max-width:none;}
  .ohsbe-toolbar-unit-picker{grid-template-columns:1fr 1fr 1fr;}
}
@media (max-width: 760px){
  .ohsbe-toolbar-unit-picker,
  .ohsbe-toolbar,
  .ohsbe-order-grid,
  .ohsbe-ability-grid{grid-template-columns:1fr;}
}


/* v5.4.2.14 march/intel + owner defense button polish */
.ohsbe-launch-wrap{margin:18px 0;text-align:center}.ohsbe-launch{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:14px 22px;border-radius:16px;font-weight:900;text-decoration:none!important;box-shadow:0 0 28px rgba(59,130,246,.28);border:1px solid rgba(147,197,253,.45)}
.ohsbe-launch-attack{background:linear-gradient(135deg,#f97316,#ef4444);color:#fff!important;animation:ohsbeAttackPulse 1.7s infinite}.ohsbe-launch-defense{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff!important}.ohsbe-launch-sub{margin-top:8px;color:#9fb3d8;font-size:13px;font-weight:700}.ohsbe-btn[data-ohsbe-live-defense]{border-color:rgba(251,191,36,.45);box-shadow:0 0 16px rgba(251,191,36,.14)}
@keyframes ohsbeAttackPulse{0%,100%{transform:translateY(0);box-shadow:0 0 20px rgba(239,68,68,.35)}50%{transform:translateY(-1px);box-shadow:0 0 34px rgba(249,115,22,.55)}}

/* v5.4.2.17 attacker battle siege route button */
.ohsbe-battle-siege-btn{background:linear-gradient(135deg,#f97316,#ef4444)!important;border-color:rgba(251,146,60,.65)!important;box-shadow:0 0 30px rgba(249,115,22,.45), inset 0 0 18px rgba(255,255,255,.08)!important;animation:ohsbeAttackRoutePulse 1.45s ease-in-out infinite}
.ohsbe-attack-route-wrap .ohsbe-launch-sub strong{color:#fed7aa}
@keyframes ohsbeAttackRoutePulse{0%,100%{transform:translateY(0);filter:brightness(1)}50%{transform:translateY(-1px);filter:brightness(1.2)}}

/* v5.4.2.33: attacker intel button visibility fallback */
.ohsbe-footer-attack-intel-fallback{
  position:relative;
  z-index:9997;
  max-width:980px;
  margin:18px auto;
  padding:0 14px;
  box-sizing:border-box;
}
.ohsbe-visible-attacker-intel-wrap .ohsbe-launch-attack,
.ohsbe-footer-attack-intel-fallback .ohsbe-launch-attack{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:12px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 10px 30px rgba(70,90,255,.22);
}
.ohsbe-visible-attacker-intel-wrap .ohsbe-launch-sub,
.ohsbe-footer-attack-intel-fallback .ohsbe-launch-sub{
  margin-top:6px;
  font-size:12px;
  opacity:.82;
}
