.kb-alliance,
.kb-alliance.landing-stage,
.kb-alliance.profile-stage {
  width: min(100%, 46rem);
  max-width: 46rem;
  margin-inline: auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding-bottom: 6rem;
  box-sizing: border-box;
  overflow: visible;
  max-height: none;
}

.kb-alliance .profile-card,
.kb-alliance .feed-card,
.kb-alliance-section,
.kb-alliance-hero {
  width: 100%;
  max-width: 100%;
}

.kb-alliance .auth-kicker,
.kb-alliance-kicker {
  margin: 0;
  color: #edf6ff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-shadow:
    0 0 4px #fff,
    0 0 10px rgba(140, 210, 255, 1),
    0 0 22px rgba(70, 160, 255, 0.85),
    0 0 38px rgba(255, 55, 190, 0.5);
}

.kb-alliance-kicker {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.55rem;
}

.kb-alliance-kicker span {
  color: #d7dcff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(120, 190, 255, 0.9),
    0 0 18px rgba(255, 80, 200, 0.4);
}

.kb-alliance-section {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.kb-alliance .feed-head,
.kb-alliance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
  padding: 0 0.1rem;
}

.kb-alliance .feed-head h2,
.kb-alliance-head h2,
.kb-alliance-head h1 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #eef1f8;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(210, 220, 255, 0.28);
}

.kb-alliance-head h1 {
  font-size: 1.12rem;
}

.kb-alliance-more {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: #d8dce8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(200, 210, 255, 0.35);
}

.kb-alliance-more span {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.85;
}

.kb-alliance a.auth-btn,
.kb-alliance button.auth-btn,
.kb-alliance-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(210, 220, 255, 0.38);
  border-radius: var(--kb-art-btn-radius, 999px);
  background: linear-gradient(180deg, rgba(48, 50, 62, 0.96) 0%, rgba(18, 18, 26, 0.96) 100%);
  color: #f4f7ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(120, 170, 255, 0.18);
  cursor: pointer;
}

.kb-alliance-cta--ghost,
.kb-alliance-cta--ghost.kb-alliance-cta {
  width: auto;
  padding-inline: 1rem;
  background: var(--kb-art-control-bg, rgba(12, 14, 22, 0.72));
}

.kb-alliance-cta--chat {
  width: 100%;
}

.kb-alliance-unread {
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: -0.42rem;
  left: -0.18rem;
  min-width: 1.28rem;
  height: 1.28rem;
  padding: 0 0.32rem;
  border-radius: 999px;
  background: #e11d2e;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  box-shadow:
    0 0 0 2px rgba(12, 12, 18, 0.9),
    0 0 12px rgba(255, 48, 72, 0.7);
}

.kb-alliance-unread[hidden] {
  display: none !important;
}

.kb-alliance-section-icon {
  width: 1.12rem;
  height: 1.12rem;
  flex: 0 0 1.12rem;
  color: rgba(150, 140, 255, 0.88);
}

.kb-alliance-home__banner {
  display: grid;
  place-items: center;
  height: 11.2rem;
  margin: -1.1rem -1.1rem 0;
  border-radius: 1.15rem 1.15rem 0 0;
  background: #10140f center/cover no-repeat;
}

.kb-alliance-home__logo {
  width: 6.6rem;
  height: 6.6rem;
  object-fit: cover;
  border-radius: 1.2rem;
  box-shadow:
    0 0 0 3px rgba(150, 140, 255, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.38);
}

.kb-alliance-home__name {
  display: block;
  justify-self: center;
  width: fit-content;
  max-width: calc(100% - 1.4rem);
  margin: -1.05rem auto 0.95rem;
  padding: 0.48rem 1.15rem;
  border-radius: 0.95rem;
  text-align: center;
  color: #f4f7ff;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(10, 12, 20, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(180, 210, 255, 0.38),
    0 0 18px rgba(90, 160, 255, 0.32),
    0 0 42px rgba(255, 70, 190, 0.16);
  text-shadow:
    0 0 8px rgba(180, 220, 255, 0.7),
    0 0 18px rgba(255, 80, 200, 0.28);
}

