/* Logos web — visual language mirrored from the iOS app's DesignSystem:
   warm cream/ink neutrals + ONE restrained gold accent, serif for the wordmark
   and display headings, system sans for body. Light + dark via prefers-color-scheme. */

:root {
  --canvas: #FAF7F1;
  --surface: #FFFEFB;
  --surface-alt: #F1ECE2;
  --hairline: #E7E0D4;
  --ink: #1A1714;
  --ink-2: #6B6357;
  --ink-3: #9A9180;
  --gold: #B0894F;
  --gold-text: #8A6A38;
  --gold-wash: #F3E9D6;
  --on-gold: #231D12;
  --verified: #3E7D55;
  --caution: #B2741A;
  --danger: #C0392B;
  --bubble-mine: #EFE2C7;
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #15120D;
    --surface: #1C1813;
    --surface-alt: #262019;
    --hairline: #2E2820;
    --ink: #F4EFE6;
    --ink-2: #A89C88;
    --ink-3: #6F6557;
    --gold: #CBA468;
    --gold-text: #D9B777;
    --gold-wash: #2C2415;
    --on-gold: #1A140A;
    --verified: #6FBF8C;
    --caution: #E0A23E;
    --danger: #E3675B;
    --bubble-mine: #322817;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--gold-text); }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 10;
}
.topbar img.mark { width: 30px; height: 30px; border-radius: 8px; }
.topbar .word { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .3px; }
.topbar .pill {
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  color: var(--gold-text); background: var(--gold-wash);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--ink-2); }
.topbar .who b { color: var(--ink); font-weight: 600; }

/* ---- layout ---- */
.wrap { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
.center { max-width: 480px; margin: 6vh auto 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px;
}
.card + .card { margin-top: 16px; }

h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 0 0 8px; letter-spacing: .2px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0 0 12px; }
.lede { color: var(--ink-2); margin: 0 0 22px; font-size: 15.5px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-3); }

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.field {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--hairline); background: var(--canvas);
  border-radius: 12px; padding: 0 12px;
}
.field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-wash); }
.field .at { color: var(--ink-3); font-weight: 600; }
.field input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink);
  font-size: 16px; padding: 13px 0; font-family: var(--sans);
}
.hint { font-size: 12.5px; margin-top: 7px; min-height: 17px; }
.hint.ok { color: var(--verified); }
.hint.bad { color: var(--danger); }

button.primary {
  width: 100%; border: 0; cursor: pointer;
  background: var(--gold); color: var(--on-gold);
  font-size: 15px; font-weight: 700; letter-spacing: .2px;
  padding: 13px 16px; border-radius: 12px; margin-top: 16px;
  font-family: var(--sans); transition: filter .15s, opacity .15s;
}
button.primary:hover { filter: brightness(1.04); }
button.primary:disabled { opacity: .45; cursor: not-allowed; }
button.ghost {
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font-family: var(--sans);
}
button.ghost:hover { background: var(--surface-alt); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--gold-wash); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  color: var(--gold-text); border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
}
.note .ico { font-size: 15px; line-height: 1.3; }

/* mono key / seed display */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.seedbox {
  background: var(--canvas); border: 1px dashed var(--hairline); border-radius: 12px;
  padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all; line-height: 1.7; color: var(--ink);
}

/* ---- app split ---- */
.split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.idrow { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--gold-wash); color: var(--gold-text);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 20px;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}
.kv { font-size: 12.5px; color: var(--ink-2); margin-top: 10px; }
.kv b { color: var(--ink); font-weight: 600; }
.divider { height: 1px; background: var(--hairline); margin: 16px 0; }

.peer-result { margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
}
.badge.found { color: var(--verified); background: color-mix(in srgb, var(--verified) 14%, transparent); }
.badge.missing { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* chat preview pane */
.chat {
  min-height: 420px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow: hidden;
}
.chat .head { padding: 16px 18px; border-bottom: 1px solid var(--hairline); }
.chat .body {
  flex: 1; padding: 20px; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--gold-wash) 40%, transparent), transparent 60%);
}
.chat .body .inner { max-width: 360px; }
.chat .composer {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--hairline); background: var(--surface-alt);
}
.chat .composer input {
  flex: 1; border: 1px solid var(--hairline); background: var(--canvas); color: var(--ink-3);
  border-radius: 999px; padding: 11px 16px; font-size: 15px; font-family: var(--sans);
}
.chat .composer button { border: 0; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 0 18px; font-weight: 700; opacity: .5; }

footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 26px 20px 40px; }
footer .warn { color: var(--caution); font-weight: 600; letter-spacing: .3px; }
.hidden { display: none !important; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--gold-wash); border-top-color: var(--gold); border-radius: 50%; animation: s .7s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }
