/* ==========================================================================
   Avalis S54 — community directory
   members · public profiles · profile editor · clans · clan pages ·
   private messages · conversations · notifications
   Every selector is scoped to body.dir-page (set only on these pages).
   ========================================================================== */

.dir-page .dir-main { padding-bottom: clamp(56px, 8vw, 110px); }

/* --------------------------------------------------------------------------
   Page hero + community section switcher
   -------------------------------------------------------------------------- */
.dir-page .dir-hero__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px 40px; flex-wrap: wrap; }
.dir-page .dir-hero__copy { max-width: 640px; min-width: 0; }
.dir-page .dir-hero h1 { margin-bottom: 10px; max-width: none; }
.dir-page label input, .dir-page label textarea, .dir-page label select { font-weight: 400; }
.dir-page .dir-hero .lede { font-size: clamp(1rem, 1.4vw, 1.12rem); }
.dir-page .dir-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dir-page .dir-hero--slim { padding: clamp(26px, 4vw, 42px) 0 clamp(22px, 3vw, 32px); }
.dir-page .dir-hero--slim h1 { font-size: clamp(1.63rem, 2.75vw, 2.24rem); margin-bottom: 6px; }
.dir-page .dir-hero .art-community { background-position: center 38%; }
.dir-page .dir-hero .art-fortress { background-position: 70% 45%; }
.dir-page .dir-hero .art-gate { background-position: 75% 50%; }

.dir-page .dir-subnav { display: flex; gap: 4px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(4, 10, 24, .62); border: 1px solid var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.dir-page .dir-subnav::-webkit-scrollbar { display: none; }
.dir-page .dir-subnav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border-radius: 999px; color: var(--mist); font: 700 .85rem/1 var(--font-display); white-space: nowrap; transition: color .15s, background .15s; }
.dir-page .dir-subnav a:hover { color: #fff; background: rgba(47, 107, 255, .14); }
.dir-page .dir-subnav a[aria-current="page"] { color: #fff; background: linear-gradient(180deg, rgba(86, 140, 255, .42), rgba(35, 80, 216, .42)); box-shadow: inset 0 0 0 1px rgba(150, 192, 255, .5), 0 4px 14px rgba(40, 100, 255, .25); }

/* --------------------------------------------------------------------------
   Layout: list + sidebar
   -------------------------------------------------------------------------- */
.dir-page .dir-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 3vw, 36px); align-items: start; padding-top: clamp(24px, 3vw, 36px); }
.dir-page .dir-layout__main { min-width: 0; }
.dir-page .dir-layout__side { display: grid; gap: 18px; min-width: 0; }

/* Side cards */
.dir-page .dir-card { position: relative; min-width: 0; padding: 20px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(17, 35, 66, .72), rgba(9, 20, 40, .82)); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.dir-page .dir-card::before { content: ""; position: absolute; inset: 0 12% auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(160, 205, 255, .4), transparent); pointer-events: none; }
.dir-page .dir-card > p:not([class]) { margin: 0 0 14px; color: var(--mist); font-size: .93rem; line-height: 1.55; }
.dir-page .dir-card__label { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font: 700 1rem/1.25 var(--font-display); color: var(--frost); }
.dir-page .dir-card__links { display: flex; flex-wrap: wrap; gap: 8px; }
.dir-page .dir-card__links .btn svg { width: 15px; height: 15px; }

.dir-page .dir-me { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.dir-page .dir-me .avatar { --avatar: 52px; }
.dir-page .dir-me strong { display: block; font-size: 1.02rem; line-height: 1.25; }
.dir-page .dir-me small { display: block; color: var(--dim); font-size: .82rem; }

.dir-page .dir-shortcuts { display: grid; gap: 2px; padding: 18px 12px 12px; }
.dir-page .dir-shortcuts .dir-card__label { margin-left: 8px; }
.dir-page .dir-shortcuts a { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 8px; border-radius: var(--r-sm); color: var(--mist); transition: background .15s; }
.dir-page .dir-shortcuts a > svg { width: 38px; height: 38px; padding: 9px; border-radius: 10px; color: var(--ice); background: rgba(47, 107, 255, .13); border: 1px solid var(--line); transition: color .15s, background .15s; }
.dir-page .dir-shortcuts a > span { grid-column: 2; min-width: 0; }
.dir-page .dir-shortcuts b { display: block; font: 700 .95rem/1.2 var(--font-text); }
.dir-page .dir-shortcuts small { display: block; color: var(--dim); font-size: .8rem; line-height: 1.35; }
.dir-page .dir-shortcuts a:hover { background: rgba(47, 107, 255, .12); color: var(--mist); }
.dir-page .dir-shortcuts a:hover > svg { color: #fff; background: var(--sapphire); }

/* --------------------------------------------------------------------------
   Search / filter toolbar
   -------------------------------------------------------------------------- */
.dir-page .dir-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin: 0 0 18px; padding: 16px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(15, 31, 60, .66), rgba(9, 20, 40, .7)); border: 1px solid var(--line); }
.dir-page .dir-toolbar--inline { padding: 0; margin: 0; background: none; border: 0; }
.dir-page .dir-field { display: grid; gap: 7px; min-width: 170px; }
.dir-page .dir-field--grow { flex: 1 1 260px; }
.dir-page .dir-field > label { font: 700 .8rem/1.2 var(--font-display); color: var(--dim); }
.dir-page .dir-toolbar__submit { min-height: 46px; }

/* Results line */
.dir-page .dir-results { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 4px 12px; min-height: 28px; color: var(--dim); font-size: .88rem; }
.dir-page .dir-results p { margin: 0; }
.dir-page .dir-clear { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font: 700 .84rem/1 var(--font-display); color: var(--ice); }
.dir-page .dir-clear svg { width: 14px; height: 14px; }
.dir-page .dir-clear:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Divided lists (members, roster, activity, inbox, notifications)
   -------------------------------------------------------------------------- */
.dir-page .dir-list { position: relative; margin: 0; padding: 0; list-style: none; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(14, 29, 56, .64), rgba(8, 18, 36, .74)); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.dir-page .dir-list > * + * { border-top: 1px solid var(--line); }
.dir-page .dir-list > :first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.dir-page .dir-list > :last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.dir-page .dir-list__head { display: grid; gap: 16px; padding: 11px 20px; background: rgba(3, 9, 22, .38); font: 700 .78rem/1.2 var(--font-display); color: var(--dim); }

.dir-page .dir-arrow { display: grid; place-items: center; color: var(--dim); transition: color .15s, transform .2s var(--ease); }
.dir-page .dir-arrow svg { width: 20px; height: 20px; }

