#world-notice {
  top: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #9976b366;
  border-radius: 5px;
  pointer-events: none;
}
#world-notice[data-state="loading"] {
  background: #161525ed;
  color: #e1d5ee;
}
#world-notice[data-state="loading"]::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border: 2px solid #826d9b;
  border-top-color: #ead4ff;
  border-radius: 50%;
  animation: world-loading 1s linear infinite;
}
#world-notice button {
  pointer-events: auto;
  min-height: 36px;
  padding: 6px 10px;
  white-space: nowrap;
  border: 1px solid #b48bcd;
  border-radius: 3px;
  color: #f0dfff;
}
@keyframes world-loading {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  #world-notice::before {
    animation: none;
  }
}
@media (max-width: 760px) {
  #world-notice {
    top: 120px;
    width: calc(100% - 24px);
    flex-wrap: wrap;
  }
}

/* Keep the world visible on phones and landscape screens. */
@media (max-width: 760px),
  (max-width: 1100px) and (max-height: 500px) {
  .player-hud {
    padding: 8px;
  }
  .player-hud > .hud-heading,
  .player-hud .xp-label,
  .player-hud .xp-track,
  .player-hud .mana-label,
  .player-hud .mana-track,
  .player-hud .talents-link,
  .player-hud .active-effects,
  .player-hud .pet-caption,
  .player-hud .class-tag {
    display: none;
  }
  .player-hud .character-summary {
    margin: 0;
    gap: 6px;
  }
  .player-hud .portrait {
    width: 28px;
    height: 32px;
  }
  .player-hud .character-summary h2 {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 105px;
  }
  .player-hud .character-summary p {
    font-size: 8px;
    margin: 1px 0;
  }
  .player-hud .power-readout,
  [data-location="tower"] .player-hud .power-readout {
    display: flex;
    margin: 5px 0;
    padding: 0;
    gap: 5px;
  }
  .player-hud .power-readout span {
    font-size: 8px;
  }
  .player-hud .power-readout strong {
    font-size: 12px;
  }
  .player-hud .stat-list {
    display: block;
    border: 0;
    margin: 0;
    padding: 0;
  }
  .player-hud .stat-list > div:not(:first-child) {
    display: none;
  }
  .player-hud .stat-list span,
  .player-hud .stat-list strong {
    font-size: 9px;
  }
  .player-hud .stat-list .icon {
    width: 10px;
    height: 10px;
  }
  .actor-nameplate,
  .quest-hud,
  .journal-hud,
  .expedition-hud,
  .damage-hud {
    display: none;
  }
  .combat-controls {
    bottom: 26px;
  }
  .battle-state {
    display: none;
  }
  .rotation-hotbar {
    gap: 5px;
    padding: 6px;
  }
  .rotation-ability {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    grid-template-rows: 12px 10px;
    align-content: center;
    align-items: center;
    min-height: 44px;
    padding: 5px 3px;
    gap: 2px 3px;
    text-align: left;
  }
  .rotation-icon {
    display: flex;
    grid-row: 1 / 3;
    line-height: 1;
  }
  .rotation-icon > .icon {
    width: 15px;
    height: 15px;
  }
  .rotation-ability > strong {
    font-size: 8px;
    line-height: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .rotation-ability > small {
    font-size: 8px;
    line-height: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rotation-hotbar .potion-ability {
    width: 44px;
    padding: 4px 2px;
    min-height: 44px;
  }
  .rotation-hotbar .potion-ability .ability-icon {
    width: 19px;
    height: 20px;
  }
  .rotation-hotbar .potion-ability small {
    display: none;
  }
  .rotation-hotbar .pause-button {
    width: 36px;
  }
  .auto-toggle {
    margin-top: 5px;
    min-height: 24px;
  }
}
@media (max-width: 760px) {
  .player-hud {
    top: 122px;
  }
}
@media (max-width: 760px) and (max-height: 720px) {
  .player-hud {
    top: 122px;
    width: 144px;
  }
  .location-hud {
    top: 124px;
  }
  .location-hud h1 {
    font-size: 13px;
    line-height: 1.3;
  }
  .location-hud > p,
  .location-hud .live-badge {
    display: none;
  }
  .target-hud,
  [data-location="tower"] .target-hud {
    top: 218px;
    bottom: auto;
    width: 144px;
    left: 12px;
    transform: none;
  }
  .target-hud #enemy-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .tower-live {
    top: 218px;
    padding: 6px 10px;
    font-size: 10px;
    gap: 8px;
    display: block;
    left: 12px;
    right: auto;
    width: 144px;
  }
  .tower-live > div {
    font-size: 10px;
    white-space: nowrap;
    gap: 8px;
  }
  .tower-live button {
    white-space: nowrap;
    font-size: 9px;
  }
  [data-location="tower"] .target-hud {
    top: 270px;
  }
  [data-location="tower"] #enemy-level {
    display: none;
  }
  .boss-intent {
    font-size: 9px;
    margin-top: 4px;
  }
  .boss-intent > div {
    margin-top: 3px;
    height: 2px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) and (max-height: 500px) {
  #world-notice {
    top: 56px;
  }
  .topbar {
    inset: 6px 12px auto;
    min-height: 44px;
    padding: 5px 10px;
  }
  .world-nav .nav-item {
    min-height: 30px;
    padding: 3px 7px;
  }
  #main {
    top: 60px;
    bottom: 26px;
  }
  .player-hud {
    top: 62px;
    left: 12px;
    width: 160px;
  }
  .location-hud {
    top: 65px;
    left: 50%;
    width: 270px;
    transform: translateX(-50%);
  }
  .location-hud h1 {
    font-size: 19px;
  }
  .location-hud > p,
  .location-hud .live-badge {
    display: none;
  }
  .target-hud,
  [data-location="tower"] .target-hud {
    top: 160px;
    left: 12px;
    bottom: auto;
    width: 160px;
    transform: none;
    padding: 8px;
  }
  .target-hud > div:first-child {
    font-size: 10px;
    flex-wrap: wrap;
    gap: 3px;
  }
  .target-hud .boss-intent {
    font-size: 9px;
  }
  .tower-live {
    top: 62px;
    right: 12px;
    width: 170px;
    padding: 8px;
  }
  .tower-live p {
    display: none;
  }
  .tower-live > div {
    font-size: 11px;
  }
  .tower-live button {
    padding: 0;
    font-size: 10px;
  }
  .combat-controls:has(.rotation-hotbar) {
    bottom: 22px;
    width: min(620px, calc(100% - 200px));
    left: auto;
    right: 12px;
    transform: none;
  }
  .rotation-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .footer .keyboard-hint {
    display: none;
  }
}
