.band-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.band-card {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.band-card h3 {
  margin-top: 0;
  font-family: 'mabinogi_classic';
}

.band-card p {
  flex-grow: 1;
  margin: 0.5rem 0 1rem;
  white-space: pre-line;
}

.band-card button {
  align-self: flex-end;
}

.search-form {
  margin: 1rem 0;
  display: flex;
  gap: 0.5rem;
}

.small-info {
  font-size: 0.85rem;
  color: var(--text-color-light, #666);
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}
.leader-info { margin-top: 0; }

.server-badge {
  background: var(--button-bg);
  color: var(--button-text);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-right: 0.3rem;
}

.me-badge {
  background: var(--button-hover-bg);
  color: var(--button-text);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-right: 0.3rem;
}

.rank-badge {
  color: var(--button-text);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-right: 0.3rem;
}
.rank-badge.leader { background: #c91c1c; }
.rank-badge.vice { background: #e67e22; }
.rank-badge.member { background: #3498db; }

#band-modal .modal-content {
  max-width: 500px;
}

.band-header .controls {
  margin-top: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.small-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--link-color, #007bff);
}

.small-link:hover {
  text-decoration: underline;
}

.member-list,
.pending-list {
  list-style: none;
  padding: 0;
}

.member-list li,
.pending-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
}

.member-list li button.small-btn:first-of-type,
.pending-list li button.small-btn:first-of-type {
  margin-left: auto;
}

.member-list li button.small-btn:not(:first-of-type),
.pending-list li button.small-btn:not(:first-of-type) {
  margin-left: 0.25rem;
}

.inst {
  color: var(--text-color-light, #666);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-bg);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  background: var(--modal-content-bg);
  color: var(--modal-content-text);
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.band-create-form {
  max-width: 500px;
  margin: 0 auto;
}

#apply-modal textarea,
#apply-modal input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  resize: vertical;
}
.band-create-form textarea,
.band-create-form input,
#edit-modal textarea,
#edit-modal input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  resize: vertical;
}

#intro-modal p {
  white-space: pre-line;
  margin: 0.5rem 0;
}

.kick-btn {
    background-color: #ff0000b0;
    color: wheat;
}

.introTitle {
	font-family: 'mabinogi_classic';
    font-size: 1.5rem;
}
.intro-content {
	padding: 1rem;
}
.section h3 {
	font-family: 'mabinogi_classic';
}
.filter-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  width: 100%
}
.filter-buttons::-webkit-scrollbar {
  display: none;
}
.filter-button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: #e5e7eb;
  color: #2d3436;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.filter-button.active {
  background: #0984e3;
  color: #fff;
  font-weight: bold;
}
.server-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.4rem;
}

#filter-form {
	display: block !important;
}
@media (max-width: 600px) {
    .filter-button {
        flex: 0 0 auto;
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}