.house-hq-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  justify-items: center;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0, rgba(138, 43, 226, 0.3), transparent 18rem),
    radial-gradient(circle at 88% 16%, rgba(255, 45, 141, 0.18), transparent 15rem),
    #0a0a0a;
  color: #fff;
}

.house-hq-modal.hidden {
  display: none;
}

.house-hq-hero[hidden],
.house-hq-stats[hidden],
.house-hq-tabs[hidden] {
  display: none;
}

.house-hq-shell {
  width: min(430px, 100vw);
  min-height: 100vh;
  padding: 12px 14px 96px;
}

.house-hq-header {
  height: 58px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
}

.house-hq-header button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.74);
  color: #fff;
  font-size: 1.6rem;
}

.house-hq-header img {
  width: 142px;
  max-height: 54px;
  justify-self: center;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(245, 179, 47, 0.25));
}

.house-hq-bell {
  position: relative;
  justify-self: end;
}

.house-hq-bell::before {
  content: "";
  width: 18px;
  height: 20px;
  display: block;
  margin: auto;
  background: linear-gradient(180deg, #ffd36a, #f5b32f);
  clip-path: polygon(50% 0, 76% 16%, 82% 62%, 96% 78%, 4% 78%, 18% 62%, 24% 16%);
}

.house-hq-bell span {
  position: absolute;
  right: -4px;
  top: -5px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff2d8d;
  color: #fff;
  font: 900 0.7rem "Inter", sans-serif;
}

.house-hq-hero {
  position: relative;
  min-height: 288px;
  display: grid;
  justify-items: center;
  align-content: end;
  padding: 122px 16px 24px;
  border-radius: 0 0 22px 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), #0a0a0a 88%),
    radial-gradient(circle at 50% 20%, rgba(255, 45, 141, 0.2), transparent 8rem),
    var(--house-banner, none) center / cover no-repeat;
}

.house-hq-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.65), transparent 42%, rgba(0, 0, 0, 0.62)),
    radial-gradient(circle at 50% 28%, rgba(138, 43, 226, 0.4), transparent 8rem);
}

.house-hq-hero > * {
  position: relative;
  z-index: 1;
}

.house-hq-public-actions {
  margin-top: 12px;
}

.house-hq-public-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(245, 179, 47, 0.52);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.7);
  color: #f7d66e;
  font-weight: 850;
}

.house-hq-shield,
.hq-mini-avatar,
.hq-leader-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.house-hq-shield {
  width: 150px;
  height: 166px;
  margin-bottom: 8px;
  clip-path: polygon(50% 0, 92% 16%, 86% 72%, 50% 100%, 14% 72%, 8% 16%);
  border: 4px solid rgb(var(--house-rgb, 245, 179, 47));
  background:
    radial-gradient(circle at 50% 38%, rgba(var(--house-rgb, 245, 179, 47), 0.42), transparent 2.2rem),
    linear-gradient(145deg, rgba(var(--house-rgb, 245, 179, 47), 0.18), rgba(0, 0, 0, 0.94));
  box-shadow: inset 0 0 0 8px #050505, 0 0 40px rgba(var(--house-rgb, 245, 179, 47), 0.36);
}

.house-hq-shield svg {
  width: 82px;
  height: 82px;
  color: rgb(var(--house-rgb, 245, 179, 47));
  filter: drop-shadow(0 0 12px rgba(var(--house-rgb, 245, 179, 47), 0.52));
}

.house-hq-shield img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.house-hq-logo-text {
  max-width: 80%;
  color: rgb(var(--house-rgb, 245, 179, 47));
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.house-hq-state,
.house-hq-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 28px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.92);
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.house-hq-state button {
  min-width: 132px;
  min-height: 44px;
  border: 1px solid rgba(245, 179, 47, 0.55);
  border-radius: 12px;
  background: rgba(245, 179, 47, 0.12);
  color: #fff;
  font-weight: 800;
}

body.house-hq-open {
  overflow: hidden;
  overflow-x: hidden;
}

.house-membership-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(245, 179, 47, 0.28);
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.94);
}

.house-membership-bar:empty {
  display: none;
}

.house-membership-bar > div {
  min-width: 0;
  flex: 1;
}

.house-membership-bar strong,
.house-membership-bar span {
  display: block;
}

.house-membership-bar span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
}