.kb-alliance-charter {
  margin: 0.55rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.9rem;
  background: rgba(8, 10, 18, 0.48);
  box-shadow: inset 0 0 0 1px rgba(180, 210, 255, 0.14);
}

.kb-alliance-charter__label,
.kb-alliance-charter p {
  margin: 0;
  color: #d8dce8;
}

.kb-alliance-charter__label {
  margin-bottom: 0.28rem;
  color: #eef1f8;
  font-size: 0.86rem;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(200, 210, 255, 0.28);
}

.kb-alliance-card__logo,
.profile-alliance img {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  border-radius: 0.85rem;
  box-shadow: 0 0 0 1px rgba(150, 140, 255, 0.25);
}

.kb-alliance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.7rem;
}

.kb-alliance-actions .kb-alliance-cta,
.kb-alliance-actions .kb-alliance-cta--chat {
  flex: 1 1 100%;
}

.kb-alliance-actions .kb-alliance-cta--ghost {
  flex: 1 1 auto;
}

.kb-alliance-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.kb-alliance-leave {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.8rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(160deg, rgba(176, 42, 42, 0.95), rgba(122, 22, 22, 0.92));
  color: #ffe8e6;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(255, 170, 160, 0.28),
    0 6px 14px rgba(90, 8, 8, 0.28);
}

.kb-alliance-leave svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
}

.kb-alliance-card {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.7rem;
  padding: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.kb-alliance-card__art {
  min-height: 4.6rem;
  border-radius: 0.8rem;
  background: #121812 center/cover no-repeat;
  display: grid;
  place-items: center;
}

.kb-alliance-card__body strong {
  display: block;
  color: #dbd8ff;
}

.kb-alliance-card__body p,
.kb-alliance-card__body small {
  color: rgba(198, 196, 232, 0.72);
  margin: 0.2rem 0 0;
}

.kb-alliance-search__field input,
.kb-alliance-form input,
.kb-alliance-form textarea,
.kb-alliance-form select {
  width: 100%;
  border: 0;
  border-radius: 0.8rem;
  background: rgba(12, 20, 12, 0.88);
  color: #dbd8ff;
  padding: 0.7rem 0.85rem;
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.18);
}

.kb-alliance-form {
  display: grid;
  gap: 0.75rem;
}

.kb-alliance-form label {
  display: grid;
  gap: 0.35rem;
  color: #c6c4e8;
  font-size: 0.88rem;
}

.kb-alliance-form__check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.kb-alliance-manage-list,
.kb-alliance-invites {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.kb-alliance-manage-list li,
.kb-alliance-invites li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  background: rgba(8, 14, 8, 0.4);
}

.kb-alliance-members__online {
  color: rgba(214, 232, 196, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.kb-alliance-roster,
.kb-alliance-others__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  align-items: center;
}

.kb-alliance-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: inherit;
  text-decoration: none;
}

.kb-alliance-chip__face {
  position: relative;
  display: block;
  width: 2.45rem;
  height: 2.45rem;
}

.kb-alliance-chip img {
  display: block;
  width: 2.45rem;
  height: 2.45rem;
  object-fit: cover;
  border-radius: 50%;
  background: rgba(8, 14, 8, 0.7);
  box-shadow: 0 0 0 1px rgba(150, 140, 255, 0.28);
}

.kb-alliance-role {
  position: absolute;
  right: -0.12rem;
  bottom: -0.12rem;
  width: 0.92rem;
  height: 0.92rem;
  padding: 0.08rem;
  border-radius: 50%;
  background: rgba(10, 16, 10, 0.92);
  box-shadow: 0 0 0 1px rgba(150, 140, 255, 0.22);
}

.kb-alliance-role.is-owner {
  color: #f4d36a;
}

.kb-alliance-role.is-admin {
  color: #8ec8ff;
}

.kb-alliance-role.is-member {
  color: rgba(198, 196, 232, 0.78);
}

.kb-alliance-chip__live {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #a380ff;
  box-shadow: 0 0 8px #a380ff;
}

