/* KABL — mobile-first, dummy phase */

:root{
	--bg: #f4f5f7;
	--card: #ffffff;
	--text: #1c2128;
	--muted: #79808a;
	--line: #e3e6ea;
	--accent: #2f6fed;
	--indent: #d6dae0;
	--neon: #ff2fd6;
}
@media (prefers-color-scheme: dark){
	:root{
		--bg: #101418;
		--card: #1a2026;
		--text: #e6e9ec;
		--muted: #8b949e;
		--line: #2b333b;
		--accent: #5b93ff;
		--indent: #39424c;
		--neon: #ff2fd6;
	}
}

*{ box-sizing: border-box; }
[hidden]{ display: none !important; } /* keep the hidden attribute working against display:flex classes */
html, body{ margin: 0; padding: 0; height: 100%; }
body{
	background: var(--bg);
	color: var(--text);
	font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}
#app{
	max-width: 640px;
	margin: 0 auto;
	height: 100dvh;
	display: flex;
	flex-direction: column;
}
a{ color: var(--accent); text-decoration: none; }

/* ── header bar ─────────────────────────────────────────────────────── */
.bar{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	padding-top: calc(10px + env(safe-area-inset-top));
	background: var(--card);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 10;
}
.bar .back{
	font-size: 28px;
	line-height: 1;
	padding: 0 6px 4px 0;
	color: var(--accent);
}
.bar-title{ font-weight: 700; font-size: 17px; }
.bar-sub{ font-size: 12px; color: var(--muted); }
.bar-titles{ flex: 1; min-width: 0; }
.bar-bell{
	border: none;
	background: none;
	font-size: 20px;
	padding: 0 2px;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
}
.bell-badge{
	position: absolute;
	top: -4px;
	right: -8px;
	font-size: 10px;
	padding: 0 5px;
}
.bar-add, .bar-gear{
	border: none;
	background: none;
	font-size: 22px;
	line-height: 1;
	padding: 0 2px;
	cursor: pointer;
	flex-shrink: 0;
	color: var(--text);
}
.bar-gear{ font-size: 19px; }
.bar-version{
	border: none;
	background: none;
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	padding: 0 4px;
	cursor: pointer;
	flex-shrink: 0;
	/* colour is set inline — muted when seen, version-hue when fresh. Weight/size never
	   change between the two states, so the label holds its place (no layout shift). */
}

