* { box-sizing: border-box; }
:root { font-family: "Segoe UI", system-ui, sans-serif; color: #363636; background: #F5F5F5; color-scheme: light; --green: #67A130; }
body { margin: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
header { background: white; border-bottom: 1px solid #e3e6df; }
.header-inner { max-width: 1120px; margin: auto; padding: 13px 18px; display: flex; align-items: center; gap: 10px; }
.brand { background: var(--green); color: #182707; padding: 8px 7px; border-radius: 10px; font-size: .85rem; font-weight: 800; letter-spacing: .04em; }
.badge { margin-left: auto; background: #edf3e8; color: #40572a; border-radius: 30px; font-size: .8125rem; padding: 5px 10px; }
main { overflow: auto; display: flex; flex-direction: column; padding: 20px 16px; }
.welcome { margin: auto; padding: 10px 0; text-align: center; }
.mark { margin: 0 auto 16px; display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid #d6e6c6; border-radius: 22px; color: #456c20; background: #e9f2df; }
h1 { margin: 0; font-size: clamp(1.8rem, 6vw, 2.9rem); line-height: 1.1; letter-spacing: -.045em; }
.welcome p { color: #535c50; margin: 12px 0 0; }
footer, #conversation { width: min(100%, 760px); margin-inline: auto; }
footer { padding: 0 12px max(8px, env(safe-area-inset-bottom)); }
form { background: #fff; border: 1px solid #dce3d6; border-radius: 20px; padding: 10px; box-shadow: 0 8px 28px #2538150b; }
textarea { width: 100%; border: 0; background: transparent; resize: vertical; min-height: 54px; max-height: 25dvh; padding: 8px; color: inherit; font: inherit; }
form:focus-within { border-color: var(--green); }
textarea:focus { outline: none; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 11px; min-height: 44px; padding: 0 9px; font-family: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
button:focus-visible { outline: 2px solid #426c1d; outline-offset: 2px; }
.attach { color: #363636; background: #f4f6f2; border-color: #e4e9e0; }
.attach:hover { background: #e9f2df; }
button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.send { margin-left: auto; padding-inline: 15px; background: var(--green); color: #112000; }
.send:disabled { background: #e7eddf; color: #5c6654; cursor: default; }
.note, #status { font-size: .8125rem; color: #576052; margin: 8px 0 0; }
.note { text-align: center; }
#previews { display: flex; gap: 8px; overflow-x: auto; padding: 4px; }
[hidden] { display: none !important; }
figure { margin: 0; position: relative; overflow: hidden; border-radius: 10px; background: #e9eee4; }
#previews figure { flex: 0 0 96px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
#previews img { height: 90px; }
.remove { position: absolute; right: 0; top: 0; min-width: 44px; color: white; background: #30362dee; font-size: 1.3rem; }
.fallback { padding: 8px; overflow-wrap: anywhere; font-size: .8125rem; }
#previews .fallback { padding-top: 46px; }
#conversation { display: grid; justify-items: end; gap: 16px; }
.message { width: fit-content; max-width: min(100%, 530px); padding: 12px; border-radius: 16px 16px 4px 16px; background: #e9f2df; overflow-wrap: anywhere; }
.message strong { font-size: .875rem; }
.message p { margin: 5px 0 0; white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); width: min(65vw, 420px); gap: 6px; margin-top: 8px; }
.photos img { aspect-ratio: 4 / 3; }
@media (min-width: 640px) { footer { padding-bottom: 18px; } form { padding: 12px; } button { padding-inline: 13px; } }

