/* PTT Chat: app layout and components. Tokens live in tokens.css. */

* { box-sizing: border-box; }
/* Text size (Display → Text size, 85–150 %): scales messages, names, the chat list and the typing box. */
:root { --ts: 1; }
html, body { margin: 0; height: 100%; }
body {
	background: var(--paper); color: var(--text);
	font-family: var(--pt-body); font-size: 16px;
	-webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
	overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; flex: 0 0 auto; }
[lang|="zh"], [lang="ja"], [lang="ko"] { letter-spacing: 0; }

/* ---------- frame: list beside chat on desktop, one at a time on phones ---------- */
.app { height: 100dvh; display: grid; grid-template-columns: 1fr; }
.side, .main { min-width: 0; min-height: 0; height: 100dvh; display: flex; flex-direction: column; }
.main { display: none; background: var(--screen-bg); }
.app.in-chat .side { display: none; }
.app.in-chat .main { display: flex; }
@media (min-width: 900px) {
	.app { grid-template-columns: minmax(320px, 380px) 1fr; }
	.side { border-inline-end: 1px solid var(--line); background: var(--surface); }
	.app .side, .app.in-chat .side { display: flex; }
	.app .main { display: flex; }
}
.app.signed-out { grid-template-columns: 1fr; }
.app.signed-out .main { display: none; }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
	font: 700 15px/1 var(--pt-display); text-decoration: none;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--fill); color: var(--on-fill); box-shadow: 0 10px 22px color-mix(in srgb, var(--fill) 28%, transparent); }
.btn.primary:hover { background: var(--fill-hi); }
.btn.coral { background: var(--hl); color: var(--on-hl); box-shadow: 0 10px 22px color-mix(in srgb, var(--hl) 32%, transparent); }
.btn.ghost { background: var(--paper); color: var(--heading); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.link-btn { border: 0; background: none; padding: 6px 2px; color: var(--accent); font: 600 14px/1.3 var(--pt-display); }
.icon-btn {
	width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent;
	display: inline-flex; align-items: center; justify-content: center; color: var(--heading); flex: 0 0 auto;
}
.icon-btn:hover { background: var(--paper); }

/* ---------- forms ---------- */
.field-l { display: block; font: 600 13px/1.3 var(--pt-display); color: var(--heading); margin: 0 0 6px; }
.input {
	width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line);
	background: var(--surface); font: 400 17px/1 var(--pt-body); color: var(--text); outline: 0;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fill) 16%, transparent); }
.input.code { font: 700 24px/1 var(--pt-display); letter-spacing: .3em; text-align: center; }
.hint { font-size: 14px; line-height: 1.45; color: var(--muted); margin: 8px 0 0; }
.err { font: 600 13.5px/1.4 var(--pt-display); color: var(--bad); margin: 10px 0 0; min-height: 1px; }
.err:empty { display: none; }

/* ---------- welcome (signed out) ---------- */
.welcome {
	min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: calc(32px + var(--safe-t)) 16px calc(32px + var(--safe-b));
	background:
		radial-gradient(1200px 600px at 85% -10%, rgba(19, 195, 239, .28), transparent 60%),
		radial-gradient(900px 500px at -10% 110%, rgba(255, 107, 74, .22), transparent 60%),
		linear-gradient(160deg, var(--pt-navy) 0%, var(--pt-deep) 100%);
}
.welcome .tag {
	font: 800 clamp(26px, 6.4vw, 40px)/1.12 var(--pt-display); letter-spacing: -.02em; color: var(--pt-white);
	text-align: center; margin: 0 0 26px; max-width: 620px; text-wrap: balance;
}
.card-wrap {
	width: min(100%, 420px); background: var(--surface); border-radius: 28px; padding: 22px 22px 24px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}
