/* ---------------- the messenger ----------------
   Same paper, ink and one accent as the landing. White blocks on paper, no
   borders, no shadows — the layout does the separating. */
html, body { height: 100% }
body { overflow: hidden; background: var(--paper) }

.shell {
  height: 100dvh; display: flex; flex-direction: column;
  max-width: 1280px; margin: 0 auto; padding: 14px 20px 20px;
}

/* ---------------- topbar ---------------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 6px 4px 16px; flex: none }
.topbar .grow { flex: 1 }

.me-chip {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px 0 7px;
  border-radius: 40px; background: var(--white); cursor: pointer; position: relative;
}
.me-chip .nm { font-size: 14.5px; line-height: 1.15 }
.me-chip .nm small { display: block; color: var(--ink-3); font-size: 12px }
.me-chip .av { width: 28px; height: 28px }

.menu {
  position: absolute; top: 50px; right: 0; min-width: 216px; z-index: 40;
  background: var(--white); border-radius: 18px; padding: 7px;
  box-shadow: 0 18px 44px rgba(19, 15, 28, .12); display: none;
}
.menu.on { display: block }
.menu button, .menu a {
  display: flex; width: 100%; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 0; background: none;
  font-size: 14.5px; cursor: pointer; color: var(--ink);
}
.menu button:hover, .menu a:hover { background: var(--wash) }
.menu .sep { height: 1px; background: var(--line-2); margin: 5px 8px }
.menu .danger { color: var(--red) }

/* ---------------- panes ---------------- */
.panes { flex: 1; min-height: 0; display: grid; grid-template-columns: 336px 1fr; gap: 14px }
.side, .thread {
  background: var(--white); border-radius: 26px;
  min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}

/* ---------------- sidebar ---------------- */
.side-head { padding: 14px 14px 10px; flex: none }
.search-wrap { position: relative }
.search-wrap .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none }
.search-wrap .field { height: 44px; font-size: 14.5px; padding-left: 42px; background: var(--paper); box-shadow: none }
.search-wrap .field:focus { box-shadow: inset 0 0 0 1.5px var(--accent) }

.list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 10px }
.list::-webkit-scrollbar { width: 10px }
.list::-webkit-scrollbar-thumb { background: rgba(19,15,28,.13); border-radius: 10px; border: 3px solid transparent; background-clip: content-box }

.row {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 11px 12px; border-radius: 16px; border: 0; background: none; cursor: pointer;
  transition: background .12s ease;
}
.row:hover { background: var(--paper) }
.row.on { background: var(--accent-wash) }
.row .body { flex: 1; min-width: 0 }
.row .top { display: flex; align-items: baseline; gap: 8px; min-width: 0 }
.row .top .nm { min-width: 0 }
.row .nm { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .ts { margin-left: auto; font-size: 11.5px; color: var(--ink-3); flex: none }
.row .last { display: block; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .last .you { color: var(--ink-3) }
.row.unread .nm { font-weight: 500 }
.row.unread .last { color: var(--ink) }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 40px; flex: none;
  background: var(--accent); color: #fff; font-size: 11.5px;
  display: grid; place-items: center;
}

.list-label { padding: 14px 12px 6px; font-size: 12px; color: var(--ink-3) }
.list-empty { padding: 30px 20px; color: var(--ink-2); font-size: 14px; line-height: 1.6; text-align: center }
.list-empty b { display: block; color: var(--ink); font-weight: 400; margin-bottom: 4px }

/* ---------------- thread ---------------- */
.th-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex: none; position: relative }
.th-head .who { min-width: 0; flex: 1 }
.th-head .nm { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.th-head .sb { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.back { display: none; background: none; border: 0; cursor: pointer; color: var(--ink-2); padding: 6px; margin-left: -6px }
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; border: 0; background: none; cursor: pointer;
  color: var(--ink-3); display: grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--paper); color: var(--ink) }

.msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 10px; display: flex; flex-direction: column }
.msgs-inner { margin-top: auto; display: flex; flex-direction: column; gap: 3px }
.msgs::-webkit-scrollbar { width: 10px }
.msgs::-webkit-scrollbar-thumb { background: rgba(19,15,28,.13); border-radius: 10px; border: 3px solid transparent; background-clip: content-box }

.thread-note {
  align-self: center; text-align: center; max-width: 330px; color: var(--ink-2);
  font-size: 14px; line-height: 1.6; padding: 30px 0 20px;
}
.thread-note b { display: block; color: var(--ink); font-weight: 400; margin-bottom: 4px }
.day { align-self: center; font-size: 11.5px; color: var(--ink-3); padding: 16px 0 12px }

.bub {
  max-width: min(560px, 76%); padding: 10px 15px; border-radius: 20px;
  font-size: 15px; line-height: 1.48; overflow-wrap: anywhere; white-space: pre-wrap;
  background: var(--wash); color: var(--ink); align-self: flex-start;
  border-bottom-left-radius: 7px;
}
.bub.mine { background: var(--accent); color: #fff; align-self: flex-end; border-radius: 20px; border-bottom-right-radius: 7px }
.bub.run { border-bottom-left-radius: 20px }
.bub.mine.run { border-bottom-right-radius: 20px }
.bub .t { display: block; font-size: 11px; margin-top: 3px; opacity: .55; text-align: right }
.bub.run .t { display: none }
.bub.sending { opacity: .5 }
.bub.failed { background: var(--red-wash); color: var(--red) }

.th-empty { flex: 1; display: grid; place-items: center; padding: 30px; text-align: center }
.th-empty .in { max-width: 340px }
.th-empty h3 { margin: 18px 0 6px; font-size: 19px; font-weight: 400; letter-spacing: -.014em }
.th-empty p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6 }
.th-empty .av { margin: 0 auto; background: var(--accent-wash); color: var(--accent) }

/* ---------------- composer ---------------- */
.composer { flex: none; padding: 10px 14px 16px }
.composer form { display: flex; gap: 10px; align-items: flex-end }
.composer textarea {
  flex: 1; resize: none; max-height: 150px; min-height: 46px; padding: 12px 18px;
  background: var(--paper); border: 0; border-radius: 24px;
  font-size: 15px; line-height: 1.45;
}
.composer textarea::placeholder { color: var(--ink-3) }
.composer textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent) }
.send { width: 46px; height: 46px; border-radius: 50%; padding: 0; flex: none; background: var(--accent) }
.send:hover { background: #4157e2 }
.composer .note { font-size: 12.5px; color: var(--ink-3); padding: 8px 6px 0 }
.composer .note.bad { color: var(--red) }

/* ---------------- gate ---------------- */
.gate {
  position: fixed; inset: 0; z-index: 100; display: none;
  padding: 24px; overflow-y: auto;
}
.gate.nightsky::before, .gate.nightsky::after { position: fixed }
.gate.on { display: grid; place-items: center }
.gate-card {
  width: 100%; max-width: 452px; background: var(--white); border-radius: 28px; padding: 32px;
  box-shadow: 0 30px 70px rgba(19, 15, 28, .13);
}
.gate-card h2 { font-size: 25px; font-weight: 400; letter-spacing: -.022em; margin: 0 0 10px }
.gate-card p.g-sub { margin: 0 0 24px; color: var(--ink-2); font-size: 15px; line-height: 1.6 }
.gate-card p.g-sub b { color: var(--ink); font-weight: 400 }

.g-name { position: relative; margin: 0 0 12px }
.g-name .at { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3) }
.g-name .field { padding-left: 34px; background: var(--paper); box-shadow: none }
.g-name .field:focus { box-shadow: inset 0 0 0 1.5px var(--accent) }

.wallets { display: flex; flex-direction: column; gap: 8px }
.wallet-opt {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  padding: 13px 16px; border-radius: 18px; cursor: pointer;
  background: var(--paper); border: 0; color: var(--ink);
  transition: background .13s ease;
}
.wallet-opt:hover { background: var(--wash) }
.wallet-opt img, .wallet-opt .fb {
  width: 30px; height: 30px; border-radius: 9px; flex: none; object-fit: cover;
  background: var(--wash); display: grid; place-items: center; color: var(--ink-3);
}
.wallet-opt .nm { display: block; font-size: 15px }
.wallet-opt .sb { display: block; font-size: 12.5px; color: var(--ink-3) }
.wallet-opt .go { margin-left: auto; color: var(--ink-3); font-size: 13.5px }
.wallet-none { color: var(--ink-2); font-size: 14.5px; line-height: 1.65 }
.wallet-none a { color: var(--accent) }

.steps-list { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 2px }
.s { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-3) }
.s.run, .s.ok { color: var(--ink) }
.s.no { color: var(--red) }
.s .ic { width: 18px; height: 18px; display: grid; place-items: center; flex: none }
.s .ic .dotp { width: 7px; height: 7px; border-radius: 2px; background: currentColor; opacity: .3 }

.verdict { display: none; margin-top: 22px; padding: 16px 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.55 }
.verdict.on { display: block }
.verdict .hl { display: block; margin-bottom: 3px; font-size: 15.5px }
.verdict .bd { color: var(--ink-2) }
.verdict.ok { background: var(--green-wash) }
.verdict.ok .hl { color: var(--green) }
.verdict.no { background: var(--red-wash) }
.verdict.no .hl { color: var(--red) }
.verdict.no .bd { color: #8a5442 }

.claim-row { display: flex; gap: 8px; margin-top: 4px }
.claim-row .res-input-wrap { position: relative; flex: 1 }
.claim-row .at { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--ink-3) }
.claim-row .field { padding-left: 34px; background: var(--paper); box-shadow: none }
.claim-row .field:focus { box-shadow: inset 0 0 0 1.5px var(--accent) }
.claim-row .btn { height: 50px }
.g-addr {
  display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 16px;
  border-radius: 16px; background: var(--paper); font-size: 13px; color: var(--ink-3);
}
.g-addr .mono { color: var(--ink) }
.g-foot { margin-top: 20px; font-size: 13px; color: var(--ink-3); line-height: 1.6 }
.g-foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px }

