.whf-panel,
.whf-card,
.whf-empty,
.whf-notice {
  box-sizing: border-box;
}

.whf-panel {
  margin: 24px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(176, 139, 74, 0.34);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18, 24, 38, 0.96), rgba(10, 14, 24, 0.96));
  color: #eef2f8;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.whf-panel h3 {
  margin: 0 0 16px;
  color: #fff;
}

.whf-form {
  display: grid;
  gap: 16px;
}

.whf-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.whf-form input,
.whf-form select,
.whf-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid rgba(174, 190, 217, 0.35);
  border-radius: 10px;
  background: rgba(4, 9, 17, 0.58);
  color: #fff;
  font: inherit;
}

.whf-form input:focus,
.whf-form select:focus,
.whf-form textarea:focus {
  outline: 2px solid rgba(215, 164, 66, 0.5);
  border-color: #d7a442;
}

.whf-form select option {
  background: #0b111b;
  color: #fff;
}

.whf-form input[type="file"] {
  padding: 7px 9px;
  color: #dce4ef;
  cursor: pointer;
}

.whf-form input[type="file"]::file-selector-button,
.whf-form input[type="file"]::-webkit-file-upload-button {
  min-height: 38px;
  margin: 0 12px 0 0;
  padding: 8px 14px;
  border: 1px solid #e0aa3f;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0b429, #bd7b18);
  color: #17110a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.whf-form input[type="file"]:hover::file-selector-button,
.whf-form input[type="file"]:hover::-webkit-file-upload-button {
  filter: brightness(1.08);
}

.whf-form input[type="file"]:focus-visible {
  outline: 2px solid rgba(215, 164, 66, 0.72);
  outline-offset: 2px;
}

.whf-form small,
.whf-fineprint,
.whf-plan small {
  color: #aeb9ca;
}

.whf-current-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.whf-current-logo > img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
}

.whf-form .whf-current-logo label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.whf-form .whf-current-logo input {
  width: auto;
  margin: 0;
}

.whf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: fit-content;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #d9a63f, #a76b17);
  color: #111720 !important;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.whf-button:hover,
.whf-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.whf-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-content: start;
  align-items: stretch;
  gap: 18px;
  margin: 24px 0;
}

.whf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: 20px;
  border: 1px solid rgba(132, 151, 183, 0.28);
  border-radius: 15px;
  background: linear-gradient(150deg, #151d2d, #0b101b);
  color: #e8edf6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.whf-card.is-promoted {
  border-color: #e4ad3e;
  background: linear-gradient(145deg, #2a2114, #18130d 62%, #0d121c);
  box-shadow: inset 4px 0 0 rgba(239, 181, 60, 0.86), 0 16px 36px rgba(0, 0, 0, 0.28);
}

.whf-card.is-premium {
  border-color: #56d8eb;
  background: linear-gradient(145deg, #123747, #211b43 62%, #0d1420);
  box-shadow: inset 4px 0 0 rgba(86, 216, 235, 0.88), 0 16px 36px rgba(0, 0, 0, 0.3);
}

.whf-card.is-linked-highlight {
  z-index: 2;
  outline: 3px solid #f5c451;
  outline-offset: 4px;
  animation: whf-linked-highlight 1s ease-in-out 3;
}

@keyframes whf-linked-highlight {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.28);
  }
}

.whf-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(19px, 2vw, 23px);
}

.whf-card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 12px;
}

.whf-card-heading h3 {
  margin: 0;
}

.whf-guild-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid rgba(224, 174, 78, 0.58);
  border-radius: 12px;
  background: #0b111b;
  object-fit: contain;
}

.whf-card p {
  margin: 0 0 18px;
  color: #c6cfdd;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.whf-card .whf-discord {
  margin-top: auto;
}

.whf-badge {
  align-self: flex-start;
  margin: -8px 0 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(221, 164, 51, 0.14);
  color: #f3c565;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.whf-card.is-premium .whf-badge {
  border: 1px solid rgba(81, 211, 235, 0.46);
  background: rgba(49, 175, 212, 0.12);
  color: #77e5f7;
}

.whf-demo-label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  border: 1px solid rgba(154, 172, 204, 0.28);
  border-radius: 999px;
  background: rgba(9, 14, 23, 0.78);
  color: #aeb9ca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
}

.whf-demo-label + .whf-card-heading {
  padding-right: 46px;
}

.whf-mode-badge {
  align-self: flex-start;
  margin: 0 0 14px;
  padding: 3px 8px;
  border: 1px solid rgba(142, 164, 199, 0.36);
  border-radius: 999px;
  background: rgba(118, 139, 173, 0.12);
  color: #cbd6e8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.whf-mode-pvp {
  border-color: rgba(226, 98, 102, 0.5);
  background: rgba(151, 43, 51, 0.2);
  color: #ffb1b5;
}