.card-wrap .brand { width: 120px; height: auto; display: block; margin: 0 0 14px; }
.welcome > .card { width: min(100%, 420px); background: var(--surface); border-radius: 28px; padding: 26px 22px 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.card h1 { font: 800 24px/1.2 var(--pt-display); color: var(--heading); margin: 0 0 6px; letter-spacing: -.01em; }
.card .sub { font-size: 16px; line-height: 1.45; color: var(--muted); margin: 0 0 20px; }
.card .stack { display: grid; gap: 12px; }
.card .row { display: flex; gap: 10px; }
.card .or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font: 600 12px/1 var(--pt-display); text-transform: uppercase; letter-spacing: .08em; }
.card .or::before, .card .or::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--line); }
.card .foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.welcome .legal { margin-top: 22px; font: 500 12px/1.4 var(--pt-display); color: var(--pt-muted-d); text-align: center; }
.welcome .legal a { color: var(--pt-white); }
.lang-chip {
	display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px; width: 100%;
	border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--heading);
	font: 600 16px/1 var(--pt-display); justify-content: space-between;
}
.lang-chip:hover { border-color: var(--accent); }
.lang-chip .k { color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---------- home (chat list) ---------- */
.top {
	display: flex; align-items: center; gap: 10px; padding: calc(12px + var(--safe-t)) 14px 12px;
	background: var(--surface); border-bottom: 1px solid var(--line);
}
.top .logo { height: 34px; width: auto; display: block; }
.top .sp { flex: 1 1 auto; }
.me-chip {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-block: 0 0; padding-inline: 12px 6px; border-radius: 999px;
	border: 1.5px solid var(--line); background: var(--surface); font: 600 13.5px/1 var(--pt-display); color: var(--heading);
	max-width: 50vw;
}
.me-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .av { width: 28px; height: 28px; font-size: 12px; }
.list { flex: 1 1 auto; overflow-y: auto; padding: 16px 14px calc(24px + var(--safe-b)); background: var(--paper); }
.join-card {
	background: linear-gradient(135deg, var(--card-a), var(--card-b)); color: var(--pt-white);
	border-radius: 22px; padding: 18px 16px 16px; box-shadow: var(--pt-shadow); margin-bottom: 18px;
}
.join-card h2 { font: 700 17px/1.25 var(--pt-display); margin: 0 0 4px; }
.join-card p { font-size: 15px; line-height: 1.4; color: var(--pt-muted-d); margin: 0 0 12px; }
.join-card form { display: flex; gap: 8px; }
.join-card .input { height: 48px; border-color: transparent; font: 700 19px/1 var(--pt-display); letter-spacing: .18em; }
.join-card .btn { min-height: 48px; padding: 0 18px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 4px 8px; }
.sec-h h3 { font: 700 12px/1 var(--pt-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.sec-h .n { font: 600 12px/1 var(--pt-display); color: var(--muted); }
.chat-row {
	width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; text-align: start;
	background: var(--surface); border-radius: 18px; box-shadow: 0 4px 14px rgba(11, 37, 69, .06); margin-bottom: 8px;
	transition: box-shadow .15s ease, transform .15s ease;
}
.chat-row:hover { box-shadow: 0 8px 22px rgba(11, 37, 69, .1); }
.chat-row.active { box-shadow: 0 0 0 2px var(--accent), 0 8px 22px color-mix(in srgb, var(--fill) 14%, transparent); }
.chat-row .t { min-width: 0; flex: 1 1 auto; }
.chat-row b { display: block; font: 700 calc(15.5px * var(--ts))/1.3 var(--pt-display); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row small { display: block; font: 500 calc(12.5px * var(--ts))/1.35 var(--pt-display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row .badge { font: 700 10.5px/1 var(--pt-display); letter-spacing: .06em; text-transform: uppercase; padding: 6px 8px; border-radius: 999px; background: var(--cool); color: var(--accent); flex: 0 0 auto; }
.chat-row .badge.warm { background: var(--warm); color: var(--warm-ink); }
.empty { text-align: center; color: var(--muted); padding: 26px 16px; font-size: 15.5px; line-height: 1.45; }
.empty b { display: block; font: 700 17px/1.3 var(--pt-display); color: var(--heading); margin-bottom: 4px; }
.no-chat { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 40px; }
.no-chat .inner { max-width: 360px; text-align: center; color: var(--muted); }
.no-chat .bub { width: 92px; height: 92px; border-radius: 30px; margin: 0 auto 18px; background: linear-gradient(135deg, var(--fill), var(--fill-2)); display: flex; align-items: center; justify-content: center; color: var(--on-fill); box-shadow: 0 18px 40px color-mix(in srgb, var(--fill) 30%, transparent); }
.no-chat .bub svg { width: 44px; height: 44px; }
.no-chat h2 { font: 800 22px/1.25 var(--pt-display); color: var(--heading); margin: 0 0 8px; }

/* ---------- avatars ---------- */
.av {
	width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	color: var(--pt-white); font: 700 12.5px/1 var(--pt-display); background: var(--pt-blue); overflow: hidden;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 44px; height: 44px; border-radius: 15px; font-size: 16px; }

/* ---------- chat screen ---------- */
.hd {
	background: var(--surface); padding: calc(10px + var(--safe-t)) 10px 10px; border-bottom: 1px solid var(--line);
	display: flex; align-items: center; gap: 8px;
}
.hd .t { min-width: 0; flex: 1 1 auto; }
.hd .t b { display: block; font: 700 16.5px/1.25 var(--pt-display); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd .row2 { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-width: 0; }
@media (min-width: 900px) {
	.hd .back { display: none; }
	.hd { padding-inline-start: 18px; }
	.hd .t { display: flex; align-items: center; gap: 12px; }
	.hd .row2 { margin-top: 0; }
}
.pill {
	white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; min-height: 28px; max-width: 100%;
	padding: 0 10px; border: 1.5px solid var(--pill-line); border-radius: 999px; background: var(--pill-bg); color: var(--accent);
	font: 700 12px/1 var(--pt-display);
}
.pill:hover { border-color: var(--accent); }
.pill .k { color: var(--muted); font-weight: 600; }
.pill svg { width: 14px; height: 14px; }
.people { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--pt-display); color: var(--muted); white-space: nowrap; }
.people svg { width: 15px; height: 15px; }

.status {
	display: flex; align-items: center; gap: 8px; padding: 8px 14px; font: 600 12.5px/1.3 var(--pt-display);
	border-bottom: 1px solid var(--line); background: var(--cool); color: var(--accent);
}
.status.listen { background: var(--warm); color: var(--warm-ink); }
.status.warn { background: var(--notice); color: var(--notice-ink); }
.status .live { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.2s ease-in-out infinite; flex: 0 0 auto; }
@keyframes blink { 50% { opacity: .25; } }

.thread {
	flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 10px;
	display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; overscroll-behavior: contain;
}
.thread > :first-child { margin-top: auto; }
.thread .inner { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.day { align-self: center; font: 600 11.5px/1 var(--pt-display); color: var(--muted); background: rgba(255, 255, 255, .7); padding: 6px 10px; border-radius: 999px; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.me { flex-direction: row-reverse; }
.msg.cont .av { visibility: hidden; }
.bubble {
	position: relative; background: var(--bubble-them); border-start-start-radius: 18px; border-start-end-radius: 18px; border-end-end-radius: 18px; border-end-start-radius: 6px; padding: 8px 12px 10px;
	box-shadow: 0 4px 12px rgba(11, 37, 69, .07); min-width: 0; max-width: min(calc(100% - 38px), 560px);
	border: 2px solid transparent; transition: border-color .15s ease, box-shadow .15s ease; text-align: start;
}
.msg.me .bubble { background: var(--bubble-me); border-start-start-radius: 18px; border-start-end-radius: 18px; border-end-end-radius: 6px; border-end-start-radius: 18px; max-width: min(86%, 560px); }
.bubble.reading { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fill) 12%, transparent); }
.who { display: flex; align-items: center; gap: 6px; font: 700 calc(12px * var(--ts))/1.4 var(--pt-display); color: var(--heading); margin-bottom: 2px; min-height: 22px; }
.who .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; max-width: 60%; }
.who .from { font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.who .mini, .who .tm { flex: 0 0 auto; }
.who .tm { font-weight: 500; color: var(--muted); margin-inline-start: auto; white-space: nowrap; font-size: 11px; }
.who .mini {
	width: 26px; height: 22px; border: 0; border-radius: 7px; background: transparent; color: var(--muted);
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.who .mini:hover { background: var(--paper); color: var(--accent); }
.who .mini svg { width: 15px; height: 15px; }
.txt { font-family: var(--msg-font, inherit); font-size: calc(var(--msg-px, 16px) * var(--ts)); line-height: 1.38; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.txt.pending { color: var(--muted); }
.shimmer { background: linear-gradient(90deg, var(--muted) 0%, var(--pt-muted-d) 50%, var(--muted) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shim 1.6s linear infinite; }
@keyframes shim { to { background-position: -200% 0; } }
.orig { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.orig .tag { display: block; font: 700 10px/1 var(--pt-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.orig .txt { font-family: system-ui, sans-serif; font-size: calc(15px * var(--ts)); }
.reading-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 700 10.5px/1 var(--pt-display); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.bars i { width: 3px; border-radius: 2px; background: currentColor; animation: eq .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: .15s; } .bars i:nth-child(3) { animation-delay: .3s; } .bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 11px; } }
.photo { display: block; max-width: 100%; max-height: 320px; width: auto; height: auto; border-radius: 12px; margin: 4px 0 6px; background: var(--paper); cursor: zoom-in; }
.file { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 10px; border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--heading); font: 600 13px/1.3 var(--pt-display); }
.gps { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: var(--paper); text-decoration: none; }
.gps b { display: block; font: 700 12.5px/1.3 var(--pt-display); color: var(--heading); }
.gps small { font: 600 12px/1.3 var(--pt-display); color: var(--accent); }
.pause { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 600 11px/1 var(--pt-display); }
.pause::before, .pause::after { content: ""; flex: 1 1 auto; border-top: 1.5px dashed var(--switch-off); }
.sys { align-self: center; font: 600 12px/1.3 var(--pt-display); color: var(--muted); text-align: center; max-width: 90%; }
.interim .txt { color: var(--muted); font-style: italic; }
.dots { display: inline-flex; gap: 3px; margin-inline-start: 3px; vertical-align: middle; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--hl); animation: blink 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.jump {
	position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 3;
	display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
	background: var(--solid); color: var(--pt-white); font: 600 12.5px/1 var(--pt-display); box-shadow: 0 8px 20px rgba(8, 26, 49, .3);
}
.thread-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* composer + dock */
.composer { background: var(--surface); border-top: 1px solid var(--line); padding: 10px 12px calc(12px + var(--safe-b)); }
.composer .inner { max-width: 820px; margin: 0 auto; }
.field {
	display: flex; align-items: flex-end; gap: 6px; min-height: 44px; border-radius: 22px; background: var(--paper);
	border: 1px solid var(--line); padding-block: 4px 4px; padding-inline: 14px 4px;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fill) 16%, transparent); }
.field textarea {
	flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: 0; resize: none; max-height: 120px;
	font: 400 calc(16px * var(--ts))/1.35 var(--pt-body); color: var(--text); padding: 7px 0; overflow-y: hidden;
	height: calc(16px * 1.35 * var(--ts) + 15px);   /* one line at any text size; autosize() grows it */
}
.field textarea::placeholder { color: var(--muted); opacity: 1; }
.send { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fill); color: var(--on-fill); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.send:disabled { background: var(--switch-off); cursor: default; }
.send svg { width: 18px; height: 18px; }
.dock { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 10px; }
.dk { display: flex; flex-direction: column; align-items: center; gap: 5px; font: 600 10.5px/1 var(--pt-display); color: var(--muted); }
.dk.l { justify-self: start; padding-inline-start: 6px; } .dk.r { justify-self: end; padding-inline-end: 6px; }
.round { border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s ease, background-color .15s ease; }
.round:hover { transform: scale(1.05); }
.round:focus-visible { outline-offset: 3px; }
.menu-btn { width: 48px; height: 48px; background: var(--paper); color: var(--heading); box-shadow: inset 0 0 0 1.5px var(--line); }
.menu-btn[aria-expanded="true"] { background: var(--solid); color: var(--pt-white); box-shadow: none; }
.mic { position: relative; width: 70px; height: 70px; background: var(--hl); color: var(--on-hl); box-shadow: 0 12px 26px color-mix(in srgb, var(--hl) 38%, transparent); }
.mic svg.i { width: 28px; height: 28px; }
.mic.on::before, .mic.on::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--hl); opacity: 0; animation: ring 1.6s ease-out infinite; }
.mic.on::after { animation-delay: .8s; }
.mic.paused { background: var(--hl-soft); }
.mic.busy { opacity: .7; }
@keyframes ring { 0% { transform: scale(.9); opacity: .55; } 100% { transform: scale(1.35); opacity: 0; } }
.play-row { display: flex; align-items: center; gap: 8px; }
.play { width: 48px; height: 48px; background: var(--solid); color: var(--pt-white); }
.play.on { background: var(--fill); color: var(--on-fill); }
.auto { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 6px 0; font: 700 11px/1 var(--pt-display); color: var(--muted); }
.auto .sw { position: relative; width: 28px; height: 16px; border-radius: 999px; background: var(--switch-off); transition: background-color .15s ease; }
.auto .sw::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--pt-white); transition: transform .15s ease; }
.auto[aria-pressed="true"] { color: var(--accent); }
.auto[aria-pressed="true"] .sw { background: var(--fill); }
.auto[aria-pressed="true"] .sw::after { transform: translateX(calc(12px * var(--dx, 1))); }
.readonly-note { text-align: center; font: 600 13px/1.4 var(--pt-display); color: var(--muted); padding: 6px 0 2px; }

/* a tapped message: its buttons, and Play starts there */
.bubble { cursor: pointer; }
.bubble.picked { border-color: var(--picked); box-shadow: 0 0 0 4px color-mix(in srgb, var(--fill) 8%, transparent), 0 4px 12px rgba(11, 37, 69, .07); }
.msg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); cursor: default; }
.act-btn {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px;
	background: var(--paper); color: var(--heading); font: 600 13px/1 var(--pt-display);
}
.msg.me .act-btn { background: var(--veil); }
.act-btn svg.i { width: 17px; height: 17px; color: var(--accent); }
.act-btn:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.act-btn.go, .msg.me .act-btn.go { background: var(--fill); color: var(--on-fill); }
.act-btn.go svg.i { color: var(--on-fill); }
.act-btn.warm, .act-btn.warm svg.i { color: var(--warm-ink); }
.pause > span { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
button.pause { width: 100%; border: 0; background: transparent; padding: 2px 0; }
button.pause > span { padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--heading); }
button.pause:hover > span { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
button.pause svg.i { width: 14px; height: 14px; }

/* photos and files on their way, your edits */
.upload { display: flex; align-items: center; gap: 10px; margin: 4px 0 4px; padding: 8px; border-radius: 12px; background: var(--glass, rgba(255, 255, 255, .7)); min-width: min(240px, 60vw); }
.upload img, .upload .fic { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.up-info { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }
.up-info b { font: 600 12.5px/1.25 var(--pt-display); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-info small { font: 600 11px/1 var(--pt-display); color: var(--muted); }
.bar { display: block; height: 6px; border-radius: 999px; background: #d3e0f0; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--fill); transition: width .2s ease; }
.uploading { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; padding: 12px; border-radius: 12px; background: var(--paper); font: 600 13px/1.3 var(--pt-display); color: var(--muted); }
.uploading svg.i { width: 22px; height: 22px; flex: 0 0 auto; }
.fic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--cool); color: var(--accent); flex: 0 0 auto; }
.fic svg.i { width: 22px; height: 22px; }
.fic em { position: absolute; bottom: -3px; inset-inline-end: -6px; font: 700 8.5px/1 var(--pt-display); font-style: normal; padding: 2px 4px; border-radius: 5px; background: var(--solid); color: var(--pt-white); letter-spacing: .03em; }
.file .fn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload .mini, .editbar .mini {
	width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
	display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: 0 0 auto;
}
.upload .mini:hover, .editbar .mini:hover { background: var(--paper); color: var(--accent); }
.editbar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding-block: 2px 2px; padding-inline: 12px 4px; border-radius: 12px; background: var(--cool); color: var(--accent); font: 600 12.5px/1.2 var(--pt-display); }
.editbar span { flex: 1 1 auto; color: var(--heading); }
.editbar svg.i { width: 16px; height: 16px; }
.drop-hint {
	position: absolute; inset: 10px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	border: 2.5px dashed var(--accent); border-radius: 22px; background: var(--drop-bg); color: var(--accent);
	font: 700 15px/1.3 var(--pt-display); pointer-events: none;
}
.drop-hint svg.i { width: 36px; height: 36px; }

/* ---------- sheets (bottom on phones, centered on desktop) ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(8, 26, 49, .42); z-index: 20; animation: fade .2s ease both; }
.sheet {
	position: fixed; inset-inline-start: 0; inset-inline-end: 0; bottom: 0; z-index: 21; background: var(--surface);
	border-radius: 26px 26px 0 0; padding: 10px 16px calc(18px + var(--safe-b)); box-shadow: 0 -18px 40px rgba(11, 37, 69, .18);
	animation: up .25s ease both; max-height: 88dvh; display: flex; flex-direction: column;
}
@media (min-width: 700px) {
	.sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(100% - 32px)); border-radius: 26px; animation: pop .2s ease both; max-height: 80dvh; padding-bottom: 18px; }
	.sheet .handle { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%); } }
.handle { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto 8px; flex: 0 0 auto; }
.sheet-hd { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; flex: 0 0 auto; }
.sheet-hd h2 { font: 700 18px/1.25 var(--pt-display); color: var(--heading); margin: 0; flex: 1 1 auto; }
.sheet-body { overflow-y: auto; min-height: 0; flex: 1 1 auto; margin: 0 -4px; padding: 0 4px; }
.sheet h3 { font: 700 11px/1 var(--pt-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 4px 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; padding: 8px 2px; border-radius: 14px; font: 600 11.5px/1.2 var(--pt-display); color: var(--heading); text-align: center; }
.tile:hover { background: var(--paper); }
.tile .ic { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; background: var(--cool); color: var(--accent); }
.tile.warm .ic { background: var(--warm); color: var(--warm-icon); }
.tile.dim .ic { background: var(--paper); color: var(--muted); }
.tile .soon { font: 600 9.5px/1 var(--pt-display); color: var(--muted); }

/* language picker */
.search { position: relative; margin-bottom: 8px; flex: 0 0 auto; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-inline-start: 42px; height: 46px; }
.langs { list-style: none; margin: 0; padding: 0; }
.langs li button {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 10px; border: 0; border-radius: 12px; background: transparent; text-align: start;
}
.langs li button:hover, .langs li button:focus-visible { background: var(--paper); }
.langs li button[aria-selected="true"] { background: var(--cool); }
.langs .nat { font: 600 15.5px/1.3 var(--pt-display); color: var(--heading); }
.langs .en { font: 500 13px/1.3 var(--pt-display); color: var(--muted); }
.langs .ck { margin-inline-start: auto; color: var(--accent); }
.langs .note { margin-inline-start: auto; font: 600 10.5px/1.2 var(--pt-display); color: var(--muted); text-align: end; }

/* message actions, paste/drop confirm, accent */
.quote { margin: 0 4px 10px; padding: 8px 12px; border-inline-start: 3px solid var(--line); color: var(--muted); font: 400 15px/1.35 var(--pt-body); white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.quote-img { display: block; height: 72px; width: auto; max-width: 100%; border-radius: 8px; }
.acts { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.act { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; padding: 12px; border-radius: 14px; font: 600 15px/1.2 var(--pt-display); color: var(--heading); text-align: start; }
.act:hover, .act:focus-visible { background: var(--paper); }
.act svg.i { width: 20px; height: 20px; color: var(--accent); }
.act.warm, .act.warm svg.i { color: var(--warm-ink); }
.confirm { margin: 4px 4px 14px; font: 600 15.5px/1.35 var(--pt-display); color: var(--heading); }
.confirm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 2px 0 14px; }
.pick-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--paper); }
.pick-grid .file { grid-column: 1 / -1; margin: 0; }

/* pages (New chat) and the forms in them and in People */
.page-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 14px 20px; background: var(--paper); }
.page-body > .sec, .page-body > .empty { max-width: 640px; margin-inline-start: auto; margin-inline-end: auto; }
.page-foot { padding: 10px 14px calc(12px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.page-foot .btn { max-width: 640px; margin: 0 auto; display: flex; }
.sec { background: var(--surface); border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(11, 37, 69, .05); }
.sheet .sec { box-shadow: none; padding: 4px 2px 12px; border-radius: 0; border-bottom: 1px solid var(--line); }
.sheet .sec:last-child { border-bottom: 0; }
.sec h3 { font: 700 11.5px/1 var(--pt-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 4px 2px 10px; }
.sec .input + .input, .sec .input + select, .topic-box .input { margin-top: 8px; }
.sec .field-l + .input { margin-top: 0; }
.sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sec-hd h3 { margin-bottom: 6px; }
.sec-acts { display: flex; gap: 2px; flex-wrap: wrap; }
.sec-acts .link-btn { display: inline-flex; align-items: center; gap: 4px; }
.sec-acts svg.i { width: 16px; height: 16px; }
.row-2 { display: grid; gap: 10px; margin-top: 10px; }
.input.date { max-width: 220px; }
.input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(196, 58, 26, .14); }
select.input { appearance: auto; font-family: var(--pt-display); font-size: 15px; }
.swrow { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 6px; border: 0; background: transparent; text-align: start; border-radius: 12px; }
.swrow:hover:not(:disabled) { background: var(--paper); }
.swrow:disabled { opacity: .55; cursor: default; }
.swrow .sw { position: relative; flex: 0 0 auto; width: 40px; height: 24px; margin-top: 1px; border-radius: 999px; background: var(--switch-off); transition: background-color .15s ease; }
.swrow .sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--pt-white); transition: transform .15s ease; }
.swrow.on .sw { background: var(--fill); }
.swrow.on .sw::after { transform: translateX(calc(16px * var(--dx, 1))); }
.swt b { display: block; font: 700 15px/1.25 var(--pt-display); color: var(--heading); }
.swt small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chips.sub { margin-block: 0 6px; margin-inline: 58px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); font: 600 12.5px/1 var(--pt-display); }
.chip svg.i { width: 15px; height: 15px; }
.chip.on { border-color: var(--accent); background: var(--cool); color: var(--accent); }
.flist { display: grid; gap: 8px; margin-top: 10px; }
.frow { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); }
.frow.in { background: var(--cool); }
.frow.blocked { background: var(--warm); }
.frow .av { width: 40px; height: 40px; font-size: 15px; }
.ft { min-width: 0; flex: 1 1 auto; }
.ft b { display: flex; align-items: center; gap: 6px; font: 700 15px/1.3 var(--pt-display); color: var(--heading); }
.ft small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); }
.ft .dot { width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; }
.fa { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; gap: 5px; box-shadow: none; }
.btn.sm svg.i { width: 16px; height: 16px; }
.btn.ghost.warm { color: var(--warm-ink); box-shadow: inset 0 0 0 1.5px var(--warm-line); }
.btn.new-chat { min-height: 40px; padding: 0 14px; font-size: 13.5px; box-shadow: none; white-space: nowrap; flex: 0 0 auto; }
.btn.new-chat svg.i { width: 18px; height: 18px; }
.langs-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.lchip { display: inline-flex; flex-direction: column; padding: 6px 10px; border-radius: 12px; background: var(--paper); font: 700 13px/1.25 var(--pt-display); color: var(--heading); }
.lchip small { font: 500 11.5px/1.3 var(--pt-display); color: var(--muted); }
.spin.sm { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--pt-white); animation: spin .8s linear infinite; }

