/* BLACK RAIN service panels. Keep the original boss and chat nodes/handlers. */
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) {
  background: #030b13c9 !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) {
  top: 15.5% !important;
  left: 4% !important;
  width: 92% !important;
  height: 65% !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: 0 0 0 100vmax #08070477,0 8px 23px #000c !important;
}
html.survival-portrait body .game #boss.popup::before {
  content: '';
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
  background: linear-gradient(#241f1ae9,#111a21f2),url('../img/ui/survival/operations-board.jpg') center / cover no-repeat;
  border: 10px solid transparent;
  border-image: url('../img/city/market/survival/upgrade_panel_bronze.webp') 26 fill / 10px stretch;
  box-shadow: 0 10px 26px #000d;
}
html.survival-portrait body .game #boss.popup::before {
  inset: 75px 7px 74px;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat::before {
  content: '';
  position: absolute;
  pointer-events: none;
  box-sizing: border-box;
  inset: 0;
  background: #191b19 url('../img/ui/survival/steel_popup_texture.webp') center / cover no-repeat;
  border: 2px solid #8c7c60;
  clip-path: polygon(0 3%,4% 0,96% 0,100% 3%,100% 97%,96% 100%,4% 100%,0 97%);
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px #0b1010,inset 0 0 0 3px #49473b,0 10px 26px #000d;
}

/* Bosses: the first three real opponents form the prominent hero row. The
   remaining opponents stay in the original scrollable list. */
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .h1 {
  left: 39px !important;
  top: 84px !important;
  width: calc(100% - 88px) !important;
  height: 29px !important;
  font: 900 21px/29px var(--br-display) !important;
  text-transform: uppercase;
  overflow: visible !important;
}
html.survival-portrait body .game #boss.popup > .h1::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 1px;
  width: 26px;
  height: 26px;
  background: url('../img/ui/survival/kit/boss.webp') center / contain no-repeat;
}
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .close {
  top: 81px !important;
  right: 18px !important;
  width: 29px !important;
  height: 29px !important;
  border-color: transparent !important;
  background: transparent url('../img/ui/survival/kit/button_close.webp') center / 100% 100% no-repeat !important;
  z-index: 50 !important;
}
html.survival-portrait body .game #boss.popup > .close::after {
  content: none !important; font: 900 22px/27px Arial,sans-serif !important; }
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > #countTicketBoss {
  left: 82px !important;
  top: 123px !important;
  width: calc(100% - 164px) !important;
  height: 28px !important;
  padding: 0 7px 0 27px !important;
  border: 1px solid #b07a48 !important;
  background: linear-gradient(#3b3027,#171d21) !important;
  color: #f7d7a5 !important;
  font: 800 11px/26px Arial,sans-serif !important;
  text-align: center !important;
  text-transform: uppercase;
  white-space: nowrap;
}
html.survival-portrait body .game #boss.popup > #countTicketBoss::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 3px;
  width: 20px;
  height: 20px;
}
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .bossList {
  left: 16px !important;
  right: 16px !important;
  top: 157px !important;
  bottom: 108px !important;
  width: calc(100% - 32px) !important;
  padding: 1px 1px 5px !important;
  scrollbar-width: thin;
  scrollbar-color: #9b633e #101b20;
}
html.survival-portrait body .game #boss .boss-card-grid {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 5px !important;
}
html.survival-portrait body .game #boss .boss-card-grid > .guild-raid-card,
html.survival-portrait body .game #boss .boss-card-grid > .guild-raid-card > .guild-raid-card-frame {
  height: 228px !important;
  border-radius: 3px !important;
  background: linear-gradient(#44372d,#10191e) !important;
  border: 1px solid #bd8c58 !important;
  box-shadow: inset 0 0 0 2px #121c21,0 3px 7px #000b !important;
}
html.survival-portrait body .game #boss .boss-card-grid > .guild-raid-card.lock,
html.survival-portrait body .game #boss .boss-card-grid > .guild-raid-card.lock > .guild-raid-card-frame {
  height: 78px !important;
  border-color: #72675a !important;
}
html.survival-portrait body .game #boss .guild-raid-card-art {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 2px !important;
  background: linear-gradient(#5c49386b,#191d1d) !important;
}
html.survival-portrait body .game #boss .guild-raid-card-art-img {
  background-size: 220% auto !important;
  background-position: center 8% !important;
}
html.survival-portrait body .game #boss .guild-raid-card-art .boss-dossier-portrait {
  inset: 0 0 auto !important;
  width: 100%;
  height: 61% !important;
  background-size: cover !important;
  background-position: center 17% !important;
}
html.survival-portrait body .game #boss .guild-raid-card:not(.lock) .guild-raid-name {
  position: absolute; z-index: 3; inset: auto 2px 79px; height: 28px;
  display: grid; place-items: center; padding: 0 2px; text-align: center;
  color: #f6d6a6; background: #211b16f0; font: 800 9px/11px var(--br-display); text-transform: uppercase;
}
html.survival-portrait body .game #boss .guild-raid-card.lock .guild-raid-name { display: none; }
html.survival-portrait body .game #boss .guild-raid-card.lock .guild-raid-card-art-img {
  background-size: 135% auto !important;
  background-position: center 17% !important;
  filter: grayscale(1) brightness(.43) !important;
}
html.survival-portrait body .game #boss .guild-raid-card-footer {
  left: 0 !important;
  top: auto !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 79px !important;
  padding: 4px 3px 4px !important;
  gap: 3px !important;
  justify-content: flex-end !important;
  background: linear-gradient(transparent,#0d151aeb 18%,#0b1117) !important;
  pointer-events: none;
}
html.survival-portrait body .game #boss .guild-raid-card-status {
  flex: 0 0 auto;
  color: #f5d09a !important;
  text-align: center !important;
  font: 800 9px/11px Arial,sans-serif !important;
}
html.survival-portrait body .game #boss .guild-raid-card-note {
  color: #f5d09a !important;
  font: 800 9px/11px Arial,sans-serif !important;
  text-align: center !important;
}
html.survival-portrait body .game #boss .guild-raid-card-note .flag {
  width: 12px !important;
  height: 12px !important;
}
html.survival-portrait body .game #boss .guild-raid-card-action { flex: 0 0 auto; pointer-events: auto; }
html.survival-portrait body .game #boss .guild-raid-card-btn {
  height: 29px !important;
  border-color: transparent !important;
  border-radius: 3px !important;
  background: transparent url('../img/ui/survival/kit/button_primary.webp') center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: #fff0d0 !important;
  font: 900 8px/27px var(--br-display) !important;
  text-transform: uppercase;
}
html.survival-portrait body .game #boss .guild-raid-card.lock .guild-raid-card-footer {
  height: 30px !important;
  padding: 3px !important;
  justify-content: center !important;
}
html.survival-portrait body .game #boss .guild-raid-card.lock .guild-raid-card-action { display: none !important; }
html.survival-portrait body .game #boss .guild-raid-card-lock-row {
  color: #ddc6a8 !important;
  font: 700 8px/10px Arial,sans-serif !important;
  text-align: center !important;
}
html.survival-portrait body .game #boss.popup:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .p13 {
  bottom: 82px !important;
  left: 18px !important;
  right: 18px !important;
  padding-top: 7px !important;
  border-top: 1px solid #a8794e !important;
  color: #c9b8a0 !important;
  font: 8px/11px Arial,sans-serif !important;
}