.whf-mode-rp {
  border-color: rgba(171, 119, 226, 0.5);
  background: rgba(100, 55, 150, 0.2);
  color: #dab8ff;
}

.whf-mode-hardcore {
  border-color: rgba(234, 163, 67, 0.5);
  background: rgba(157, 95, 25, 0.2);
  color: #ffd18c;
}

.whf-mode-normal {
  border-color: rgba(86, 191, 219, 0.45);
  background: rgba(38, 126, 151, 0.18);
  color: #a5e7f4;
}

.whf-compact-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: stretch;
  max-width: 100%;
  padding: 2px 2px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.whf-card-compact {
  position: relative;
  display: inline-flex;
  flex: 0 0 clamp(360px, 34vw, 480px);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 13px;
  border-radius: 14px 14px 12px 12px !important;
  background-clip: padding-box;
  color: #f8fafc !important;
  text-decoration: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.whf-compact-brand,
.whf-compact-guild {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.whf-compact-brand {
  align-self: stretch;
  flex: 0 0 auto;
  gap: 7px;
  margin: -10px 0 -10px -13px;
  padding: 7px 11px 7px 8px;
  border-right: 1px solid rgba(222, 171, 67, 0.35);
  border-radius: 14px 0 0 14px;
  background: rgba(3, 7, 13, 0.54);
  color: #f1c466;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.whf-compact-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.whf-compact-guild {
  flex: 1 1 auto;
  gap: 9px;
}

.whf-card-compact .whf-guild-logo {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 9px;
}

.whf-card-compact.is-promoted,
.whf-card-compact.is-premium {
  border-color: rgba(77, 190, 214, 0.76);
  background: #101827;
  box-shadow: none;
}

.whf-card-compact .whf-mode-badge {
  flex: none;
  align-self: center;
  margin: 0;
  font-size: 10px;
}

.whf-card-compact:hover,
.whf-card-compact:focus-visible {
  z-index: 3;
  transform: translateY(-2px);
  border-color: #e0ae4e;
}

.whf-card-name {
  min-width: 0;
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
}

.whf-card-action {
  flex: none;
  color: #f1c466;
  font-size: 13px;
  font-weight: 800;
}

.whf-tooltip {
  display: none !important;
}

.whf-floating-tooltip {
  position: fixed;
  z-index: 2147482000;
  width: max-content;
  max-width: min(380px, calc(100vw - 20px));
  padding: 11px 12px;
  border: 1px solid rgba(222, 171, 67, 0.58);
  border-radius: 10px;
  background: #080d16;
  color: #dce4f0;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.46);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: normal;
}

.whf-floating-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .whf-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .whf-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.whf-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.whf-plan {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(154, 172, 204, 0.25);
  border-radius: 13px;
  background: rgba(4, 9, 17, 0.42);
}

.whf-plan.is-premium {
  border-color: rgba(75, 210, 236, 0.55);
  background: linear-gradient(145deg, rgba(28, 117, 145, 0.2), rgba(83, 50, 135, 0.2));
  box-shadow: inset 0 0 0 1px rgba(145, 104, 225, 0.12);
}

.whf-plan.is-premium > div > strong {
  color: #77e5f7;
}

.whf-plan.is-premium .whf-button {
  background: linear-gradient(135deg, #6ee4f3, #7865dc);
  color: #07131a !important;
}

.whf-page-title {
  margin: 0 0 22px;
  color: #f4f7fb;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.whf-brand-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid #2c3b49;
  border-radius: 22px;
  background: #101720;
}

.whf-hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
  padding: 28px 24px;
  border-right: 1px solid rgba(129, 180, 197, 0.18);
  background: radial-gradient(ellipse at 20% 35%, #193d4b, transparent 85%), linear-gradient(135deg, #152531, #111923);
}

.whf-hero-brand > img {
  width: clamp(100px, 11vw, 146px);
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.35));
}

.whf-hero-wordmark {
  display: grid;
  gap: 7px;
}

.whf-hero-wordmark > span {
  color: #afbdd0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.whf-hero-wordmark > strong {
  color: #f5f0e6;
  font-family: Georgia, serif;
  font-size: clamp(40px, 4.5vw, 62px);
  font-weight: 500;
  line-height: 1;
}

.whf-hero-wordmark > small {
  color: #9db6c3;
  font-size: 12px;
}

.whf-hero-copy {
  align-self: center;
  min-width: 0;
  padding: 28px clamp(24px, 3vw, 44px);
}

.whf-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dfbd7b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.whf-hero-eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: currentColor;
}