/* playback sheet, photos during Play */
.choices.modes .choice { align-items: flex-start; text-align: start; justify-content: flex-start; padding: 12px; }
.choice b { font: 700 15px/1.2 var(--pt-display); }
.choice small { font: 500 12.5px/1.35 var(--pt-display); color: var(--muted); }
.choice.on small { color: var(--accent); }
.act.toggle { align-items: flex-start; }
.act.toggle b { display: block; font: 700 15px/1.25 var(--pt-display); }
.act.toggle small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); margin-top: 2px; }
.act.toggle .sw { position: relative; flex: 0 0 auto; width: 40px; height: 24px; margin-top: 2px; border-radius: 999px; background: var(--switch-off); transition: background-color .15s ease; }
.act.toggle .sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--pt-white); transition: transform .15s ease; }
.act.toggle.on .sw { background: var(--fill); }
.act.toggle.on .sw::after { transform: translateX(calc(16px * var(--dx, 1))); }
.play.muted { background: #8a99ad; }
.viewer.auto { z-index: 15; }
.viewer-pace {
	position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); display: inline-flex; align-items: center; gap: 6px;
	padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: var(--pt-white); font: 600 13px/1 var(--pt-display);
}
.viewer-pace button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: var(--pt-white); font: 700 20px/1 var(--pt-display); }
.viewer-pace .pz { min-width: 96px; text-align: center; }

/* chat voices: people, then the picker */
.voices-top { margin: 0 0 10px; }
.voices-lang { height: 46px; font-family: var(--pt-display); font-weight: 600; font-size: 15px; }
.vlist { display: grid; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); }
.vrow .av { width: 40px; height: 40px; }
.vt { min-width: 0; flex: 1 1 auto; }
.vt b { display: block; font: 700 15px/1.3 var(--pt-display); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vt small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbtn { min-height: 42px; padding: 0 14px; font-size: 14px; flex: 0 0 auto; }
.vpick h3 { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 8px 4px 6px; margin: 4px 0 0; }
.vp { display: flex; align-items: center; gap: 6px; margin: 4px 0; border-radius: 14px; background: var(--paper); }
.vp.on { background: var(--cool); box-shadow: inset 0 0 0 2px var(--accent); }
.vp-play { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 12px; background: transparent; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.vp-play:hover { background: var(--surface); }
.vp-pick { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 0 0; padding-inline: 4px 12px; border: 0; background: transparent; text-align: start; font: 600 14px/1.25 var(--pt-display); color: var(--heading); }
.vp-pick .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-pick .g { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--pt-display); background: #dbeafe; color: var(--accent); }
.vp-pick .g.f { background: #fde7ef; color: #c2185b; }
.vp-pick svg.i { color: var(--accent); }

/* auto-pause delays, text size and layout */
.delays { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px; }
.delay { min-height: 48px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); font: 700 14px/1 var(--pt-display); color: var(--heading); }
.delay:hover { border-color: var(--accent); }
.delay.on { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 10px 6px;
	border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); font: 600 13.5px/1.2 var(--pt-display); color: var(--heading); text-align: center;
}
.choice:hover { border-color: var(--accent); }
.choice.on { border-color: var(--accent); background: var(--cool); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice .aa { font-family: var(--pt-body); font-weight: 700; line-height: 1; }

/* ---------- toast + viewer ---------- */
.toast {
	position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); z-index: 40; transform: translateX(-50%); max-width: min(86%, 420px);
	padding: 10px 16px; border-radius: 14px; background: var(--solid); color: var(--pt-white);
	font: 600 13px/1.35 var(--pt-display); text-align: center; box-shadow: 0 10px 24px rgba(8, 26, 49, .3);
	animation: up .2s ease both; pointer-events: none;
}
.viewer { position: fixed; inset: 0; z-index: 30; background: rgba(8, 26, 49, .92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.viewer img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.viewer .icon-btn { position: absolute; top: calc(12px + var(--safe-t)); inset-inline-end: 12px; color: var(--pt-white); background: rgba(255, 255, 255, .12); }

.viewer-dl {
	position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); display: inline-flex; align-items: center; gap: 6px;
	height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: var(--pt-white); text-decoration: none;
	font: 600 13px/1 var(--pt-display);
}
.viewer-dl:hover { background: rgba(255, 255, 255, .24); }

/* ---------- camera ---------- */
.camera { position: fixed; inset: 0; z-index: 35; background: #000; display: flex; flex-direction: column; color: var(--pt-white); }
.cam-top { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 14px 8px; }
.cam-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.cam-video, .cam-still { width: 100%; height: 100%; object-fit: contain; }
.cam-video.mirror { transform: scaleX(-1); }
.cam-msg { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 320px; padding: 0 20px; text-align: center; font: 600 15px/1.45 var(--pt-display); }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 24px calc(22px + var(--safe-b)); }
.cam-bar > :first-child { justify-self: start; } .cam-bar > :last-child { justify-self: end; }
.cam-bar.shot { grid-template-columns: 1fr 1fr; gap: 12px; }
.cam-bar.shot .btn { width: 100%; }
.cam-bar .btn.ghost { background: rgba(255, 255, 255, .12); color: var(--pt-white); box-shadow: none; }
.cam-round { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--pt-white); display: inline-flex; align-items: center; justify-content: center; }
.cam-round[aria-pressed="true"] { background: var(--pt-white); color: #000; }
.cam-chip { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: var(--pt-white); font: 700 12.5px/1 var(--pt-display); }
.cam-shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .55); background: var(--pt-white); background-clip: padding-box; }
.cam-shutter:active { transform: scale(.94); }
.cam-shutter:disabled { opacity: .4; }

/* ---------- location ---------- */
.loc { display: grid; gap: 12px; padding-bottom: 4px; }
.loc-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--cool); }
.loc-card.err { background: var(--warm); }
/* v1.1.1: the note's mic, inside the box at the right (like the password eye) */
.loc-note-box { position: relative; }
.loc-note-box .loc-note { padding-inline-end: 56px; }
.loc-mic { position: absolute; inset-inline-end: 6px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.loc-mic svg.i { width: 22px; height: 22px; }
.loc-mic:hover { background: var(--paper); }
.loc-mic.on { background: var(--hl); color: var(--on-hl); }
.loc-mic.busy { opacity: .6; }
.loc-heard { margin: 6px 4px 0; font: italic 400 15px/1.4 var(--pt-body); color: var(--muted); }
.loc-pin { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--hl); color: var(--on-hl); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.loc-pin svg.i { width: 26px; height: 26px; }
.loc-card.finding .loc-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--hl); animation: ring 1.6s ease-out infinite; }
.loc-card.err .loc-pin { background: var(--muted); }
.loc-status { margin: 0; font: 700 15px/1.35 var(--pt-display); color: var(--heading); }
.loc-coords { margin: 2px 0 0; font: 500 13px/1.3 ui-monospace, monospace; color: var(--muted); }
.loc-coords:empty { display: none; }
.loc-check { display: inline-block; margin-top: 4px; font: 600 12.5px/1.3 var(--pt-display); color: var(--accent); }
.loc-note { height: auto; min-height: 64px; resize: vertical; font: 400 16px/1.35 var(--pt-body); padding-top: 10px; }
.loc .hint { margin: 0 4px; }

