@font-face { font-family: InterVariable; src: url('/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { font-family: InterVariable, system-ui, sans-serif; color: #25352f; background: #e5e9e5; font-synthesis: none; font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11', 'ss01'; --green: #075e54; --muted: #63736b; --line: #20362b1a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button, a, input { outline-color: #218d71; }
button:focus-visible, a:focus-visible { outline: 2px solid #218d71; outline-offset: 3px; }
button { border: 0; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
.app { isolation: isolate; max-width: 960px; margin: 0 auto; height: 100dvh; background: white; }
.locked { display: grid; place-items: center; min-height: 100%; padding: 40px 24px; background: #fff; }
.lock-form { width: 100%; max-width: 320px; text-align: center; }
.wordmark { color: var(--green); font-size: .875rem; font-weight: 500; margin-bottom: 40px; }
.monogram { width: 76px; height: 76px; background: #e5f1e9; color: var(--green); border-radius: 26px; font-size: 2.5rem; display: grid; place-items: center; margin: 0 auto 24px; }
.lock-form h1 { font-size: 1.65rem; letter-spacing: -.04em; }
.intro { color: var(--muted); font-size: 1rem; line-height: 1.7; margin: 14px 0 32px; }
#unlock-form { text-align: left; display: grid; gap: 12px; }
label { font-size: 1rem; font-weight: 500; display: block; margin-bottom: 8px; }
#unlock-form label { margin: 0; }
input { min-width: 0; width: 100%; background: white; color: #25352f; border: 1px solid #20362b33; border-radius: 8px; padding: 12px; font-size: 1rem; }
input:focus { outline: 2px solid #218d71; outline-offset: -1px; }
.primary, .secondary { min-height: 44px; padding: 11px 14px; border-radius: 8px; font-size: 1rem; font-weight: 500; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #064d44; }
.secondary { color: var(--green); background: #e8f2eb; }
.secondary:hover { background: #dcece2; }
.error { color: #a12b28; font-size: .875rem; line-height: 1.5; min-height: 1.5em; }
.privacy { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: .8125rem; color: var(--muted); margin: 28px 0 8px; }
.privacy img { flex-shrink: 0; }
.subtle { font-size: .8125rem; line-height: 1.7; color: var(--muted); }
.chat-app { height: 100%; display: flex; flex-direction: column; position: relative; min-width: 0; }
.header { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding: max(14px, env(safe-area-inset-top)) 16px 14px; background: var(--green); color: white; }
.avatar { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #cfe2d7; color: #1d5141; display: grid; place-items: center; font-size: 1.4rem; }
.contact { min-width: 0; flex: 1; }
.contact h1 { font-size: 1.0625rem; }
.contact p { color: #d0e4dd; font-size: .75rem; margin-top: 4px; }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 10px; width: 36px; height: 36px; flex-shrink: 0; background: transparent; color: inherit; border-radius: 50%; text-decoration: none; }
.icon-button::after, .text-button::after { content: ''; position: absolute; inset: 50% auto auto 50%; width: max(100%, 48px); height: max(100%, 48px); transform: translate(-50%, -50%); }
.icon-button:hover { background: #20362b0d; }
.icon-button img { flex-shrink: 0; width: 16px; height: 16px; }
.header .icon-button img, .photo-toolbar .icon-button img { filter: brightness(0) invert(1); }
.header .icon-button:hover { background: #ffffff1a; }
.header .icon-button:focus-visible { outline-color: white; }
.search-panel { display: flex; align-items: center; gap: 5px; padding: 10px 12px; background: #f7faf7; border-bottom: 1px solid var(--line); }
.search-panel input { flex: 1; min-width: 0; padding: 8px; }
.search-count { font-size: .75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 16px 28px; overscroll-behavior: contain; background-color: #efeae2; background-image: radial-gradient(#a0927c15 .8px, transparent .8px); background-size: 17px 17px; scrollbar-color: #b1b5a9 transparent; }
.archive-note { display: flex; justify-content: center; align-items: flex-start; gap: 8px; max-width: 420px; padding: 14px 16px; margin: 0 auto 28px; background: #fff7da; border-radius: 8px; color: #6b6246; font-size: .8125rem; line-height: 1.6; text-align: center; }
.archive-note img { flex-shrink: 0; margin-top: 2px; opacity: .75; }
.messages { display: flex; flex-direction: column; align-items: stretch; gap: 5px; max-width: 740px; margin: 0 auto; }
.date-divider { text-align: center; align-self: center; color: #52615a; background: #f8faf5; box-shadow: 0 1px 2px #20362b15; border-radius: 7px; padding: 6px 12px; font-size: .75rem; font-weight: 500; margin: 18px 0 10px; font-variant-numeric: tabular-nums; }
.message { position: relative; align-self: flex-start; background: #fff; border-radius: 0 9px 9px 9px; box-shadow: 0 1px 1px #20362b18; padding: 8px 10px 5px; max-width: 86%; min-width: 85px; scroll-margin: 22px; overflow-wrap: anywhere; }
.message.outgoing { align-self: flex-end; background: #d9f4cb; border-radius: 9px 0 9px 9px; }
.message .sender { color: #2f765d; font-size: .75rem; font-weight: 600; margin-bottom: 5px; }
.message .body { white-space: pre-wrap; font-size: 1rem; line-height: 1.5; }
.message a { color: #086f92; text-underline-offset: 2px; }
.message time { display: block; text-align: right; font-size: .6875rem; color: #6c7d70; font-variant-numeric: tabular-nums; padding-top: 3px; }
.message.has-media { padding: 4px 4px 5px; width: min(310px, 86%); }
.has-media .sender, .has-media .body, .has-media time { padding-left: 5px; padding-right: 5px; }
.media-box { width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; background: #e5e8df; overflow: hidden; position: relative; }
.media-button { width: 100%; height: 100%; padding: 0; display: grid; place-items: center; border-radius: 6px; background: transparent; color: #63736b; font-size: .8125rem; }
.media-button img { width: 100%; height: 100%; object-fit: cover; }
.media-box video { width: 100%; height: 100%; object-fit: contain; background: #24332d; }
.media-error { font-size: .8125rem; color: #7b4432; padding: 8px; }
.file-button { background: #20362b08; padding: 12px 10px; border-radius: 6px; display: flex; align-items: center; gap: 10px; text-align: left; color: #25352f; width: 100%; }
.file-button:hover { background: #20362b12; }
.file-button img { flex-shrink: 0; }
.file-details { min-width: 0; font-size: .875rem; overflow-wrap: anywhere; }
.file-details small { display: block; color: #63736b; font-size: .6875rem; padding-top: 5px; }
.unavailable { font-size: .875rem; color: #718074; font-style: italic; padding: 3px 0; }
.message.search-match { outline: 2px solid #b79636; outline-offset: 2px; }
.message.current-match { outline: 3px solid #b87b12; background: #fff1b5; }
.end-note { text-align: center; margin-top: 30px; font-size: .75rem; color: #7b8175; }
.bottom-bar { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); background: #f8faf7; border-top: 1px solid var(--line); }
#offline-status { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: .6875rem; color: var(--muted); }
.status-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: #b0b9ac; }
.offline-ready .status-dot { background: #26805f; }
.text-button { position: relative; color: var(--green); background: transparent; padding: 8px 6px; font-size: .8125rem; font-weight: 500; border-radius: 6px; }
.text-button:hover { background: #075e540a; }
dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; border: none; border-radius: 16px; padding: 24px; color: #25352f; background: #fff; box-shadow: 0 16px 64px #10231940; }
dialog::backdrop { background: #10231999; }
.dialog-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 8px; }
.dialog-heading h2 { font-size: 1.375rem; letter-spacing: -.025em; }
.dialog-description { color: var(--muted); font-size: .875rem; line-height: 1.7; margin-bottom: 24px; }
.date-controls { display: flex; align-items: center; gap: 10px; }
.date-controls input { flex: 1; }
.offline-section { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.offline-section h3 { font-size: 1rem; }
.offline-section > p { font-size: .875rem; line-height: 1.65; color: var(--muted); margin: 10px 0 16px; }
.offline-section .subtle { font-size: .75rem; }
.offline-section .primary, #install { width: 100%; }
.download-status { min-height: 1em; font-variant-numeric: tabular-nums; }
progress { width: 100%; accent-color: var(--green); height: 8px; margin-top: 16px; }
#install-help { margin-top: 16px; }
.lock-button { display: block; margin: 16px auto 0; }
.photo-viewer { max-width: none; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)); background: #131d19; color: white; overflow: hidden; }
.photo-viewer[open] { display: flex; flex-direction: column; }
.photo-toolbar { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.photo-toolbar p { flex: 1; min-width: 0; font-size: .8125rem; color: #d2ddd5; }
.photo-toolbar .icon-button:hover { background: #ffffff1a; }
.photo-scroll { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; }
#full-photo { max-width: 100%; max-height: calc(100dvh - 124px); object-fit: contain; cursor: zoom-in; }
#full-photo.zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.photo-help { text-align: center; font-size: .75rem; color: #bdc9c0; padding-top: 10px; }
@media (min-width: 640px) {
  .app { height: calc(100dvh - 48px); margin: 24px auto; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 50px #20362b18; }
  body { padding: 0 24px; }
  .header { padding: 16px 24px; }
  .timeline { padding: 24px 42px 32px; }
  .message { max-width: 70%; }
  .message .body { font-size: .9375rem; }
  label, .primary, .secondary { font-size: .875rem; }
  .primary, .secondary { min-height: 38px; padding: 9px 12px; }
  .bottom-bar { padding-left: 24px; padding-right: 24px; }
  #offline-status { font-size: .8125rem; }
}
@media (max-width: 360px) { .header { gap: 8px; padding-left: 12px; padding-right: 8px; } .contact p { font-size: .6875rem; } .search-panel { gap: 0; padding-left: 8px; padding-right: 4px; } }
@media (prefers-reduced-motion: no-preference) { dialog[open] { animation: appear .15s ease-out; } @keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } } }
