:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --canvas: #f3f4f0;
  --panel: #fbfcfa;
  --paper: #ffffff;
  --ink: #202a25;
  --muted: #8a938e;
  --quiet: #b2bab5;
  --line: #e9ece8;
  --green: #2d6655;
  --green-deep: #204f42;
  --green-soft: #eaf2ed;
  --green-mist: #f2f7f3;
  --shadow: 0 20px 60px rgba(28, 42, 34, 0.12);
}

* { box-sizing: border-box; }

body {
  min-width: 780px;
  min-height: 600px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 13px;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid rgba(70, 132, 106, 0.28);
  outline-offset: 2px;
}

svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 70px 300px minmax(420px, 1fr) auto;
  width: min(1540px, 100vw);
  height: 100vh;
  min-height: 600px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 70px rgba(41, 52, 44, 0.045);
}

.rail {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 21px 0 17px;
  background: #f7f8f5;
  border-right: 1px solid var(--line);
}

.brand-mark, .user-avatar, .rail-button, .square-button, .icon-button, .tool-button, .mobile-back {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 13px 13px 13px 5px;
  color: #fff;
  background: var(--green);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(44, 100, 82, 0.16);
}

.rail-menu, .rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-menu { margin-top: 39px; }
.rail-bottom { margin-top: auto; }
.rail-button { width: 42px; height: 42px; color: #87918b; background: transparent; border-radius: 14px; transition: color 160ms, background 160ms, transform 160ms; }
.rail-button svg { width: 19px; height: 19px; }
.rail-button:hover { color: var(--green-deep); background: #edf1ed; }
.rail-button:active, .square-button:active, .tool-button:active { transform: scale(0.96); }
.rail-button.is-active { color: var(--green-deep); background: #e7eee8; }
.user-avatar { width: 34px; height: 34px; border: 2px solid #fff; border-radius: 50%; }
.avatar-self { color: #fff; background: linear-gradient(145deg, #c78f6b, #a35d4a); font-size: 13px; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.10); }

.conversation-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fbfcfa;
  border-right: 1px solid var(--line);
}

.pane-heading { display: flex; align-items: center; justify-content: space-between; padding: 30px 21px 22px; }
.eyebrow { margin: 0 0 8px; color: #99a39d; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.pane-heading h1 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: -0.7px; }
.square-button { width: 35px; height: 35px; color: #53655b; background: #f1f3ef; border-radius: 12px; transition: background 150ms, color 150ms, transform 150ms; }
.square-button:hover { color: #fff; background: var(--green); }
.square-button svg { width: 18px; height: 18px; }
.new-chat-button { color: #fff; background: var(--green); box-shadow: 0 3px 8px rgba(45, 102, 85, 0.17); }
.new-chat-button:hover { background: var(--green-deep); }

.search-box { display: flex; align-items: center; gap: 9px; height: 40px; margin: 0 17px 24px; padding: 0 11px; color: #929d96; background: #f3f5f1; border: 1px solid #eff1ed; border-radius: 11px; }
.search-box svg { width: 16px; height: 16px; }
.search-box input { width: 100%; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-box input::placeholder { color: #a1aaa4; }
.search-box kbd { padding: 3px 5px; color: #9ba49f; background: #fff; border: 1px solid #e9ece8; border-radius: 5px; font-family: inherit; font-size: 9px; white-space: nowrap; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 0 21px 10px; color: #919b95; font-size: 11px; font-weight: 600; }
.text-button { padding: 3px 0; color: #9aa29d; background: transparent; border: 0; cursor: pointer; font-size: 10px; }
.text-button:hover { color: var(--green); }
.conversation-list { display: flex; flex-direction: column; gap: 3px; padding: 0 8px; }
.conversation-item { display: flex; align-items: center; width: 100%; min-height: 71px; gap: 11px; padding: 9px 10px; text-align: left; background: transparent; border: 0; border-radius: 13px; cursor: pointer; transition: background 150ms; }
.conversation-item:hover { background: #f3f5f2; }
.conversation-item.is-selected { background: #edf3ee; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; overflow: hidden; color: #fff; border-radius: 50%; font-size: 14px; font-weight: 600; }
.avatar-landscape { background: linear-gradient(155deg, #aecabb 0%, #89aa98 49%, #4f7562 50%, #305642 100%); }
.avatar-peach { color: #805442; background: radial-gradient(circle at 72% 25%, #fae4cd 0 20%, transparent 22%), linear-gradient(145deg, #f6d5bb, #deaa91); }
.avatar-blue { background: linear-gradient(145deg, #9bb6c0, #536f83); }
.conversation-copy { flex: 1; min-width: 0; }
.conversation-line, .preview-line { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.conversation-line strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.conversation-line time { color: #a1aaa4; font-size: 10px; white-space: nowrap; }
.preview-line { margin-top: 7px; color: #929c96; font-size: 11px; }
.preview-line > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.read-mark { color: #6f9b83; font-size: 11px; letter-spacing: -2px; }
.unread-dot { width: 6px; height: 6px; background: #568a70; border-radius: 50%; }
.conversation-item:not(.is-selected) .unread-dot { display: none; }
.empty-search { padding: 25px 12px; color: #9aa39d; text-align: center; font-size: 12px; }
.pane-footer { display: flex; align-items: center; gap: 8px; margin: auto 18px 17px; padding-top: 14px; color: #98a29c; border-top: 1px solid #eef0ed; font-size: 10px; }
.pane-footer svg { width: 14px; height: 14px; color: #69917a; }

.chat-view { position: relative; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.chat-header { z-index: 1; display: flex; flex: 0 0 77px; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid #eff1ee; }
.chat-person { display: flex; align-items: center; gap: 11px; padding: 0; text-align: left; background: transparent; border: 0; cursor: pointer; }
.chat-person .avatar { width: 39px; height: 39px; }
.person-copy { display: flex; flex-direction: column; gap: 5px; }
.person-copy strong { font-size: 13px; font-weight: 600; }
.person-copy > span { color: #89968e; font-size: 10px; }
.person-copy > span::before { display: inline-block; width: 6px; height: 6px; margin: 0 6px 1px 0; background: #69a27b; border-radius: 50%; content: ""; }
.header-actions { display: flex; align-items: center; gap: 11px; }
.security-pill { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; color: #547162; background: #f1f6f2; border: 1px solid #e9f0eb; border-radius: 9px; cursor: pointer; font-size: 10px; transition: background 150ms; }
.security-pill:hover { background: #e7f0e9; }
.security-pill svg { width: 14px; height: 14px; }
.security-dot { width: 5px; height: 5px; margin-left: 1px; background: #dda55d; border-radius: 50%; }
.more-button { color: #87928a; background: transparent; }
.more-button:hover { color: var(--green-deep); background: #f2f5f1; }
.mobile-back { display: none; width: 32px; height: 32px; color: #64746a; background: transparent; border-radius: 9px; }

.chat-content-wrap { display: flex; flex: 1 1 auto; flex-direction: column; width: min(800px, 100%); min-height: 0; margin: 0 auto; padding: 17px 34px 0; }
.encryption-note { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0 auto 22px; padding: 9px 12px 9px 9px; color: #4b6255; background: #f5f8f5; border: 1px solid #edf1ed; border-radius: 11px; cursor: pointer; transition: background 150ms, border 150ms; }
.encryption-note:hover { background: #eef5ef; border-color: #e0eae2; }
.note-icon { display: grid; flex: 0 0 auto; place-items: center; width: 28px; height: 28px; color: #4e7b62; background: #e6f0e8; border-radius: 9px; }
.note-icon svg { width: 14px; height: 14px; }
.encryption-note > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.encryption-note strong { font-size: 10px; font-weight: 600; }
.encryption-note span span { color: #8a988f; font-size: 9px; }
.note-chevron { width: 13px; height: 13px; margin-left: 7px; color: #9aa79d; }
.day-divider { display: flex; align-items: center; gap: 12px; margin: 0 auto 17px; color: #a0a9a3; font-size: 10px; }
.day-divider::before, .day-divider::after { width: 21px; height: 1px; background: #edf0ed; content: ""; }
.message-feed { display: flex; flex: 1; flex-direction: column; gap: 17px; min-height: 0; padding: 3px 3px 18px; overflow-y: auto; scrollbar-color: #e3e8e3 transparent; scrollbar-width: thin; }
.message-row { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.message-incoming { align-self: flex-start; }
.message-outgoing { align-self: flex-end; justify-content: flex-end; }
.avatar-tiny { width: 27px; height: 27px; margin-bottom: 17px; font-size: 10px; }
.message-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.message-outgoing .message-stack { align-items: flex-end; }
.message-stack time { padding: 0 3px; color: #a5aea8; font-size: 9px; }
.message-bubble { max-width: 100%; padding: 11px 14px; color: #38463d; background: #f1f4f0; border-radius: 4px 14px 14px 14px; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-outgoing .message-bubble { color: #fff; background: var(--green); border-radius: 14px 4px 14px 14px; }
.message-checks { padding-left: 3px; color: #76a88c; letter-spacing: -2px; }
.attachment-bubble { display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 330px; padding: 11px; color: #f5fff8; background: var(--green); border-radius: 14px 4px 14px 14px; }
.attachment-bubble .file-icon { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 40px; color: #376b55; background: #e8f2e9; border-radius: 9px; }
.attachment-bubble .file-icon svg { width: 19px; height: 19px; }
.file-preview-incoming { display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 330px; padding: 11px; color: #425448; background: #f1f4f0; border-radius: 4px 14px 14px 14px; }
.file-preview-incoming .file-icon { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 40px; color: #55715f; background: #e2ebe3; border-radius: 9px; }
.file-preview-incoming .file-icon svg { width: 19px; height: 19px; }
.attachment-name { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.attachment-meta { margin-top: 4px; color: rgba(246,255,247,.72); font-size: 9px; }
.attachment-download { display: grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; margin-left: auto; color: #fff; background: rgba(255,255,255,.13); border: 0; border-radius: 8px; cursor: pointer; }
.attachment-download svg { width: 15px; height: 15px; }

.photo-card, .lightbox-photo, .image-message { position: relative; width: 257px; height: 172px; overflow: hidden; isolation: isolate; background: linear-gradient(180deg, #d7e8e7 0%, #c5ddd9 48%, #a5c2b6 100%); border-radius: 13px 3px 13px 13px; cursor: pointer; }
.photo-sky { position: absolute; z-index: -3; inset: 0; background: linear-gradient(180deg, #c8dcdb 0%, #e2e7dd 66%, #9bb2a0 100%); }
.photo-sun { position: absolute; top: 18%; right: 23%; width: 30px; height: 30px; background: rgba(255,247,216,.85); border-radius: 50%; box-shadow: 0 0 35px rgba(255,243,200,.75); }
.photo-cloud { position: absolute; width: 46px; height: 9px; background: rgba(255,255,255,.28); border-radius: 30px; }
.photo-cloud::before, .photo-cloud::after { position: absolute; bottom: 1px; width: 19px; height: 15px; background: inherit; border-radius: 50%; content: ""; }
.photo-cloud::before { left: 7px; }
.photo-cloud::after { right: 6px; width: 16px; height: 12px; }
.photo-cloud-one { top: 27%; left: 18%; }
.photo-cloud-two { top: 17%; left: 51%; transform: scale(.72); }
.photo-mountain { position: absolute; z-index: -1; bottom: 31%; width: 82%; height: 51%; clip-path: polygon(0 100%, 34% 14%, 52% 58%, 69% 25%, 100% 100%); }
.photo-mountain-back { left: -12%; background: linear-gradient(135deg,#8aa79c,#617f70); opacity: .75; }
.photo-mountain-front { right: -18%; bottom: 29%; width: 90%; height: 46%; background: linear-gradient(145deg,#657f6a,#3f674f); }
.photo-water { position: absolute; z-index: -2; right: 0; bottom: 0; left: 0; height: 43%; background: linear-gradient(180deg,#779b8e,#426f60 63%,#365e50); clip-path: polygon(0 21%, 26% 0, 46% 13%, 70% 8%, 100% 20%, 100% 100%,0 100%); }
.photo-water::after { position: absolute; top: 48%; right: 18%; left: 35%; height: 1px; background: rgba(236,239,218,.7); box-shadow: 9px 9px 0 rgba(236,239,218,.24), -30px 14px 0 rgba(236,239,218,.2); content: ""; }
.photo-shore { position: absolute; z-index: -1; bottom: 27%; left: 0; width: 42%; height: 25%; background: #627a57; clip-path: polygon(0 49%, 50% 8%, 100% 100%, 0 100%); }
.photo-caption { position: absolute; z-index: 1; right: 10px; bottom: 9px; padding: 4px 6px; color: rgba(255,255,255,.93); background: rgba(26,49,37,.35); border-radius: 5px; font-size: 9px; backdrop-filter: blur(7px); }
.photo-open { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 25px; height: 25px; color: #fff; background: rgba(34,52,42,.25); border: 1px solid rgba(255,255,255,.23); border-radius: 8px; opacity: 0; cursor: pointer; transition: opacity 150ms; }
.photo-card:hover .photo-open { opacity: 1; }
.image-message { width: 257px; height: 172px; border-radius: 13px 3px 13px 13px; }

.composer-wrap { flex: 0 0 auto; width: min(800px, 100%); margin: 0 auto; padding: 0 34px 16px; }
.composer { display: flex; align-items: flex-end; gap: 10px; min-height: 58px; padding: 10px 10px 9px 13px; background: #fbfcfa; border: 1px solid #e8ece8; border-radius: 15px; box-shadow: 0 4px 16px rgba(34,52,39,.035); transition: border 160ms, box-shadow 160ms; }
.composer:focus-within { border-color: #c8d9ce; box-shadow: 0 4px 18px rgba(35,93,67,.07); }
.composer-tools { display: flex; align-items: center; gap: 2px; padding-bottom: 1px; }
.tool-button { width: 32px; height: 32px; color: #7e8b82; background: transparent; border-radius: 9px; transition: color 150ms, background 150ms, transform 150ms; }
.tool-button:hover { color: var(--green); background: #eef3ee; }
.tool-button svg { width: 17px; height: 17px; }
.composer textarea { flex: 1; min-width: 60px; max-height: 122px; min-height: 31px; padding: 7px 4px 3px; resize: none; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; line-height: 1.7; }
.composer textarea::placeholder { color: #a1aaa4; }
.send-button { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; color: #fff; background: var(--green); border: 0; border-radius: 12px; cursor: pointer; transition: background 150ms, transform 150ms, opacity 150ms; }
.send-button svg { width: 16px; height: 16px; }
.send-button:hover:not(:disabled) { background: var(--green-deep); transform: translateY(-1px); }
.send-button:disabled { cursor: default; opacity: .38; }
.composer-hint { display: flex; align-items: center; gap: 6px; margin: 8px 4px 0; color: #a4ada7; font-size: 9px; }
.local-encryption { display: flex; align-items: center; gap: 4px; margin-left: auto; color: #77927e; }
.local-encryption svg { width: 12px; height: 12px; }

.detail-panel { position: relative; z-index: 4; display: flex; flex-direction: column; width: 288px; min-width: 288px; background: #fbfcfa; border-left: 1px solid var(--line); animation: slide-in 180ms ease-out; }
@keyframes slide-in { from { transform: translateX(12px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.detail-header { display: flex; flex: 0 0 67px; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; color: #65736a; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; }
.icon-button { width: 32px; height: 32px; color: #87938b; background: transparent; border-radius: 9px; }
.icon-button:hover { color: var(--green-deep); background: #eef2ed; }
.icon-button svg { width: 16px; height: 16px; }
.detail-profile { display: flex; flex-direction: column; align-items: center; padding: 30px 20px 24px; }
.avatar-large { width: 66px; height: 66px; font-size: 19px; box-shadow: 0 0 0 5px #f0f3ef; }
.detail-profile h2 { margin: 17px 0 7px; font-size: 16px; font-weight: 600; }
.detail-id { color: #939e96; font-size: 10px; }
.detail-id code { margin-left: 3px; color: #53645a; font-family: inherit; font-weight: 600; }
.detail-encryption { display: flex; align-items: center; gap: 11px; margin: 0 14px; padding: 13px; text-align: left; background: #f0f5f0; border: 1px solid #e8eee8; border-radius: 12px; cursor: pointer; }
.detail-lock { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; color: #508064; background: #e2eee4; border-radius: 10px; }
.detail-lock svg { width: 15px; height: 15px; }
.detail-encryption > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; gap: 5px; }
.detail-encryption strong { color: #3e5947; font-size: 10px; }
.detail-encryption small { color: #929d94; font-size: 9px; }
.detail-arrow { width: 13px; height: 13px; color: #9ba69e; }
.detail-section { margin: 23px 19px 0; padding-bottom: 19px; border-bottom: 1px solid #edf0ed; }
.section-kicker { margin: 0 0 13px; color: #97a199; font-size: 9px; font-weight: 700; letter-spacing: .45px; }
.fingerprint { margin: 0; color: #44564a; font-size: 12px; font-weight: 600; letter-spacing: 1.1px; line-height: 1.9; }
.detail-help { margin: 8px 0 12px; color: #909b93; font-size: 9px; line-height: 1.7; }
.outline-button { min-height: 30px; padding: 0 11px; color: #4f705a; background: #fff; border: 1px solid #dce6dd; border-radius: 8px; cursor: pointer; font-size: 10px; transition: background 150ms; }
.outline-button:hover { background: #f0f5f0; }
.detail-device { margin-top: 19px; }
.device-row { display: flex; align-items: center; gap: 8px; }
.device-dot { width: 7px; height: 7px; background: #62a479; border-radius: 50%; box-shadow: 0 0 0 3px #e9f2eb; }
.device-row > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.device-row strong { color: #4b6050; font-size: 10px; font-weight: 500; }
.device-row small { color: #99a39c; font-size: 9px; }
.danger-button { margin: auto 19px 22px; padding: 10px; color: #a16962; text-align: left; background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 10px; }
.danger-button:hover { background: #f8efed; }

.modal-backdrop { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(34, 46, 38, .23); backdrop-filter: blur(5px); animation: fade-in 140ms ease-out; }
.modal { position: relative; width: min(390px, 100%); padding: 32px 32px 25px; text-align: center; background: #fff; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; box-shadow: var(--shadow); animation: pop-in 180ms ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { transform: translateY(8px) scale(.985); opacity: .7; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 13px; right: 13px; }
.modal-icon { display: grid; place-items: center; width: 45px; height: 45px; margin: 0 auto 19px; color: #4d775e; background: #edf4ee; border-radius: 15px; }
.modal-icon svg { width: 20px; height: 20px; }
.modal .eyebrow { margin-bottom: 8px; }
.modal h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.55px; }
.modal-copy { max-width: 290px; margin: 10px auto 20px; color: #89948d; font-size: 11px; line-height: 1.8; }
.invite-card { margin: 0 0 14px; padding: 14px; background: #f8faf7; border: 1px solid #e9eee8; border-radius: 13px; text-align: left; }
.invite-badge { display: flex; align-items: center; gap: 5px; margin-bottom: 12px; color: #729078; font-size: 9px; }
.invite-badge svg { width: 12px; height: 12px; }
.invite-card code { display: block; padding: 10px 9px; overflow: hidden; color: #425448; background: #fff; border: 1px solid #ebefea; border-radius: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 34px; margin-top: 9px; color: #456a52; background: #edf4ee; border: 0; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 600; transition: background 150ms; }
.copy-button:hover { background: #e2eee4; }
.copy-button svg { width: 14px; height: 14px; }
.invite-card > p { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px 0 0; color: #9aa39d; font-size: 9px; }
.invite-card > p svg { width: 12px; height: 12px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 42px; color: #fff; background: var(--green); border: 0; border-radius: 11px; cursor: pointer; font-size: 11px; font-weight: 600; transition: background 150ms, transform 150ms; }
.primary-button:hover { background: var(--green-deep); transform: translateY(-1px); }
.primary-button svg { width: 15px; height: 15px; }
.modal-footnote { margin: 13px 0 0; color: #a2aaa4; font-size: 9px; }

.lightbox { position: absolute; z-index: 12; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; background: rgba(19, 30, 24, .93); animation: fade-in 140ms ease-out; }
.lightbox-close { position: absolute; top: 22px; right: 22px; color: rgba(255,255,255,.82); }
.lightbox-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.lightbox-photo { width: min(620px, 74vw); height: min(420px, 52vh); border-radius: 8px; box-shadow: 0 20px 70px rgba(0,0,0,.35); }
.lightbox-photo .photo-sun { width: 58px; height: 58px; }
.lightbox-photo .photo-caption { right: 17px; bottom: 15px; padding: 6px 9px; font-size: 11px; }
.lightbox > p { margin: 0; color: rgba(255,255,255,.61); font-size: 10px; }

.toast { position: absolute; z-index: 20; right: 50%; bottom: 30px; max-width: calc(100% - 36px); padding: 10px 15px; color: #fff; background: #263c30; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.18); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(50%, 8px); transition: opacity 180ms, transform 180ms; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(50%, 0); }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 64px 276px minmax(390px, 1fr) auto; }
  .chat-header { padding: 0 20px; }
  .chat-content-wrap, .composer-wrap { padding-right: 23px; padding-left: 23px; }
  .detail-panel { width: 266px; min-width: 266px; }
}

@media (max-width: 920px) {
  body { min-width: 640px; }
  .app-shell { grid-template-columns: 58px 256px minmax(326px, 1fr); }
  .detail-panel { position: absolute; inset: 0 0 0 auto; width: 288px; min-width: 288px; box-shadow: -14px 0 32px rgba(31,48,37,.1); }
  .rail { padding-top: 17px; }
  .pane-heading { padding: 25px 17px 19px; }
  .conversation-list { padding: 0 6px; }
  .conversation-item { gap: 9px; padding-right: 8px; padding-left: 8px; }
}

@media (max-width: 700px) {
  body { min-width: 360px; }
  .app-shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .conversation-pane { position: absolute; z-index: 2; inset: 0; transition: transform 200ms ease; }
  .chat-view { position: absolute; z-index: 1; inset: 0; }
  .app-shell.mobile-list .chat-view { transform: translateX(100%); }
  .app-shell.mobile-list .conversation-pane { transform: translateX(0); }
  .app-shell:not(.mobile-list) .conversation-pane { transform: translateX(-100%); }
  .mobile-back { display: grid; margin-right: 8px; transform: rotate(180deg); }
  .chat-header { justify-content: flex-start; gap: 4px; padding: 0 14px; }
  .header-actions { gap: 5px; margin-left: auto; }
  .security-pill { width: 34px; justify-content: center; gap: 0; padding: 0; }
  .security-pill > span:nth-child(2) { display: none; }
  .security-dot { margin-left: -2px; }
  .chat-content-wrap, .composer-wrap { padding-right: 15px; padding-left: 15px; }
  .encryption-note { width: 100%; }
  .message-row { max-width: 92%; }
}