.dir-page .dir-empty { margin-top: 4px; }
.dir-page .dir-empty .btn { margin-top: 8px; }
.dir-page .dir-inline-empty { margin: 0; padding: 22px 18px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: rgba(10, 22, 42, .4); color: var(--dim); text-align: center; font-size: .92rem; }

/* Section heads inside pages */
.dir-page .dir-section { min-width: 0; }
.dir-page .dir-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.dir-page .dir-section__head .eyebrow { margin-bottom: 6px; }
.dir-page .dir-section__head h2 { margin: 0; font-size: clamp(1.2rem, 1.89vw, 1.5rem); }
.dir-page .dir-section__head > p { margin: 0; color: var(--dim); font-size: .86rem; }

/* --------------------------------------------------------------------------
   Badges (forum_badges), presence and name colours
   -------------------------------------------------------------------------- */
.dir-page .game-badges { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.dir-page .game-badges:empty { display: none; }
.dir-page .game-badge { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(3, 9, 22, .6); border: 1px solid var(--line-2); cursor: help; }
.dir-page .game-badge img { display: block; width: auto; height: 13px; image-rendering: pixelated; }
.dir-page .game-badge::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 20; padding: 6px 9px; border-radius: 6px; background: #0d1d3b; border: 1px solid var(--line-3); box-shadow: 0 8px 20px rgba(0, 0, 0, .45); color: var(--frost); font: 700 .76rem/1 var(--font-display); white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s var(--ease); }
.dir-page .game-badge:hover::after, .dir-page .game-badge:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.dir-page .game-badge:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }

.dir-page .dir-presence { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(3, 9, 22, .58); border: 1px solid var(--line-2); color: var(--mist); font: 700 .8rem/1 var(--font-display); }
.dir-page .dir-presence i { width: 8px; height: 8px; border-radius: 50%; background: #50617f; }
.dir-page .dir-presence.is-here { color: #bff7e8; border-color: rgba(69, 227, 207, .4); }
.dir-page .dir-presence.is-here i { background: var(--aurora); box-shadow: 0 0 0 3px rgba(69, 227, 207, .16), 0 0 10px var(--aurora); }

/* --------------------------------------------------------------------------
   Pagination (directory-pagination.php)
   -------------------------------------------------------------------------- */
.dir-page .directory-pagination { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 16px 0 0; }
.dir-page .directory-pagination .page-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dir-page .directory-pagination .page-numbers a, .dir-page .directory-pagination .page-numbers span, .dir-page .directory-pagination .page-direction { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); font: 700 .89rem/1 var(--font-display); color: var(--mist); background: rgba(14, 30, 58, .6); border: 1px solid var(--line-2); transition: color .15s, border-color .15s, background .15s; }
.dir-page .directory-pagination .page-direction { padding: 0 16px; }
.dir-page .directory-pagination a:hover { color: #fff; border-color: var(--line-3); background: rgba(30, 60, 110, .7); }
.dir-page .directory-pagination .page-numbers .current { color: #fff; background: linear-gradient(180deg, #4a84ff, #2350d8); border-color: #6c9dff; box-shadow: 0 6px 16px rgba(40, 100, 255, .32); }
.dir-page .directory-pagination .page-numbers .page-gap { min-width: 16px; padding: 0; background: none; border: 0; }
.dir-page .directory-pagination .unavailable { opacity: .38; }
.dir-page .directory-pagination .page-count { grid-column: 1 / -1; text-align: center; color: var(--dim); font-size: .8rem; }
/* Narrow containers (clan calendar) and phones: numbers first, then previous / next */
.dir-page .clan-calendar .directory-pagination { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "nums nums" "prev next" "count count"; }
.dir-page .clan-calendar .directory-pagination .page-numbers { grid-area: nums; }
.dir-page .clan-calendar .directory-pagination .page-prev { grid-area: prev; }
.dir-page .clan-calendar .directory-pagination .page-next { grid-area: next; }
.dir-page .clan-calendar .directory-pagination .page-count { grid-area: count; }

/* --------------------------------------------------------------------------
   Collapsible composers (new clan, new message, schedule event) + forms
   -------------------------------------------------------------------------- */
.dir-page .dir-compose { border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(20, 42, 80, .72), rgba(9, 20, 40, .86)); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); }
.dir-page .dir-compose > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 16px 10px 18px; border-radius: inherit; color: var(--frost); font: 700 .95rem/1.2 var(--font-display); transition: background .15s; }
.dir-page .dir-compose > summary::-webkit-details-marker { display: none; }
.dir-page .dir-compose > summary:hover { background: rgba(47, 107, 255, .1); }
.dir-page .dir-compose > summary:focus-visible { outline: none; box-shadow: var(--focus); }
.dir-page .dir-compose[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.dir-page .dir-compose__title { display: inline-flex; align-items: center; gap: 12px; }
.dir-page .dir-compose__title svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; color: #fff; background: linear-gradient(180deg, #4a84ff, #2350d8); box-shadow: 0 4px 12px rgba(40, 100, 255, .35); }
.dir-page .dir-compose__toggle { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(3, 9, 22, .5); transition: transform .25s var(--ease), border-color .15s; }
.dir-page .dir-compose__toggle::before, .dir-page .dir-compose__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--ice); transform: translate(-50%, -50%); }
.dir-page .dir-compose__toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .25s var(--ease); }
.dir-page .dir-compose[open] .dir-compose__toggle { border-color: var(--line-3); }
.dir-page .dir-compose[open] .dir-compose__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.dir-page .dir-form { padding: 18px; }
.dir-page .dir-form .field { margin-bottom: 14px; }
.dir-page .dir-form .field > span { font-size: .86rem; }
.dir-page .dir-form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.dir-page .dir-form__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.dir-page .dir-form textarea { min-height: 110px; }

/* --------------------------------------------------------------------------
   Members directory
   -------------------------------------------------------------------------- */