.kb-alliance-others-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(210, 220, 255, 0.38);
  border-radius: var(--kb-art-btn-radius, 999px);
  background: linear-gradient(180deg, rgba(48, 50, 62, 0.96) 0%, rgba(18, 18, 26, 0.96) 100%);
  color: #f4f7ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 14px rgba(120, 170, 255, 0.18);
}

.kb-alliance-others-btn svg {
  width: 1.05rem;
  height: 1.05rem;
}

.kb-alliance-others {
  width: min(92vw, 28rem);
  max-width: 92vw;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.kb-alliance-others::backdrop {
  background: rgba(4, 8, 4, 0.78);
}

.kb-alliance-others__panel {
  padding: 0.85rem;
  border-radius: 1.05rem;
  background: #10180f;
  box-shadow:
    inset 0 0 0 1px rgba(150, 140, 255, 0.22),
    0 22px 48px rgba(0, 0, 0, 0.42);
}

.kb-alliance-others__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.kb-alliance-others__head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.kb-alliance-others__close {
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 14, 8, 0.78);
  color: #dbd8ff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.kb-alliance-chat__unread {
  margin: 0.15rem 0.4rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  justify-self: center;
  text-align: center;
  color: #d8ecff;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(31, 111, 224, 0.22);
  box-shadow: inset 0 0 0 1px rgba(125, 178, 255, 0.28);
}

.kb-alliance-chat__item.is-unread .kb-alliance-chat__bubble {
  box-shadow:
    inset 0 0 0 1px rgba(125, 178, 255, 0.32),
    0 6px 16px rgba(0, 0, 0, 0.18);
}

.kb-alliance-chat {
  overflow: visible;
}

.kb-alliance-chat__log {
  display: grid;
  gap: 0.55rem;
  padding: 0.2rem 0.1rem 1.1rem;
  overflow: visible;
  max-height: none;
}

.kb-alliance-chat__item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  background: none;
  padding: 0;
  scroll-margin-top: 9.2rem;
  scroll-margin-bottom: 8.4rem;
}

.kb-alliance-chat__bubble {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 10.75rem;
  width: fit-content;
  max-width: min(78%, 24rem);
  min-height: 2.85rem;
  padding: 0.42rem 0.62rem 0.5rem;
  border-radius: 0.28rem 0.95rem 0.95rem 0.95rem;
  background: rgba(10, 16, 10, 0.72);
  direction: rtl;
  text-align: right;
  box-shadow:
    inset 0 0 0 1px rgba(150, 140, 255, 0.14),
    0 6px 16px rgba(0, 0, 0, 0.18);
}

.kb-alliance-chat__item.is-own .kb-alliance-chat__bubble {
  background: linear-gradient(160deg, rgba(60, 49, 121, 0.88), rgba(22, 38, 18, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(150, 140, 255, 0.34),
    0 0 14px rgba(163, 128, 255, 0.08);
}

.kb-alliance-chat__avatar {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  margin-top: 0.12rem;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  background: rgba(8, 14, 8, 0.7);
  box-shadow: 0 0 0 1px rgba(180, 210, 255, 0.32);
}

.kb-alliance-chat__name {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0 0 0.18rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #dbd8ff;
  line-height: 1.2;
  text-align: right;
}

.kb-alliance-chat__bubble p {
  margin: 0;
  color: #c6c4e8;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kb-alliance-chat__when {
  flex: 0 0 auto;
  max-width: 5.6rem;
  margin: 0 0 0.18rem;
  font-size: 0.55rem;
  line-height: 1.3;
  letter-spacing: 0;
  color: rgba(198, 196, 232, 0.42);
  text-align: end;
  white-space: nowrap;
}

.kb-alliance-chat__zoom {
  display: block;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  max-width: min(100%, 10.5rem);
}

.kb-alliance-chat__photo,
.kb-alliance-chat__bubble > img:not(.kb-alliance-chat__avatar) {
  display: block;
  max-width: min(100%, 10.5rem);
  max-height: 8.2rem;
  border-radius: 0.55rem;
  object-fit: cover;
  object-position: center;
}

.kb-alliance-chat__zoom .kb-alliance-chat__photo {
  max-width: 100%;
}

.kb-alliance-chat__item .kb-gif {
  display: block;
  width: 7.2rem;
  height: 7.2rem;
  max-width: 7.2rem;
  overflow: hidden;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.35);
}

.kb-alliance-chat__zoom .kb-gif {
  margin: 0;
}

.kb-alliance-chat__item .kb-gif img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin-top: 0;
  object-fit: cover;
}

