body[data-warboost-mode="demo"] {
  --warboost-demo-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans CJK JP", "Noto Sans CJK KR",
    "PingFang SC", "Hiragino Sans", "Yu Gothic", "Malgun Gothic", "Noto Sans Arabic", sans-serif;
  font-family: var(--warboost-demo-font-family);
}

body[data-warboost-mode="demo"] :is(button, input, select, textarea) {
  font-family: var(--warboost-demo-font-family);
}

body[data-warboost-mode="demo"] .warboostDemoBanner {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 8px 14px;
  color: #eaf2ff;
  background: rgba(17, 29, 49, .98);
  border-bottom: 1px solid rgba(116, 163, 226, .38);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .25);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

body[data-warboost-mode="demo"] .warboostDemoBanner b {
  color: #93c5fd;
  letter-spacing: .04em;
}

body[data-warboost-mode="demo"] .publisherVision,
body[data-warboost-mode="demo"] .safeLaunchGrid,
body[data-warboost-mode="demo"] .publisherStrip,
body[data-warboost-mode="demo"] .publisherFooter,
body[data-warboost-mode="demo"] #accountBtn,
body[data-warboost-mode="demo"] #homeProBtn,
body[data-warboost-mode="demo"] #accountDrawer,
body[data-warboost-mode="demo"] #supportBtn,
body[data-warboost-mode="demo"] #supportDrawer {
  display: none !important;
}

body[data-warboost-mode="demo"] .drawer img {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer .demoHeroPortrait {
  display: block !important;
}

body[data-warboost-mode="demo"] .drawer [style*="background-image"] {
  background-image: none !important;
}

body[data-warboost-mode="demo"] .demoMutationDisabled {
  opacity: .55;
  cursor: not-allowed !important;
  filter: grayscale(.25);
}

.demoTourDock {
  position: fixed;
  z-index: 52;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(370px, calc(100vw - 24px));
  color: #e8eef9;
}

.demoTourStartCard,
.demoTourPanel {
  padding: 12px;
  border: 1px solid rgba(132, 165, 211, .42);
  border-radius: 15px;
  background: rgba(11, 18, 31, .96);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .36);
  backdrop-filter: blur(12px);
}

.demoTourStartCard p {
  margin: 0 0 8px;
  color: #aebbd0;
  font-size: 12px;
}

.demoTourStartCard .primaryAction {
  width: 100%;
  min-height: 40px;
}

.demoTourStartCard .demoTourStartStatus {
  margin: 8px 0 0;
  color: #ffd38a;
  font-size: 12px;
  line-height: 1.35;
}

@media (min-width: 1280px) {
  .demoTourDock {
    width: min(340px, calc(100vw - 24px));
  }
}

.demoTourProgress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.demoTourProgress b {
  font-size: 14px;
}

.demoTourProgress span,
.demoTourPanel p {
  color: #aebbd0;
  font-size: 12px;
}

.demoTourPanel p {
  margin: 7px 0 10px;
  line-height: 1.45;
}

.demoTourActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.demoTourActions button {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.demoTourActions .textActionBtn {
  color: #aebbd0;
}

.demoPresentationContent {
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom));
}

.demoStoreIntro {
  margin-top: 0;
}

.demoOfficialAccess {
  display: grid;
  gap: 12px;
}

.demoBusinessNote {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(123, 157, 204, .3);
  border-radius: 14px;
  background: rgba(16, 28, 46, .82);
}

.demoBusinessNote span {
  color: #aebbd0;
  font-size: 12px;
}

.demoIsolationFailure {
  max-width: 38rem;
  margin: 12vh auto;
  padding: 24px;
  color: #f4f7fb;
  font: 16px/1.5 system-ui, sans-serif;
}

@media (max-width: 520px) {
  body[data-warboost-mode="demo"] .warboostDemoBanner {
    padding: 7px 10px;
    font-size: 11px;
  }

  .demoTourDock {
    right: 12px;
    left: 12px;
    width: auto;
  }
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > :not(.drawerHandle):not(.drawerHeader):not(.summaryBar):not(#squadList):not(#demoAirSquadShowcase):not(#demoSquadAction) {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer .squadCollapseAll,
body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer .squadSwapBtn,
body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer .squadSwapMenu {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .squadShell:not([data-squad-id="1"]) {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroInfo small,
body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroWeaponStats,
body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .squadName small {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .squadBody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 0 8px 8px;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroRow {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 5px;
  align-content: start;
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid rgba(116, 147, 191, .2);
  border-radius: 12px;
  background: rgba(16, 25, 41, .76);
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroAvatar {
  grid-row: 1 / span 2;
  width: 27px;
  height: 27px;
  font-size: 10px;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroInfo {
  min-width: 0;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroInfo b {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .heroPwr {
  grid-column: 2;
  margin-top: 2px;
  color: #aebbd0;
  font-size: 10px;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer #squadList .inlineHeroConfirm {
  display: none !important;
}

body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="alliance"] #allianceDrawer > :not(.drawerHandle):not(.drawerHeader):not(.summaryBar):not(#demoAllianceSummary) {
  display: none !important;
}

.demoSquadFormation,
.demoSquadAction {
  margin: 0 0 10px;
}

.demoSquadFormation {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(108, 154, 220, .3);
  border-radius: 14px;
  background: rgba(15, 25, 42, .9);
}

.demoSquadFormation > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.demoSquadFormation b {
  color: #89dff4;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.demoSquadFormation span {
  color: #e8eef9;
}

.demoSquadAction {
  padding-top: 2px;
}

.demoTourPanel {
  padding: 10px;
}

.demoTourProgress b {
  max-width: 70%;
  font-size: 13px;
  line-height: 1.2;
}

.demoTourPanel p {
  margin: 5px 0 8px;
  line-height: 1.3;
}

.demoTourActions button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 7px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

@media (max-width: 520px) {
  .demoTourDock {
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .demoTourProgress b {
    font-size: 12px;
  }

  .demoSquadFormation > div {
    grid-template-columns: 56px minmax(0, 1fr);
    font-size: 11px;
  }

  body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > .summaryBar.four {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) minmax(0, .9fr);
    gap: 6px;
    margin-bottom: 8px;
  }

  body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > .summaryBar.four .stat {
    min-width: 0;
    padding: 7px;
  }

  body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > .summaryBar.four .stat:nth-child(4) {
    display: none;
  }

  body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > .summaryBar.four .stat span {
    font-size: 8px;
  }

  body[data-warboost-mode="demo"].demoTourActive[data-demo-tour-step="player"] #playerDrawer > .summaryBar.four .stat b {
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  #demoTourPanel {
    padding: 8px;
  }

  #demoTourDescription {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .demoTourActions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
  }

  .demoTourActions button {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 10px;
  }

  #demoTourExit {
    white-space: nowrap;
  }
}

html[dir="rtl"] body[data-warboost-mode="demo"] {
  direction: rtl;
}

html[dir="rtl"] body[data-warboost-mode="demo"] .demoTourDock {
  right: auto;
  left: max(12px, env(safe-area-inset-left));
}

html[dir="rtl"] body[data-warboost-mode="demo"] .demoTourProgress,
html[dir="rtl"] body[data-warboost-mode="demo"] .demoTourActions {
  direction: rtl;
}

html[dir="rtl"] body[data-warboost-mode="demo"] .moduleCard {
  text-align: right;
}

@media (max-width: 520px) {
  html[dir="rtl"] body[data-warboost-mode="demo"] .demoTourDock {
    right: 12px;
    left: 12px;
  }
}