/* Chat retains live tabs, messages and composer inside the steel terminal. */
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .h1 {
  left: 61px !important;
  top: 11px !important;
  width: calc(100% - 108px) !important;
  height: 28px !important;
  font: 900 19px/28px var(--br-display) !important;
  text-transform: uppercase;
  overflow: visible !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat > .h1::before {
  content: '';
  position: absolute;
  left: -37px;
  top: -3px;
  width: 31px;
  height: 31px;
  background: url('../img/ui/survival/kit/chat.webp') center / contain no-repeat;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .close {
  top: 8px !important;
  right: 10px !important;
  width: 34px !important;
  height: 34px !important;
  border-color: transparent !important;
  background: transparent url('../img/ui/survival/kit/button_close.webp') center / 100% 100% no-repeat !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat > .close::after {
  content: none !important; font: 900 21px/26px Arial,sans-serif !important; }
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .choice {
  left: 10px !important;
  right: 10px !important;
  top: 43px !important;
  bottom: 65px !important;
  width: calc(100% - 20px) !important;
  padding: 5px !important;
  background: #161819 !important;
  border: 1px solid #645541 !important;
  box-shadow: inset 0 0 12px #000a !important;
  scrollbar-width: thin;
  scrollbar-color: #95623a #101b20;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .choice > .chatTabs {
  display: flex !important;
  gap: 5px !important;
  position: sticky;
  top: -5px;
  z-index: 1;
  background: #191b1b;
  height: 32px !important;
  margin-bottom: 6px !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .choice > .chatTabs > .btn {
  box-sizing: border-box !important;
  flex: 1 1 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  background: transparent url('../img/ui/survival/kit/button_secondary.webp') center / 100% 100% no-repeat !important;
  color: #e1cfb3 !important;
  font: 800 11px/13px var(--br-display) !important;
  text-transform: uppercase;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .choice > .chatTabs > .btn.active {
  background: transparent url('../img/ui/survival/kit/button_primary.webp') center / 100% 100% no-repeat !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #fff0d4 !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .chatBlock {
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  bottom: 7px !important;
  width: calc(100% - 20px) !important;
  height: 54px !important;
  padding: 3px 3px 16px !important;
  border: 1px solid #9b7757 !important;
  border-radius: 3px !important;
  background: #0e1c23ef !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .chatBlock > #messChatAll {
  height: 29px !important;
  background: #202425 !important;
  border: 1px solid #6c7169 !important;
  color: #f2ede2 !important;
  font: 12px/26px Arial,sans-serif !important;
}
html.survival-portrait body #scroll#scroll.popup.scroll-mode-chat:not(#coinPopup):not(#goldPopup):not(#energyPopup):not(#payRobo):not(#companyDailyQuest):not(#eventHunting) > .chatBlock > #sendMessChat {
  flex-basis: 86px !important;
  width: 86px !important;
  height: 29px !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  background: url('../img/ui/survival/kit/button_primary.webp') center / 100% 100% no-repeat !important;
  color: #fff0d0 !important;
  font: 900 10px/27px Arial,sans-serif !important;
  text-transform: uppercase;
}

html.survival-portrait #scroll.scroll-mode-chat .chat-composer-note {
  position: absolute; bottom: 1px; left: 4px; right: 4px; text-align:center;
}
html.survival-portrait #scroll.scroll-mode-chat .chat-composer-note .errorMessChat {
  color:#c4b59e; font:400 8px/12px Arial,sans-serif;
}
html.survival-portrait body .game #boss .guild-raid-card-hp {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  color: #f8e4c7; font: 800 9px/13px var(--br-display);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
html.survival-portrait body .game #boss .guild-raid-card-hp .hp { width: 11px; height: 11px; }