.kb-alliance-composer-card {
  padding: 0.7rem 0.75rem;
}

.kb-alliance-chat-page {
  text-align: right;
}

.is-docked .kb-alliance-chat-page.landing-stage,
.kb-alliance-chat-page.landing-stage {
  padding-top: 9.6rem;
  padding-bottom: calc(10.8rem + env(safe-area-inset-bottom, 0px));
}

body > .kb-alliance-chat-top,
.kb-alliance-chat-top.is-pinned {
  position: fixed;
  top: 4.5rem;
  right: 0;
  left: 0;
  z-index: 118;
  width: min(100%, 46rem);
  margin-inline: auto;
  padding: 0.72rem 1.1rem 0.7rem;
  overflow: visible;
  isolation: isolate;
  background: rgba(8, 10, 16, 0.94);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}

body > .kb-alliance-chat-top::before,
.kb-alliance-chat-top.is-pinned::before {
  content: "";
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  z-index: -1;
  width: 100vw;
  transform: translateX(50%);
  background: rgba(8, 10, 16, 0.94);
  pointer-events: none;
}

body > .kb-alliance-composer-card,
.kb-alliance-composer-card.is-pinned {
  position: fixed;
  right: 0;
  left: 0;
  bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  width: min(calc(100% - 1.4rem), 46rem);
  max-width: 46rem;
  margin-inline: auto;
  overflow: visible;
  isolation: isolate;
  pointer-events: auto;
  border: 1px solid rgba(210, 220, 255, 0.22);
  border-radius: 1.05rem;
  background: rgba(10, 12, 20, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.38);
}

body.is-alliance-chat .kb-dock {
  z-index: 130;
}

body > .kb-alliance-composer-card::before,
.kb-alliance-composer-card.is-pinned::before {
  content: "";
  position: absolute;
  right: 50%;
  top: -1.35rem;
  bottom: calc(-5.4rem - env(safe-area-inset-bottom, 0px));
  z-index: -1;
  width: 100vw;
  transform: translateX(50%);
  background: linear-gradient(
    180deg,
    rgba(7, 8, 14, 0) 0%,
    rgba(7, 8, 14, 0.92) 12%,
    rgba(7, 8, 14, 0.97) 22%,
    rgba(7, 8, 14, 0.98) 100%
  );
  pointer-events: none;
}

.kb-alliance-composer-card .kb-emoji-bar {
  display: none;
}

.kb-alliance-chat__form,
.kb-alliance-composer-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
  min-width: 0;
}

.kb-alliance-chat__composer {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  width: 100%;
  padding: 0.22rem 0.28rem;
  border-radius: 0.95rem;
  background: rgba(12, 20, 12, 0.88);
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.18);
}

.kb-alliance-chat__form .kb-composer-row,
.kb-alliance-composer-card .kb-composer-row {
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

.kb-alliance-chat__composer input[type='text'] {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #dbd8ff;
  padding: 0.58rem 0.55rem;
  font: inherit;
  box-shadow: none;
}

.kb-alliance-chat__composer input[type='text']::placeholder {
  color: rgba(198, 196, 232, 0.42);
}

.kb-alliance-chat__attach,
.kb-alliance-chat__gif,
.kb-alliance-chat__send,
.kb-alliance-composer-card .kb-gif-btn,
.kb-alliance-chat__form .kb-gif-btn {
  position: relative;
  flex: 0 0 2.15rem;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.kb-alliance-chat__attach {
  color: rgba(198, 196, 232, 0.82);
  background: rgba(8, 14, 8, 0.45);
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.16);
}

.kb-alliance-chat__attach svg {
  width: 1.05rem;
  height: 1.05rem;
}

.kb-alliance-chat__attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.kb-alliance-chat__gif,
.kb-alliance-composer-card .kb-gif-btn,
.kb-alliance-chat__form .kb-gif-btn {
  min-width: 2.15rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(198, 196, 232, 0.82);
  background: rgba(8, 14, 8, 0.45);
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.16);
}

.kb-alliance-chat__gif svg {
  width: 1.05rem;
  height: 1.05rem;
}

.kb-alliance-chat__send {
  color: #f4f8ff;
  background: linear-gradient(160deg, #4d9dff, #1f6fe0);
  box-shadow:
    inset 0 0 0 1px rgba(180, 214, 255, 0.35),
    0 0 12px rgba(47, 127, 255, 0.28);
}

.kb-alliance-chat__send svg {
  width: 1.05rem;
  height: 1.05rem;
  transform: scaleX(-1);
}

.kb-alliance-chat__form .kb-gif,
.kb-alliance-composer-card .kb-gif {
  display: block;
  width: 7.2rem;
  height: 7.2rem;
  overflow: hidden;
}

.kb-alliance-composer-card .kb-gif-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.28rem 0.4rem;
  border-radius: 0.75rem;
  background: rgba(8, 12, 10, 0.72);
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.18);
}

.kb-alliance-composer-card .kb-gif-chip[hidden] {
  display: none !important;
}

.kb-alliance-composer-card .kb-gif-chip img {
  width: 2.15rem;
  height: 2.15rem;
  object-fit: cover;
  border-radius: 0.45rem;
}

.kb-alliance-composer-card .kb-gif-chip button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.kb-gif-sheet {
  position: fixed;
  inset: 0;
  z-index: 480;
  display: none;
}

.kb-gif-sheet.is-open,
.kb-gif-sheet[open] {
  display: block;
}

.kb-gif-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.kb-gif-sheet__panel {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  max-height: min(72dvh, 32rem);
  padding: 0.8rem 0.8rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.1rem 1.1rem 0 0;
  background: rgba(8, 10, 10, 0.94);
}

.kb-gif-sheet__head {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.kb-gif-sheet__head input {
  flex: 1;
  min-height: 2.4rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.7rem;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font: inherit;
}

.kb-gif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  max-height: 46dvh;
  overflow: auto;
}