.whf-brand-hero .whf-hero-headline {
  margin: 9px 0 12px;
  color: #f4f7fb;
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.whf-hero-headline em {
  color: #eed2a0;
  font-style: normal;
}

.whf-brand-hero .whf-hero-description {
  max-width: 540px;
  margin: 0;
  color: #b9c5d4;
  font-size: 15px;
  line-height: 1.6;
}

.whf-hero-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
  color: #91a6b8;
  font-size: 12px;
  line-height: 1.5;
}

.whf-hero-note > span {
  color: #dfbd7b;
}

@media (max-width: 900px) {
  .whf-brand-hero {
    grid-template-columns: 1fr;
  }

  .whf-hero-brand {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid rgba(129, 180, 197, 0.18);
  }
}

.whf-inline-actions {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

.whf-action-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99980;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid #3a4555;
  border-radius: 14px;
  background: rgba(13, 18, 25, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
}

.whf-action-primary,
.whf-action-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 14px;
  border: 1px solid #303a49;
  border-radius: 9px;
  background: #171e28;
  color: #eceff4 !important;
  font: inherit;
  font-weight: 800;
  text-decoration: none !important;
  cursor: pointer;
}

.whf-action-primary {
  border-color: #f0b429;
  background: #f0b429;
  color: #15110a !important;
}

.whf-action-secondary:hover,
.whf-action-secondary:focus-visible {
  border-color: #5e789d;
  background: #202a38;
}

.whf-modal[hidden] {
  display: none !important;
}

.whf-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  padding: 18px;
  overflow: hidden;
  isolation: isolate;
  overscroll-behavior: contain;
}

.whf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 11, 0.82);
  backdrop-filter: blur(7px);
}

.whf-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  box-sizing: border-box;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #354154;
  border-radius: 20px;
  background: #0f141c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.whf-modal-dialog .whf-panel {
  margin: 0;
  border: 0;
  box-shadow: none;
}

html body .whf-modal .whf-modal-dialog > button.whf-modal-close {
  position: sticky !important;
  top: 12px !important;
  z-index: 3 !important;
  display: grid !important;
  float: right !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 12px 12px -48px 0 !important;
  padding: 0 !important;
  place-items: center !important;
  color: #dce4ee !important;
  border: 1px solid #3a4658 !important;
  border-radius: 999px !important;
  background: #161e29 !important;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.34) !important;
  appearance: none !important;
  cursor: pointer !important;
}

html body .whf-modal .whf-modal-dialog > button.whf-modal-close::before,
html body .whf-modal .whf-modal-dialog > button.whf-modal-close::after {
  display: none !important;
  content: none !important;
}

html body .whf-modal .whf-modal-dialog > button.whf-modal-close svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
}

body.whf-modal-open {
  overflow: hidden;
}

.whf-page-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 100010;
  width: min(520px, calc(100vw - 30px));
  transform: translateX(-50%);
}

.whf-plan p {
  margin: 7px 0;
  color: #c6cfdd;
}

.whf-notice,
.whf-empty {
  margin: 18px 0;
  padding: 13px 15px;
  border-radius: 10px;
}

.whf-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.whf-notice.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

.whf-notice [data-whf-notice-close] {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  padding: 0;
  border: 1px solid rgba(174, 190, 217, 0.28);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.36);
  color: #dce4ef;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
}

.whf-notice-success {
  border: 1px solid rgba(67, 190, 116, 0.5);
  background: rgba(25, 113, 63, 0.18);
}

.whf-notice-error {
  border: 1px solid rgba(226, 93, 93, 0.52);
  background: rgba(139, 32, 32, 0.2);
}

.whf-empty {
  border: 1px dashed rgba(151, 169, 198, 0.36);
  color: #aeb9ca;
  text-align: center;
}

@media (max-width: 560px) {
  .whf-page-title {
    margin-bottom: 14px;
    font-size: clamp(24px, 7vw, 30px);
  }

  .whf-brand-hero {
    border-radius: 18px;
  }

  .whf-hero-brand {
    gap: 18px;
    padding: 20px;
  }

  .whf-hero-brand > img {
    width: 96px;
  }

  .whf-hero-wordmark > span {
    font-size: 10px;
  }

  .whf-hero-wordmark > strong {
    font-size: 42px;
  }

  .whf-hero-copy {
    padding: 22px 20px;
  }

  .whf-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .whf-action-dock {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .whf-action-dock > button {
    flex: 1 1 0;
    padding-inline: 9px;
    font-size: 13px;
  }

  .whf-modal {
    padding: 10px;
  }

  .whf-modal-dialog {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .whf-card-compact {
    flex-basis: min(88vw, 380px);
  }

  .whf-compact-brand span {
    display: none;
  }

  .whf-compact-brand {
    padding-right: 8px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .whf-button,
  .whf-card-compact,
  .whf-floating-tooltip {
    transition: none;
  }

  .whf-card.is-linked-highlight {
    animation: none;
  }
}
