.crew-detail {
	&__header {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 16px;
		margin-bottom: 14px;

		@media (max-width: 768px) {
			flex-direction: column;
			gap: 12px;
		}
	}

	&__info {
		flex: 1;
		min-width: 0;
	}

	&__title {
		font-size: 1.5rem;
		font-weight: 700;
		margin: 0;
		line-height: 1.3;
	}

	&__desc {
		color: var(--muted-foreground);
		font-size: 0.875rem;
		margin-top: 4px;
	}

	&__actions {
		display: flex;
		gap: 8px;
		flex-shrink: 0;
		align-items: center;
	}
}

.crew-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--border);
	margin-bottom: 24px;

	@media (max-width: 768px) {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;

		&::-webkit-scrollbar {
			display: none;
		}
	}

	&__item {
		padding: 14px 24px;
		border: none;
		background: none;
		cursor: pointer;
		font-size: 0.875rem;
		font-weight: 500;
		color: var(--muted-foreground);
		border-bottom: 3px solid transparent;
		margin-bottom: -1px;
		transition: color 0.15s;
		white-space: nowrap;
		letter-spacing: 0.01em;

		&:first-of-type {
			padding-left: 0;
		}

		&:hover {
			color: var(--foreground);
		}

		&--active {
			color: var(--foreground);
			font-weight: 600;
			border-bottom-color: hsl(var(--foreground));
		}
	}

	&__content {
		min-height: 200px;
	}
}

.crew-members {
	&__toolbar {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 0;

		@media (max-width: 768px) {
			align-items: flex-start;
			gap: 8px;
		}
	}

	&__subtitle {
		font-size: 1rem;
		font-weight: 600;
		margin: 0;
	}

	&__actions {
		display: flex;
		gap: 8px;
	}

	.studio-page__table-wrap {
		@media (max-width: 768px) {
			overflow-x: auto;
		}
	}

	.studio-page__table {
		@media (max-width: 768px) {
			min-width: 640px;
		}
	}
}

.crew-invite {
	margin-bottom: 24px;
	padding: 16px;
	border: 1px solid hsl(var(--border));
	border-radius: 8px;

	@media (min-width: 1024px) {
		max-width: 420px;
	}

	&__legend {
		font-size: 0.875rem;
		font-weight: 600;
		padding: 0 6px;
	}

	&__body {
		display: flex;
		gap: 8px;
		align-items: center;

		@media (max-width: 768px) {
			flex-direction: column;
		}
	}

	&__input {
		flex: 1;
		font-family: monospace;
		font-size: 1rem;
		font-weight: 600;
		letter-spacing: -1px;

		@media (max-width: 768px) {
			width: 100%;
		}
	}

	&__actions {
		display: flex;
		gap: 8px;
		flex-shrink: 0;

		@media (max-width: 768px) {
			width: 100%;

			> button {
				flex: 1;
			}
		}
	}
}

