/* Clans and invite links (#/clan, #/join/<code>, МОЙ КЛАН in СООБЩЕСТВО). */
.open-clan .btn { justify-self: end; }
.group-create { display: grid; gap: 10px; margin-top: 8px; }
.group-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.group-leave { margin-top: 16px; width: 100%; }

.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.member-row.self { box-shadow: var(--bevel), inset 0 0 0 2px var(--accent); }
.member-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.owner-tag { font-family: var(--font-pixel); font-size: 8px; color: var(--accent); }

.invite-box { display: grid; gap: 10px; }
.invite-link {
  display: block; padding: 8px; background: var(--ink); color: var(--accent-2);
  font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; user-select: all;
}

.clan-rank { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.clan-rank > .btn { grid-column: 1 / -1; justify-self: start; }
.clan-place { font-family: var(--font-pixel); font-size: 18px; color: var(--accent); }
.clan-cta { margin-top: 10px; display: inline-flex; }

.join-card { display: grid; gap: 10px; justify-items: start; }
.join-kind { font-family: var(--font-pixel); font-size: 9px; color: var(--accent-2); }
.join-guest { display: grid; gap: 10px; }

/* Clan roles: a coloured tag per member, the hierarchy list, the editor's swatches and rights. */
.role-tag {
  flex: none; padding: 3px 6px; font-family: var(--font-pixel); font-size: 7px; color: var(--role, var(--muted));
  border: 2px solid var(--role, var(--line)); background: color-mix(in srgb, var(--role, transparent) 15%, transparent);
}
.role-tag.member { color: var(--muted); border-color: var(--line); background: none; }
.member-row .role-tag { margin-left: auto; }
.member-row .role-tag ~ .btn { flex: none; }
.clan-my-role { display: flex; align-items: center; gap: 8px; margin: 0; }
.role-about { margin: 0 0 8px; font-size: 13px; }
.role-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.role-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
.role-rights { flex: 1; min-width: 120px; font-size: 13px; }
.role-controls { display: flex; gap: 2px; }
.role-add { width: 100%; margin-top: 8px; }
.role-options { display: grid; gap: 6px; }
.role-option { justify-content: space-between; text-transform: none; }
.role-option.current { box-shadow: var(--bevel), inset 0 0 0 2px var(--accent-2); }
.role-option .muted { font-family: var(--font-body); font-size: 12px; }
.role-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.role-swatch { width: 34px; height: 34px; background: var(--role); border: 3px solid var(--ink); cursor: pointer; }
.role-swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px var(--text); }
.role-right { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 15px; }
.role-right input { width: 20px; height: 20px; accent-color: var(--accent-2); }

/* The clan stash: garage cards that open the catches behind a model. */
.clan-stash-btn { width: 100%; margin: 10px 0 2px; }
.stash-card { position: relative; font: inherit; color: inherit; cursor: pointer; }
.stash-count { position: absolute; top: 4px; right: 4px; padding: 2px 4px; font-family: var(--font-pixel); font-size: 7px; color: var(--ink); background: var(--accent); }
.stash-catch { display: grid; grid-template-columns: 72px 1fr; gap: 10px; padding: 6px; }
.stash-catch .thumb { width: 72px; height: 54px; }