.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--pt-navy); }
.boot .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--pt-cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- v0.7: swap, day lines, links, maps, avatars, builder, viewer bar, pauses, exit ---------- */
.pill.swap { gap: 5px; color: var(--accent); border-color: #b9d1f3; background: var(--cool); }
.msg[data-day], .pause[data-day] { flex-wrap: wrap; }
.msg[data-day]::before, .pause[data-day]::before {
	content: attr(data-day); flex: 0 0 100%; order: -1; display: block; border: 0; text-align: center;
	margin: 10px 0 2px; font: 700 calc(11.5px * var(--ts))/1.3 var(--pt-display); color: var(--muted); letter-spacing: .04em;
}
.pause[data-day]::after { display: none; }
.txt .lnk { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.gps { align-items: flex-start; }
.gps > svg.i { flex: 0 0 auto; margin-top: 2px; color: var(--hl); }
.gps-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gps-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.gps-links a { font: 700 calc(13px * var(--ts))/1.3 var(--pt-display); color: var(--accent); }
.gps small { color: var(--muted); }
.gps .q::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 5px; background: #9aa9bd; vertical-align: 1px; }
.gps .q.good::before { background: #1c9b4a; }
.gps .q.ok::before { background: #e3a008; }
.gps .q.bad::before { background: #d93a1f; }
.av-btn { border: 0; padding: 0; background: none; border-radius: 12px; flex: 0 0 auto; cursor: zoom-in; }
.msg.cont .av-btn { visibility: hidden; }
.ins { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; align-self: center; }
.ins-b { width: 30px; height: 30px; border: 0; border-radius: 10px; background: var(--paper); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; opacity: .55; }
.ins-b svg.i { width: 16px; height: 16px; }
.ins-b:hover { opacity: 1; color: var(--accent); }
.ins-b.on { opacity: 1; background: var(--fill); color: var(--on-fill); }
.builderbar { background: var(--warm); color: var(--warm-ink); }
.field.waiting .send { opacity: .45; }
.chat-info { padding: 2px 4px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.chat-info b { display: block; font: 700 16px/1.3 var(--pt-display); color: var(--heading); }
.chat-info small { display: block; font: 500 13px/1.4 var(--pt-display); color: var(--muted); }
.tile.on .ic { background: var(--fill); color: var(--on-fill); }
.viewer-bar { position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: calc(18px + var(--safe-b)); display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 0 12px; }
.viewer-bar .viewer-dl { position: static; transform: none; border: 0; cursor: pointer; }
.pick { position: relative; display: block; }
.pick-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(8, 26, 49, .7); color: var(--pt-white); display: inline-flex; align-items: center; justify-content: center; }
.pick-x svg.i { width: 14px; height: 14px; }
.warn-line { margin: 4px 4px 14px; padding: 10px 12px; border-radius: 12px; background: var(--warm); color: var(--warm-ink); font: 600 13.5px/1.4 var(--pt-display); }
.cam-sel { height: 34px; max-width: 46vw; padding: 0 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); color: var(--pt-white); font: 600 12.5px/1 var(--pt-display); }
.cam-sel option { color: #000; }
.cam-auto { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 14px 0; color: var(--pt-white); }
.cam-auto svg.i { width: 18px; height: 18px; }
.cam-chip.on { background: var(--hl); color: var(--on-hl); }

/* ---------- v0.8: list tabs, tools, browse, topics, settings, display modes ---------- */
.list-status { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font: 600 13px/1.35 var(--pt-display); background: var(--cool); color: var(--heading); border-bottom: 1px solid var(--line); }
.list-status.warn { background: #fff7e0; color: #7a5200; }
.list-status .link-btn { flex: 1 1 auto; text-align: start; padding: 2px 0; }
.list-status svg.i { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.list-status .mini { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.tabs { display: flex; gap: 4px; padding: 8px 14px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.tab { flex: 1 1 0; border: 0; background: none; padding: 10px 4px 11px; font: 700 13.5px/1 var(--pt-display); color: var(--muted); border-bottom: 3px solid transparent; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.list-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 0 0 4px; }
.list-tools .chips { margin-top: 0; }
.tools-r { display: flex; align-items: center; gap: 4px; }
.icon-btn.spin svg { animation: spin .6s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.friends-btn { width: 40px; height: 40px; }
.join-card form { display: flex; gap: 8px; }
.join-card .scan-btn { flex: 0 0 auto; padding: 0 12px; background: rgba(255, 255, 255, .14); color: var(--pt-white); box-shadow: none; }
.row-wrap { position: relative; }
.row-wrap .chat-row { padding-inline-end: 52px; }
.row-wrap .row-edit { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.row-wrap .row-edit:hover { color: var(--accent); }
.chat-row .badge.new { background: var(--hl); color: var(--on-hl); }
.chat-row .badge.gold { background: #fff3c4; color: #7a5200; }
.chat-row .badge.purple { background: #f0e6ff; color: #6a3fb5; }
.chat-row.emergency { box-shadow: inset 4px 0 0 #e3a008, 0 4px 14px rgba(11, 37, 69, .06); }
.chat-row.console { box-shadow: inset 4px 0 0 #8a4fd8, 0 4px 14px rgba(11, 37, 69, .06); }
.chat-row.new { box-shadow: inset 4px 0 0 var(--hl), 0 4px 14px rgba(11, 37, 69, .06); }
.browse { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.b-cat, .b-topic { background: var(--surface); border-radius: 16px; box-shadow: 0 4px 14px rgba(11, 37, 69, .05); overflow: hidden; }
.b-sub .b-topic { box-shadow: none; border-top: 1px solid var(--line); border-radius: 0; }
.b-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 12px 14px; text-align: start; font: 600 14.5px/1.3 var(--pt-display); color: var(--heading); }
.b-row.cat { font-weight: 700; }
.b-row svg.i { width: 18px; height: 18px; color: var(--accent); flex: 0 0 auto; }
.b-row .n { margin-inline-start: auto; font: 600 12px/1 var(--pt-display); color: var(--muted); }
.b-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-tw { width: 18px; text-align: center; font: 700 16px/1 var(--pt-display); color: var(--muted); flex: 0 0 auto; }
.b-sub { padding-inline-start: 14px; }
.b-chats { display: flex; flex-direction: column; padding-block: 0 10px; padding-inline: 40px 10px; gap: 4px; }
.b-chat { display: flex; align-items: center; gap: 10px; border: 0; background: var(--paper); border-radius: 12px; padding: 9px 12px; text-align: start; color: var(--heading); }
.b-chat svg.i { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; }
.b-chat b { display: block; font: 700 14px/1.3 var(--pt-display); }
.b-chat small { display: block; font: 500 12px/1.3 var(--pt-display); color: var(--muted); }
.topics-edit { margin: 8px 0 0; }
.tp { margin: 0 0 8px; }
.tp-row { display: flex; align-items: center; gap: 6px; }
.b-tw-btn { width: 30px; height: 30px; border: 0; border-radius: 9px; background: var(--paper); font: 700 16px/1 var(--pt-display); color: var(--muted); flex: 0 0 auto; }
.tp-chats { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 6px 0; padding-inline: 36px 0; }
.tp-chats small { color: var(--muted); }
.sticky-foot { position: sticky; bottom: 0; padding: 10px 0 2px; background: linear-gradient(transparent, var(--surface) 30%); }
.settings .field-l { margin-top: 12px; }
.settings .sec > .field-l:first-of-type { margin-top: 0; }
.input.ro { display: flex; align-items: center; background: var(--paper); color: var(--muted); }
.field-note { margin: 6px 4px 0; font: 600 12.5px/1.35 var(--pt-display); color: var(--muted); }
.field-note.good { color: var(--good); }
.field-note.bad { color: var(--bad); }
.field-note .btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; margin-inline-start: 6px; }
.pic-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.pic, .av.xl { width: 64px; height: 64px; border-radius: 20px; object-fit: cover; flex: 0 0 auto; font-size: 22px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range { flex: 1 1 auto; accent-color: var(--fill); height: 32px; }
.range-v { font: 700 13px/1 var(--pt-display); color: var(--heading); min-width: 48px; text-align: end; }
.font-preview { margin: 8px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--paper); color: var(--text); line-height: 1.35; }
.notify-grid { display: flex; flex-direction: column; }
.ng-h, .ng-r { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: 6px; padding: 8px 4px; }
.ng-h { font: 700 11.5px/1 var(--pt-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 2px; }
.ng-r { border-top: 1px solid var(--line); }
.ng-r b { display: block; font: 700 14px/1.3 var(--pt-display); color: var(--heading); }
.ng-r small { display: block; font: 500 12.5px/1.35 var(--pt-display); color: var(--muted); }
.tick { justify-self: center; width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; }
.tick.on { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.tick:disabled { opacity: .45; }
.tick svg.i { width: 18px; height: 18px; }
.acct .motd { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--cool); color: var(--heading); font: 600 14px/1.4 var(--pt-display); }
.acct-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font: 500 14px/1.35 var(--pt-display); }
.acct-dl dt { color: var(--muted); }
.acct-dl dd { margin: 0; color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
.page-foot .inner { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.page-foot .inner .btn { max-width: none; width: 100%; }
/* Concise (Settings → Display mode): no bubbles, one line of name and time, text under it. */
:root[data-display="concise"] .thread .inner { gap: 4px; }
:root[data-display="concise"] .bubble, :root[data-display="concise"] .msg.me .bubble { background: none; border-color: transparent; box-shadow: none; padding: 4px 6px; max-width: 100%; border-radius: 10px; }
:root[data-display="concise"] .msg.me { flex-direction: row; }
:root[data-display="concise"] .bubble.picked, :root[data-display="concise"] .bubble.reading { background: var(--surface); }
/* Button labels: icons only, or words only (Settings → Button labels). */
:root[data-labels="emoji"] .dock .dl { display: none; }
:root[data-labels="text"] .dock .round svg { display: none; }
:root[data-labels="text"] .dock .round::after { content: attr(data-label); font: 700 12px/1 var(--pt-display); }
:root[data-labels="text"] .dock .dl { display: none; }
/* The list's top bar holds New chat, Friends and the account chip: in the narrow sidebar the chip shows just the
   avatar (its name is in the account sheet's title). */
.top .me-chip { flex: 0 0 auto; }
@media (min-width: 900px) { .top .me-chip > span:first-child { display: none; } .top .me-chip { padding: 3px; } }

/* ---------- v0.9: friends, QR, scanner, sign-up ---------- */
.friends .sec { max-width: 640px; margin-inline-start: auto; margin-inline-end: auto; }
.hd .btn.sm { height: 38px; padding: 0 14px; font-size: 13px; flex: 0 0 auto; }
.frow .ft.link { border: 0; background: none; padding: 0; text-align: start; color: inherit; cursor: pointer; flex: 1 1 auto; min-width: 0; }
.frow .ft.link:disabled { cursor: default; }
.frow.self { background: var(--cool); }
.frow.link-row .av svg.i { width: 20px; height: 20px; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 6px; }
.qr { width: min(300px, 78vw); padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 6px 20px rgba(11, 37, 69, .12); }
.qr svg { display: block; width: 100%; height: auto; }
.qr-link { margin: 0; font: 500 12.5px/1.4 var(--pt-display); color: var(--muted); word-break: break-all; text-align: center; max-width: 340px; }
.qr-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.camera.scan .cam-top { justify-content: space-between; }
.scan-title { color: var(--pt-white); font: 700 16px/1.2 var(--pt-display); }
.scan-frame { position: absolute; width: min(64vw, 300px); aspect-ratio: 1; border: 3px solid rgba(255, 255, 255, .85); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); pointer-events: none; }
.scan-msg { margin: 0; padding: 16px 20px calc(24px + var(--safe-b)); text-align: center; color: var(--pt-white); font: 600 15px/1.4 var(--pt-display); }
.pw { position: relative; }
.pw .input { padding-inline-end: 52px; }
.pw .eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.pw .eye[aria-pressed="true"] { color: var(--accent); }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 4px; font: 500 13.5px/1.45 var(--pt-display); color: var(--text); }
.check-row input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--fill); }
.card .foot.col { flex-direction: column; align-items: center; gap: 2px; }
.card .stack .field-l { margin-top: 6px; }
.join-card .scan-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--pt-white); opacity: .9; }
.join-card .scan-link svg.i { width: 18px; height: 18px; }

/* ---------- v1.1: video beside the chat (views/video.js) ---------- */
html.video-on .app { grid-template-columns: 1fr; }
html.video-on .app .side { display: none; }
.stage { position: relative; flex: 0 0 42%; min-height: 180px; background: #000; color: #fff; overflow: hidden; }
@media (min-aspect-ratio: 1/1) and (min-width: 700px) {
	.app .main.with-video, .app.in-chat .main.with-video { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
	.main.with-video > * { min-width: 0; }
	.main.with-video .hd .row2 { flex-wrap: wrap; row-gap: 4px; }
	.main.with-video > .stage { grid-column: 1; grid-row: 1 / -1; height: 100dvh; }
	.main.with-video > .hd { grid-column: 2; grid-row: 1; }
	.main.with-video > .status { grid-column: 2; grid-row: 2; }
	.main.with-video > .thread-wrap { grid-column: 2; grid-row: 3; }
	.main.with-video > .composer { grid-column: 2; grid-row: 4; }
}
.stage-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.stage-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.stage-video.mirror { transform: scaleX(-1); }
.stage-avwrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--pt-navy); }
.stage-av { width: 40%; max-width: 220px; aspect-ratio: 1 / 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font: 700 clamp(28px, 7vw, 64px)/1 var(--pt-display); }
.stage-av img { width: 100%; height: 100%; object-fit: cover; }
.stage-status { position: absolute; inset-inline-start: 0; inset-inline-end: 0; top: 50%; transform: translateY(-50%); z-index: 3; padding: 14px 20px; text-align: center; color: #ffd84d; font: 600 15px/1.45 var(--pt-display); }
.stage-status[hidden] { display: none; }
.stage-cap { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; width: max-content; max-width: min(78%, 900px); max-height: calc(100% - 70px); overflow-y: auto; padding: 8px 14px; border-radius: 10px; background: rgba(0, 0, 0, .72); color: #fff; text-align: center; font: 600 clamp(16px, 2.4vw, 28px)/1.3 var(--msg-font, var(--pt-body)); }
.stage-cap[hidden] { display: none; }
.stage-ctrls { position: absolute; inset-inline-start: 10px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; gap: 8px; }
.stage-top { position: absolute; inset-inline-end: 10px; top: 10px; z-index: 5; display: flex; gap: 8px; }
.stage-btn { min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .45); color: rgba(255, 255, 255, .75); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 700 14px/1 var(--pt-display); letter-spacing: .04em; }
.stage-btn[hidden] { display: none; }
.stage-btn svg.i { width: 20px; height: 20px; }
.stage-btn.on { background: rgba(255, 255, 255, .95); border-color: #fff; color: var(--pt-ink); }
.stage-btn.mic.on { background: #ffd84d; border-color: #4caf50; }
.stage-btn.share span { font: 600 13px/1 var(--pt-display); letter-spacing: 0; }
.stage-btn.close { background: rgba(0, 0, 0, .6); border-color: rgba(255, 255, 255, .5); color: #fff; }
.stage-audio { display: none; }
.shutter { position: fixed; inset: 0; z-index: 9999; background: #fff; opacity: .85; pointer-events: none; }
.mic.on.voice { background: var(--hl-voice); }

/* ---------- v1.1: captions on the web, glasses, bridge mode ---------- */
.cc-state { display: flex; align-items: center; gap: 8px; margin: 2px 4px 6px; font: 600 14px/1.35 var(--pt-display); color: var(--muted); }
.cc-state .live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--switch-off); flex: 0 0 auto; }
.cc-state.live { color: var(--heading); }
.cc-state.live .live-dot { background: #e0402a; animation: blink 1.4s ease-in-out infinite; }
.act.on b { color: var(--accent); }
.btn.flash { animation: blink 1s ease-in-out infinite; }
.big-code { margin: 4px 4px 14px; font: 700 26px/1.2 var(--pt-display); letter-spacing: .12em; color: var(--heading); text-align: center; word-break: break-all; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 12px 10px; }
.pick-list .hint { width: 100%; margin: 0 0 2px; }
.glasses-preview { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: #000; display: flex; justify-content: center; }
.glasses-preview img { display: block; max-width: 100%; max-height: 55vh; object-fit: contain; }
.bridge-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px 20px calc(24px + var(--safe-b)); background: var(--pt-deep); color: #fff; text-align: center; }
.bridge-ic svg.i { width: 72px; height: 72px; color: var(--pt-sky); }
.bridge-msg { margin: 0; max-width: 420px; font: 600 20px/1.45 var(--pt-display); white-space: pre-line; }
.bridge-msg.ok { color: #7ee08a; }
.bridge-msg.bad { color: #ffb4a3; }
.bridge-btns { display: flex; gap: 12px; }
.bulk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 4px 10px; }
.bulk-row small { font: 600 12.5px/1.2 var(--pt-display); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .cc-state.live .live-dot, .btn.flash { animation: none; } }

/* ---------- v1.0.6: folding the controls (phones), the emoji panel, the text-size slider, dark ---------- */
.composer { position: relative; }
.dock-tg { display: none; }
.emo-btn {
	width: 36px; height: 36px; margin-inline-start: -10px; padding: 0; border: 0; border-radius: 50%; background: transparent;
	color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.emo-btn:hover { color: var(--accent); }
.emo-btn[aria-pressed="true"] { background: var(--cool); color: var(--accent); }
.emoji-panel { display: flex; flex-direction: column; height: 300px; margin: 8px 0 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.ep-top { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px; flex: 0 0 auto; }
.ep-find { position: relative; flex: 1 1 auto; min-width: 0; }
.ep-find svg.i { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.ep-search { width: 100%; height: 38px; padding-block: 0 0; padding-inline: 34px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--text); font: 400 15px/1 var(--pt-display); outline: 0; }
.ep-search:focus { border-color: var(--accent); }
.ep-tone { width: 42px; height: 38px; padding: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 20px; line-height: 1; flex: 0 0 auto; }
.ep-tone[aria-expanded="true"] { border-color: var(--accent); }
.ep-tones { display: flex; justify-content: flex-end; gap: 4px; padding: 2px 8px 6px; flex: 0 0 auto; }
.ep-tones button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; font-size: 22px; line-height: 1; }
.ep-tones button[aria-pressed="true"] { background: var(--cool); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ep-tabs { display: flex; gap: 2px; padding: 0 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; }
.ep-tabs.off { opacity: .45; }
.ep-tab { flex: 1 0 34px; height: 36px; padding: 0; border: 0; border-bottom: 3px solid transparent; background: none; font-size: 19px; line-height: 1; filter: grayscale(.7); opacity: .75; }
.ep-tab[aria-selected="true"] { border-bottom-color: var(--accent); filter: none; opacity: 1; }
.ep-grid { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 6px 8px; overscroll-behavior: contain; scrollbar-width: thin; }
.ep-sec.off { display: none; }
.ep-sec h4 { position: sticky; top: 0; z-index: 1; margin: 0; padding: 8px 4px 4px; background: var(--surface); font: 700 11px/1 var(--pt-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ep-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.ep-row button { height: 40px; padding: 0; border: 0; border-radius: 10px; background: none; font: 26px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.ep-row button:hover, .ep-row button:focus-visible { background: var(--paper); }
.ep-row button:active { transform: scale(.9); }
.ep-msg { margin: 16px 8px; font: 600 13.5px/1.4 var(--pt-display); color: var(--muted); text-align: center; }
.sheet h3.first { margin-top: 4px; }
.ts-row { gap: 10px; margin: 0 4px; }
.ts-row .aa { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: var(--paper); color: var(--heading); font-family: var(--pt-body); font-weight: 700; line-height: 1; flex: 0 0 auto; }
.ts-row .aa.sm { font-size: 14px; }
.ts-row .aa.lg { font-size: 24px; }
.ts-preview { margin: 10px 4px 0; padding: 12px 14px; border-radius: 14px; background: var(--paper); color: var(--text); font-family: var(--msg-font, var(--pt-body)); font-size: calc(var(--msg-px, 16px) * var(--ts)); line-height: 1.38; }
.logo.dk, .brand.dk { display: none; }
:root[data-theme="dark"] .logo.lt, :root[data-theme="dark"] .brand.lt { display: none; }
:root[data-theme="dark"] .logo.dk, :root[data-theme="dark"] .brand.dk { display: block; }
/* Dark: the one-off colors that the tokens don't cover. */
:root[data-theme="dark"] .day, :root[data-theme="dark"] button.pause > span, :root[data-theme="dark"] .upload { background: var(--veil); }
:root[data-theme="dark"] .bar { background: var(--switch-off); }
:root[data-theme="dark"] .list-status.warn { background: var(--notice); color: var(--notice-ink); }
:root[data-theme="dark"] .chat-row .badge.gold { background: #3a2f10; color: #ffd772; }
:root[data-theme="dark"] .chat-row .badge.purple { background: #2c1f4a; color: #c9a8ff; }
:root[data-theme="dark"] .vp-pick .g { background: var(--cool); color: var(--accent); }
:root[data-theme="dark"] .vp-pick .g.f { background: #3d1a2a; color: #ff8fb8; }
:root[data-theme="dark"] .pill.swap { border-color: var(--pill-line); }
:root[data-theme="dark"] .card-wrap, :root[data-theme="dark"] .welcome > .card { box-shadow: 0 0 0 1px var(--line), 0 30px 70px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] .cam-sel option { color: var(--text); background: var(--surface); }

/* ---------- v1.0.7: the tour (js/tour.js), searching the chat list ---------- */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour.dim { background: rgba(3, 10, 22, .62); }
.tour-hole { position: fixed; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 3px var(--pt-sky), 0 0 0 200vmax rgba(3, 10, 22, .62); transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease; }
.tour-card { position: fixed; padding: 14px 16px 16px; border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 22px 50px rgba(0, 0, 0, .35); animation: fade .2s ease both; }
.tour.dim .tour-card { left: 50%; top: 50%; width: min(400px, calc(100% - 24px)); transform: translate(-50%, -50%); padding: 22px 20px 18px; }
.tour-card h2 { margin: 0 0 6px; font: 700 18px/1.25 var(--pt-display); color: var(--heading); }
.tour-card p { margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--text); }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin-block: -4px 2px; margin-inline: 0 -8px; }
.tour-top .icon-btn { width: 36px; height: 36px; color: var(--muted); }
.tour-n { font: 700 11px/1 var(--pt-display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tour-dots { display: flex; gap: 5px; margin: 12px 0 0; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--switch-off); }
.tour-dots i.on { width: 18px; border-radius: 999px; background: var(--accent); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tour-foot .btn { min-height: 44px; padding: 0 18px; }
.tour-foot.col { flex-direction: column; align-items: stretch; gap: 8px; }
.tour-foot.col .link-btn { align-self: center; color: var(--muted); }
.tour-logo { display: block; width: 120px; height: auto; margin: 0 0 12px; }
.tour-logo.dk { display: none; }
:root[data-theme="dark"] .tour-logo.lt { display: none; }
:root[data-theme="dark"] .tour-logo.dk { display: block; }
.chat-search { margin: 0 0 10px; }
.chat-search .input { padding-inline-end: 46px; }
.chat-search .input::-webkit-search-cancel-button { display: none; }
.chat-search .clr { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.chat-search .clr svg { position: static; transform: none; width: 18px; height: 18px; }
.chat-search .clr:hover { color: var(--accent); background: var(--paper); }
.empty .btn.sm { margin-top: 12px; }

/* ---------- v1.0.8: your messages on their way (Sending…, Not sent) ---------- */
.msg.pending .bubble { cursor: default; }
.msg.pending .bubble .txt { opacity: .78; }
.msg.pending .who .tm { font-style: italic; }
.msg.pending.failed .bubble { border-color: var(--bad); }
.msg.pending.failed .bubble .txt { opacity: 1; }
.msg.pending.failed .who .tm { color: var(--bad); font-style: normal; font-weight: 700; }

/* ---------- v1.0.10: start from a transcript ---------- */
.imp-sub { margin: 0 2px 10px; }
.imp-pick { width: 100%; justify-content: center; }
.imp-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.imp-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imp-t b { font: 700 15px/1.3 var(--pt-display); color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-t small { font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.imp-card .link-btn { flex: 0 0 auto; }
.imp-opts { margin-top: 12px; }
.imp-opts .field-l { margin-top: 10px; }
.imp-opts > .hint:first-child { margin-top: 0; }
.hint.warm { color: var(--warm-ink); }
.imp-run { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 18px; text-align: center; }
.imp-run b { font: 700 16px/1.35 var(--pt-display); color: var(--heading); }
.imp-run .bar { width: 100%; max-width: 360px; }
.who .imp { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; font-weight: 600; font-size: 11px; color: var(--muted); white-space: nowrap; }
.who .imp svg.i { width: 12px; height: 12px; }
.imp-run .spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }

/* ---------- v1.2.0: the New section, alerts, alert settings ---------- */
.new-box[hidden] { display: none; }
.new-sec .sec-h { margin-top: 4px; align-items: center; }
.new-sec .sec-h h3 { color: var(--hl); }
.new-sec .mark-read { margin-inline-start: auto; padding: 0 2px; font-size: 13px; }
.new-sec .sec-h .n { margin-inline-start: 8px; }
.chat-row.unread b { color: var(--heading); }
.chat-row.unread small { color: var(--text); }
.chat-row.muted small { color: var(--muted); }
.new-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.new-r small { font: 600 11.5px/1 var(--pt-display); color: var(--muted); }
.new-r .nr { display: inline-flex; align-items: center; gap: 6px; }
.new-r .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--hl); color: var(--on-hl); font: 700 12px/22px var(--pt-display); text-align: center; }
.chat-row.muted .count { background: var(--line); color: var(--muted); }
.new-r .quiet svg.i { width: 16px; height: 16px; color: var(--muted); }
.chat-row.invite-new { box-shadow: 0 0 0 1.5px var(--warm-line, rgba(255, 107, 74, .35)), 0 4px 14px rgba(11, 37, 69, .06); }
.req-ic { display: inline-flex; align-items: center; justify-content: center; background: var(--cool); color: var(--accent); flex: 0 0 auto; }
.req-ic svg.i { width: 22px; height: 22px; }
.alert-banner {
	position: fixed; top: calc(12px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%); z-index: 45;
	width: min(92%, 440px); display: flex; align-items: center; gap: 4px; padding-block: 6px 6px; padding-inline: 4px 6px; border-radius: 16px;
	background: var(--solid); color: var(--pt-white); box-shadow: 0 12px 28px rgba(8, 26, 49, .35); animation: drop .2s ease both;
}
@keyframes drop { from { transform: translate(-50%, -16px); opacity: 0; } }
.alert-banner .ab-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 6px 8px; text-align: start; }
.alert-banner .ab-main svg.i { width: 20px; height: 20px; color: var(--hl); flex: 0 0 auto; }
.alert-banner .ab-main span { min-width: 0; }
.alert-banner b { display: block; font: 700 14px/1.3 var(--pt-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-banner small { display: block; font: 500 13px/1.35 var(--pt-body); opacity: .85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.alert-banner .mini { color: var(--pt-white); opacity: .8; }
.acts-h { margin: 14px 12px 4px; font: 700 12px/1 var(--pt-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.acts-group.dim { opacity: .55; }
.rule-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; }
.rule-row svg.i { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }
.rule-row > span { flex: 1 1 auto; min-width: 0; }
.rule-row b { display: block; font: 600 15px/1.25 var(--pt-display); color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-row small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); }
.alerts-sec .btn.sm { align-self: flex-start; margin: 4px 12px; }
.alerts-sec .test-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 12px; }
.alerts-sec .test-row .btn.sm { margin: 0; }

/* ---------- v1.3.0: themes (Display → Theme: js/look.js, views/theme.js) ---------- */
.lk-pv { display: flex; flex-direction: column; gap: 10px; margin: 2px 0 4px; padding: 14px 12px 12px; border-radius: 18px; border: 1px solid var(--line); background-color: var(--screen-bg); pointer-events: none; }
.lk-pv .bubble { cursor: default; }
.lk-pv .msg-acts { margin-top: 6px; padding-top: 6px; }
.lk-pv-dock { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0 2px; margin: 4px -12px 0; border-top: 1px solid var(--line); }
.lk-pv-dock .chip { margin: 0; }
.lk-pv-dock .mic { width: 46px; height: 46px; box-shadow: none; }
.lk-pv-dock .mic svg.i { width: 22px; height: 22px; }
.lk-pv-dock .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--hl); color: var(--on-hl); font: 700 12px/22px var(--pt-display); text-align: center; }
.lk-hint { margin: 8px 4px 4px; }
.lk-hint.warm { color: var(--warm-ink); }
.lk-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lk-preset { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 6px 8px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--heading); font: 600 12.5px/1.2 var(--pt-display); }
.lk-preset:hover { border-color: var(--accent); }
.lk-preset.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.lk-preset .nm { display: flex; align-items: center; justify-content: center; gap: 4px; }
.lk-preset .nm svg.i { width: 14px; height: 14px; }
.lk-sw { position: relative; display: block; height: 56px; border-radius: 11px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.lk-sw i { position: absolute; display: block; }
.lk-sw .b { height: 12px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.lk-sw .b.them { inset-inline-start: 7px; top: 9px; width: 58%; }
.lk-sw .b.me { inset-inline-end: 7px; top: 26px; width: 50%; }
.lk-sw .dot { bottom: 6px; inset-inline-start: 7px; width: 10px; height: 10px; border-radius: 50%; }
.lk-sw .dot.hl { inset-inline-start: 21px; }
.lk-row { padding: 12px 4px; border-top: 1px solid var(--line); }
.lk-row:first-of-type { border-top: 0; }
.lk-l { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.lk-l b { font: 700 14.5px/1.3 var(--pt-display); color: var(--heading); }
.lk-l small { flex-basis: 100%; font: 500 12.5px/1.35 var(--pt-display); color: var(--muted); }
.lk-reset { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; font-size: 13px; }
.lk-reset svg.i { width: 15px; height: 15px; }
.lk-sws { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lk-c { position: relative; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); cursor: pointer; }
.lk-c.on { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.lk-c svg.i { width: 16px; height: 16px; }
.lk-any { background: conic-gradient(#ff5f5f, #ffcc33, #4cd964, #34c3ff, #7a5cff, #ff5fb4, #ff5f5f); color: #fff; }
.lk-any svg.i { filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, .55)); }
.lk-any.on svg.i { filter: none; }
.lk-any input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.lk-any:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.lk-pat { display: block; width: 100%; height: 30px; border-radius: 9px; background-color: var(--screen-bg); box-shadow: inset 0 0 0 1px var(--line); }
.lk-shape { display: block; width: 52px; height: 24px; background: var(--bubble-me); box-shadow: inset 0 0 0 1px var(--line); }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.two .choice { min-height: 44px; }
.lk-fonts .chip { font-size: 14px; font-weight: 600; min-height: 36px; }
.lk-all { margin-top: 18px; }
/* A row with a title and a line under it (Settings → Display and Theme, Display → Theme). */
.act.stack { align-items: flex-start; }
.act.stack b { display: block; font: 700 15px/1.25 var(--pt-display); }
.act.stack small { display: block; font: 500 13px/1.35 var(--pt-display); color: var(--muted); margin-top: 2px; }
.m .act.stack b { font-size: 18px; }
.m .act.stack small { font-size: 15px; }
.lk-sync { margin: 6px 0 0; }
/* v1.5.0: a chat's theme (views/theme.js in chat mode) */
.lk-top { margin-top: 12px; }
.lk-mine { margin: 8px 0 4px; }

/* ---------- v1.6.0: chat folders and filters (views/home.js, views/folders.js) ---------- */
.folders { margin: 4px 0 6px; }
.fold { margin-bottom: 6px; }
.fold-row { position: relative; }
.fold-h {
	width: 100%; display: flex; align-items: center; gap: 8px; min-height: 48px; padding-block: 8px 8px; padding-inline: 10px 52px; border: 0; border-radius: 14px;
	background: var(--surface); box-shadow: 0 2px 10px rgba(11, 37, 69, .05); color: var(--heading); text-align: start;
	font: 700 calc(15px * var(--ts))/1.25 var(--pt-display); transition: box-shadow .15s ease, background-color .15s ease;
}
.fold-h:hover { box-shadow: 0 6px 18px rgba(11, 37, 69, .09); }
.fold-h > svg.i { width: 20px; height: 20px; color: var(--accent); flex: 0 0 auto; }
.fold-h .nm { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-h .n { font: 600 12.5px/1 var(--pt-display); color: var(--muted); flex: 0 0 auto; }
.fold-h .count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--hl); color: var(--on-hl); font: 700 12px/22px var(--pt-display); text-align: center; flex: 0 0 auto; }
.fold-h .chev { display: inline-flex; color: var(--muted); transition: transform .15s ease; transform: rotate(-90deg); flex: 0 0 auto; }
.fold-h .chev.open { transform: none; }
.fold-h .chev svg.i { width: 16px; height: 16px; }
.fold-more { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; color: var(--muted); }
.fold-more:hover { color: var(--accent); }
.fold-b { margin-block: 6px 4px; margin-inline: 14px 0; padding-inline-start: 10px; border-inline-start: 2px solid var(--line); }
.fold-b .fold-h { min-height: 44px; box-shadow: none; background: color-mix(in srgb, var(--surface) 70%, var(--paper)); }
.fold-empty { margin: 4px 4px 8px; font: 500 13px/1.4 var(--pt-display); color: var(--muted); }
.fold-bar { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 2px 6px; border-radius: 12px; }
.fold-bar .link-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; }
.fold-bar .link-btn svg.i { width: 17px; height: 17px; }

/* drag and drop (a mouse), Select */
.chat-row, .fold-h { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.dragging { opacity: .45; }
.drop, .fold-h.drop, .list-sec.drop { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px color-mix(in srgb, var(--fill) 16%, transparent); background: var(--cool); }
.list-sec { border-radius: 16px; }
.list-sec.drop { padding: 2px 6px 6px; }
.drag-on .fold-bar { outline: 1.5px dashed var(--line); outline-offset: 2px; }
.av-wrap { position: relative; flex: 0 0 auto; display: inline-flex; }
.pick-ic {
	position: absolute; inset-inline-end: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	background: var(--surface); border: 2px solid var(--line); color: var(--on-fill);
}
.pick-ic.on { background: var(--fill); border-color: var(--surface); }
.pick-ic svg.i { width: 14px; height: 14px; }
.chat-row.picked { box-shadow: 0 0 0 2px var(--accent); background: var(--cool); }
.sel-bar {
	position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 8px -4px 0; padding: 10px 12px calc(10px + var(--safe-b));
	border-radius: 16px 16px 0 0; background: var(--surface); box-shadow: 0 -6px 20px rgba(11, 37, 69, .12);
}
.sel-bar .sel-n { flex: 1 1 auto; font: 700 14px/1.3 var(--pt-display); color: var(--heading); }

/* the sheets */
.fold-tree .act.fold-pick .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act.fold-pick.on { color: var(--accent); background: var(--cool); }
.act:disabled { opacity: .45; }
.fold-form { padding: 6px 4px 4px; }
.fold-form-r { display: flex; gap: 8px; }
.fold-form-r .input { flex: 1 1 auto; min-width: 0; }
.fold-form-r .btn { flex: 0 0 auto; min-height: 46px; }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 11px; }
.icon-btn.sm svg.i { width: 18px; height: 18px; }
.icon-btn:disabled { opacity: .35; }
.rules { display: grid; gap: 8px; }
.rule-row { display: flex; align-items: center; gap: 10px; padding-block: 8px 8px; padding-inline: 10px 6px; border-radius: 14px; background: var(--paper); }
.rule-row.off .rule-t { opacity: .6; }
.rule-t { flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 4px 0; text-align: start; color: var(--heading); }
.rule-t b { display: block; font: 700 14px/1.35 var(--pt-display); }
.rule-t small { display: flex; align-items: center; gap: 4px; margin-top: 3px; font: 600 12.5px/1.3 var(--pt-display); color: var(--accent); }
.rule-t small svg.i { width: 15px; height: 15px; }
.rule-ord { display: flex; flex-direction: column; }
.conds { display: grid; gap: 10px; margin-bottom: 6px; }
.cond { display: grid; gap: 6px; padding: 10px; border-radius: 14px; background: var(--paper); }
.cond-r { display: flex; gap: 6px; align-items: center; }
.cond-r > .input { flex: 1 1 0; min-width: 0; }
.cond-r > .icon-btn { flex: 0 0 auto; }
.cond-r.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 420px) { .cond-r.how { grid-template-columns: minmax(0, 1fr); } }
.cond-r.how > :only-child { grid-column: 1 / -1; }
.fold-pv { margin: 10px 4px 0; color: var(--heading); }
.del-filter { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; }
.link-btn.warm { color: var(--warm-ink); }
.drop-back { display: none; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 4px; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--line); color: var(--muted); font: 600 13.5px/1.3 var(--pt-display); }
.drag-filed .drop-back { display: flex; }
.drop-back.drop { color: var(--accent); border-color: var(--accent); }
/* rows inside folders: a little smaller, so nested ones keep their names */
.fold-b .chat-row { padding: 10px; gap: 10px; border-radius: 16px; margin-bottom: 6px; }
.fold-b .chat-row .av.lg { width: 38px; height: 38px; border-radius: 13px; font-size: 14px; }
.fold-b .fold-b { margin-inline-start: 8px; }
@media (max-width: 560px) {
	.fold-b { margin-inline-start: 6px; padding-inline-start: 8px; }
	.fold-b .fold-b { margin-inline-start: 4px; }
	.fold-b .chat-row .badge { padding: 5px 6px; font-size: 9.5px; }
}

/* ---------- the app's language and right to left (v1.7.0) ---------- */
/* Arabic and Hebrew mirror the whole app: i18n.js loadUi sets <html dir="rtl">, and the rules above use start and
   end, not left and right. Messages keep their own direction (chat.js), whatever the app's. */
:root[dir="rtl"] { --dx: -1; }
svg[data-icon="back"]:dir(rtl), svg[data-icon="next"]:dir(rtl), svg[data-icon="send"]:dir(rtl),
svg[data-icon="leave"]:dir(rtl), svg[data-icon="foldermove"]:dir(rtl) { transform: scaleX(-1); }
.fold-h .chev:not(.open):dir(rtl) { transform: rotate(90deg); }
/* Names, chat titles and folder names people wrote run in their own direction inside the app's (a Hebrew chat
   title in an English list, an English name in an Arabic one); they still line up with the app. */
:is(.chat-row .t b, .chat-row .t small, .hd .t b, .nm, .ft b, .me-chip span) { unicode-bidi: plaintext; text-align: match-parent; }
/* Typed text runs in its own direction (util.js h: dir="auto"), but an empty box lines up with the app. */
:root[dir="rtl"] :is(input, textarea)[dir="auto"]:placeholder-shown { direction: rtl; }

/* The app's fonts are Latin only (Comic Neue, Poppins). Polish and Turkish get Nunito for body text; Russian,
   Ukrainian, Vietnamese and the other scripts use the device's own fonts, as the website does without loading any. */
:root[data-ui-font="ext-body"] { --pt-body: "Nunito", "Segoe UI", system-ui, sans-serif; }
:root:is([data-ui-font="ext"], [data-ui-font="cjk"], [data-ui-font="script"]) {
	--pt-display: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
	--pt-body: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

/* The globe: the website header's language button. */
.globe-btn {
	display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 11px; flex: 0 0 auto;
	border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--heading);
	font: 700 14px/1 var(--pt-display); letter-spacing: .02em; cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.globe-btn:hover, .globe-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.globe-btn svg.i { width: 18px; height: 18px; flex: 0 0 auto; }
.globe-btn svg.chev { width: 12px; height: 12px; }
.welcome { position: relative; justify-content: flex-start; }
/* Centered when it fits; when it doesn't (a phone, a long language), it starts at the top instead of being cut off
   there (justify-content: center would push the top out of reach). */
.welcome > :first-child, .welcome > .tag { margin-top: auto; }
.welcome > :last-child { margin-bottom: auto; }
.welcome > .globe-btn { position: absolute; top: calc(14px + var(--safe-t)); inset-inline-end: 14px; z-index: 2; }
/* Phones and short screens: above the tagline, at the end of the line, so it never covers it. */
@media (max-width: 760px), (max-height: 720px) {
	.welcome > .globe-btn { position: static; align-self: flex-end; margin: 0 0 14px; }
}
.m .welcome > .globe-btn { position: static; align-self: flex-end; margin: 0 0 14px; height: 44px; }
.ui-langs .nat { font-family: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif; font-weight: 600; }
/* In the chat list's header it's a round button like Friends, with the language's code as a small badge. */
.top .globe-btn { position: relative; width: 40px; padding: 0; justify-content: center; border-width: 1.5px; }
.top .globe-btn svg.i { width: 20px; height: 20px; }
.top .globe-btn svg.chev { display: none; }
.top .globe-btn .code {
	position: absolute; bottom: -4px; inset-inline-end: -5px; padding: 2px 4px; border-radius: 6px;
	background: var(--solid); color: var(--pt-white); font: 700 9px/1 var(--pt-display); letter-spacing: .03em;
}
.m .top .globe-btn { width: 44px; height: 44px; }
.top.tight .new-chat { width: 40px; padding: 0; justify-content: center; flex: 0 0 auto; }
.top.tight .new-chat .lbl { display: none; }
.m .top.tight .new-chat { width: 50px; padding: 0; }
