:root { color-scheme: light; font-family: system-ui,-apple-system,"Segoe UI",sans-serif; color: #4e3340; background: #f7eeed; }
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; padding: 0; }
button,input,textarea,select { font: inherit; }
button,a,select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible,a:focus-visible { outline: 3px solid #d6a0b2; outline-offset: 3px; }
input:focus,textarea:focus,select:focus { outline: 2px solid #c88fa2; outline-offset: 1px; }
button { border: 0; }
.room { width: 100%; max-width: 780px; height: 100%; margin: auto; display: flex; flex-direction: column; background: #fff9f6; position: relative; }
.room-header { flex: none; display: flex; align-items: center; gap: 14px; background: #fffefd; border-bottom: 1px solid #eddeE2; padding: 16px max(14px,env(safe-area-inset-right)) 16px max(14px,env(safe-area-inset-left)); min-height: 83px; }
.room-name { flex: 1; min-width: 0; }
h1 { margin: 0 0 3px; font: 30px/1.1 Georgia,serif; letter-spacing: -.03em; }
.room-name p { margin: 0; color: #997c88; font-size: 12px; overflow-wrap: anywhere; }
.icon-button { width: 42px; height: 42px; flex: none; display: grid; place-items: center; background: transparent; border-radius: 50%; font-size: 26px; text-decoration: none; color: #915a6d; }
.icon-button:hover { background: #f9edf0; }
.home { font: 34px Georgia,serif; }
.auth { width: 100%; max-width: 420px; padding: 28px; margin: auto; overflow-y: auto; }
.auth-mark { color: #b77b90; font-size: 29px; margin-bottom: 16px; }
h2 { font: 26px/1.25 Georgia,serif; margin: 0 0 12px; letter-spacing: -.02em; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 7px; }
.muted { color: #8b707c; font-size: 13px; line-height: 1.6; }
label { display: block; font-size: 13px; margin: 15px 0 7px; }
input,select { color: #4e3340; width: 100%; border: 1px solid #e4d3da; border-radius: 9px; padding: 12px; background: #fff; min-width: 0; }
small { display: block; color: #937883; font-size: 11px; margin-top: 6px; }
.primary,.secondary { border-radius: 10px; min-height: 42px; padding: 11px 17px; font-size: 14px; font-weight: 500; }
.primary { background: #873b55; color: #fff; }
.secondary { background: #f3e8ec; color: #784354; }
.text-button { background: transparent; color: #9b586e; padding: 10px 7px; font-size: 13px; }
.auth .primary { width: 100%; margin-top: 22px; }
.auth .text-button { width: 100%; margin-top: 8px; }
.auth-note { text-align: center; color: #a38c96; font-size: 12px; margin: 22px 0 0; }
.error { margin: 12px 18px; color: #a3294c; background: #fff0f3; border-radius: 9px; padding: 11px 14px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; flex: none; }
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.messages { padding: 23px 20px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.empty { color: #a18a95; font: italic 18px/1.6 Georgia,serif; text-align: center; margin: auto; width: 100%; padding: 25px; }
.older { display: block; align-self: center; }
.bubble { max-width: min(84%,460px); padding: 11px 14px 8px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #eddee4; flex: none; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: #f0dfe6; border-color: #f0dfe6; border-radius: 16px 16px 4px 16px; }
.bubble p { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 1.55; }
.stamp { display: block; text-align: right; color: #9c7f8b; font-size: 10px; margin-top: 6px; }
.photo-card { min-width: 205px; padding: 15px; }
.photo-symbol { font-size: 21px; color: #ac7188; margin-bottom: 8px; }
.photo-caption { font-size: 12px !important; color: #967784; }
.photo-card .primary { width: 100%; margin-top: 12px; }
.expired .photo-symbol { opacity: .5; }
.compose { display: flex; gap: 9px; align-items: end; padding: 13px 14px max(15px,env(safe-area-inset-bottom)); background: #fffefd; border-top: 1px solid #eddeE2; flex: none; }
.compose textarea { background: #fbf4f3; border: 1px solid #ecdee1; border-radius: 23px; resize: none; line-height: 1.4; padding: 12px 15px; min-height: 46px; max-height: 118px; flex: 1; min-width: 0; width: 0; font-size: 16px; color: #4e3340; }
.attach { font-size: 25px; margin-bottom: 2px; }
.send { width: 44px; height: 44px; border-radius: 50%; background: #873b55; color: #fff; flex: none; font-size: 25px; margin-bottom: 1px; }
.sheet { background: #fffaf8; color: #4e3340; width: min(92vw,470px); padding: 25px; border: 1px solid #e7d8df; border-radius: 20px; max-height: 88dvh; overflow-y: auto; }
dialog::backdrop { background: #23141d88; backdrop-filter: blur(4px); }
.sheet-heading { display: flex; justify-content: space-between; align-items: center; }
.sheet-heading h2 { margin: 0; }
.sheet section { margin-top: 25px; border-top: 1px solid #eddee3; padding-top: 23px; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.privacy-note { margin-top: 28px; color: #9c7f8b; font-size: 12px; line-height: 1.6; }
.danger { width: 100%; margin-top: 13px; }
#invite-result { margin-top: 12px; }
#invite-link { font-size: 12px; }
.photo-sheet>img { width: 100%; max-height: 43dvh; object-fit: contain; margin: 5px 0 10px; border-radius: 10px; background: #f1e6e9; }
.photo-sheet .button-row>* { flex: 1; }
.photo-sheet .error { margin: 15px 0 0; }
.viewer { width: min(100vw,980px); height: min(96dvh,900px); background: #20191e; color: #fff5f9; border: 0; padding: 15px; border-radius: 15px; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.viewer img { display: block; width: 100%; height: calc(100% - 55px); object-fit: contain; margin-top: 10px; }
.viewer .secondary { background: #50303e; color: #ffeef5; }
.new-message-note { position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #eddee3; border-radius: 20px; box-shadow: 0 4px 15px #66344418; }
[hidden] { display: none !important; }
noscript { padding: 20px; }
@media(min-width: 840px) { body { padding: 24px; } .room { height: calc(100dvh - 48px); border-radius: 22px; overflow: hidden; border: 1px solid #eadce2; box-shadow: 0 15px 50px #834c6310; } }
@media(max-width: 400px) { .messages { padding: 18px 12px; } .compose { padding-left: 8px; padding-right: 10px; gap: 5px; } .sheet { padding: 21px; } }