.members-page .member-list .dir-list__head { grid-template-columns: minmax(0, 1fr) 150px 72px; }
.members-page .member-list .dir-list__head span:last-child { text-align: right; }
.members-page .member-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 150px 72px; gap: 16px; align-items: center; padding: 14px 20px; color: var(--mist); transition: background .15s; }
.members-page .member-row:hover { background: rgba(47, 107, 255, .09); color: var(--mist); }
.members-page .member-row:hover .avatar { border-color: var(--line-3); }
.members-page .member-row .avatar { --avatar: 52px; transition: border-color .15s; }
.members-page .member-copy { min-width: 0; }
.members-page .member-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.members-page .member-name strong { font-size: 1.04rem; line-height: 1.3; }
.members-page .member-copy small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: .86rem; }
.members-page .member-presence { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: .86rem; line-height: 1.3; }
.members-page .member-presence i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3f5070; }
.members-page .member-presence.is-here { color: #bff7e8; font-weight: 700; }
.members-page .member-presence i.online { background: var(--aurora); box-shadow: 0 0 0 3px rgba(69, 227, 207, .16), 0 0 10px var(--aurora); }
.members-page .member-posts { display: grid; justify-items: end; gap: 3px; font: 700 1.25rem/1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; }
.members-page .member-posts small { font: 700 .74rem/1 var(--font-display); color: var(--dim); }

/* --------------------------------------------------------------------------
   Public profile
   -------------------------------------------------------------------------- */
.profile-page .profile-banner { position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px, 3.4vw, 40px) 0 clamp(92px, 10vw, 120px); border-bottom: 1px solid var(--line); }
.profile-page .profile-banner__art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 42%; opacity: .5; }
.profile-page .profile-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px 300px at calc(var(--gutter) + 120px) 58%, rgba(47, 107, 255, .26), transparent 70%), linear-gradient(90deg, rgba(6, 13, 29, .94) 0%, rgba(6, 13, 29, .76) 45%, rgba(6, 13, 29, .4) 100%), linear-gradient(0deg, var(--night-1) 0%, transparent 60%); }
.profile-page .profile-banner .breadcrumbs { margin-bottom: clamp(16px, 2.4vw, 26px); }
.profile-page .profile-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px clamp(20px, 3vw, 34px); align-items: center; }
.profile-page .profile-id .hero-avatar { --avatar: clamp(104px, 11vw, 140px); border: 0; box-shadow: 0 0 0 3px #0a1630, 0 0 0 5px rgba(196, 218, 250, .72), 0 0 0 10px rgba(47, 107, 255, .2), 0 20px 44px rgba(0, 0, 0, .55), 0 0 70px rgba(47, 107, 255, .32); }
.profile-page .profile-id__copy { min-width: 0; }
.profile-page .profile-id__copy .eyebrow { margin-bottom: 8px; }
.profile-page .profile-id h1 { margin: 0 0 12px; font-size: clamp(1.81rem, 3.61vw, 2.84rem); overflow-wrap: anywhere; text-shadow: 0 3px 22px rgba(0, 0, 0, .6); }
.profile-page .profile-id__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.profile-page .profile-id__meta .game-badges { gap: 6px; }
.profile-page .profile-id__meta .game-badge { width: 34px; height: 34px; border-radius: 9px; }
.profile-page .profile-id__meta .game-badge img { height: 26px; }
.profile-page .profile-bio { margin: 16px 0 0; max-width: 62ch; color: #d3dff1; font-size: 1.04rem; line-height: 1.6; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.profile-page .profile-id__actions { display: flex; flex-direction: column; gap: 10px; align-self: end; }
.profile-page .profile-id__actions:empty { display: none; }

.profile-page .profile-body { position: relative; z-index: 2; margin-top: calc(-1 * clamp(56px, 6vw, 70px)); }
.profile-page .profile-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px; margin: 0 0 14px; overflow: hidden; border-radius: var(--r-lg); background: var(--line); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.profile-page .profile-stats > div { position: relative; padding: 18px 22px 16px; background: linear-gradient(180deg, rgba(16, 33, 64, .97), rgba(9, 19, 39, .98)); }
.profile-page .profile-stats > div:first-child::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--ice), var(--sapphire)); box-shadow: 0 0 12px rgba(95, 155, 255, .7); }
.profile-page .profile-stats dt { font: 700 .78rem/1.2 var(--font-display); color: var(--dim); }
.profile-page .profile-stats dd { margin: 6px 0 0; font: 700 clamp(1.16rem, 1.89vw, 1.5rem)/1 var(--font-display); letter-spacing: .02em; color: var(--frost); font-variant-numeric: tabular-nums; white-space: nowrap; }
.profile-page .profile-stats-note { margin: 0 4px 10px; color: var(--dim); font-size: .86rem; }
.profile-page .profile-body > .alert { margin-top: 4px; }

.profile-page .profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 3vw, 36px); align-items: start; margin-top: clamp(22px, 3vw, 34px); }
.profile-page .profile-activity { display: grid; gap: clamp(26px, 3vw, 36px); min-width: 0; }
.profile-page .profile-side { display: grid; gap: 18px; min-width: 0; }

