.guilds-page {
	margin: 0 3px;
	color: #3a2410;
}

.guilds-status {
	text-align: center;
	font-size: 14px;
	font-weight: bold;
	padding: 8px 10px;
	margin: 0 0 12px;
	border: 1px solid #8a4b1f;
	border-radius: 3px;
	background: linear-gradient(180deg, #f7ebcf 0%, #e8d4b0 100%);
}

.guilds-status--on strong {
	color: #1a7a1a;
}

.guilds-status--off {
	color: #8b0000;
	background: linear-gradient(180deg, #f5d0d0 0%, #e8b0b0 100%);
	font-weight: normal;
}

.guilds-empty {
	text-align: center;
	padding: 18px 10px;
	color: #5a3a1a;
	font-size: 13px;
}

.guilds-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.guild-card {
	border: 2px solid #8a4b1f;
	border-radius: 4px;
	background: linear-gradient(180deg, #f7ebcf 0%, #e0c48a 100%);
	box-shadow: 0 2px 0 #1a0d07, inset 0 1px 0 rgba(255, 255, 255, 0.35);
	overflow: hidden;
}

.guild-card__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px 8px 8px;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.guild-card__head::-webkit-details-marker {
	display: none;
}

.guild-card__head::marker {
	content: "";
}

.guild-card__outfit {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.guild-card__outfit img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: contain;
	object-position: center center;
	image-rendering: pixelated;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.guild-card__meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.guild-card__name {
	font-size: 15px;
	font-weight: bold;
	color: #1a0d07;
	line-height: 1.2;
	word-break: break-word;
}

.guild-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font-size: 11px;
	color: #5a3a1a;
}

.guild-card__leader {
	opacity: 0.95;
}

.guild-card__toggle {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	position: relative;
	opacity: 0.7;
}

.guild-card__toggle::before,
.guild-card__toggle::after {
	content: "";
	position: absolute;
	background: #6a3a12;
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.guild-card__toggle::before {
	top: 8px;
	left: 2px;
	width: 14px;
	height: 2px;
}

.guild-card__toggle::after {
	top: 2px;
	left: 8px;
	width: 2px;
	height: 14px;
}

.guild-card[open] .guild-card__toggle::after {
	opacity: 0;
	transform: scaleY(0);
}

.guild-card[open] .guild-card__head {
	border-bottom: 1px solid rgba(138, 75, 31, 0.45);
	background: linear-gradient(180deg, #f3e2b8 0%, #e8d09a 100%);
}

.guild-card__body {
	padding: 10px 10px 12px;
	background: rgba(255, 248, 230, 0.45);
	animation: guilds-open 0.22s ease;
}

@keyframes guilds-open {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.guild-members {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.guild-member {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	text-decoration: none;
	color: #2b140a;
	border: 1px solid rgba(138, 75, 31, 0.55);
	border-radius: 3px;
	background: linear-gradient(180deg, #fff8e8 0%, #f0dfb8 100%);
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.guild-member:hover,
.guild-member:focus {
	border-color: #c45a00;
	transform: translateX(2px);
	box-shadow: 0 0 8px rgba(196, 90, 0, 0.25);
	text-decoration: none;
	color: #1a0d07;
}

.guild-member--owner {
	border-color: #a06a18;
	background: linear-gradient(180deg, #fff3d0 0%, #ebd08a 100%);
}

.guild-member__outfit {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.guild-member__outfit img {
	display: block;
	width: 48px;
	height: 48px;
	image-rendering: pixelated;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}

.guild-member__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.guild-member__name {
	font-size: 12px;
	font-weight: bold;
	line-height: 1.2;
	word-break: break-word;
}

.guild-member:hover .guild-member__name {
	color: #8b2500;
}

.guild-member__rank {
	font-size: 11px;
	color: #5a3a1a;
}

.guild-member__nick {
	font-size: 10px;
	font-style: italic;
	color: #7a5530;
}

.guild-member__lvl {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: bold;
	color: #5a3a1a;
	white-space: nowrap;
}

.guild-card__footer {
	margin-top: 10px;
	text-align: right;
}

.guild-card__link {
	font-size: 12px;
	font-weight: bold;
	color: #8b2500;
	text-decoration: none;
}

.guild-card__link:hover {
	color: #c45a00;
	text-decoration: underline;
}

.guilds-back {
	margin: 0 0 10px;
	font-size: 12px;
}

.guilds-back a {
	color: #8b2500;
	font-weight: bold;
	text-decoration: none;
}

.guilds-back a:hover {
	color: #c45a00;
	text-decoration: underline;
}

.guild-detail {
	border: 2px solid #8a4b1f;
	border-radius: 4px;
	padding: 12px 10px;
	background: linear-gradient(180deg, #f7ebcf 0%, #e0c48a 100%);
	box-shadow: 0 2px 0 #1a0d07, inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.guild-detail__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(138, 75, 31, 0.45);
}

.guild-detail__name {
	margin: 0 0 4px;
	font-size: 18px;
	color: #1a0d07;
	line-height: 1.2;
	word-break: break-word;
}

.guild-detail__stats {
	margin: 0;
	font-size: 12px;
	color: #5a3a1a;
}

.guild-detail__stats strong {
	color: #1a0d07;
}

@media (max-width: 520px) {
	.guild-card__head {
		padding: 8px;
	}

	.guild-card__stats {
		flex-direction: column;
		gap: 2px;
	}

	.guild-member__lvl {
		align-self: flex-start;
	}
}