/* ── events view ────────────────────────────────────────────────────── */
.events{ flex: 1; overflow-y: auto; }
.push-box{
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: var(--card);
	border-bottom: 1px solid var(--line);
	font-size: 13px;
}
.push-state{ color: var(--muted); flex: 1; }
.push-box button{
	border: 1px solid var(--accent);
	background: none;
	color: var(--accent);
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 12px;
	cursor: pointer;
}
.events-empty{ padding: 24px 14px; color: var(--muted); font-size: 13.5px; }
.event-item{
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	background: var(--card);
	color: var(--text);
	font-size: 13.5px;
}
.event-item.unread{ box-shadow: inset 3px 0 0 var(--neon); }
.event-icon{ flex-shrink: 0; }
.event-text{
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.event-time{ font-size: 11.5px; color: var(--muted); flex-shrink: 0; }

/* ── changelog view (FT_CHANGELOG) ──────────────────────────────────── */
.changelog{
	flex: 1;
	overflow-y: auto;
	padding: 4px 16px calc(20px + env(safe-area-inset-bottom));
}
.changelog-uptodate{
	padding: 14px 0 2px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
}
.changelog-body{ font-size: 14px; line-height: 1.5; color: var(--text); }
.changelog-body h2{
	font-size: 15px;
	font-weight: 700;
	margin: 22px 0 6px;
	padding-top: 14px;
	border-top: 1px solid var(--line);
}
.changelog-body h2:first-child{ border-top: none; padding-top: 4px; margin-top: 8px; }
.changelog-body ul{ margin: 6px 0; padding-left: 20px; }
.changelog-body li{ margin: 5px 0; }
.changelog-body p{ margin: 6px 0; color: var(--muted); }
.changelog-body strong{ color: var(--text); }
.changelog-date{ font-weight: 700; } /* colour set inline per section version */
.changelog-all{
	display: block;
	margin: 22px auto 0;
	border: none;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 12.5px;
	text-decoration: underline;
	cursor: pointer;
}

/* ── projection tabs ────────────────────────────────────────────────── */
.tabs{
	display: flex;
	gap: 6px;
	padding: 8px 14px;
	background: var(--card);
	border-bottom: 1px solid var(--line);
}
.tab{
	flex: 1;
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--muted);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 0;
	border-radius: 14px;
	cursor: pointer;
}
.tab.active{
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.proj-hint{
	font-size: 12.5px;
	color: var(--muted);
	background: var(--card);
	border-bottom: 1px solid var(--line);
	padding: 7px 14px;
	transition: opacity 0.6s;
}
.proj-hint.fade{ opacity: 0; }

/* ── social projection ──────────────────────────────────────────────── */
.social{
	flex: 1;
	overflow-y: auto;
	padding: 10px 10px calc(16px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.fy{
	background: var(--card);
	border: 1px solid var(--accent);
	border-radius: 12px;
	padding: 8px 12px;
}
.fy-title{
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 4px;
}
.fy-item{
	display: block;
	font-size: 13px;
	color: var(--text);
	padding: 5px 0;
	border-top: 1px solid var(--line);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fy-item:first-of-type{ border-top: none; }
.fy-unread{ box-shadow: inset 3px 0 0 var(--neon); padding-left: 8px; }
.fy-item .avatar{ width: 16px; height: 16px; font-size: 9px; vertical-align: -3px; }
.fy-emoji{ font-size: 15px; }

/* ── channel list ───────────────────────────────────────────────────── */
.channel-list{ overflow-y: auto; }
.channel-item{
	display: block;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	background: var(--card);
	color: var(--text);
}
.channel-row{ display: flex; align-items: baseline; gap: 8px; }
.channel-name{ font-weight: 700; flex: 1; }
.badge{
	background: var(--accent);
	color: #fff;
	border-radius: 10px;
	font-size: 11.5px;
	font-weight: 700;
	padding: 1px 7px;
	align-self: center;
}
.channel-time{ font-size: 12px; color: var(--muted); }
.channel-snippet{
	font-size: 13px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

/* ── new-channel form ───────────────────────────────────────────────── */
.form{
	flex: 1;
	overflow-y: auto;
	padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.form-label{
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted);
	margin-top: 8px;
}
.form-input{
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--card);
	color: var(--text);
	font: inherit;
	padding: 10px 12px;
}
.form-input:focus{ outline: none; border-color: var(--accent); }
.opt-row{ display: flex; gap: 6px; flex-wrap: wrap; }
.opt{
	flex: 1;
	min-width: 70px;
	border: 1px solid var(--line);
	background: var(--card);
	color: var(--muted);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 0;
	border-radius: 14px;
	cursor: pointer;
}
.opt.active{ background: var(--accent); border-color: var(--accent); color: #fff; }
.member-pick{ display: flex; flex-direction: column; gap: 4px; }
.member-opt{
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--line);
	background: var(--card);
	color: var(--text);
	font: inherit;
	text-align: left;
	padding: 8px 12px;
	border-radius: 10px;
	cursor: pointer;
}
.member-opt.active{ border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.member-opt.locked{ opacity: 0.7; cursor: default; }
.member-name{ flex: 1; min-width: 0; }
.member-check{ color: var(--accent); font-weight: 700; width: 16px; text-align: center; }
.form-submit{
	margin-top: 16px;
	border: none;
	border-radius: 12px;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	padding: 12px 0;
	cursor: pointer;
}

/* ── users & invites (FT_USERS) ─────────────────────────────────────── */
.user-list, .invite-list{ display: flex; flex-direction: column; gap: 4px; }
.user-item{
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--line);
	background: var(--card);
	border-radius: 10px;
	padding: 8px 12px;
}
.user-meta{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-name{ font-weight: 700; }
.user-sub{ font-size: 12px; color: var(--muted); }
.user-recovery{
	border: 1px solid var(--line);
	background: var(--bg);
	color: var(--text);
	font: inherit;
	border-radius: 8px;
	padding: 6px 10px;
	cursor: pointer;
	flex-shrink: 0;
}
.invite-item{
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--line);
	background: var(--card);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
}
.invite-target{ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-exp{ font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.invite-revoke{
	border: none;
	background: transparent;
	color: var(--danger, #e5484d);
	font: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}
.token-box{ display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.token-field{
	flex: 1;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	font-size: 13px;
	padding: 10px 12px;
}
.token-copy{
	border: none;
	border-radius: 10px;
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	padding: 10px 16px;
	cursor: pointer;
	flex-shrink: 0;
}
.token-note{ width: 100%; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── topics list projection ─────────────────────────────────────────── */
.topic-list{ overflow-y: auto; flex: 1; }
.topic-item{
	display: block;
	padding: 12px 14px;
	border-bottom: 1px solid var(--line);
	background: var(--card);
	color: var(--text);
}
.topic-item.has-unread{ box-shadow: inset 3px 0 0 var(--neon); }
.topic-line{
	font-weight: 700;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.topic-item .avatar{ width: 16px; height: 16px; font-size: 9px; vertical-align: -3px; }

/* ── stream + topic containers ──────────────────────────────────────── */
.stream, .topic{
	flex: 1;
	overflow-y: auto;
	padding: 10px 10px calc(16px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	gap: 10px;
}
/* bottom-anchor when content is short; NEVER justify-content:flex-end here — it
   makes the overflowing top of a scroll container unreachable */
.stream > :first-child{ margin-top: auto; }

/* ── chat projection (1:1 bubbles) ───────────────────────────────────── */
.stream.chat{ gap: 6px; }
.brow{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}
.brow-own{ align-items: flex-end; }
.brow .ctx-line{ font-size: 11.5px; max-width: 82%; }
.bubble{
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 14px 14px 14px 4px;
	padding: 7px 10px 5px;
	max-width: 82%;
}
.brow-own .bubble{
	background: color-mix(in srgb, var(--accent) 14%, var(--card));
	border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
	border-radius: 14px 14px 4px 14px;
}
.bubble-author{ font-size: 11.5px; font-weight: 700; color: var(--muted); }
.bubble-meta{
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
	font-size: 10.5px;
	color: var(--muted);
	margin-top: 2px;
}
.bubble-meta .msg-reply, .bubble-meta .msg-more{
	font-size: 12px;
	padding: 0 3px;
	margin-left: 0;
}
.bubble .reactions{ margin-top: 2px; margin-bottom: 4px; }

.card{
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 12px;
}
.card-open{
	display: block;
	font-size: 12px;
	margin-top: 6px;
	color: var(--muted);
}

/* ── context lines (2.5-line delta reference) ───────────────────────── */
.ctx-line{
	font-size: 12.5px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 2px 0;
}
.ctx-line b{ color: var(--muted); }
.ctx-icon{ margin-right: 4px; }
.ctx-topic-link{ display: block; }
.ctx-topic-link .ctx-line{ border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.level2-wrap{ margin-left: 34px; }

/* ── fork: stub at the old position + backlink on the forked topic ───── */
.fork-stub{
	display: block;
	font-size: 12.5px;
	color: var(--muted);
	font-style: italic;
	padding: 6px 0;
	cursor: pointer;
}
.fork-backlink{ cursor: pointer; }

/* ── messages ───────────────────────────────────────────────────────── */
.msg{ padding: 6px 0; }
.msg.unread{ box-shadow: inset 3px 0 0 var(--neon); padding-left: 8px; }
.neu{
	background: var(--neon);
	color: #fff;
	border-radius: 8px;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	text-transform: uppercase;
}
.msg-indent, .msg-level1{ margin-left: 16px; }
.msg-level2{ margin-left: 34px; border-left: 2px solid var(--indent); padding-left: 10px; }
.topic-root{ border-bottom: 1px solid var(--line); padding-bottom: 10px; }

.msg-head{ display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.avatar{
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.msg-author{ font-weight: 700; font-size: 13.5px; }
.msg-time{ font-size: 11.5px; color: var(--muted); }

.msg-body p{ margin: 4px 0; }
.msg-body p:first-child{ margin-top: 0; }
.msg-body p:last-child{ margin-bottom: 0; }
.msg-body pre{
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px;
	overflow-x: auto;
	font-size: 13px;
}
.msg-body code{ font-size: 13px; }
.msg-body ul, .msg-body ol{ margin: 4px 0; padding-left: 22px; }

/* ── quotes (Teilzitat) ─────────────────────────────────────────────── */
.quote{
	border-left: 3px solid var(--accent);
	background: color-mix(in srgb, var(--accent) 8%, transparent);
	border-radius: 0 8px 8px 0;
	padding: 5px 9px;
	margin: 4px 0;
	font-size: 13px;
	color: var(--muted);
	cursor: pointer;
}
.quote-author{ font-weight: 700; }
.quote-text{ font-style: italic; }

/* ── reactions ──────────────────────────────────────────────────────── */
.reactions{ display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.reaction{
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 1px 8px;
	font-size: 12.5px;
}
.reaction.live{ cursor: pointer; }
.reaction.mine{ border-color: var(--accent); } /* my own active reaction — subtle accent ring */
.reaction-label{ color: var(--muted); }

/* ── 80s neon marker on quote jump ──────────────────────────────────── */
.kabl-neon{
	animation: kablNeon 2.4s ease-out;
	border-radius: 8px;
}
@keyframes kablNeon{
	0%{ box-shadow: 0 0 0 3px var(--neon), 0 0 22px 6px var(--neon); background: color-mix(in srgb, var(--neon) 18%, transparent); }
	70%{ box-shadow: 0 0 0 3px var(--neon), 0 0 12px 2px var(--neon); }
	100%{ box-shadow: none; background: transparent; }
}

/* ── composer ───────────────────────────────────────────────────────── */
.composer{
	background: var(--card);
	border-top: 1px solid var(--line);
	padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
}
.composer-ctx{
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0 2px 6px;
}
.chip{
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12.5px;
	color: var(--muted);
}
.chip .ctx-text{
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
}
.chip-quote .ctx-text{ font-style: italic; }
.chip button{
	border: none;
	background: none;
	color: var(--muted);
	font-size: 18px;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
}

.quote-offer{
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--accent);
	padding: 4px 4px 4px 8px;
	margin-bottom: 6px;
	border: 1px dashed var(--accent);
	border-radius: 8px;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}
.quote-offer-label{
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.quote-offer-text{ font-style: italic; color: var(--muted); }
#quote-offer-clear{
	border: none;
	background: none;
	color: var(--muted);
	font-size: 18px;
	line-height: 1;
	padding: 2px 6px;
	cursor: pointer;
}

.msg-body{
	-webkit-user-select: text;
	user-select: text;
}

/* neon marker on the quoted Teilsatz (CSS Custom Highlight API) */
::highlight(kabl-quote){
	background: #eaff00;
	color: #111;
}
.composer-row{
	display: flex;
	gap: 8px;
	align-items: flex-end;
}
#composer-text{
	flex: 1;
	resize: none;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	padding: 8px 10px;
	max-height: 120px;
}
#composer-text:focus{ outline: none; border-color: var(--accent); }
#composer-send{
	border: none;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	background: var(--accent);
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	flex-shrink: 0;
}
#composer-send:disabled{ opacity: 0.5; }
#composer-attach{
	border: none;
	background: none;
	font-size: 20px;
	line-height: 38px;
	height: 38px;
	padding: 0 2px;
	cursor: pointer;
	flex-shrink: 0;
}
#composer-attach:disabled{ opacity: 0.4; }

/* ── images (FT_FILES) ──────────────────────────────────────────────── */
/* thumbnail strip under the composer: what is already uploaded, × discards it again */
.composer-files{
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 2px 8px;
}
.composer-file{ position: relative; }
.composer-file img{
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid var(--line);
	display: block;
}
.composer-file-x{
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 50%;
	background: var(--muted);
	color: #fff;
	font-size: 13px;
	line-height: 20px;
	padding: 0;
	cursor: pointer;
}
.msg-img{
	max-width: 100%;
	max-height: 360px;
	border-radius: 8px;
	display: block;
	margin: 6px 0;
	cursor: zoom-in;
}
/* a reference whose file is gone stays VISIBLE — the message must not silently lose content */
.file-missing{
	display: inline-block;
	padding: 2px 8px;
	border: 1px dashed var(--line);
	border-radius: 6px;
	color: var(--muted);
	font-size: 13px;
}
.img-overlay{
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(0, 0, 0, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
}
.img-overlay img{
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.img-overlay-x{
	position: absolute;
	top: calc(10px + env(safe-area-inset-top));
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
}

.msg-reply, .msg-more{
	border: none;
	background: none;
	color: var(--muted);
	font-size: 14px;
	padding: 0 4px;
	cursor: pointer;
	opacity: 0.7;
}
.msg-reply{ margin-left: auto; }
.msg-more{ font-weight: 700; }

/* ── action sheet (bottom sheet) ────────────────────────────────────── */
.sheet-overlay{
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 50;
	display: flex;
	align-items: flex-end;
	opacity: 0;
	transition: opacity 0.18s ease-out;
}
.sheet-overlay.open{ opacity: 1; }
.sheet{
	background: var(--card);
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	border-radius: 16px 16px 0 0;
	padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
	transform: translateY(100%);
	transition: transform 0.18s ease-out;
}
.sheet-overlay.open .sheet{ transform: none; }
.sheet-title{
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	padding: 4px 0 8px;
}
.sheet-item{
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px;
	border: none;
	background: none;
	color: var(--text);
	font: inherit;
	text-align: left;
	border-radius: 10px;
	cursor: pointer;
}
.sheet-item:active{ background: var(--bg); }
.sheet-item.danger{ color: #e5484d; }
.sheet-item .si-icon{ width: 24px; text-align: center; flex-shrink: 0; }
.sheet-item .si-label{ flex: 1; min-width: 0; }
.sheet-item .si-sub{
	display: block;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sheet-info{ cursor: default; }
.sheet-info:active{ background: none; }
.sheet-muted{ opacity: 0.5; } /* greyed placeholder (e.g. "Stummschalten — bald") */

/* ── reaction favorites bar on top of the message sheet ─────────────── */
.sheet-react{
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	padding: 2px 6px 8px;
}
.sheet-emoji{
	border: 1px solid var(--line);
	background: var(--bg);
	border-radius: 12px;
	font-size: 20px;
	line-height: 1;
	padding: 5px 10px;
	cursor: pointer;
}
.sheet-emoji.mine{
	border-color: var(--accent);
	background: color-mix(in srgb, var(--accent) 14%, var(--card));
}
.sheet-emoji-add{ font-size: 18px; font-weight: 700; color: var(--muted); }
.sheet-react-input{
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 0 6px 8px;
}
.sheet-react-input input{
	flex: 1;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--text);
	font: inherit;
	padding: 8px 10px;
}
.sheet-react-input input:focus{ outline: none; border-color: var(--accent); }
.sheet-react-send{
	border: none;
	border-radius: 50%;
	width: 34px;
	height: 34px;
	background: var(--accent);
	color: #fff;
	font-size: 15px;
	cursor: pointer;
	flex-shrink: 0;
}

.toast{
	position: fixed;
	bottom: 96px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--text);
	color: var(--card);
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	z-index: 60;
	animation: toastFade 1.8s ease-out;
	max-width: 85vw;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
@keyframes toastFade{
	0%{ opacity: 0; transform: translate(-50%, 8px); }
	10%, 80%{ opacity: 1; transform: translate(-50%, 0); }
	100%{ opacity: 0; }
}

.error{
	margin: 20px;
	padding: 12px;
	border: 1px solid #d33;
	border-radius: 8px;
	color: #d33;
	background: var(--card);
}
