.chatraumToolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
	align-items: center;
}

.chatraumToolbar select,
.chatraumToolbar input[type="search"] {
	min-height: 42px;
	border: 1px solid #d7dee8;
	border-radius: 10px;
	background: #fff;
	padding: 0 12px;
}

.chatraumToolbar__search {
	margin-left: auto;
}

.chatraumToolbar__search input {
	min-width: min(280px, 70vw);
}

.chatraumGrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.chatraumCard {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(16, 24, 40, 0.06);
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 12px 32px rgba(22, 34, 58, 0.07);
	min-height: 100%;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.chatraumCard:hover {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(22, 34, 58, 0.12);
}

.chatraumCard__art {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 148px;
	background:
		radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.55), transparent 46%),
		linear-gradient(160deg, var(--chat-accent, #3aa0ff), color-mix(in srgb, var(--chat-accent, #3aa0ff) 28%, #152033));
}

.chatraumCard__emoji {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.22);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38), 0 12px 24px rgba(0, 0, 0, 0.12);
	font-size: 42px;
	line-height: 1;
}

.chatraumCard__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	padding: 16px;
}

.chatraumCard__category {
	align-self: flex-start;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f2f4f7;
	color: #475467;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.chatraumCard__body h2 {
	margin: 0;
	font-size: 20px;
	letter-spacing: -0.02em;
}

.chatraumCard__body p {
	margin: 0;
	color: #667085;
	font-size: 14px;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.chatraumCard__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}

.chatraumCard__joiners {
	display: flex;
	flex-direction: column;
	line-height: 1.05;
}

.chatraumCard__joiners strong {
	font-size: 22px;
	color: #1c2430;
}

.chatraumCard__joiners span {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #98a2b3;
}