.house-membership-bar button,
.house-member-requests button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 179, 47, 0.42);
  border-radius: 11px;
  background: rgba(245, 179, 47, 0.1);
  color: #fff;
  font-weight: 850;
}

.house-membership-bar .house-membership-primary {
  width: 100%;
  background: linear-gradient(135deg, #f5b32f, #ff2d8d);
  color: #09070c;
}

.house-member-tools {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 8px;
}

.house-member-tools label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.house-member-tools input,
.house-member-tools select {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #111;
  color: #fff;
}

.house-member-row small,
.hq-member-request span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
}

.house-role-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 45, 141, 0.42);
  border-radius: 999px;
  color: #ff79b5;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.role-leader,
.role-co_leader {
  border-color: rgba(245, 179, 47, 0.55);
  color: #f5b32f;
}

.house-member-requests {
  display: grid;
  gap: 10px;
}

.hq-member-request {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hq-member-request > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hq-member-request button:disabled {
  opacity: 0.45;
}

.house-membership-dialog {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.76);
}

.house-membership-dialog.hidden,
.house-membership-toast.hidden {
  display: none;
}

.house-membership-dialog-panel {
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid rgba(245, 179, 47, 0.42);
  border-radius: 18px;
  background: #121014;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.house-membership-dialog-panel h2 {
  margin: 0 0 10px;
}

.house-membership-dialog-panel p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.house-membership-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.house-membership-dialog-actions button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  background: #1c1920;
  color: #fff;
  font-weight: 850;
}

#houseMembershipDialogConfirm {
  border-color: rgba(245, 179, 47, 0.55);
  background: linear-gradient(135deg, #f5b32f, #ff2d8d);
  color: #09070c;
}

.house-membership-toast {
  position: fixed;
  z-index: 14000;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border: 1px solid rgba(245, 179, 47, 0.48);
  border-radius: 14px;
  background: #151118;
  color: #fff;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

@media (max-width: 430px) {
  .house-membership-bar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .house-membership-bar > div {
    flex-basis: 100%;
  }

  .house-membership-bar button {
    flex: 1;
  }

  .house-member-tools {
    grid-template-columns: 1fr;
  }
}

.house-chat,
.house-chat-messages {
  display: grid;
  gap: 10px;
}

.house-chat-locked,
.house-chat-state,
.house-chat-empty {
  min-height: 170px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(245, 179, 47, 0.24);
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.92);
  text-align: center;
}

.house-chat-locked p,
.house-chat-state p,
.house-chat-empty p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  line-height: 1.5;
}

.house-chat-state button {
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid rgba(245, 179, 47, 0.5);
  border-radius: 11px;
  background: rgba(245, 179, 47, 0.12);
  color: #fff;
  font-weight: 850;
}

.house-chat-message {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.94);
}

.house-chat-message-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.house-chat-message-head span {
  padding: 2px 6px;
  border: 1px solid rgba(255, 45, 141, 0.38);
  border-radius: 999px;
  color: #ff79b5;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.house-chat-message-head time {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
}

.house-chat-message p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.house-chat-message > button {
  min-width: 44px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

.house-chat-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 179, 47, 0.3);
  border-radius: 14px;
  background: rgba(10, 8, 12, 0.98);
}

.house-chat-composer label {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  font-weight: 850;
}

.house-chat-composer textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #111;
  color: #fff;
  font: inherit;
}

.house-chat-composer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.house-chat-composer span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
}