/* ---------------- toast ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px); z-index: 200;
  background: var(--ink); color: var(--paper); border-radius: 40px;
  padding: 12px 20px; font-size: 14.5px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 40px);
}
#toast.on { opacity: 1; transform: translate(-50%, 0) }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .shell { padding: 10px 10px 12px }
  .panes { grid-template-columns: 1fr }
  .thread { display: none }
  .shell.open .side { display: none }
  .shell.open .thread { display: flex }
  .back { display: block }
  .topbar { padding-bottom: 10px }
}

/* verified on fomoscan — only some fomo accounts are indexed there at all */
.vf { width: 13px; height: 13px; color: var(--accent); display: inline-block; vertical-align: -2px; margin-left: 5px; flex: none }
.row .nm .vf { width: 12px; height: 12px }

/* what could and could not be checked about a name — never left to a missing tick */
.unv {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 40px;
  background: var(--wash); color: var(--ink-3); font-size: 11.5px; vertical-align: 1px;
}
.unv.ok { background: var(--green-wash); color: var(--green) }
.th-head .sb { white-space: normal }

/* ================= the app runs in fomo's dark =================
   The same semantic tokens, redefined once for this page, so every rule above
   keeps working — panels become glass, paper becomes night, ink becomes light. */
body {
  --paper: #060510;
  --white: rgba(255, 255, 255, .045);
  --wash: rgba(255, 255, 255, .085);
  --ink: #f4f3f8;
  --ink-2: #a8a4b6;
  --ink-3: #706b81;
  --line: rgba(255, 255, 255, .12);
  --line-2: rgba(255, 255, 255, .07);
  --accent-wash: rgba(81, 106, 246, .20);
  --green: #6fd39a;
  --green-wash: rgba(33, 201, 94, .15);
  --red: #ff9573;
  --red-wash: rgba(255, 98, 46, .15);
  background: var(--paper);
}

/* the same light the landing has, held to the top of the room */
body::before {
  content: ''; position: fixed; z-index: 0; pointer-events: none;
  left: 50%; top: -420px; transform: translateX(-50%);
  width: min(1700px, 170vw); height: 1100px;
  background:
    radial-gradient(46% 40% at 26% 26%, rgba(81, 106, 246, .30), transparent 66%),
    radial-gradient(40% 36% at 72% 16%, rgba(129, 96, 255, .24), transparent 64%),
    radial-gradient(50% 40% at 56% 46%, rgba(38, 66, 210, .18), transparent 68%);
  -webkit-mask-image: radial-gradient(70% 62% at 50% 32%, #000 0%, #000 46%, transparent 88%);
  mask-image: radial-gradient(70% 62% at 50% 32%, #000 0%, #000 46%, transparent 88%);
}
/* the gate must keep position:fixed — it is an overlay, not a block in flow */
.shell { position: relative; z-index: 1 }

/* things that were tuned for a light page and need saying again */
.list::-webkit-scrollbar-thumb,
.msgs::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14) }
.side, .thread { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px) }
.me-chip { background: rgba(255, 255, 255, .06) }
.menu { background: #16131f; box-shadow: 0 20px 48px rgba(0, 0, 0, .6) }
.search-wrap .field { background: rgba(255, 255, 255, .05) }
.composer textarea { background: rgba(255, 255, 255, .05) }
.bub { border: 0 }
.bub.mine { background: var(--accent); color: #fff }
.icon-btn:hover, .row:hover { background: rgba(255, 255, 255, .06) }
.row.on { background: rgba(81, 106, 246, .22) }
.th-empty .av { background: rgba(81, 106, 246, .18); color: #9fb0ff }

.gate { background: rgba(6, 5, 16, .72) }
.gate-card { background: #14121e; box-shadow: 0 30px 80px rgba(0, 0, 0, .6) }
.gate-card .field, .wallet-opt { background: rgba(255, 255, 255, .05) }
.wallet-opt:hover { background: rgba(255, 255, 255, .09) }
.g-addr { background: rgba(255, 255, 255, .05) }
#toast { background: #1b1826; color: var(--ink) }
.unv { background: rgba(255, 255, 255, .09); color: var(--ink-3) }
.unv.ok { background: rgba(33, 201, 94, .16); color: #6fd39a }