.member-search {
	position: relative;

	&__input {
		width: 100%;
		padding: 8px 12px;
		border: 1px solid var(--border-default);
		border-radius: 6px;
		font-size: 0.875rem;
		background: var(--background);
		color: var(--foreground);
	}

	&__results {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 10;
		background: var(--background);
		border: 1px solid var(--border);
		border-radius: 6px;
		max-height: 240px;
		overflow-y: auto;
		margin-top: 4px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	}

	&__item {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 8px 12px;
		cursor: pointer;
		border: none;
		background: none;
		width: 100%;
		text-align: left;
		font: inherit;
		color: var(--foreground);

		&:hover {
			background: var(--accent);
		}
	}

	&__thumb {
		width: 32px;
		height: 32px;
		border-radius: 50%;
		background: var(--muted);
		object-fit: cover;
	}

	&__info {
		flex: 1;
		min-width: 0;
	}

	&__name {
		font-weight: 500;
		font-size: 0.875rem;
	}

	&__email {
		font-size: 0.75rem;
		color: var(--muted-foreground);
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	&__channel {
		font-size: 0.75rem;
		color: var(--primary);
	}
}

// ── 위젯 설정 탭 ──────────────────────────────────
.crew-widget {
	.studio-page__table-wrap {
		@media (max-width: 768px) {
			overflow-x: auto;
		}
	}

	.studio-page__table {
		@media (max-width: 768px) {
			min-width: 640px;
		}
	}
}

// ── 세션 탭 ────────────────────────────────────
.session-active {
	margin-bottom: 32px;

	&__card {
		border: 1px solid var(--border);
		border-radius: 8px;
		padding: 20px;
		background: var(--card);

		@media (max-width: 768px) {
			padding: 14px;
		}
	}

	&__top {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 16px;

		@media (max-width: 768px) {
			flex-direction: column;
			align-items: flex-start;
			gap: 10px;
		}
	}

	&__info {
		display: flex;
		align-items: center;
		gap: 12px;

		@media (max-width: 768px) {
			flex-wrap: wrap;
		}
	}

	&__session-title {
		font-size: 1.1rem;
		font-weight: 600;
	}

	&__stats {
		display: flex;
		gap: 24px;
		margin-bottom: 20px;
		padding: 12px 16px;
		background: var(--accent);
		border-radius: 6px;

		@media (max-width: 768px) {
			flex-direction: column;
			gap: 12px;
		}
	}

	&__stat {
		text-align: center;

		@media (max-width: 768px) {
			display: flex;
			align-items: center;
			justify-content: space-between;
			text-align: left;
		}

		&-value {
			font-size: 1.5rem;
			font-weight: 700;
			color: var(--primary);

			@media (max-width: 768px) {
				font-size: 1.25rem;
			}
		}

		&-label {
			font-size: 0.75rem;
			color: var(--muted-foreground);
			margin-top: 2px;

			@media (max-width: 768px) {
				margin-top: 0;
			}
		}
	}

	.studio-page__table-wrap {
		@media (max-width: 768px) {
			overflow-x: auto;
		}
	}

	.studio-page__table {
		@media (max-width: 768px) {
			min-width: 480px;
		}
	}
}

.session-consents {
	margin-bottom: 16px;

	&__title {
		font-size: 0.875rem;
		font-weight: 600;
		margin-bottom: 8px;
	}

	&__list {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;

		@media (max-width: 768px) {
			gap: 6px;
		}
	}

	&__item {
		display: flex;
		align-items: center;
		gap: 6px;
		padding: 6px 12px;
		border-radius: 20px;
		font-size: 0.875rem;
		border: 1px solid var(--border);

		&--consented {
			background: hsl(var(--primary) / 0.1);
			border-color: hsl(var(--primary) / 0.3);
		}

		&--pending {
			background: var(--accent);
		}
	}

	&__icon {
		font-size: 0.875rem;
	}
}

.session-start {
	border: 2px dashed var(--border);
	border-radius: 8px;
	padding: 32px;
	text-align: center;
	margin-bottom: 0;

	@media (max-width: 768px) {
		padding: 20px;
	}

	&__title {
		font-size: 1.1rem;
		font-weight: 600;
		margin-bottom: 16px;
	}

	&__form {
		display: flex;
		gap: 12px;
		justify-content: center;
		align-items: center;
		max-width: 480px;
		margin: 0 auto;

		@media (max-width: 768px) {
			flex-direction: column;
		}
	}

	&__input {
		flex: 1;
		padding: 8px 12px;
		font-size: 0.875rem;

		@media (max-width: 768px) {
			width: 100%;
		}
	}
}

.session-history {
	&__title {
		font-size: 1rem;
		font-weight: 600;
		margin-bottom: 16px;
	}

	.studio-page__table-wrap {
		@media (max-width: 768px) {
			overflow-x: auto;
		}
	}

	.studio-page__table {
		@media (max-width: 768px) {
			min-width: 580px;
		}
	}
}

// ── 멤버 아바타 ─────────────────────────────────
.member-row {
	&__thumb {
		width: 28px;
		height: 28px;
		border-radius: 50%;
		background: var(--muted);
		object-fit: cover;
		vertical-align: middle;
		margin-right: 8px;
	}
}