:root {
	--teal: #0f8b8d;
	--teal-dark: #0a6f73;
	--bg: #e3f4f5;
	--card: #ffffff;
	--user: #d9f5d0;
	--text: #10242e;
	--muted: #7b8c93;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #cfe9ec;
	color: var(--text);
	display: flex;
	justify-content: center;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.app {
	width: 100%;
	max-width: 440px;
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	background: linear-gradient(#bfe6e9, var(--bg) 40%, #f3fafa);
	overflow: hidden;
}

/* Top bar */
.topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: #f1fafa;
	border-radius: 0 0 28px 28px;
}
.logo {
	width: 52px; height: 52px; border-radius: 50%;
	background: var(--teal);
	display: grid; place-items: center;
	box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--teal);
	margin: 2px 4px 2px 2px;
}
.title { flex: 1; }
.title h1 { font-size: 20px; line-height: 1.2; }
.title p { font-size: 14px; color: #4a5d66; margin-top: 2px; }
.menu { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.menu span { width: 24px; height: 3px; background: var(--text); border-radius: 2px; }

/* Hero */
.hero { display: flex; align-items: flex-start; gap: 4px; padding: 12px 16px 0 10px; }
.bot-big { flex: none; align-self: flex-end; }
.hello { margin-top: 4px; }

/* Bubbles */
.bubble {
	background: var(--card);
	padding: 14px 16px;
	border-radius: 20px;
	font-size: 15px;
	line-height: 1.45;
	box-shadow: 0 2px 8px rgba(15, 100, 110, .08);
	max-width: 100%;
}
.bubble.user { background: var(--user); border-bottom-right-radius: 6px; }
.bubble.bot { border-top-left-radius: 6px; }
.bubble ul { list-style: none; margin: 8px 0; }
.bubble li { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.bubble li::before {
	content: "✓"; flex: none;
	width: 20px; height: 20px; border-radius: 5px;
	background: #1db954; color: #fff;
	font-size: 13px; font-weight: 700;
	display: grid; place-items: center;
}
.time { display: block; text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 14px 12px; }
.quick button {
	background: rgba(255, 255, 255, .8);
	border-radius: 18px;
	padding: 14px 4px 12px;
	font-size: 13px; line-height: 1.25;
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	box-shadow: 0 2px 8px rgba(15, 100, 110, .08);
	transition: transform .1s;
}
.quick button:active { transform: scale(.96); }
.quick svg {
	width: 34px; height: 34px;
	fill: none; stroke: var(--teal); stroke-width: 1.8;
	stroke-linecap: round; stroke-linejoin: round;
}

/* Messages */
.messages {
	flex: 1;
	overflow-y: auto;
	background: #f3fafa;
	border-radius: 28px 28px 0 0;
	padding: 16px;
	display: flex; flex-direction: column; gap: 14px;
}
.row { display: flex; gap: 10px; align-items: flex-start; }
.row.user { justify-content: flex-end; max-width: 100%; }
.row.user .bubble { max-width: 80%; }
.row.bot .bubble { max-width: 85%; }
.avatar-sm {
	flex: none; width: 40px; height: 40px; border-radius: 50%;
	background: #fff; display: grid; place-items: center; font-size: 22px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.avatar-user { background: #e1f1f2; }
.avatar-user svg { width: 22px; height: 22px; fill: none; stroke: var(--teal); stroke-width: 2; }
.read { color: #2aa5c7; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; padding-left: 50px; }
.actions button {
	flex: 1; min-width: 140px;
	padding: 14px 12px; border-radius: 999px;
	border: 1.5px solid #8ccfd2; background: #fff; color: var(--teal-dark);
	font-weight: 600; font-size: 15px;
}
.actions button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }

.typing span {
	display: inline-block; width: 7px; height: 7px; margin: 0 2px;
	border-radius: 50%; background: #9bb; animation: blink 1s infinite;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* Composer */
.composer {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px calc(14px + env(safe-area-inset-bottom));
	background: #f3fafa;
}
.clip { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; }
.clip svg { width: 24px; height: 24px; fill: none; stroke: #6b7b82; stroke-width: 1.8; stroke-linecap: round; }
.composer input {
	flex: 1; min-width: 0; height: 52px; padding: 0 20px;
	border: 0; border-radius: 999px; background: #fff;
	font-size: 16px; color: var(--text); outline: none;
}
.composer input:focus { box-shadow: 0 0 0 2px #8ccfd2; }
.send {
	width: 52px; height: 52px; border-radius: 50%; flex: none;
	background: var(--teal); display: grid; place-items: center;
}
.send svg { width: 24px; height: 24px; }

.bubble { white-space: pre-line; }
.bubble ul, .bubble .time { white-space: normal; }
