:root {
  color-scheme: light;
  --ink: #20231f;
  --muted: #7f827c;
  --muted-dark: #61655f;
  --line: #e8e6df;
  --paper: #fffefa;
  --wash: #f4f2eb;
  --orange: #e66742;
  --orange-dark: #ca4e2f;
  --mint: #4b9377;
  font-family: 'DM Sans', 'Noto Sans SC', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--wash); }
button, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { max-width: 1440px; margin: 0 auto; padding: 0 6.4%; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5e2d9; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 19px; font-weight: 700; text-decoration: none; letter-spacing: -.04em; }
.brand-mark { width: 29px; height: 29px; position: relative; display: grid; place-items: center; border-radius: 9px; background: var(--orange); transform: rotate(-4deg); }
.brand-mark span { position: absolute; width: 12px; height: 7px; border: 1.7px solid white; border-radius: 5px; transform: rotate(-35deg); }
.brand-mark span:first-child { left: 5px; top: 8px; }
.brand-mark span:last-child { right: 4px; bottom: 7px; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.network-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; color: #65746b; background: #e9eee7; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-dot, .live-indicator { width: 7px; height: 7px; border-radius: 99px; background: #67a184; box-shadow: 0 0 0 3px #d5e5d9; }
.network-pill.offline { color: #a46c58; background: #f4e5dd; }
.network-pill.offline .status-dot { background: #d17a57; box-shadow: 0 0 0 3px #f0d5c9; }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #dedbd3; color: #6c706a; background: transparent; border-radius: 50%; font-size: 15px; }
.lobby { max-width: 790px; min-height: calc(100vh - 79px); display: flex; flex-direction: column; justify-content: center; margin: 0 auto; padding: 54px 0 70px; }
.lobby-heading { max-width: 650px; margin: 0 auto 30px; text-align: center; }
.lobby-heading h1 { margin-bottom: 11px; font-size: clamp(30px, 4vw, 43px); }
.lobby-heading .subheading { max-width: 520px; margin: 0 auto; }
.room-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.room-option { min-height: 220px; position: relative; padding: 24px 25px; background: var(--paper); border: 1px solid #e8e5dd; border-radius: 14px; }
.create-option { background: #e8e8de; border-color: #e0dfd5; }
.room-option-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 10px; font-size: 19px; }
.create-icon { color: #fff; background: var(--orange); }
.join-icon { color: #547560; background: #e3ebe1; }
.option-kicker { margin: 0 0 6px; color: #9b9b91; font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.room-option h2 { margin: 0 0 7px; font-size: 16px; font-weight: 600; }
.room-option > p:not(.option-kicker) { min-height: 30px; margin: 0 0 16px; color: #898a81; font-size: 10px; line-height: 1.6; }
.primary-room-button, .join-room-button { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 132px; padding: 10px 12px; color: white; background: var(--orange); border: 0; border-radius: 7px; font-size: 10px; font-weight: 600; }
.primary-room-button:hover, .join-room-button:hover { background: var(--orange-dark); }
.join-form { display: flex; gap: 8px; }
.join-form input { width: 100%; min-width: 0; padding: 10px 11px; color: #323630; background: #faf9f5; border: 1px solid #e8e6df; border-radius: 7px; outline: 0; font-size: 11px; letter-spacing: .08em; }
.join-form input:focus { border-color: #d6a28e; box-shadow: 0 0 0 3px #e8896710; }
.join-form input::placeholder { color: #b0aea4; letter-spacing: 0; }
.join-room-button { min-width: 82px; }
.lobby-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 20px 0 0; color: #9a9b92; font-size: 9px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .86fr); gap: clamp(42px, 7.5vw, 112px); padding: 52px 0 48px; align-items: start; }
.conversation { min-width: 0; }
.conversation-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 9px; color: #9b9b92; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 36px); line-height: 1.3; letter-spacing: -.055em; font-weight: 600; }
.heading-period { color: var(--orange); }
.subheading { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.today-badge { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 3px; white-space: nowrap; color: #8b8c82; font-size: 10px; }
.today-icon { font-size: 17px; color: var(--orange); }
.today-badge strong { color: #51584f; font-family: 'DM Sans', monospace; font-size: 12px; letter-spacing: .12em; }
.leave-room { margin-left: 4px; padding: 5px 7px; color: #9b786d; background: transparent; border: 1px solid #e3d7ce; border-radius: 6px; font-size: 9px; }
.leave-room:hover { color: #a74f37; background: #fbf4ef; }
.share-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 91px; background: #ecece2; border: 1px solid #e7e6db; border-radius: 13px; }
.share-icon { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--paper); color: var(--orange); border-radius: 11px; font-size: 27px; transform: rotate(-8deg); }
.share-content { min-width: 0; flex: 1; }
.share-title-row { display: flex; align-items: center; gap: 10px; }
.share-title-row strong { font-size: 12px; }
.wifi-caption { color: #819082; font-size: 9px; }
.share-content p { margin: 3px 0 6px; color: #85877f; font-size: 10px; }
.room-code-row { display: flex; align-items: center; gap: 9px; margin: 7px 0 7px; }
.room-code-label { color: #92948a; font-size: 9px; }
.room-code-row strong { color: #384c3e; font-family: 'DM Sans', monospace; font-size: 15px; letter-spacing: .18em; }
.copy-code { padding: 5px 7px; color: #657d69; background: #f7f8f1; border: 1px solid #dce3d6; border-radius: 6px; font-size: 9px; }
.copy-code:hover { background: #e9f0e7; }
.address-list { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.address-list a, .address-loading { color: #46564c; font-family: 'DM Sans', monospace; font-size: 10px; font-weight: 600; text-decoration-color: #a8b5a8; text-underline-offset: 3px; }
.address-list a:hover { color: var(--orange-dark); }
.copy-address { padding: 9px 13px; color: #665f50; background: #f8f7f0; border: 1px solid #e2dfd2; border-radius: 8px; white-space: nowrap; font-size: 10px; font-weight: 600; transition: .2s ease; }
.copy-address:hover:not(:disabled) { color: var(--orange-dark); border-color: #e7b3a0; }
.copy-address:disabled { cursor: default; opacity: .55; }
.feed-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 29px 1px 14px; }
.feed-title { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; }
.count-badge { min-width: 21px; padding: 3px 6px; text-align: center; border-radius: 10px; background: #ebe8df; color: #777970; font-size: 9px; }
.feed-caption { display: flex; align-items: center; gap: 7px; color: #8c8e86; font-size: 10px; }
.feed-caption .live-indicator { width: 6px; height: 6px; box-shadow: none; }
.feed { display: flex; flex-direction: column; gap: 10px; max-height: 425px; min-height: 172px; overflow: auto; padding: 1px 4px 1px 0; scrollbar-width: thin; scrollbar-color: #d3d1c7 transparent; }
.empty-state { min-height: 172px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border: 1px dashed #dedbd0; border-radius: 12px; text-align: center; }
.empty-art { width: 68px; height: 48px; position: relative; margin-bottom: 8px; }
.paper { position: absolute; width: 31px; height: 37px; background: #fffefa; border: 1px solid #e8e3d9; border-radius: 5px; box-shadow: 0 4px 10px #42351a12; }
.paper-one { left: 15px; top: 7px; transform: rotate(-9deg); }
.paper-two { left: 27px; top: 4px; transform: rotate(8deg); }
.paper-two:after { content: ''; position: absolute; left: 7px; top: 10px; width: 14px; height: 2px; background: #eeddd4; box-shadow: 0 6px #ece8df, 0 12px #ece8df; }
.empty-spark { position: absolute; top: 0; right: 6px; color: var(--orange); font-size: 12px; }
.empty-state h2 { margin: 1px 0 5px; font-size: 13px; font-weight: 600; }
.empty-state p { max-width: 295px; margin: 0; color: #94958c; font-size: 10px; line-height: 1.65; }
.message-card { position: relative; display: flex; gap: 11px; padding: 13px 14px; background: var(--paper); border: 1px solid #eceae4; border-radius: 11px; animation: appear .25s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.message-avatar { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: #9fbaa8; border-radius: 9px; font-size: 13px; }
.message-card.file-message .message-avatar { color: #b95d3d; background: #f8e6dc; }
.message-body { min-width: 0; flex: 1; }
.message-top { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.message-sender { font-size: 10px; font-weight: 700; }
.message-time { color: #a0a096; font-size: 9px; }
.copy-message { margin-left: auto; padding: 4px 7px; color: #96968d; background: transparent; border: 0; border-radius: 5px; font-size: 9px; }
.copy-message:hover { color: var(--orange-dark); background: #f8f3ec; }
.message-text { margin: 0; color: #43463f; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.image-preview { display: block; max-width: min(100%, 420px); max-height: 280px; object-fit: contain; margin: 8px 0 7px; background: #f3f1ea; border-radius: 8px; }
.file-tile { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 8px 0 1px; padding: 9px 11px; background: #faf9f5; border: 1px solid #eeece5; border-radius: 9px; }
.file-type { flex: 0 0 31px; width: 31px; height: 34px; display: grid; place-items: center; border-radius: 6px; color: #a85940; background: #f5e7dc; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.file-detail { min-width: 0; }
.file-name { display: block; max-width: 220px; overflow: hidden; color: #464840; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-size { display: block; margin-top: 3px; color: #a09f96; font-size: 9px; }
.download-link { margin-left: 5px; padding: 6px 8px; color: #52745f; background: #edf1ea; border-radius: 6px; font-size: 9px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.download-link:hover { background: #dfe9dd; }
.composer { margin-top: 15px; padding: 11px 12px 10px; background: var(--paper); border: 1px solid #e7e5de; border-radius: 11px; box-shadow: 0 3px 14px #3b321708; }
.composer:focus-within { border-color: #d7b5a5; box-shadow: 0 0 0 3px #e8896710; }
.composer textarea { display: block; width: 100%; min-height: 32px; max-height: 120px; resize: none; padding: 4px 3px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; line-height: 1.6; }
.composer textarea::placeholder { color: #aaa99f; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid #f0eee9; }
.composer-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.attach-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #7d8078; background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 9px; white-space: nowrap; }
.attach-button:hover { color: #b65d40; background: #faf3ee; border-color: #f0e1d8; }
.attach-button span:first-child { font-size: 15px; line-height: 10px; }
.composer.uploading { border-color: #d7b5a5; }
.feed.drag-over { outline: 2px dashed #d98768; outline-offset: -5px; background: #fcf7f1; border-radius: 12px; }
.composer-hint { color: #aaa99f; font-size: 9px; }
.send-button { display: flex; align-items: center; gap: 11px; padding: 8px 11px 8px 13px; color: white; background: var(--orange); border: 0; border-radius: 7px; font-size: 10px; font-weight: 600; transition: background .2s ease, transform .2s ease; }
.send-button:hover { background: var(--orange-dark); transform: translateY(-1px); }
.send-button span:last-child { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; background: #ffffff2a; font-size: 12px; }
.footer-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: #a1a197; font-size: 9px; }
.lock-icon { color: #819588; font-size: 15px; }
.side-panel { padding-top: 30px; }
.side-card { overflow: hidden; background: #e8e8de; border: 1px solid #e3e2d8; border-radius: 14px; }
.intro-card { padding: 0 23px 20px; }
.illustration { height: 183px; position: relative; display: grid; place-items: center; overflow: hidden; margin: 0 -23px 19px; background: #e2e5d9; }
.orbit { position: absolute; width: 158px; height: 73px; border: 1px solid #c9d0c2; border-radius: 50%; transform: rotate(-19deg); }
.orbit-one { left: calc(50% - 93px); top: 64px; }
.orbit-two { left: calc(50% - 78px); top: 50px; transform: rotate(19deg); }
.device-laptop { position: absolute; left: calc(50% - 72px); top: 59px; width: 96px; height: 69px; z-index: 1; transform: rotate(-7deg); }
.device-screen { display: flex; flex-direction: column; gap: 5px; width: 82px; height: 56px; padding: 10px 9px; background: #43584e; border: 4px solid #4f6258; border-radius: 7px 7px 3px 3px; box-shadow: 0 10px 17px #30423825; }
.device-screen i { display: block; height: 3px; width: 63%; background: #a8c3ad; border-radius: 3px; }
.device-screen i:first-child { width: 36%; background: #eea887; }
.device-screen i:last-child { width: 48%; }
.device-base { position: absolute; left: -5px; bottom: 3px; width: 91px; height: 5px; background: #677b6f; border-radius: 2px 2px 7px 7px; }
.device-phone { position: absolute; left: calc(50% + 22px); top: 58px; z-index: 3; width: 40px; height: 73px; padding: 11px 5px 7px; background: #f9f6ec; border: 3px solid #707f6f; border-radius: 10px; transform: rotate(8deg); box-shadow: 0 11px 20px #30423822; }
.phone-camera { position: absolute; width: 8px; height: 2px; top: 5px; left: 13px; background: #7d8a7b; border-radius: 4px; }
.phone-content { display: flex; flex-direction: column; gap: 5px; }
.phone-content i { display: block; height: 9px; background: #e8eade; border-radius: 3px; }
.phone-content i:first-child { background: #f3d4c3; }
.phone-content i:last-child { width: 70%; }
.transfer-arrow { position: absolute; left: calc(50% + 4px); top: 85px; z-index: 4; display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--orange); border-radius: 50%; font-size: 15px; box-shadow: 0 3px 8px #d16c4b45; }
.float-dot { position: absolute; width: 8px; height: 8px; background: #d59a6f; border-radius: 50%; }
.dot-a { left: calc(50% - 91px); top: 54px; }
.dot-b { left: calc(50% + 89px); top: 127px; width: 5px; height: 5px; background: #95a48c; }
.float-star { position: absolute; right: calc(50% - 103px); top: 51px; color: #d58461; font-size: 13px; }
.card-kicker { margin: 0 0 8px; color: #999b8e; font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.intro-card h2 { margin: 0 0 7px; font-size: 17px; font-weight: 600; letter-spacing: -.04em; }
.card-copy { margin: 0; color: #7e8178; font-size: 10px; line-height: 1.8; }
.feature-list { display: flex; flex-direction: column; gap: 10px; padding-top: 17px; margin-top: 17px; border-top: 1px solid #d8d9ce; }
.feature-list > div { display: flex; align-items: center; gap: 8px; color: #666b62; font-size: 10px; }
.feature-check { width: 14px; height: 14px; display: grid; place-items: center; color: #64856e; background: #d7e0d4; border-radius: 50%; font-size: 9px; font-weight: 700; }
.quick-card { margin-top: 13px; padding: 14px 16px 15px; background: #f0eee5; }
.quick-top { display: flex; align-items: center; gap: 8px; }
.quick-mark { width: 17px; height: 17px; display: grid; place-items: center; color: #758474; background: #dde3d8; border-radius: 50%; font-size: 10px; font-family: Georgia, serif; font-style: italic; }
.quick-title { flex: 1; color: #555950; font-size: 10px; font-weight: 600; }
.mini-close { padding: 0 3px; color: #a4a398; background: none; border: 0; font-size: 16px; line-height: 1; }
.quick-card p { margin: 9px 0 10px 25px; color: #8a8b82; font-size: 9px; line-height: 1.75; }
.text-link { margin-left: 25px; padding: 0; color: #bd674a; background: transparent; border: 0; font-size: 9px; font-weight: 600; }
.text-link span { padding-left: 3px; }
.side-foot { margin-top: 15px; text-align: center; color: #a3a399; font-size: 9px; }
.tiny-spark { color: #c87652; font-size: 12px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; padding: 10px 15px; color: white; background: #313a34; border-radius: 9px; font-size: 12px; opacity: 0; transform: translate(-50%, 12px); transition: .2s ease; pointer-events: none; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.help-dialog { width: min(420px, calc(100% - 28px)); padding: 24px; color: var(--ink); background: #fffefa; border: 1px solid #e9e7df; border-radius: 16px; box-shadow: 0 20px 80px #26231832; }
.help-dialog::backdrop { background: #25282164; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 19px; }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.dialog-close { width: 28px; height: 28px; font-size: 20px; }
.guide-steps { display: flex; flex-direction: column; gap: 17px; margin: 0; padding: 0; list-style: none; }
.guide-steps li { display: flex; align-items: start; gap: 11px; }
.guide-steps li > span { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; color: #a85b42; background: #f7e8df; border-radius: 8px; font-size: 10px; font-weight: 700; }
.guide-steps strong { font-size: 12px; }
.guide-steps p { margin: 4px 0 0; color: #8d8e86; font-size: 10px; line-height: 1.65; }
.guide-note { margin: 19px 0 16px; padding: 10px; color: #85857c; background: #f5f3eb; border-radius: 8px; font-size: 10px; line-height: 1.7; }
.guide-done { width: 100%; padding: 10px; color: white; background: var(--orange); border: 0; border-radius: 8px; font-size: 11px; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 840px) {
  .app-shell { padding: 0 5%; }
  .lobby { max-width: 700px; }
  .layout { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .9fr); gap: 34px; }
  .conversation-heading { display: block; }
  .today-badge { margin-top: 12px; }
  .side-panel { padding-top: 56px; }
}
@media (max-width: 650px) {
  .app-shell { padding: 0 19px; }
  .topbar { height: 62px; }
  .brand { font-size: 17px; }
  .network-pill { padding: 7px 9px; font-size: 10px; }
  .help-toggle { width: 29px; height: 29px; }
  .layout { display: block; padding: 31px 0 28px; }
  .lobby { min-height: calc(100vh - 63px); justify-content: flex-start; padding: 56px 0 35px; }
  .lobby-heading { margin-bottom: 25px; text-align: left; }
  .lobby-heading h1 { font-size: 29px; }
  .lobby-heading .subheading { margin: 0; font-size: 11px; }
  .room-options { grid-template-columns: 1fr; gap: 10px; }
  .room-option { min-height: 0; padding: 17px 18px; }
  .room-option-icon { width: 30px; height: 30px; margin-bottom: 12px; }
  .room-option > p:not(.option-kicker) { min-height: 0; margin-bottom: 13px; }
  .lobby-footnote { align-items: flex-start; justify-content: flex-start; line-height: 1.6; }
  .lobby-footnote .lock-icon { flex: 0 0 auto; }
  .conversation-heading { margin-bottom: 21px; }
  .eyebrow { font-size: 8px; }
  h1 { font-size: 26px; }
  .subheading { max-width: 330px; font-size: 11px; }
  .today-badge { display: flex; margin-top: 11px; white-space: normal; }
  .leave-room { padding: 5px 6px; }
  .share-card { align-items: start; flex-wrap: wrap; gap: 10px; padding: 13px; }
  .share-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .share-content { width: calc(100% - 47px); flex: 1; }
  .share-content p { line-height: 1.55; }
  .copy-address { margin-left: 44px; padding: 7px 10px; font-size: 9px; }
  .feed-toolbar { margin-top: 23px; }
  .feed { max-height: 48vh; min-height: 150px; }
  .empty-state { min-height: 150px; }
  .composer { margin-top: 12px; }
  .composer-hint { display: none; }
  .attach-button { padding-left: 3px; }
  .send-button { padding: 7px 9px 7px 11px; }
  .footer-note { font-size: 8px; }
  .side-panel { display: none; }
  .message-card { padding: 11px; }
  .message-text { font-size: 12px; }
  .help-dialog { padding: 21px; }
}