.kb-gif-tile {
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.kb-gif-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kb-gif-status {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
}

.kb-alliance-lightbox {
  width: min(92vw, 42rem);
  max-width: 92vw;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.kb-alliance-lightbox::backdrop {
  background: rgba(4, 8, 4, 0.78);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}

.kb-alliance-lightbox__panel {
  position: relative;
  padding: 0.7rem;
  border-radius: 1.05rem;
  background: rgba(10, 16, 10, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(150, 140, 255, 0.22),
    0 22px 48px rgba(0, 0, 0, 0.42);
}

.kb-alliance-lightbox__close {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 14, 8, 0.78);
  color: #dbd8ff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.22);
}

.kb-alliance-lightbox img {
  display: block;
  width: auto;
  max-width: min(86vw, 38rem);
  max-height: min(76dvh, 36rem);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 0.7rem;
}

.profile-alliance {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
  background: rgba(10, 16, 10, 0.55);
  box-shadow: inset 0 0 0 1px rgba(150, 140, 255, 0.16);
}

.profile-alliance strong {
  display: block;
  color: #dbd8ff;
}

.profile-alliance small {
  color: rgba(198, 196, 232, 0.7);
}

.kb-alliance-search__results {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

@media (max-width: 720px) {
  .kb-alliance {
    width: 100%;
  }

  body > .kb-alliance-composer-card,
  .kb-alliance-composer-card.is-pinned {
    width: calc(100% - 1.2rem);
  }
}

@media (min-width: 1100px) {
  .kb-alliance,
  body > .kb-alliance-chat-top,
  .kb-alliance-chat-top.is-pinned,
  body > .kb-alliance-composer-card,
  .kb-alliance-composer-card.is-pinned {
    width: min(52rem, 92%);
    max-width: 52rem;
  }
}

/* ---- Floating back / close (frameless) ---- */
.kb-alliance-back {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  align-self: flex-start;
  margin: 0 0 0.55rem;
  padding: 0.3rem 0.15rem;
  color: #eef1ff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(190, 200, 255, 0.45);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.kb-alliance-back svg {
  width: 1.35rem;
  height: 1.35rem;
  filter: drop-shadow(0 0 6px rgba(190, 200, 255, 0.5));
}

.kb-alliance-back.is-close span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.kb-alliance-back:active {
  transform: scale(0.94);
}

/* ---- Owner settings entry (capacity) ---- */
.kb-alliance-setting {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding: 0.35rem 0;
  color: #f4e7b2;
  text-decoration: none;
  pointer-events: auto;
}

.kb-alliance-setting svg {
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 1.6rem;
  color: #ffd76a;
  filter: drop-shadow(0 0 8px rgba(255, 205, 90, 0.55));
}

.kb-alliance-setting span {
  display: grid;
  gap: 0.1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.kb-alliance-setting strong {
  font-size: 0.9rem;
}

.kb-alliance-setting small {
  color: rgba(244, 231, 178, 0.72);
  font-size: 0.74rem;
}

.kb-alliance-setting i {
  font-style: normal;
  font-size: 1.2rem;
  opacity: 0.7;
}

/* ---- Leave / owner sheet ---- */
.kb-alliance-sheet {
  width: min(94vw, 26rem);
  max-width: 94vw;
  max-height: 86dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f2f4ff;
}

@media (min-width: 720px) {
  .kb-alliance-sheet {
    margin: auto;
  }
}

.kb-alliance-sheet::backdrop {
  background: rgba(3, 5, 10, 0.78);
  backdrop-filter: blur(4px);
}

.kb-alliance-sheet__panel {
  display: grid;
  gap: 0.75rem;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-radius: 1.2rem 1.2rem 0 0;
  background: linear-gradient(180deg, rgba(20, 22, 34, 0.98), rgba(10, 11, 18, 0.98));
  box-shadow: 0 -18px 46px rgba(0, 0, 0, 0.5);
}

@media (min-width: 720px) {
  .kb-alliance-sheet__panel {
    border-radius: 1.2rem;
  }
}

.kb-alliance-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kb-alliance-sheet__head h3 {
  margin: 0;
  font-size: 1rem;
}

.kb-alliance-sheet__form {
  display: grid;
  gap: 0.55rem;
}

.kb-alliance-sheet__form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.kb-alliance-sheet__form select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font: inherit;
}

.kb-alliance-sheet__form.is-danger {
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-alliance-sheet__form .kb-alliance-form__check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffc9c2;
}

.kb-alliance-sheet__form .kb-alliance-leave,
.kb-alliance-sheet__form .kb-alliance-cta {
  justify-content: center;
  width: 100%;
}

.kb-alliance-sheet__cancel {
  border: 0;
  background: transparent;
  color: rgba(230, 233, 255, 0.7);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.35rem;
  cursor: pointer;
}

/* "Other members" sheet: never taller than the screen, so close stays reachable. */
.kb-alliance-others__panel {
  max-height: 84dvh;
  overflow-y: auto;
}

.kb-alliance-others__head {
  position: sticky;
  top: -0.85rem;
  z-index: 1;
  padding: 0.2rem 0;
  background: inherit;
}

/* Capacity purchase: stepper + live total (seats × per-seat gems). */
.kb-seat-stepper {
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
  gap: 0.5rem;
  align-items: center;
}
.kb-seat-stepper button {
  height: 3rem;
  border: 0;
  border-radius: 0.9rem;
  color: #fff;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.55), rgba(91, 63, 214, 0.55));
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}
.kb-seat-stepper input[type="number"] {
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
  -moz-appearance: textfield;
}
.kb-seat-stepper input::-webkit-outer-spin-button,
.kb-seat-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.kb-seat-total {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  color: #e9ddff;
  font-size: 0.98rem;
  text-align: center;
}
.kb-seat-total b {
  color: #d8b4fe;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.55);
}
.kb-seat-total small {
  color: rgba(214, 204, 240, 0.65);
}
.kb-seat-total.is-short small {
  color: #ffb4c0;
}
.kb-seat-form [data-seat-submit]:disabled {
  opacity: 0.55;
}
