.server-promo .clan-catalog { height: 1027px; box-sizing: border-box; }
.clan-drum { height: 689px; overflow: auto; scrollbar-width: none; overscroll-behavior-y: contain; mask-image: linear-gradient(transparent, #000 11%, #000 89%, transparent); border: 0; border-radius: 14px; }
.clan-drum::-webkit-scrollbar { display: none; }
.clan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; grid-auto-rows: 1fr; padding: 8px 16px; }
.clan-card { display: block; width: 100%; min-height: 156px; height: auto; padding: 16px 20px; text-align: left; color: #d5d6da; background: linear-gradient(130deg,#141517e8,#202123e8); border: 2px solid #686164; border-radius: 12px; box-shadow: inset 0 0 0 1px #ffffff0c; cursor: pointer; font: inherit; }
.clan-card:hover, .clan-card:focus-visible { border-color: #c48c78; outline: 2px solid #ad6751; outline-offset: -2px; }
.clan-card-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.clan-card-head > span:last-child { min-width: 0; }
.clan-emblem, .clan-dialog-emblem { flex: 0 0 52px; display: block; width: 52px; height: 52px; background-position: center; background-size: contain; background-repeat: no-repeat; }
.clan-emblem { border-radius: 18%; overflow: hidden; }
.clan-emblem img { width: 100%; height: 100%; object-fit: contain; }
.clan-name { display: block; color: #f54a40; text-transform: uppercase; font-weight: 700; font-size: 23px; line-height: 28px; overflow-wrap: anywhere; }
.clan-leader { display: block; color: #f4f0eb; text-transform: uppercase; font-weight: 700; font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
.clan-card .clan-leader, .clan-card .clan-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clan-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 16px; line-height: 23px; margin-top: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.clan-dialog { position: fixed; inset: 0; margin: auto; width: min(1120px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; color: #eee9e5; background: #141315; border: 2px solid #bc8b76; border-radius: 24px; box-shadow: 0 0 0 1px #4b2e29,0 0 28px #9a372950; }
/* The frame and artwork share one clipping boundary at every aspect ratio. */
.clan-dialog::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 3px; background: var(--clan-frame,url('images/clan-modal-frame.png')) center / 100% 100% no-repeat,linear-gradient(#f4cfb0,#754f45 25%,#4a302b 65%,#e7b79b); mask: linear-gradient(#fff 0 0) content-box exclude,linear-gradient(#fff 0 0); box-shadow: inset 0 0 0 1px #f4c8ad; }

.clan-dialog::backdrop { background: #050406cf; backdrop-filter: blur(5px); }
.clan-art { position: absolute; inset: 0 0 0 auto; width: 64%; overflow: hidden; background: url('images/clan-castle.png') center/cover; pointer-events: none; }
.clan-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,#141315,transparent 65%),linear-gradient(0deg,#141315,transparent 45%); }
.clan-close { position: absolute; right: 18px; top: 12px; z-index: 2; width: 56px; height: 56px; color: #eee; background: none; border: 0; font: 48px/1 sans-serif; cursor: pointer; }
.clan-dialog-content { position: relative; max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: contain; padding: 44px 48px 56px; min-height: min(540px,calc(100dvh - 36px)); }
.clan-dialog-header { display: flex; align-items: center; gap: 28px; padding-right: 30px; width: 80%; }
.clan-dialog-header .clan-emblem { width: 96px; height: 96px; }
.clan-dialog-emblem { flex-basis: 96px; width: 96px; height: 96px; }
.clan-dialog-header .clan-name { font-size: 46px; line-height: 54px; }
.clan-dialog-header .clan-leader { font-size: 32px; line-height: 40px; margin: 0; }
.clan-divider { display: flex; align-items: center; width: 70%; margin: 24px 0; color: #ca9a83; }
.clan-divider::before,.clan-divider::after { content:''; height: 1px; flex: 1; background: linear-gradient(90deg,transparent,#bd8877); }
.clan-divider::after { transform: rotate(180deg); }
.clan-divider span { font-size: 28px; padding: 0 8px; }
.clan-description { width: 68%; font-size: 22px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.clan-description p { margin: 0; }
.clan-dialog :focus-visible { outline: 2px solid #e8bb9f; outline-offset: 3px; }
@media(max-width: 1100px) { .clan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .clan-dialog-content { padding: 36px 28px; } .clan-description { width: 78%; } }
@media(max-width: 600px) { .clan-grid { grid-template-columns: 1fr; } .clan-dialog-content { padding: 60px 22px 28px; min-height: min(440px,calc(100dvh - 36px)); } .clan-dialog-header { width: 100%; gap: 16px; padding: 0; } .clan-dialog-header .clan-name { font-size: 28px; line-height: 36px; } .clan-dialog-header .clan-leader { font-size: 21px; line-height: 28px; } .clan-dialog-emblem { flex-basis: 60px; width: 60px; height: 60px; } .clan-dialog-header .clan-emblem { width: 60px; height: 60px; } .clan-divider,.clan-description { width: 100%; } .clan-description { font-size: 18px; } .clan-art { opacity: .22; width: 100%; } }
/* Keep the measured footprint of the original six-slot section. */
@media(min-width:1600px) { .server-promo .clan-catalog { height: 1030px; } .clan-drum { height: 692px; } }
@media(min-width:768px) and (max-width:1350px) { .server-promo .clan-catalog { height: 1024px; } .clan-drum { height: 686px; } }
@media(max-width:767px) { .server-promo .clan-catalog { height: 2314px; } .clan-drum { height: 1952px; } }
.server-promo :is(.clan-card, .clan-dialog, .clan-name, .clan-leader, .clan-preview, .clan-description) { font-family: 'Philosopher', sans-serif; }
.clan-card { border-color: var(--clan-card-border-color, #686164); }
.clan-emblem { border-radius: var(--clan-logo-radius, 18%); }
.clan-card .clan-name { color: var(--clan-accent-color,#f54a40); font-size: var(--clan-card-name-size,23px); line-height: 1.3; }
.clan-card .clan-leader { font-size: var(--clan-card-leader-size,18px); line-height: 1.3; }
.clan-card .clan-preview { font-size: var(--clan-card-description-size,16px); line-height: 1.45; }
.clan-art { inset: 0; width: 100%; background-image: var(--clan-background,url('images/clan-modal-background.png')); background-size: cover; background-position: center; }
.clan-art::after { background: linear-gradient(90deg,#141315f5 5%,#141315bd 45%,transparent 85%),linear-gradient(0deg,#141315cf,transparent 55%); }
.clan-dialog-header .clan-name { color: var(--clan-accent-color,#f54a40); font-size: var(--clan-modal-name-size,46px); line-height: 1.25; }
.clan-dialog-header .clan-leader { font-size: var(--clan-modal-leader-size,32px); line-height: 1.2; }
.clan-description { font-size: var(--clan-modal-description-size,22px); }
.clan-tags { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.clan-tags:empty,.clan-actions:empty { display: none; }
.clan-tags > span { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border: 1px solid #797073; border-radius: 12px; background: linear-gradient(#242124d9,#131315e8); box-shadow: inset 0 0 0 1px #e9c2b522,0 3px 10px #0005; font-size: 20px; }
.clan-tags i { color: #e6a4a5; font-size: 24px; }
.clan-actions { display: flex; justify-content: flex-start; gap: 28px; margin-top: 40px; }
.clan-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 60px; padding: 12px 28px; border: 2px solid #8b858a; border-radius: 15px; background: linear-gradient(#29272bd9,#121215ef); box-shadow: inset 0 1px 2px #fff5,0 5px 14px #0008; font: 24px/1.3 'Philosopher',sans-serif; color: #f5efec; text-decoration: none; }
.clan-actions .clan-join { border-color: #da6750; background: linear-gradient(#7d3029e8,#351713f2); box-shadow: inset 0 1px 3px #ffcfb3a0,0 0 20px #cd32243b; }
.clan-actions a:hover { filter: brightness(1.2); }
.clan-actions a:focus-visible { outline: 2px solid #f6c8ad; outline-offset: 4px; }
@media(max-width:600px) {
    .clan-dialog-header .clan-name { font-size: min(var(--clan-modal-name-size,46px),28px); }
    .clan-dialog-header .clan-leader { font-size: min(var(--clan-modal-leader-size,32px),21px); }
    .clan-description { font-size: min(var(--clan-modal-description-size,22px),18px); }
    .clan-art { opacity: .55; }
    .clan-tags { gap: 8px; }
    .clan-tags > span { font-size: 16px; padding: 8px 12px; }
    .clan-actions { flex-direction: column; gap: 14px; margin-top: 24px; }
    .clan-actions a { font-size: 20px; padding: 12px; }
}

.clan-tags:not(:has(> span)), .clan-actions:not(:has(> a)) { display: none; }
/* Paint the landscape once beneath both the frame and the content. */
.clan-dialog { background-image: linear-gradient(90deg,#141315f5 5%,#141315bd 45%,transparent 85%),linear-gradient(0deg,#141315cf,transparent 55%),var(--clan-background,url('images/clan-modal-background.png')); }
.clan-art, .clan-art::after { background: none; }
.clan-dialog { background-size: cover; background-position: center; }

.clan-emblem--placeholder { display: flex; align-items: center; justify-content: center; background: #202124; border: 1px solid #49474b; color: #e8dfd6; font: 700 28px/1 'Philosopher',sans-serif; }
.clan-dialog-header .clan-emblem--placeholder { font-size: 48px; }
@media(max-width:600px) { .clan-dialog-header .clan-emblem--placeholder { font-size: 32px; } }

.clan-card { position: relative; }
.clan-war-tag { position: absolute; top: 10px; right: 12px; padding: 2px 8px; border: 1px solid #8c7252; border-radius: 5px; background: #30271ed9; color: #ebd2ac; font-size: 12px; font-weight: 700; line-height: 18px; }
.clan-war-tag--big { border-color: #a45c50; background: #391e1ad9; color: #f1b8a9; }
.clan-card:has(.clan-war-tag) .clan-card-head { padding-right: 76px; }