.house-chat-composer button {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid rgba(245, 179, 47, 0.5);
  border-radius: 11px;
  background: linear-gradient(135deg, #f5b32f, #ff2d8d);
  color: #09070c;
  font-weight: 900;
}

.house-chat-composer button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.house-chat-form-error {
  min-height: 1.2em;
  margin: 0;
  color: #ff8dbf;
  font-size: 0.76rem;
}

.house-events,
.house-event-group {
  display: grid;
  gap: 12px;
}

.house-event-group h2 {
  margin: 8px 0 0;
  font-family: "Oswald", sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.house-event-create {
  min-height: 48px;
  border: 1px solid rgba(245, 179, 47, 0.5);
  border-radius: 12px;
  background: linear-gradient(135deg, #f5b32f, #ff2d8d);
  color: #09070c;
  font-weight: 900;
}

.house-events-state,
.house-events-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(245, 179, 47, 0.24);
  border-radius: 15px;
  background: rgba(17, 17, 17, 0.92);
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.house-events-state button {
  min-height: 44px;
  border: 1px solid rgba(245, 179, 47, 0.5);
  border-radius: 11px;
  background: rgba(245, 179, 47, 0.12);
  color: #fff;
  font-weight: 850;
}

.house-event-card {
  padding: 15px;
  border: 1px solid rgba(245, 179, 47, 0.25);
  border-radius: 15px;
  background: rgba(17, 17, 17, 0.94);
}

.house-event-card.status-cancelled {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.78;
}

.house-event-card-head,
.house-event-card-head > div,
.house-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.house-event-card-head {
  justify-content: space-between;
}

.house-event-card-head strong {
  font-size: 1.05rem;
}

.house-event-visibility,
.house-event-status {
  padding: 3px 7px;
  border: 1px solid rgba(255, 45, 141, 0.4);
  border-radius: 999px;
  color: #ff79b5;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.house-event-status {
  border-color: rgba(245, 179, 47, 0.42);
  color: #f5b32f;
}

.house-event-card dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
}

.house-event-card dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

.house-event-card dt {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.house-event-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.84);
}

.house-event-card > p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  white-space: pre-wrap;
}

.house-event-card > small {
  color: rgba(255, 255, 255, 0.5);
}

.house-event-actions {
  margin-top: 12px;
}

.house-event-actions button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(245, 179, 47, 0.36);
  border-radius: 10px;
  background: rgba(245, 179, 47, 0.08);
  color: #fff;
  font-weight: 800;
}

.house-event-dialog {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 18px;
  background: rgba(0, 0, 0, 0.8);
}

.house-event-dialog.hidden {
  display: none;
}

.house-event-dialog-panel {
  width: min(440px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  display: grid;
  gap: 7px;
  padding: 20px;
  border: 1px solid rgba(245, 179, 47, 0.42);
  border-radius: 18px;
  background: #121014;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.house-event-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.house-event-dialog-head h2 {
  margin: 0;
}

.house-event-dialog-head button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #1b171e;
  color: #fff;
  font-size: 1.35rem;
}

.house-event-dialog-panel label {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 850;
}

.house-event-dialog-panel input,
.house-event-dialog-panel textarea,
.house-event-dialog-panel select {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #0d0b0f;
  color: #fff;
  font: inherit;
}

.house-event-dialog-panel textarea {
  min-height: 88px;
  resize: vertical;
}

.house-event-field-error,
.house-event-form-error {
  min-height: 1em;
  margin: 0;
  color: #ff8dbf;
  font-size: 0.72rem;
}

.house-event-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.house-event-dialog-actions button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 11px;
  background: #1b171e;
  color: #fff;
  font-weight: 900;
}

#houseEventSave {
  border-color: rgba(245, 179, 47, 0.52);
  background: linear-gradient(135deg, #f5b32f, #ff2d8d);
  color: #09070c;
}

@media (max-width: 430px) {
  .house-event-dialog {
    align-items: end;
    padding: 0;
  }

  .house-event-dialog-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .house-event-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.house-hq-hero h1 {
  margin: 0;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: clamp(2.3rem, 10vw, 3.45rem);
  line-height: 0.92;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 45, 141, 0.18);
}

.house-hq-verified {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: 7px;
  border-radius: 50%;
  background: #38bdf8;
  color: #fff;
  font-size: 0.86rem;
  vertical-align: 0.2em;
}

.house-hq-hero p {
  margin: 7px 0 6px;
  color: #f5b32f;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.house-hq-meta {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.house-hq-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 10px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.92);
}

.house-hq-stats span {
  min-height: 72px;
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 8px 3px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.house-hq-stats span:last-child {
  border-right: 0;
}

.house-hq-stats b {
  color: #fff;
  font-family: "Oswald", sans-serif;
  font-size: 0.98rem;
}

.house-hq-stats i {
  color: #f5b32f;
  font-style: normal;
  font-size: 1.18rem;
}

.house-hq-mvp {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 58px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 179, 47, 0.24);
  border-radius: 16px;
  background: #111;
  color: #fff;
  text-align: left;
}

.hq-mini-avatar,
.hq-leader-avatar {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 45, 141, 0.72), transparent 1.2rem),
    linear-gradient(135deg, #26112c, #0a0a0a);
  border: 2px solid #f5b32f;
}