.dir-page .activity-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; color: var(--mist); transition: background .15s; }
.dir-page .activity-row:hover { background: rgba(47, 107, 255, .09); color: var(--mist); }
.dir-page .activity-row .activity-icon { width: 38px; height: 38px; padding: 9px; border-radius: 10px; color: var(--ice); background: rgba(47, 107, 255, .12); border: 1px solid var(--line); }
.dir-page .activity-row > span { min-width: 0; }
.dir-page .activity-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.dir-page .activity-row small { display: block; color: var(--dim); font-size: .82rem; }
.dir-page .activity-row time { color: var(--dim); font-size: .82rem; white-space: nowrap; }
.dir-page .activity-row:hover b { color: #fff; }

.profile-page .profile-about h2 { margin: 0 0 12px; font-size: 1.35rem; overflow-wrap: anywhere; }
.profile-page .profile-about .eyebrow { margin-bottom: 8px; }
.profile-page .profile-about__text { margin: 0; color: #cfdcf0; line-height: 1.65; overflow-wrap: anywhere; }
.profile-page .profile-about__empty { margin: 0 0 12px; color: var(--dim); }
.profile-page .profile-facts { display: grid; gap: 12px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-page .profile-facts:empty { display: none; }
.profile-page .profile-facts > div { display: grid; gap: 3px; }
.profile-page .profile-facts dt { display: flex; align-items: center; gap: 8px; font: 700 .78rem/1.2 var(--font-display); color: var(--dim); }
.profile-page .profile-facts dt svg { width: 16px; height: 16px; color: var(--ice); }
.profile-page .profile-facts dd { margin: 0 0 0 24px; color: var(--frost); font-weight: 700; overflow-wrap: anywhere; }

/* Missing profile (404) */
.profile-page .dir-missing { padding-top: clamp(26px, 4vw, 44px); }
.profile-page .dir-missing__card { max-width: 660px; margin-inline: auto; padding: clamp(24px, 4vw, 36px); text-align: center; }
.profile-page .dir-missing__icon { width: 52px; height: 52px; margin-bottom: 6px; color: var(--sapphire-2); filter: drop-shadow(0 0 12px rgba(95, 155, 255, .6)); }
.profile-page .dir-missing__card h2 { margin: 0 0 18px; font-size: clamp(1.16rem, 2.06vw, 1.46rem); }
.profile-page .dir-missing__card .dir-toolbar { text-align: left; }
.profile-page .dir-missing__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 26px; margin: 22px 0 0; }

/* --------------------------------------------------------------------------
   Profile editor
   -------------------------------------------------------------------------- */
.profile-edit-page .edit-id { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 26px); }
.profile-edit-page .edit-id .avatar { --avatar: clamp(76px, 8vw, 96px); border: 0; box-shadow: 0 0 0 3px #0a1630, 0 0 0 5px rgba(196, 218, 250, .7), 0 0 0 9px rgba(47, 107, 255, .18), 0 14px 32px rgba(0, 0, 0, .5); }
.profile-edit-page .edit-id > div:last-child { min-width: 0; }
.profile-edit-page .edit-id h1 { margin-bottom: 8px; }
.profile-edit-page .edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 3vw, 36px); align-items: start; padding-top: clamp(24px, 3vw, 34px); }
.profile-edit-page .edit-main { min-width: 0; }
.profile-edit-page .edit-section { padding: clamp(18px, 2.6vw, 26px); margin-bottom: 18px; }
.profile-edit-page .edit-section__head { margin-bottom: 16px; }
.profile-edit-page .edit-section__head .eyebrow { margin-bottom: 6px; }
.profile-edit-page .edit-section__head h2 { margin: 0; font-size: clamp(1.12rem, 1.72vw, 1.33rem); }
.profile-edit-page .edit-section .field { margin-bottom: 18px; }
.profile-edit-page .edit-section .field:last-child { margin-bottom: 0; }
.profile-edit-page .edit-section .field > small { margin-top: -3px; }
.profile-edit-page .edit-section .dir-form__pair .field { margin-bottom: 0; }
.profile-edit-page .edit-section .dir-form__pair { gap: 18px 16px; margin: 2px 0 18px; }
.profile-edit-page .edit-section .dir-form__pair:last-child { margin-bottom: 0; }
.profile-edit-page .edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 6px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.profile-edit-page .edit-section textarea[name="bio"] { min-height: 92px; }
.profile-edit-page .edit-side .dir-card { position: sticky; top: calc(var(--header-h) + 18px); }
.profile-edit-page .edit-map { display: grid; gap: 16px; margin: 0 0 18px; padding: 0; list-style: none; }
.profile-edit-page .edit-map li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; }
.profile-edit-page .edit-map svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; color: var(--ice); background: rgba(47, 107, 255, .13); border: 1px solid var(--line); }
.profile-edit-page .edit-map b { display: block; font-size: .95rem; }
.profile-edit-page .edit-map small { display: block; color: var(--dim); font-size: .84rem; line-height: 1.45; }

/* --------------------------------------------------------------------------
   Clan emblem, recruitment and role chips
   -------------------------------------------------------------------------- */
.dir-page .clan-emblem {
  --em-hi: #7fb4ff; --em-a: #2f6bff; --em-b: #0d2a7a;
  position: relative; isolation: isolate; flex: none; display: grid; place-items: center; width: 60px; height: 68px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)) drop-shadow(0 0 10px rgba(47, 107, 255, .18));
}
.dir-page .clan-emblem::before, .dir-page .clan-emblem::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(50% 0, 100% 11%, 100% 58%, 50% 100%, 0 58%, 0 11%); }
.dir-page .clan-emblem::before { inset: 0; background: linear-gradient(180deg, #f4f8ff 0%, #9fb1cc 24%, #56688a 52%, #aebfd9 80%, #e9f0fb 100%); }
.dir-page .clan-emblem::after { inset: 3px; background: linear-gradient(118deg, transparent 0 40%, rgba(255, 255, 255, .14) 40% 50%, transparent 50%), radial-gradient(90% 60% at 50% 18%, var(--em-hi), transparent 70%), linear-gradient(180deg, var(--em-a), var(--em-b)); }
.dir-page .clan-emblem > span { margin-bottom: 12%; color: #fff; font: 700 1.05rem/1 var(--font-display); text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 12px rgba(0, 0, 0, .4); }
.dir-page .clan-emblem--long > span { font-size: .86rem; }
.dir-page .clan-emblem--pvp { --em-hi: #ff8a98; --em-a: #c3324a; --em-b: #4a0a18; }
.dir-page .clan-emblem--skilling { --em-hi: #8ff5dd; --em-a: #1f9f8a; --em-b: #06373d; }
.dir-page .clan-emblem--social { --em-hi: #cdb6ff; --em-a: #6c4fe0; --em-b: #231466; }
.dir-page .clan-emblem--competitive { --em-hi: #e6eefc; --em-a: #6f82a6; --em-b: #1c2840; }
.dir-page .clan-emblem--lg { width: clamp(96px, 10vw, 124px); height: clamp(109px, 11.4vw, 140px); filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .55)) drop-shadow(0 0 26px rgba(47, 107, 255, .3)); }
.dir-page .clan-emblem--lg::after { inset: 5px; }
.dir-page .clan-emblem--lg > span { font-size: clamp(1.29rem, 2.06vw, 1.68rem); }
.dir-page .clan-emblem--lg.clan-emblem--long > span { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }

.dir-page .recruit-chip, .dir-page .role-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 999px; font: 700 .78rem/1 var(--font-display); white-space: nowrap; color: var(--ice-2); background: rgba(47, 107, 255, .15); border: 1px solid rgba(110, 160, 255, .32); }
.dir-page .recruit-chip::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.dir-page .recruit-chip--open { color: #b8f5dc; background: rgba(70, 224, 160, .12); border-color: rgba(70, 224, 160, .38); }
.dir-page .recruit-chip--closed { color: var(--mist); background: rgba(255, 255, 255, .04); border-color: var(--line-2); }
.dir-page .role-chip svg { width: 13px; height: 13px; }
.dir-page .role-chip--owner { color: var(--gold-2); background: rgba(255, 203, 102, .1); border-color: rgba(255, 203, 102, .34); }
.dir-page .role-chip--member, .dir-page .role-chip--recruit { color: var(--mist); background: rgba(255, 255, 255, .04); border-color: var(--line-2); }

/* --------------------------------------------------------------------------
   Clan directory
   -------------------------------------------------------------------------- */
.clans-page .clan-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 272px 22px; gap: 20px; align-items: center; padding: 18px 20px; color: var(--mist); transition: background .15s; }
.clans-page .clan-row:hover { background: rgba(47, 107, 255, .09); color: var(--mist); }
.clans-page .clan-row:hover .dir-arrow { color: var(--ice); transform: translateX(3px); }
.clans-page .clan-directory-copy { min-width: 0; }
.clans-page .clan-focus { margin: 0 0 4px; font: 700 .8rem/1.2 var(--font-display); color: var(--ice); }
.clans-page .clan-directory-copy h2 { margin: 0 0 4px; font: 700 1.3rem/1.15 var(--font-display); overflow-wrap: anywhere; }
.clans-page .clan-directory-copy h2 small { margin-left: 4px; color: var(--dim); font-size: .8em; }
.clans-page .clan-directory-copy > p:last-child { display: -webkit-box; margin: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--dim); font-size: .92rem; line-height: 1.5; }
.clans-page .clan-stats { display: grid; grid-template-columns: 60px 60px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; }
.clans-page .clan-stats > div { display: grid; justify-items: center; gap: 6px; text-align: center; }
.clans-page .clan-stats dt { order: 2; font: 700 .74rem/1 var(--font-display); color: var(--dim); }
.clans-page .clan-stats dd { margin: 0; font: 700 1.35rem/1 var(--font-display); color: var(--frost); font-variant-numeric: tabular-nums; }
.clans-page .clan-stats .clan-stats__join dd { line-height: 1; }
.clans-page .clan-stats__join .recruit-chip { min-height: 24px; }

.clans-page .clan-guide dl { display: grid; gap: 14px; margin: 0; }
.clans-page .clan-guide dt { margin-bottom: 5px; }
.clans-page .clan-guide dd { margin: 0; color: var(--mist); font-size: .88rem; line-height: 1.5; }
.clans-page .clan-guide__note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: .84rem; }

/* --------------------------------------------------------------------------
   Clan page
   -------------------------------------------------------------------------- */
.clan-page .clan-banner { position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px, 3.4vw, 40px) 0 clamp(34px, 4.6vw, 52px); border-bottom: 1px solid var(--line); }
.clan-page .clan-banner__art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center 45%; opacity: .52; }
.clan-page .clan-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px 300px at calc(var(--gutter) + 90px) 60%, rgba(47, 107, 255, .24), transparent 70%), linear-gradient(90deg, rgba(6, 13, 29, .94) 0%, rgba(6, 13, 29, .74) 48%, rgba(6, 13, 29, .36) 100%), linear-gradient(0deg, var(--night-1) 0%, transparent 60%); }
.clan-page .clan-banner .breadcrumbs { margin-bottom: clamp(16px, 2.4vw, 26px); }
.clan-page .clan-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px clamp(20px, 3vw, 34px); align-items: center; }
.clan-page .clan-id__copy { min-width: 0; }
.clan-page .clan-id__copy .eyebrow { margin-bottom: 8px; }
.clan-page .clan-id h1 { margin: 0 0 10px; font-size: clamp(1.81rem, 3.61vw, 2.84rem); overflow-wrap: anywhere; text-shadow: 0 3px 22px rgba(0, 0, 0, .6); }
.clan-page .clan-id .lede { margin: 0; color: #d3dff1; font-size: 1.04rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.clan-page .clan-id__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--mist); font-size: .92rem; }
.clan-page .clan-id__meta li { display: inline-flex; align-items: center; gap: 8px; }
.clan-page .clan-id__meta svg { width: 18px; height: 18px; color: var(--ice); }
.clan-page .clan-id__tag b { font-family: var(--font-display); }
.clan-page .clan-join { display: grid; gap: 12px; justify-items: end; align-self: end; max-width: 280px; }
.clan-page .clan-join form { margin: 0; }
.clan-page .clan-join__status { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--mist); font-size: .9rem; line-height: 1.45; text-align: right; }
.clan-page .clan-join__status svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ice); }
.clan-page .directory-status { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(3, 9, 22, .6); border: 1px solid var(--line-2); color: var(--frost); font: 700 .85rem/1 var(--font-display); }
.clan-page .directory-status svg { width: 16px; height: 16px; color: var(--gold); }
.clan-page .directory-status svg:not(:first-child) { color: var(--ice); }