.chatraumJoin {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 118px;
	min-height: 40px;
	padding: 0 16px;
	border-radius: 12px;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	background: linear-gradient(90deg, #3ec6ff, #2f7bff);
	box-shadow: 0 8px 16px rgba(47, 123, 255, 0.28);
}

.chatraumJoin:hover,
.chatraumJoin:focus {
	color: #fff;
	text-decoration: none;
	filter: brightness(1.05);
}

.chatShell {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	grid-template-rows: auto minmax(560px, calc(100vh - 210px)) auto;
	grid-template-areas:
		"bar bar"
		"log users"
		"composer users";
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: calc(100vh - 190px);
	border: 1px solid rgba(16, 24, 40, 0.08);
	border-radius: 14px;
	overflow: hidden;
	background: #f6f3ec;
}

.chatShell__bar {
	grid-area: bar;
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	max-width: 100%;
	padding: 10px 14px;
	background: #1c2430;
	color: #fff;
}

.chatShell__bar h2 {
	margin: 0;
	min-width: 0;
	font-size: 18px;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chatShell__back {
	border: 0;
	background: transparent;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

.chatShell__leave {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 14px 0 10px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.chatShell__leave svg {
	width: 16px;
	height: 16px;
	display: block;
	flex: none;
}

.chatShell__leave:hover,
.chatShell__leave:focus {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.38);
	color: #fff;
	text-decoration: none;
}

.chatShell__usersToggle {
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	min-height: 34px;
	padding: 0 12px;
	background: transparent;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.chatShell__log {
	grid-area: log;
	min-width: 0;
	max-width: 100%;
	min-height: 0;
	overflow: auto;
	padding: 22px 16px 16px;
	background-color: #f7f4ee;
	background-image: radial-gradient(rgba(28, 36, 48, 0.06) 1.1px, transparent 1.1px);
	background-size: 18px 18px;
}

.chatShell__side {
	grid-area: users;
	background: #fff;
	border-left: 1px solid #e7e7e7;
	padding: 14px;
	overflow: auto;
}

.chatShell__side h3 {
	margin: 0 0 8px;
	font-size: 15px;
}

.chatShell__about {
	color: #667085;
	font-size: 13px;
}

.chatShell__composer {
	grid-area: composer;
	min-width: 0;
	max-width: 100%;
	background: #fff;
	border-top: 1px solid #e7e7e7;
	padding: 10px;
}

.chatComposer,
#chatraumForm {
	display: block;
	min-width: 0;
	max-width: 100%;
}

.chatMsg {
	display: flex;
	gap: 8px;
	margin: 0 0 14px;
}

.chatMsg--own {
	flex-direction: row-reverse;
}

.chatMsg__avatar,
.chatUser__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	flex: none;
}

.chatMsg__bubble {
	max-width: min(82%, 720px);
	background: #fff;
	border-radius: 14px;
	padding: 8px 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.chatMsg--own .chatMsg__bubble {
	background: #e7f6ff;
}

.chatMsg__bubble--image {
	background: transparent;
	box-shadow: none;
	padding: 0;
}

.chatMsg__meta {
	display: flex;
	gap: 8px;
	align-items: baseline;
	font-size: 12px;
	color: #667085;
}

.chatMsg__meta strong {
	color: #1c2430;
}

.chatMsg__delete {
	margin-left: auto;
	border: 0;
	background: none;
	color: #667085;
	cursor: pointer;
	font-size: 12px;
	padding: 0;
}

.chatMsg__delete:hover,
.chatMsg__delete:focus {
	color: #b42318;
	text-decoration: underline;
}

.chatPrivacy {
	margin: 8px 0 0;
	color: #667085;
	font-size: 12px;
	line-height: 1.45;
}

.chatPrivacyGate {
	max-width: 640px;
	margin: 24px auto;
	padding: 28px 28px 24px;
	background: #fff;
	border: 1px solid rgba(16, 24, 40, 0.06);
	border-radius: 22px;
	box-shadow: 0 12px 32px rgba(22, 34, 58, 0.07);
}

.chatPrivacyGate h2 {
	margin: 0 0 12px;
	font-size: 22px;
	letter-spacing: -0.02em;
}

.chatPrivacyGate p {
	margin: 0;
	color: #344054;
	font-size: 15px;
	line-height: 1.55;
}

.chatPrivacyGate__check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 18px;
	font-weight: 600;
}

.chatPrivacyGate__check input {
	margin-top: 3px;
}

.chatPrivacyGate__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 18px;
}

.chatPrivacyGate__back {
	color: #667085;
	font-weight: 600;
	text-decoration: none;
}

.chatPrivacyGate__back:hover,
.chatPrivacyGate__back:focus {
	color: #1c2430;
}

.chatMsg__text {
	margin: 4px 0 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 15px;
	line-height: 1.45;
}

.chatImage {
	display: inline-flex;
	align-items: flex-end;
	gap: 8px;
	margin-top: 6px;
	max-width: 100%;
}

.chatMsg--own .chatImage {
	flex-direction: row-reverse;
}

.chatImage__frame {
	position: relative;
	width: min(320px, calc(100% - 44px));
}

.chatImage img {
	display: block;
	width: 100%;
	max-height: 360px;
	object-fit: cover;
	border-radius: 12px;
	background: #1c2430;
}

.chatImage__time {
	position: absolute;
	right: 8px;
	bottom: 8px;
	color: #fff;
	font-size: 12px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.chatReactSide {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: none;
}

.chatReactToggle {
	position: static;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #3b82f6;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	cursor: pointer;
	padding: 5px;
	z-index: 2;
}

.chatReactToggle svg {
	width: 100%;
	height: 100%;
	display: block;
}

.chatReactBar {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	top: auto;
	transform: translateX(-50%);
	gap: 6px;
	align-items: center;
	padding: 6px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
	z-index: 3;
}

.chatImage:hover .chatReactBar,
.chatImage:focus-within .chatReactBar,
.chatImage.is-open .chatReactBar {
	display: flex;
}

.chatReact {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #ffe8a3;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.chatReact svg {
	width: 22px;
	height: 22px;
}

.chatReact--like {
	background: #1877f2;
}

.chatReact--heart {
	background: #f33e5b;
}

.chatReact.is-selected {
	outline: 2px solid #1c2430;
	outline-offset: 1px;
	box-shadow: inset 0 0 0 2px #fff;
}

.chatReactSummary {
	position: static;
	z-index: 2;
}

.chatReactSummary__pill {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: #fff;
	border-radius: 999px;
	padding: 2px 8px 2px 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
	font-size: 14px;
}

.chatReactSummary__count {
	margin-left: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #344054;
}

.chatComposer__field {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.chatComposer__field + .chatComposer__field {
	margin-top: 8px;
}

.chatGuestName,
.chatComposer textarea {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	margin: 0;
}

.chatGuestName {
	min-height: 36px;
	border: 1px solid #d7dee8;
	border-radius: 10px;
	padding: 0 10px;
}

.chatComposer textarea {
	resize: none;
	border: 1px solid #d7dee8;
	border-radius: 10px;
	padding: 8px 10px;
	min-height: 52px;
	height: 52px;
}

.chatComposer__tools {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.chatComposer__tools .button {
	margin-left: auto;
}

.chatDiceMenu {
	position: relative;
}

.chatDiceMenu__panel {
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 148px;
	padding: 8px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(16, 24, 40, 0.16);
	z-index: 20;
}

.chatDiceMenu__panel button {
	border: 0;
	background: #f2f4f7;
	border-radius: 10px;
	min-height: 36px;
	padding: 0 12px;
	text-align: left;
	font-weight: 700;
	cursor: pointer;
	color: #1c2430;
}

.chatDiceMenu__panel button:hover,
.chatDiceMenu__panel button:focus {
	background: #e8f3ff;
}

.chatDice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.chatDie {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #d7dee8;
	font-weight: 800;
	font-size: 18px;
	box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
}

.chatDice__label {
	font-size: 13px;
	font-weight: 700;
	color: #475467;
}

.chatKniffel {
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	width: min(280px, calc(100vw - 32px));
	max-height: min(360px, 52vh);
	overflow: auto;
	padding: 12px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
	z-index: 21;
}

.chatKniffel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.chatKniffel__head button {
	border: 0;
	background: transparent;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #667085;
}

.chatKniffel__hint,
.chatKniffel__meta {
	margin: 8px 0;
	color: #667085;
	font-size: 12px;
	line-height: 1.4;
}

.chatKniffel__dice {
	display: flex;
	gap: 6px;
}

.chatKniffel__dice .chatDie {
	cursor: pointer;
}

.chatKniffel__dice .chatDie.is-held {
	background: #1c2430;
	color: #fff;
	border-color: #1c2430;
}

.chatKniffel__scores {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 10px;
}

.chatKniffel__scores button {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	border: 0;
	background: #f2f4f7;
	border-radius: 10px;
	min-height: 34px;
	padding: 0 10px;
	font-weight: 700;
	cursor: pointer;
	color: #1c2430;
}

.chatKniffel #chatKniffelRoll {
	width: 100%;
}

.chatSmileys {
	position: relative;
}

.chatSmileys__toggle,
.chatImageButton {
	border: 1px solid #d7dee8;
	background: #fff;
	border-radius: 10px;
	width: 40px;
	height: 40px;
	padding: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1c2430;
}

.chatSmileys__toggle {
	font-size: 20px;
}

.chatImageButton svg {
	width: 22px;
	height: 22px;
	display: block;
}

.chatImageButton__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.chatImageButton input {
	display: none;
}

.chatSmileys__panel {
	position: absolute;
	left: 0;
	bottom: calc(100% + 8px);
	width: min(360px, 86vw);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 40px rgba(16, 24, 40, 0.18);
	padding: 10px;
	z-index: 20;
}

.chatSmileys__search,
.chatSmileys__tabs button,
.chatSmileys__grid button {
	border: 0;
	background: transparent;
}

.chatSmileys__search {
	width: 100%;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	min-height: 34px;
	padding: 0 8px;
	margin-bottom: 8px;
}

.chatSmileys__tabs {
	display: flex;
	gap: 4px;
	overflow: auto;
	margin-bottom: 8px;
}

.chatSmileys__tabs button {
	border-radius: 999px;
	padding: 4px 8px;
	white-space: nowrap;
	cursor: pointer;
}

.chatSmileys__tabs button.is-active {
	background: #e8f3ff;
	color: #175cd3;
}

.chatSmileys__grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 2px;
	max-height: 220px;
	overflow: auto;
}

.chatSmileys__grid button {
	font-size: 22px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1.3;
}

.chatSmileys__grid button:hover {
	background: #f2f4f7;
}

.chatImagePreview {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.chatImagePreview img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 8px;
}

.chatImagePreview button {
	border: 0;
	background: #f2f4f7;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	cursor: pointer;
}

.chatUserList {
	list-style: none;
	margin: 0;
	padding: 0;
}

.chatUserList li {
	margin: 0 0 4px;
}

.chatUser {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	border: 0;
	background: transparent;
	border-radius: 8px;
	padding: 6px;
	color: inherit;
	font: inherit;
	text-align: left;
}

button.chatUser {
	cursor: pointer;
}

button.chatUser:hover,
button.chatUser:focus {
	background: #f2f4f7;
}

.chatraumHint,
.chatraumNotice,
.chatraumEmpty,
.chatraumError {
	margin: 8px 0 0;
	color: #667085;
	text-align: center;
}

.chatraumError:empty {
	display: none;
}

.invisible {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

@media (max-width: 800px) {
	.chatraumGrid {
		grid-template-columns: 1fr;
	}

	.chatraumToolbar__search {
		margin-left: 0;
	}

	.chatShell {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"bar"
			"log"
			"composer"
			"users";
		height: calc(100dvh - 150px);
		max-height: calc(100dvh - 150px);
		min-height: 0;
	}

	.chatShell__log {
		min-height: 0;
	}

	.chatShell__side {
		display: none;
	}

	.chatShell.is-users-open .chatShell__side {
		display: block;
	}

	.chatSmileys__grid {
		grid-template-columns: repeat(7, 1fr);
	}

	.chatShell__composer {
		padding: 8px 10px;
	}

	.chatShell__composer .chatraumHint,
	.chatShell__composer .chatPrivacy {
		display: none;
	}

	.chatShell__bar {
		flex-wrap: wrap;
		padding: 8px 10px;
	}

	.chatComposer textarea,
	.chatGuestName,
	.chatSmileys__search {
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		margin: 0 !important;
		font-size: 16px !important;
	}

	.chatComposer textarea {
		height: 40px;
		min-height: 40px;
		max-height: 40px;
		padding: 6px 8px;
	}

	.chatShell__composer {
		background: #fff;
	}

	.chatSmileys__panel {
		width: min(360px, 100%);
	}

	.chatComposer__tools {
		flex-wrap: wrap;
	}

	.chatComposer__tools .button {
		margin-left: auto;
	}

	.chatPrivacyGate {
		margin: 12px 0;
		padding: 20px 16px;
	}
}