.hq-mini-avatar {
  width: 52px;
  height: 52px;
}

.hq-mini-avatar::before,
.hq-leader-avatar::before {
  content: "";
  width: 60%;
  height: 68%;
  background: linear-gradient(180deg, #f8c899, #7d3b54);
  clip-path: polygon(50% 0, 72% 18%, 78% 48%, 62% 88%, 38% 88%, 22% 48%, 28% 18%);
}

.house-hq-mvp strong {
  display: block;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
}

.house-hq-mvp em {
  color: #f5b32f;
  font-style: normal;
}

.house-hq-mvp small {
  display: block;
  color: #ff2d8d;
  font-weight: 950;
}

.house-hq-actions {
  display: grid;
  grid-template-columns: 1fr 72px 92px;
  gap: 10px;
  margin: 10px 0 14px;
}

.house-hq-join {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffdc73, #f5b32f 58%, #f59d1a);
  color: #050505;
  box-shadow: 0 0 24px rgba(245, 179, 47, 0.22);
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.18rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.house-hq-chat {
  min-height: 54px;
  border: 1px solid rgba(255, 45, 141, 0.58);
  border-radius: 12px;
  background: rgba(255, 45, 141, 0.08);
}

.house-hq-chat::before {
  content: "";
  width: 32px;
  height: 25px;
  display: block;
  margin: auto;
  border: 3px solid #ff2d8d;
  border-radius: 11px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 68% 72%, 52% 100%, 48% 72%, 0 72%);
}

.house-hq-manage {
  min-height: 54px;
  border: 1px solid rgba(245, 179, 47, 0.45);
  border-radius: 12px;
  background: rgba(245, 179, 47, 0.08);
  color: #f5b32f;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 0.96rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.house-hq-editor {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.house-hq-editor.hidden {
  display: none;
}

.house-hq-editor-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(720px, 92vh);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 45, 141, 0.34);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0, rgba(255, 45, 141, 0.16), transparent 10rem),
    #0a0a0a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 45, 141, 0.14);
}

.house-hq-editor-panel > strong {
  color: #fff;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.house-hq-editor-panel p {
  margin: -4px 0 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  line-height: 1.35;
}

.house-hq-editor-panel label {
  display: grid;
  gap: 5px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.house-hq-editor-panel input,
.house-hq-editor-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #111;
  color: #fff;
  font: 800 0.84rem "Inter", sans-serif;
}

.house-hq-editor-panel textarea {
  resize: vertical;
}

.house-hq-save {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffdc73, #f5b32f 58%, #f59d1a);
  color: #050505;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.house-hq-editor-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 1.25rem;
}

.house-hq-tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.house-hq-tabs::-webkit-scrollbar {
  display: none;
}

.house-hq-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  min-width: max-content;
  padding: 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.house-hq-tabs button.active {
  color: #ff2d8d;
  border-color: #ff2d8d;
}

.house-hq-content {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.hq-member-welcome,
.hq-manage-intro {
  padding: 22px;
  border: 1px solid rgba(245, 179, 47, 0.32);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0, rgba(255, 45, 141, 0.18), transparent 12rem),
    linear-gradient(145deg, rgba(38, 18, 52, 0.96), rgba(12, 10, 15, 0.98));
}

.hq-member-welcome small,
.hq-manage-intro small {
  color: #f7d66e;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hq-member-welcome h2,
.hq-manage-intro h2 {
  margin: 8px 0;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  letter-spacing: 0.035em;
}

.hq-member-welcome p,
.hq-manage-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.hq-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hq-quick-actions button {
  min-height: 52px;
  padding: 8px;
  border: 1px solid rgba(255, 45, 141, 0.34);
  border-radius: 13px;
  background: rgba(40, 18, 51, 0.75);
  color: #fff;
  font-weight: 850;
}

.house-leadership-row {
  grid-template-columns: 1fr;
}

.house-hq-tabs button:focus-visible,
.house-hq-public-actions button:focus-visible,
.hq-quick-actions button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.hq-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hq-card,
.hq-wide-card,
.hq-list-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.92);
  box-shadow: 0 0 20px rgba(255, 45, 141, 0.06);
}

.hq-card,
.hq-wide-card {
  padding: 14px;
}

.hq-card strong,
.hq-wide-card strong,
.hq-section-head strong {
  display: block;
  color: #fff;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 1.06rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hq-card p,
.hq-wide-card p,
.hq-card small,
.hq-wide-card small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.42;
}