.clan-page .clan-body { padding-top: clamp(22px, 3vw, 32px); }
.clan-page .clan-requirements { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 clamp(22px, 3vw, 30px); padding: 16px 18px; border-radius: var(--r-md); background: linear-gradient(90deg, rgba(47, 107, 255, .12), rgba(47, 107, 255, .04)); border: 1px solid rgba(110, 160, 255, .28); }
.clan-page .clan-requirements > svg { flex: none; width: 24px; height: 24px; color: var(--ice); }
.clan-page .clan-requirements b { display: block; margin-bottom: 2px; font: 700 .84rem/1.3 var(--font-display); color: var(--ice-2); }
.clan-page .clan-requirements p { margin: 0; color: var(--frost); }
.clan-page .clan-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(24px, 3vw, 36px); align-items: start; }

.clan-page .member-roster article { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 13px 18px; transition: background .15s; }
.clan-page .member-roster article:hover { background: rgba(47, 107, 255, .07); }
.clan-page .member-roster .avatar { --avatar: 46px; }
.clan-page .roster-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.clan-page .roster-name a { font-size: 1.02rem; overflow-wrap: anywhere; }
.clan-page .roster-name a:hover .player-name:not(.coloured) { color: #fff; }
.clan-page .roster-name a:hover { text-decoration: underline; text-decoration-color: var(--line-3); }
.clan-page .roster-role { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.clan-page .roster-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font: 700 .78rem/1 var(--font-display); color: #ffe0b3; background: rgba(255, 183, 77, .1); border: 1px solid rgba(255, 183, 77, .38); }
.clan-page .roster-action { grid-column: 2 / -1; display: flex; justify-content: flex-end; margin: 0; }
.clan-page .roster-action .btn svg { width: 15px; height: 15px; }
.clan-page .member-roster article:has(.roster-action) { grid-template-columns: 46px minmax(0, 1fr) auto auto; }
.clan-page .member-roster article:has(.roster-action) .roster-action { grid-column: auto; }

.clan-page .clan-calendar { padding: 20px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(17, 35, 66, .74), rgba(9, 20, 40, .84)); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.clan-page .clan-calendar .dir-section__head h2 { font-size: 1.4rem; }
.clan-page .clan-events { display: grid; gap: 10px; }
.clan-page .clan-events article { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px; border-radius: var(--r-md); background: rgba(5, 12, 28, .5); border: 1px solid var(--line); }
.clan-page .clan-events time { display: grid; place-items: center; align-content: center; gap: 4px; height: 62px; border-radius: 10px; background: linear-gradient(180deg, #1a3666, #0b1a36); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset; }
.clan-page .clan-event__month { font: 700 .76rem/1 var(--font-display); color: var(--ice); }
.clan-page .clan-event__day { font: 700 1.44rem/1 var(--font-display); color: var(--frost); }
.clan-page .clan-event__copy { min-width: 0; }
.clan-page .clan-event__copy h3 { margin: 2px 0 4px; font-size: 1rem; overflow-wrap: anywhere; }
.clan-page .clan-event__copy p { margin: 0; color: var(--mist); font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.clan-page .clan-event__copy .clan-event__when { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--dim); font-size: .82rem; }
.clan-page .clan-event__when svg { width: 14px; height: 14px; }
.clan-page .clan-events__empty { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r-md); border: 1px dashed var(--line-2); background: rgba(5, 12, 28, .35); }
.clan-page .clan-events__empty > svg { flex: none; width: 34px; height: 34px; color: var(--sapphire-2); filter: drop-shadow(0 0 10px rgba(95, 155, 255, .5)); }
.clan-page .clan-events__empty h3 { margin: 0 0 2px; font-size: 1rem; }
.clan-page .clan-events__empty p { margin: 0; color: var(--dim); font-size: .88rem; }
.clan-page .clan-calendar .dir-compose { margin-top: 16px; box-shadow: none; }
.clan-page .clan-calendar .dir-form { padding: 16px; }

/* --------------------------------------------------------------------------
   Private messages — inbox
   -------------------------------------------------------------------------- */
.messages-page .mail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "inbox side"; gap: clamp(24px, 3vw, 36px); align-items: start; padding-top: clamp(24px, 3vw, 34px); }
.messages-page .mail-inbox { grid-area: inbox; min-width: 0; }
.messages-page .mail-side { grid-area: side; display: grid; gap: 16px; min-width: 0; }
.messages-page .mail-side > .alert { margin: 0; }
.messages-page .mail-privacy { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(10, 22, 42, .45); color: var(--dim); font-size: .85rem; line-height: 1.5; }
.messages-page .mail-privacy svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ice); }

