/* Замки и осады: окно замка и HUD осады (client/siege.js). */
#castlePanel { top: 70px; left: 50%; transform: translateX(-50%); width: min(460px, calc(var(--W, 100vw) - 20px)); max-height: calc(var(--H, 100vh) - 150px); overflow-y: auto; }
#castlePanel h3 { margin: 0 0 6px; color: var(--gold-hi); }
#castleBody .cs { border: 1px solid var(--bronze); background: rgba(0, 0, 0, 0.28); padding: 8px 10px; margin: 0 0 10px; line-height: 1.35; }
#castleBody .cs.war { border-color: #c0402a; box-shadow: 0 0 10px rgba(255, 70, 30, 0.35); }
#castleBody .cs h4 { margin: 0 0 4px; font-size: 16px; color: var(--gold-hi); }
#castleBody .cs small { color: var(--muted); font-weight: 600; }
#castleBody .csl { color: #cfc4a4; font-size: 14px; }
#castleBody .csAct { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
#castleBody .csRow { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
#castleBody .csRow input { width: 84px; padding: 4px 6px; }
#castleBody .csTag { color: #9fe39f; font-size: 13px; }
#castleBody button[disabled] { opacity: 0.45; cursor: not-allowed; }
#castleBody .slotLabel { color: var(--muted); font-size: 13px; }

#siegeHud { position: absolute; top: 118px; right: 12px; z-index: 4; width: min(300px, calc(var(--W, 100vw) - 24px)); padding: 8px 10px;
  background: linear-gradient(180deg, rgba(40, 14, 10, 0.92), rgba(16, 8, 6, 0.92)); border: 2px solid #8a2a1a; box-shadow: 0 0 0 1px #000, 0 4px 16px rgba(0, 0, 0, 0.7);
  font-size: 13px; line-height: 1.3; pointer-events: auto; }
#siegeHud .sgT { display: flex; justify-content: space-between; gap: 8px; color: #ffcf8a; font-size: 15px; }
#siegeHud .sgM { color: #cbbd9c; margin: 2px 0 5px; font-size: 12px; }
#siegeHud .sgS { display: grid; grid-template-columns: 112px 1fr; gap: 6px; align-items: center; margin: 2px 0; font-size: 12px; }
#siegeHud .sgS i, #siegeHud .sgSeal i { display: block; height: 7px; background: #1a0e0a; border: 1px solid #000; }
#siegeHud .sgS i b { display: block; height: 100%; background: linear-gradient(180deg, #e0a050, #8a4a1a); }
#siegeHud .sgS.dead span { color: #8a7a6a; text-decoration: line-through; }
#siegeHud .sgS.dead i b { background: #3a2a22; }
#siegeHud .sgSeal { margin-top: 5px; color: #ffe27a; }
#siegeHud .sgSeal i { height: 9px; margin-top: 3px; }
#siegeHud .sgSeal i b { display: block; height: 100%; background: linear-gradient(180deg, #fff0a0, #d8a020); }
#siegeHud .sgBtn { display: flex; gap: 6px; margin-top: 6px; }
#siegeHud .sgBtn button { flex: 1; min-height: 34px; }

/* телефон: HUD под рамкой цели, кнопки крупнее, окно замка — на весь экран (его даёт общий .win) */
body.mobile #siegeHud { top: 168px; left: 8px; right: auto; width: min(50vw, 210px); font-size: 11px; padding: 5px 7px; }
body.mobile #siegeHud .sgT { font-size: 13px; }
body.mobile #siegeHud .sgB { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
body.mobile #siegeHud .sgS { grid-template-columns: 1fr; gap: 1px; margin: 0; font-size: 10px; }
body.mobile #siegeHud .sgS span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.mobile #siegeHud .sgM { display: none; }
body.mobile #siegeHud .sgSeal { font-size: 11px; }
body.mobile #siegeHud .sgBtn button { min-height: 44px; font-size: 15px; }
body.mobile #castlePanel { padding-top: 48px; }
body.mobile #castleBody button { min-height: 44px; }
body.mobile.landscape #siegeHud { top: 100px; }

#siegeHud .sgO { color: #e8dcc0; margin: 4px 0; font-size: 12px; line-height: 1.3; }
#siegeHud .sgR { color: #9fe39f; font-size: 12px; margin-bottom: 3px; }
#siegeHud .sgX { color: #cbbd9c; font-size: 11px; margin: 3px 0; line-height: 1.35; }
body.mobile #siegeHud .sgO, body.mobile #siegeHud .sgX { display: none; }