.hq-stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
}

.hq-stat-line b {
  color: #fff;
}

.hq-recent-win {
  display: grid;
  grid-template-columns: 116px 1fr 42px;
  gap: 12px;
  align-items: center;
}

.hq-win-image {
  height: 76px;
  border-radius: 12px;
  background: url("./assets/featured-atl-ball.png") center / cover no-repeat;
}

.hq-trophy {
  color: #f5b32f;
  font-size: 2.2rem;
}

.hq-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.hq-section-head button {
  border: 0;
  background: transparent;
  color: #ff2d8d;
  font-weight: 950;
  text-transform: uppercase;
}

.hq-leaders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.hq-leader-card {
  min-height: 154px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 10px 5px;
  border: 1px solid rgba(245, 179, 47, 0.22);
  border-radius: 14px;
  background: #111;
  text-align: center;
}

.hq-leader-avatar {
  width: 58px;
  height: 58px;
}

.hq-leader-card strong {
  color: #fff;
  font-family: "Bebas Neue", "Oswald", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.hq-leader-card span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.62rem;
}

.hq-leader-card b {
  color: #ff2d8d;
  font-size: 0.68rem;
}

.hq-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hq-lock {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

.hq-list-card {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.hq-list-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hq-list-row:last-child {
  border-bottom: 0;
}

.hq-list-row strong {
  display: block;
  color: #fff;
}

.hq-list-row small {
  color: rgba(255, 255, 255, 0.62);
}

.hq-list-row b {
  color: #f5b32f;
}

@media (max-width: 390px) {
  .house-hq-shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .house-hq-hero h1 {
    font-size: 2.2rem;
  }

  .house-hq-tabs button {
    font-size: 0.8rem;
  }

  .hq-quick-actions {
    grid-template-columns: 1fr;
  }

  .hq-leaders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-hq-actions {
    grid-template-columns: 1fr 60px;
  }

  .house-hq-manage {
    grid-column: 1 / -1;
  }
}

.house-archive,
.house-trophy-grid { display: grid; gap: 14px; }
.house-archive-state,
.house-archive-empty,
.house-win-summary,
.house-win-card,
.house-trophy-card {
  border: 1px solid rgba(238, 193, 72, 0.25);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(23, 20, 28, 0.98), rgba(10, 10, 14, 0.98));
  padding: 16px;
}
.house-archive-state,
.house-archive-empty { min-height: 96px; display: grid; place-content: center; text-align: center; }
.house-win-summary { display: flex; align-items: baseline; gap: 12px; }
.house-win-summary strong { color: #f6d66e; font: 700 2rem/1 Georgia, serif; }
.house-win-card,
.house-trophy-card { display: grid; gap: 12px; min-width: 0; }
.house-win-card dl { display: grid; gap: 8px; margin: 0; }
.house-win-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.house-win-card dt,
.house-trophy-card span,
.house-trophy-card small { color: rgba(255, 255, 255, 0.68); }
.house-trophy-card > div > span,
.house-trophy-card > div > small { display: block; margin-top: 3px; }
.house-win-card a { color: #f6d66e; min-height: 44px; display: inline-flex; align-items: center; }
.house-trophy-card { grid-template-columns: 52px minmax(0, 1fr); }
.house-trophy-icon,
.house-trophy-card img {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  object-fit: cover;
  display: grid;
  place-content: center;
  background: linear-gradient(135deg, #f6d66e, #d52ba4);
  color: #111;
}
.house-trophy-card .house-event-actions { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .house-trophy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .house-hq-shell {
    width: min(1040px, calc(100vw - 48px));
    padding-bottom: 48px;
  }

  .house-hq-hero {
    min-height: 360px;
    border-radius: 24px;
  }

  .house-hq-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding-top: 18px;
  }

  .house-hq-content > .hq-member-welcome,
  .house-hq-content > .hq-manage-intro,
  .house-hq-content > .hq-quick-actions,
  .house-hq-content > .house-events,
  .house-hq-content > .house-archive,
  .house-hq-content > .house-chat,
  .house-hq-content > .house-member-tools,
  .house-hq-content > .house-member-requests,
  .house-hq-content > .house-hq-empty {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .house-hq-modal *,
  .house-hq-modal *::before,
  .house-hq-modal *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