.messages-page .thread-row { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center; padding: 15px 20px; color: var(--mist); transition: background .15s; }
.messages-page .thread-row:hover { background: rgba(47, 107, 255, .09); color: var(--mist); }
.messages-page .thread-initial { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #27497f, #0a1630); border: 1px solid var(--line-2); color: var(--ice-2); font: 700 1.15rem/1 var(--font-display); }
.messages-page .thread-copy { min-width: 0; }
.messages-page .thread-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.messages-page .thread-top h2 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 1rem/1.35 var(--font-text); letter-spacing: 0; text-transform: none; color: var(--mist); }
.messages-page .thread-top time { flex: none; color: var(--dim); font-size: .8rem; white-space: nowrap; }
.messages-page .thread-copy p { margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: .9rem; }
.messages-page .thread-copy small { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: .8rem; }
.messages-page .thread-new { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(47, 107, 255, .2); border: 1px solid rgba(110, 160, 255, .45); color: var(--ice-2); font: 700 .74rem/1 var(--font-display); }
.messages-page .thread-row.unread { background: rgba(47, 107, 255, .06); }
.messages-page .thread-row.unread::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--ice), var(--sapphire)); box-shadow: 0 0 10px rgba(95, 155, 255, .7); }
.messages-page .thread-row.unread .thread-top h2 { font-weight: 700; color: var(--frost); }
.messages-page .thread-row.unread .thread-copy p { color: var(--mist); }
.messages-page .thread-row.unread .thread-initial { color: #fff; background: linear-gradient(180deg, #4a84ff, #2350d8); border-color: #6c9dff; box-shadow: 0 4px 14px rgba(40, 100, 255, .35); }

/* --------------------------------------------------------------------------
   Conversation thread
   -------------------------------------------------------------------------- */
.conversation-page .conv-wrap { max-width: calc(900px + var(--gutter) * 2); }
.conversation-page .conv-head { position: relative; padding: clamp(24px, 3.6vw, 40px) 0 clamp(18px, 2.6vw, 26px); border-bottom: 1px solid var(--line); background: radial-gradient(760px 260px at 18% 0, rgba(47, 107, 255, .2), transparent 70%), linear-gradient(180deg, rgba(10, 22, 44, .6), transparent); }
.conversation-page .conv-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.conversation-page .conv-head__row > div:first-child { min-width: 0; }
.conversation-page .conv-head .eyebrow { margin-bottom: 8px; }
.conversation-page .conv-head h1 { margin: 0; max-width: 28ch; font-size: clamp(1.46rem, 2.58vw, 2.06rem); overflow-wrap: anywhere; }
.conversation-page .conv-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conversation-page .conv-head__actions .btn svg { width: 15px; height: 15px; }
.conversation-page .conv-body { padding-top: 20px; }
.conversation-page .conv-results .text-link { min-height: 36px; }
.conversation-page .directory-pagination { margin: 0 0 12px; }
.conversation-page .conversation + .directory-pagination { margin: 0 0 22px; }
.conversation-page .conversation { display: grid; gap: 16px; margin: 8px 0 24px; }
.conversation-page .conversation article { display: flex; align-items: flex-end; gap: 12px; max-width: min(82%, 680px); }
.conversation-page .conversation article.mine { flex-direction: row-reverse; margin-left: auto; }
.conversation-page .conversation .avatar { --avatar: 40px; }
.conversation-page .bubble { min-width: 0; padding: 11px 16px 13px; border-radius: 16px 16px 16px 5px; background: linear-gradient(180deg, rgba(20, 40, 74, .9), rgba(13, 28, 54, .92)); border: 1px solid var(--line-2); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.conversation-page .mine .bubble { border-radius: 16px 16px 5px 16px; background: linear-gradient(180deg, rgba(56, 108, 245, .42), rgba(30, 70, 196, .34)); border-color: rgba(130, 175, 255, .45); }
.conversation-page .bubble header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.conversation-page .mine .bubble header { justify-content: flex-end; }
.conversation-page .bubble header b { font-size: .9rem; }
.conversation-page .bubble time { color: var(--dim); font-size: .76rem; }
.conversation-page .mine .bubble time { color: #a9bddf; }
.conversation-page .bubble p { margin: 0; color: #dbe6f6; line-height: 1.6; overflow-wrap: anywhere; }
.conversation-page .conv-body > .alert { margin-bottom: 14px; }
.conversation-page .message-reply { display: grid; gap: 10px; padding: clamp(16px, 2.4vw, 22px); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(18, 38, 72, .8), rgba(9, 20, 40, .88)); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); scroll-margin-top: calc(var(--header-h) + 20px); }
.conversation-page .message-reply > label { font: 700 .84rem/1.2 var(--font-display); color: var(--ice); }
.conversation-page .message-reply textarea { min-height: 120px; }
.conversation-page .message-reply__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.conversation-page .message-reply__foot small { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); font-size: .82rem; }
.conversation-page .message-reply__foot small svg { flex: none; width: 15px; height: 15px; color: var(--ice); }

/* --------------------------------------------------------------------------
   Notifications
   -------------------------------------------------------------------------- */
.notifications-page .notif-wrap { max-width: calc(900px + var(--gutter) * 2); padding-top: clamp(22px, 3vw, 32px); }
.notifications-page .notif-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.notifications-page .notif-filter a { min-height: 36px; }
.notifications-page .notif-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.notifications-page .notif-actions .btn svg { width: 15px; height: 15px; }
.notifications-page .notif-clear { position: relative; }
.notifications-page .notif-clear > summary { list-style: none; }
.notifications-page .notif-clear > summary::-webkit-details-marker { display: none; }
.notifications-page .notif-clear[open] > summary { color: #ffd0d6; background: rgba(255, 107, 125, .1); }
.notifications-page .notif-clear__panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 290px; padding: 14px; border-radius: var(--r-md); background: linear-gradient(180deg, #13244a, #0b1731); border: 1px solid rgba(255, 107, 125, .45); box-shadow: var(--shadow-2); }
.notifications-page .notif-clear__panel p { margin: 0 0 12px; color: var(--mist); font-size: .88rem; line-height: 1.5; }
.notifications-page .notif-clear__panel .btn { width: 100%; }

.notifications-page .notif-item { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; gap: 14px; align-items: center; padding: 14px 18px 14px 20px; border-radius: inherit; color: var(--mist); transition: background .15s; }
.notifications-page .notif-item:hover { background: rgba(47, 107, 255, .09); color: var(--mist); }
.notifications-page .notif-item:hover .dir-arrow { color: var(--ice); transform: translateX(3px); }
.notifications-page .notif-item > span:first-child { --n-a: #27497f; --n-b: #0a1630; --n-fg: var(--ice-2); position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, var(--n-a), var(--n-b)); border: 1px solid var(--line-2); color: var(--n-fg); font: 700 1rem/1 var(--font-display); }
.notifications-page .notif-item--clan > span:first-child { --n-a: #1f7d70; --n-b: #06282c; --n-fg: #c9fbee; }
.notifications-page .notif-item--forum > span:first-child { --n-a: #3a4f9c; --n-b: #101a44; --n-fg: #d6e2ff; }
.notifications-page .notif-item--moderation > span:first-child, .notifications-page .notif-item--security > span:first-child { --n-a: #7a3a1c; --n-b: #2a1006; --n-fg: #ffe0b3; }
.notifications-page .notif-item--vote > span:first-child { --n-a: #5b3fb8; --n-b: #1c1150; --n-fg: #e3d8ff; }
.notifications-page .notif-copy { min-width: 0; }
.notifications-page .notif-copy b { display: block; color: var(--mist); font-size: .98rem; line-height: 1.35; overflow-wrap: anywhere; }
.notifications-page .notif-copy p { margin: 2px 0 4px; color: var(--dim); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.notifications-page .notif-copy small { display: flex; align-items: center; gap: 8px; margin-top: 3px; color: var(--dim); font-size: .8rem; }
.notifications-page .notif-new { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; background: rgba(47, 107, 255, .2); border: 1px solid rgba(110, 160, 255, .45); color: var(--ice-2); font: 700 .74rem/1 var(--font-display); }
.notifications-page .notif-item.unread { background: rgba(47, 107, 255, .065); }
.notifications-page .notif-item.unread:hover { background: rgba(47, 107, 255, .12); }
.notifications-page .notif-item.unread::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--ice), var(--sapphire)); box-shadow: 0 0 10px rgba(95, 155, 255, .7); }
.notifications-page .notif-item.unread .notif-copy b { color: var(--frost); }
.notifications-page .notif-item.unread > span:first-child::after { content: ""; position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--sapphire-2); box-shadow: 0 0 0 2px var(--night-2), 0 0 8px var(--sapphire-2); }
.notifications-page .notif-item:not(.unread) > span:first-child { opacity: .78; }

/* --------------------------------------------------------------------------
   Focus
   -------------------------------------------------------------------------- */
.dir-page .member-row:focus-visible, .dir-page .clan-row:focus-visible, .dir-page .thread-row:focus-visible, .dir-page .notif-item:focus-visible, .dir-page .activity-row:focus-visible, .dir-page .dir-shortcuts a:focus-visible { outline: 2px solid var(--ice); outline-offset: -2px; border-radius: var(--r-md); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .dir-page .dir-layout, .profile-edit-page .edit-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .clan-page .clan-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .messages-page .mail-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .profile-page .profile-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .members-page .member-row { grid-template-columns: 48px minmax(0, 1fr) 128px 64px; gap: 14px; }
  .members-page .member-list .dir-list__head { grid-template-columns: minmax(0, 1fr) 128px 64px; gap: 14px; }
  .clans-page .clan-row { grid-template-columns: 60px minmax(0, 1fr) 256px 22px; gap: 16px; }
  .clans-page .clan-stats { grid-template-columns: 54px 54px minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 900px) {
  .dir-page .dir-layout, .profile-edit-page .edit-layout, .clan-page .clan-layout, .profile-page .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .dir-page .dir-layout__side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .messages-page .mail-layout { display: flex; flex-direction: column; align-items: stretch; }
  .messages-page .mail-side { display: contents; }
  .messages-page .mail-side > .alert { order: 0; }
  .messages-page .mail-side > .dir-compose { order: 1; }
  .messages-page .mail-inbox { order: 2; }
  .messages-page .mail-privacy { order: 3; }
  .profile-edit-page .edit-side .dir-card { position: static; }
  /* Profile: introduction before activity, shortcuts last */
  .profile-page .profile-layout { display: flex; flex-direction: column; align-items: stretch; }
  .profile-page .profile-side { display: contents; }
  .profile-page .profile-about { order: 1; }
  .profile-page .profile-activity { order: 2; }
  .profile-page .dir-shortcuts { order: 3; }
  /* Clan: the short calendar before a long roster */
  .clan-page .clan-layout { display: flex; flex-direction: column; align-items: stretch; }
  .clan-page .clan-calendar { order: 1; }
  .clan-page #roster { order: 2; }
  .clan-page .clan-id { grid-template-columns: auto minmax(0, 1fr); }
  .clan-page .clan-join { grid-column: 1 / -1; justify-items: start; max-width: none; }
  .clan-page .clan-join__status { text-align: left; }
  .profile-page .profile-id { grid-template-columns: auto minmax(0, 1fr); }
  .profile-page .profile-id__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .profile-page .profile-stats { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-page .profile-stats > div:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
  .profile-page .profile-stats > div:last-child:nth-child(3n+2) { grid-column: span 2; }
}

@media (max-width: 720px) {
  .dir-page .dir-hero__inner { align-items: stretch; }
  .dir-page .dir-subnav { align-self: flex-start; }
  .dir-page .dir-toolbar { padding: 14px; }
  .dir-page .dir-field { min-width: 0; flex: 1 1 140px; }
  .dir-page .dir-field--grow { flex-basis: 100%; }
  .dir-page .dir-toolbar__submit { flex: 1 1 auto; }
  .dir-page .dir-list__head { display: none; }
  .dir-page .dir-form__pair { grid-template-columns: minmax(0, 1fr); }

  .members-page .member-row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "av copy posts" "av presence posts"; gap: 4px 14px; padding: 13px 16px; }
  .members-page .member-row .avatar { --avatar: 44px; grid-area: av; align-self: start; margin-top: 2px; }
  .members-page .member-copy { grid-area: copy; }
  .members-page .member-presence { grid-area: presence; font-size: .8rem; }
  .members-page .member-posts { grid-area: posts; font-size: 1.1rem; }

  .clans-page .clan-row { grid-template-columns: 52px minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .clans-page .clan-row .clan-emblem { width: 52px; height: 59px; align-self: start; }
  .clans-page .clan-row .clan-emblem > span { font-size: .92rem; }
  .clans-page .clan-row .clan-emblem--long > span { font-size: .74rem; }
  .clans-page .clan-stats { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px 16px; }
  .clans-page .clan-stats__join dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .clans-page .clan-stats > div { justify-items: start; text-align: left; }
  .clans-page .clan-row .dir-arrow { display: none; }
  .clans-page .clan-directory-copy h2 { font-size: 1.18rem; }

  .profile-page .profile-banner { padding-bottom: 76px; }
  .profile-page .profile-id { gap: 16px 18px; }
  .profile-page .profile-id .hero-avatar { --avatar: 88px; }
  .profile-page .profile-id h1 { font-size: clamp(1.55rem, 6.36vw, 1.98rem); margin-bottom: 10px; }
  .profile-page .profile-bio { grid-column: 1 / -1; }
  .profile-page .profile-id__meta .game-badge { width: 30px; height: 30px; }
  .profile-page .profile-id__meta .game-badge img { height: 13px; }
  .profile-page .profile-body { margin-top: -50px; }
  .profile-page .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-page .profile-stats > div { padding: 14px 16px; }
  .profile-page .profile-stats > div:last-child:nth-child(n) { grid-column: auto; }
  .profile-page .profile-stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .clan-page .clan-id { gap: 16px; }
  .clan-page .clan-id .lede { grid-column: 1 / -1; }
  .clan-page .member-roster article { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 14px; }
  .clan-page .member-roster .avatar { --avatar: 40px; grid-row: span 2; align-self: start; }
  .clan-page .roster-role { justify-content: flex-start; }
  .clan-page .roster-action, .clan-page .member-roster article:has(.roster-action) .roster-action { grid-column: 2; justify-content: flex-start; }
  .clan-page .member-roster article:has(.roster-action) { grid-template-columns: 40px minmax(0, 1fr); }
  .clan-page .clan-calendar { padding: 16px; }

  .messages-page .thread-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; }
  .messages-page .thread-initial { width: 40px; height: 40px; font-size: 1rem; }

  .conversation-page .conversation article { max-width: 94%; gap: 8px; }
  .conversation-page .conversation .avatar { --avatar: 32px; }
  .conversation-page .conv-head__actions { width: 100%; }
  .conversation-page .conv-head__actions .btn { flex: 1 1 0; }

  .notifications-page .notif-toolbar { align-items: stretch; }
  .notifications-page .notif-filter { align-self: flex-start; }
  .notifications-page .notif-actions { width: 100%; }
  .notifications-page .notif-actions > .btn, .notifications-page .notif-clear { flex: 1 1 0; }
  .notifications-page .notif-clear > summary { width: 100%; }
  .notifications-page .notif-clear__panel { left: auto; right: 0; width: min(290px, calc(100vw - 32px)); }
  .notifications-page .notif-item { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 13px 16px; }
  .notifications-page .notif-item > span:first-child { width: 38px; height: 38px; }
  .notifications-page .notif-item .dir-arrow { display: none; }

  .dir-page .directory-pagination { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "nums nums" "prev next" "count count"; }
  .dir-page .directory-pagination .page-numbers { grid-area: nums; }
  .dir-page .directory-pagination .page-prev { grid-area: prev; }
  .dir-page .directory-pagination .page-next { grid-area: next; }
  .dir-page .directory-pagination .page-count { grid-area: count; }

  .profile-edit-page .edit-id { flex-direction: column; align-items: flex-start; gap: 14px; }
  .conversation-page .message-reply__foot .btn { flex: 1 1 100%; }
  .profile-edit-page .edit-actions .btn { flex: 1 1 0; }
}

@media (max-width: 560px) {
  .clan-page .clan-id { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .clan-page .clan-id h1 { font-size: clamp(1.63rem, 7.22vw, 2.06rem); }
}

@media (max-width: 420px) {
  .dir-page .dir-subnav a { padding: 0 13px; }
  .dir-page .dir-card { padding: 18px 16px; }
  .members-page .member-row { gap: 4px 12px; padding: 12px 14px; }
  .profile-page .profile-id .hero-avatar { --avatar: 72px; }
  .profile-page .profile-id__actions .btn { flex: 1 1 auto; }
  .profile-page .profile-stats dd { font-size: 1.25rem; }
  .dir-page .activity-row { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 14px; gap: 4px 12px; }
  .dir-page .activity-row .activity-icon { width: 34px; height: 34px; padding: 8px; grid-row: span 2; }
  .dir-page .activity-row time { grid-column: 2; font-size: .78rem; }
  .clan-page .clan-emblem--lg { width: 72px; height: 82px; }
  .clan-page .clan-emblem--lg > span { font-size: 1.2rem; }
  .clan-page .clan-emblem--lg.clan-emblem--long > span { font-size: .95rem; }
  .clan-page .clan-join .gem-btn { width: 100%; }
  .profile-edit-page .edit-id .avatar { --avatar: 64px; }
  .conversation-page .bubble { padding: 10px 13px 12px; }
}

@media (max-width: 380px) {
  .dir-page .dir-subnav { width: 100%; }
  .dir-page .dir-subnav a { flex: 1 1 auto; justify-content: center; padding: 0 7px; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dir-page .dir-arrow, .dir-page .dir-compose__toggle, .dir-page .dir-compose__toggle::after, .dir-page .game-badge::after { transition: none; }
}
