:root { color-scheme: light; }
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  html,body { height:100%; }
  body { font-family: 'Segoe UI', Arial, Helvetica, sans-serif; background:#202020; color:#111; }
  #setup { min-height:100%; display:flex; align-items:center; justify-content:center; background:#f1f1f1; padding:20px; max-width:480px; margin:0 auto; }
  #setup .card { background:#fff; border:2.5px solid #111; border-radius:20px 26px 18px 28px/28px 18px 26px 20px; box-shadow:6px 6px 0 #111; padding:28px 22px; width:100%; max-width:360px; text-align:center; }
  #setup h1 { font-size:23px; color:#111; margin-bottom:6px; letter-spacing:.3px; }
  #setup p { font-size:14px; color:#555; margin-bottom:18px; line-height:1.5; }
  #setup input { width:100%; padding:13px; font-size:16px; border:2px solid #111; border-radius:12px; margin-bottom:14px; background:#fff; }
  #setup button { width:100%; padding:13px; font-size:16px; background:#111; color:#fff; border:2.5px solid #111; border-radius:14px 18px 14px 18px/18px 14px 18px 14px; font-weight:bold; cursor:pointer; box-shadow:3px 3px 0 rgba(17,17,17,.35); }
  #setup .brand { padding:2px 6px; margin:0 auto 14px; max-width:260px; }
  #setup .brand img { display:block; width:100%; height:auto; }
  #chat { display:none; height:100%; flex-direction:column; max-width:480px; margin:0 auto; background:#f1f1f1; box-shadow:0 0 0 2.5px #111; position:relative; }
  #menuDrop { display:none; position:absolute; top:60px; right:10px; background:#fff; border:2.5px solid #111; border-radius:14px 18px 12px 20px/20px 12px 18px 14px; box-shadow:4px 4px 0 #111; z-index:50; min-width:235px; overflow:hidden; padding:6px 0; }
  #menuDrop .mi { display:block; width:100%; background:none; border:none; color:#111; font-weight:600; text-align:left; padding:13px 18px; font-size:15px; cursor:pointer; font-family:inherit; }
  #menuDrop .mi + .mi { border-top:1.5px dashed #bbb; }
  #menuDrop .mi:active { background:#eee; }
  #header { background:#fff; color:#111; padding:10px 14px; display:flex; align-items:center; gap:10px; border-bottom:2.5px solid #111; z-index:2; }
  #avatar { width:40px; height:40px; border-radius:50%; background:#fff; border:2.5px solid #111; display:flex; align-items:center; justify-content:center; font-weight:bold; font-size:17px; flex-shrink:0; overflow:hidden; color:#111; }
  #header .info { flex:1; min-width:0; }
  #partnerName { font-size:16.5px; font-weight:bold; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #partnerStatus { font-size:12px; color:#777; }
  #menuBtn { background:none; border:none; color:#111; font-size:22px; padding:4px 8px; cursor:pointer; }
  #messages { flex:1; overflow-y:auto; padding:14px 12px 8px; background:#f1f1f1; background-image:radial-gradient(#dcdcdc 1.1px, transparent 1.2px); background-size:22px 22px; }
  .day-note { text-align:center; margin:8px 0 14px; }
  .day-note span { background:#fff; border:2px solid #111; color:#444; font-size:11.5px; padding:5px 12px; border-radius:999px; box-shadow:2px 2px 0 #111; display:inline-block; }
  .row { display:flex; margin-bottom:12px; align-items:flex-start; }
  .row.me { justify-content:flex-end; }
  .mavatar { width:34px; height:34px; border-radius:50%; background:#fff; border:2.5px solid #111; display:flex; align-items:center; justify-content:center; font-weight:bold; font-size:14px; flex-shrink:0; margin-right:8px; color:#111; }
  .mcol { max-width:80%; display:flex; flex-direction:column; }
  .row.me .mcol { align-items:flex-end; }
  .bname { font-size:13px; font-weight:bold; color:#111; margin:0 0 3px 3px; }
  .bubble { padding:8px 11px; background:#fff; border:2.5px solid #111; border-radius:16px 20px 15px 22px/22px 15px 20px 16px; box-shadow:3px 3px 0 #111; word-wrap:break-word; overflow-wrap:break-word; }
  .row.me .bubble { background:#e7e7e7; border-radius:20px 16px 22px 15px/15px 22px 16px 20px; }
  .quote { background:rgba(0,0,0,.05); border-left:3.5px solid #111; border-radius:4px; padding:5px 7px; margin-bottom:5px; font-size:12.5px; color:#444; }
  .quote b { color:#111; display:block; font-size:12px; }
  .btext { font-size:14.5px; line-height:1.45; white-space:pre-wrap; color:#111; }
  .bunder { display:flex; align-items:center; gap:10px; margin-top:4px; padding:0 3px; font-size:11px; color:#888; }
  .replybtn { background:none; border:none; color:#666; font-size:12px; cursor:pointer; padding:0; }
  .bunder .checks { color:#1e88e5; font-weight:bold; letter-spacing:-3px; }
  .bunder .checks.grey { color:#aaa; }
  .bubble:active { filter:brightness(.97); }
  #replyBar { display:none; background:#fff; border-top:2px solid #111; padding:8px 12px; font-size:13px; color:#444; }
  #replyBar b { color:#111; }
  #replyBar .x { float:right; background:none; border:none; font-size:16px; color:#888; cursor:pointer; }
  #typingBar { display:none; padding:4px 14px; font-size:12px; color:#555; background:transparent; font-style:italic; }
  #inputBar { background:#fff; padding:8px; display:flex; align-items:flex-end; gap:8px; border-top:2.5px solid #111; }
  #msgInput { flex:1; border:2.5px solid #111; border-radius:999px; padding:11px 16px; font-size:15px; resize:none; max-height:110px; outline:none; font-family:inherit; background:#fff; }
  #sendBtn { width:46px; height:46px; border-radius:50%; background:#111; color:#fff; border:2.5px solid #111; font-size:18px; cursor:pointer; flex-shrink:0; box-shadow:2px 2px 0 rgba(17,17,17,.35); }
  #sendBtn:active { transform:translate(1px,1px); box-shadow:none; }
  #netWarn { display:none; background:#b3261e; color:#fff; text-align:center; font-size:12.5px; padding:5px; border-bottom:2.5px solid #111; }
  .empty { text-align:center; color:#777; font-size:13.5px; margin-top:30px; line-height:1.6; padding:0 30px; }
