/* Outpost web (KAN-957): the D2 "Survey" look of the Apple apps. Sage map paper with contour lines,
   slate ink, one typeface (Figtree since KAN-964, served from this site like every other file:
   never from a font service), paper sheets with uneven corners, pink flagging tape for what matters.
   Night is "Blueprint by lamplight". */
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/Figtree-Italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --paper: #EEF1E8; --land: #DCE7D2; --contour: #B9C4AF; --sheet: #FBFCF8; --edge: #D3DACB;
  --field: #FFFFFF; --ink: #17262B; --soft: #2D3C40; --quiet: #4E5D5F; --link: #2B6E8F;
  --on-ink: #F6F7F2; --pink: #FF2E7E; --live: #1F6E3F; --problem: #B3261E;
  --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480' viewBox='0 0 480 480'%3E%3Cg fill='none' stroke='%23B9C4AF' stroke-width='1' opacity='.55'%3E%3Cpath d='M-20 90c80-40 150 30 240 0s170-60 280-10'/%3E%3Cpath d='M-20 130c90-30 160 40 250 10s160-50 270 0'/%3E%3Cpath d='M-20 300c70 30 150-40 240-10s180 60 280 20'/%3E%3Cpath d='M-20 340c80 40 160-30 250 0s170 50 270 10'/%3E%3Cellipse cx='360' cy='220' rx='70' ry='40'/%3E%3Cellipse cx='360' cy='220' rx='40' ry='22'/%3E%3Cellipse cx='110' cy='420' rx='60' ry='26'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0C1F36; --land: #163257; --contour: #3F6593; --sheet: #132A4B; --edge: #07162A;
    --field: #0C1F36; --ink: #F2EEE4; --soft: #D6D2C8; --quiet: #B3BFD0; --link: #9ED0FF;
    --on-ink: #0C1F36; --live: #9BE8B6; --problem: #FFB4A9;
    --contours: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='480' viewBox='0 0 480 480'%3E%3Cg fill='none' stroke='%233F6593' stroke-width='1' opacity='.7'%3E%3Cpath d='M-20 90c80-40 150 30 240 0s170-60 280-10'/%3E%3Cpath d='M-20 130c90-30 160 40 250 10s160-50 270 0'/%3E%3Cpath d='M-20 300c70 30 150-40 240-10s180 60 280 20'/%3E%3Cpath d='M-20 340c80 40 160-30 250 0s170 50 270 10'/%3E%3Cellipse cx='360' cy='220' rx='70' ry='40'/%3E%3Cellipse cx='360' cy='220' rx='40' ry='22'/%3E%3Cellipse cx='110' cy='420' rx='60' ry='26'/%3E%3C/g%3E%3C/svg%3E");
  }
  body::before { content: ""; position: fixed; inset: 0; pointer-events: none;
                 background: radial-gradient(60rem 40rem at 85% 0%, rgba(233,165,74,.18), transparent 70%); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper) var(--contours); color: var(--ink);
       font: 400 17px/1.55 "Figtree", system-ui, -apple-system, Roboto, sans-serif;
       -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-weight: 800; letter-spacing: -.012em; margin: .2rem 0 .6rem; }
h1 { font-size: 1.8rem; line-height: 1.15; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; margin-top: 1.4rem; }
p { margin: .55rem 0; }
.quiet { color: var(--quiet); }
.small { font-size: .9rem; }
.warn { color: var(--problem); font-weight: 600; }
.ok { color: var(--live); font-weight: 700; }
.strip { background: var(--sheet); border-left: 3px solid var(--pink); padding: .5rem .8rem; border-radius: 4px 10px 10px 4px; margin: .5rem 0; }
.pad { padding: .6rem 0; }

/* Sign-in and setup cards: a paper sheet on the map. */
.card { max-width: 32rem; margin: 9vh auto 2rem; padding: 2.2rem 2rem; background: var(--sheet);
        border: 1px solid var(--edge); border-radius: 22px 30px 24px 28px;
        box-shadow: 0 1px 0 var(--edge), 0 18px 40px -24px rgba(23,38,43,.35); }
.card h1::after { content: ""; display: block; width: 3.2rem; height: .35rem; margin-top: .55rem;
                  background: var(--pink); border-radius: 2px; transform: rotate(-1.5deg); }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--field);
                  border: 1px solid var(--edge); border-radius: 14px; padding: .75rem .9rem; margin: .5rem 0; }
input:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
textarea { resize: none; }
button { font: inherit; min-height: 44px; border-radius: 14px; cursor: pointer; }
button.primary, button.secondary, button.danger { display: block; width: 100%; margin: .55rem 0; padding: .65rem 1rem;
  border: 0; font-weight: 700; letter-spacing: -.005em; }
button.primary { background: var(--ink); color: var(--on-ink); }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--edge); }
button.danger { background: transparent; color: var(--problem); border: 1px solid var(--problem); }
button.link { background: none; border: 0; color: var(--link); padding: .25rem 0; font-weight: 700; }
button:disabled { opacity: .5; }
.row { display: flex; align-items: center; gap: .6rem; }
.row input[type=checkbox] { width: 1.3rem; height: 1.3rem; margin: 0; }
/* KAN-963: the first run's progress, a bar per step. */
.steps { display: flex; gap: .35rem; margin: 0 0 .9rem; }
.steps span { flex: 1; height: .3rem; border-radius: 2px; background: var(--edge); }
.steps span.on { background: var(--ink); }
.step-line { font-size: .85rem; font-weight: 700; letter-spacing: -.005em; color: var(--quiet); margin: 0 0 .2rem; }
.words, .tiles { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
                 counter-reset: w; }
.words li, .tiles li { counter-increment: w; background: var(--land); border-radius: 10px 14px 12px 9px; padding: .55rem .8rem;
                       font-weight: 700; letter-spacing: -.012em; font-size: 1.05rem; }
.words li::before, .tiles li::before { content: counter(w); color: var(--quiet); font-weight: 600; font-size: .8rem;
                                       margin-right: .55rem; letter-spacing: -.005em; }

/* Banner (updates, problems): pink flagging tape. */
#banner .flash { position: sticky; top: 0; z-index: 10; background: var(--sheet); border-bottom: 3px solid var(--pink);
                 padding: .6rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-weight: 600; }
#banner .flash.warn { border-color: var(--problem); color: var(--problem); }
#banner .flash button { width: auto; display: inline-block; margin: 0; min-height: 36px; padding: .3rem .9rem; }

/* Avatars: rounded squares in the person's map tint. */
.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 28%; color: #17262B;
          font-weight: 800; letter-spacing: -.012em; user-select: none; }
.avatar.tint0 { background: #E6E2CF; } .avatar.tint1 { background: #CFE1E8; }
.avatar.tint2 { background: #DCE7D2; } .avatar.tint3 { background: #E3D8E6; }
.avatar.s20 { width: 20px; height: 20px; font-size: .55rem; }
.avatar.s24 { width: 24px; height: 24px; font-size: .62rem; }
.avatar.s32 { width: 32px; height: 32px; font-size: .75rem; }
.avatar.s36 { width: 36px; height: 36px; font-size: .82rem; }
.avatar.s48 { width: 48px; height: 48px; font-size: 1.05rem; }

/* The shell: phone = one pane + tabs; wide = places on the left, the open thing on the right. */
.shell { display: grid; grid-template-rows: 1fr auto auto; height: 100dvh; }
.side { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: .8rem 1rem 1.2rem; }
.pane { display: none; min-height: 0; overflow: hidden; background: color-mix(in srgb, var(--sheet) 92%, transparent); }
.shell.has-detail .side { display: none; }
.shell.has-detail .pane { display: flex; flex-direction: column; }
.tabs { display: flex; background: var(--sheet); border-top: 1px solid var(--edge); padding-bottom: env(safe-area-inset-bottom); }
.tabs .tab { flex: 1; background: none; border: 0; border-radius: 0; color: var(--quiet); font-weight: 700; letter-spacing: -.005em; }
.tabs .tab.on { color: var(--ink); box-shadow: inset 0 3px 0 var(--pink); }
@media (min-width: 860px) {
  .shell { grid-template-columns: 300px 1fr; grid-template-rows: 1fr auto; }
  .shell .side, .shell.has-detail .side { display: flex; border-right: 1px solid var(--edge); }
  .shell .pane { display: flex; flex-direction: column; }
  .tabs { display: none; }
  .back { display: none; }
}
.brand { display: flex; align-items: center; justify-content: space-between; padding: .4rem .2rem 1rem; }
.clearing { font-weight: 800; letter-spacing: -.012em; font-size: 1.2rem; padding: .15rem .55rem; margin-left: -.55rem;
            background: var(--paper); border-radius: 10px; box-shadow: 0 0 0 6px var(--paper); }
.clearing.big { font-size: 1.6rem; }
.side-links { margin-top: auto; padding-top: 1rem; display: none; }
@media (min-width: 860px) { .side-links { display: flex; gap: .4rem; } }
.side-link { flex: 1; background: none; border: 1px solid var(--edge); color: var(--soft); font-weight: 700; letter-spacing: -.005em; }
.side-link.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

.places { list-style: none; margin: 0; padding: 0; }
.places .section { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
                   color: var(--quiet); padding: 1rem .5rem .35rem; }
.place { width: 100%; display: flex; align-items: center; gap: .55rem; background: none; border: 0; border-radius: 10px;
         color: var(--soft); text-align: left; padding: .5rem .6rem; min-height: 44px; }
.place:hover { background: color-mix(in srgb, var(--land) 70%, transparent); }
.place.on { background: var(--ink); color: var(--on-ink); }
.place.unread .place-name { font-weight: 800; color: var(--ink); }
.place.on.unread .place-name { color: var(--on-ink); }
.hash { width: 24px; text-align: center; color: var(--quiet); font-weight: 700; }
.place.on .hash { color: var(--on-ink); opacity: .75; }
.place-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-note { margin: 0 0 .3rem 2.6rem; font-size: .8rem; color: var(--quiet); }
.badge { min-width: 1.5rem; padding: 0 .45rem; border-radius: 1rem; background: var(--ink); color: var(--on-ink);
         font-size: .78rem; font-weight: 700; text-align: center; }
.place.on .badge { background: var(--on-ink); color: var(--ink); }
.badge.pink { background: var(--pink); color: #fff; }

.empty { margin: auto; text-align: center; max-width: 24rem; padding: 2rem; }
.back { align-self: flex-start; background: none; border: 0; color: var(--link); font-weight: 700; padding: .3rem 0; min-height: 36px; }
.page { overflow-y: auto; padding: 1.5rem 1.6rem 2.5rem; max-width: 42rem; width: 100%; }

/* A place. */
.place-view { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.place-top { display: flex; align-items: center; gap: .7rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--edge);
             background: var(--sheet); }
.place-top h2 { margin: 0; font-size: 1.2rem; flex: 1; min-width: 3.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sealed { font-size: .78rem; font-weight: 700; letter-spacing: -.005em; color: var(--live); }
.sealed::before { content: "● "; }
.place-view > .strip { margin: .5rem 1rem 0; }
.messages { list-style: none; margin: 0; padding: .75rem 1.25rem 1.25rem; flex: 1; overflow-y: auto; }
.day { text-align: center; margin: 1rem 0 .4rem; font-size: .78rem; font-weight: 700;
       text-transform: uppercase; letter-spacing: .08em; color: var(--quiet); }
.day span { background: var(--paper); padding: .15rem .7rem; border-radius: 1rem; }
/* KAN-969: the test outpost's badge. */
.test-badge { font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: #fff; background: #FF2E7E;
  border-radius: 1rem; padding: .1rem .45rem; }
/* KAN-970: where earlier messages shared with you begin, and where your own start again. */
.shared-line { display: flex; align-items: center; gap: .6rem; margin: .8rem 0 .4rem; font-size: .76rem;
  font-weight: 700; color: var(--quiet); list-style: none; }
.shared-line::before, .shared-line::after { content: ""; flex: 1; border-top: 1px solid var(--hairline, rgba(23, 38, 43, .15)); }
.msg { display: flex; gap: .8rem; padding: .25rem 0; }
.msg.first { margin-top: .75rem; }
.gutter { width: 36px; flex: none; }
.msg-body { min-width: 0; flex: 1; }
.meta { display: flex; flex-wrap: wrap; column-gap: .5rem; row-gap: 0; align-items: baseline; font-size: .9rem; }
.meta strong { letter-spacing: -.012em; font-weight: 800; font-size: 1rem; }
.role { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
        background: var(--ink); color: var(--on-ink); padding: .05rem .35rem; border-radius: 4px; }
.msg p { margin: .1rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-place { margin: 25% auto 0; text-align: center; }
.empty-place strong { letter-spacing: -.012em; font-size: 1.3rem; }
.composer { display: flex; gap: .5rem; align-items: flex-end; padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
            border-top: 1px solid var(--edge); background: var(--sheet); }
.composer textarea { margin: 0; max-height: 160px; }
.send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-ink);
        font-size: 1.2rem; font-weight: 800; }

/* People and settings. */
.people { list-style: none; margin: .5rem 0; padding: 0; }
.person { width: 100%; display: flex; align-items: center; gap: .8rem; background: none; border: 0; border-bottom: 1px solid var(--edge);
          border-radius: 0; color: var(--ink); text-align: left; padding: .75rem 0; }
.person-name { flex: 1; display: flex; flex-direction: column; }
.person-name strong { letter-spacing: -.012em; }
.link-text { color: var(--link); font-weight: 700; }
.person-head, .card-row { display: flex; align-items: center; gap: .9rem; margin: .6rem 0; }
.person-head h2 { margin: 0; }

/* KAN-958: new places, files, alerts. */
.new-row { display: flex; gap: .4rem; padding: 0 .2rem .4rem; }
.new { flex: 1; background: none; border: 1px dashed var(--contour); color: var(--soft); font-weight: 700; letter-spacing: -.005em;
       min-height: 38px; border-radius: 12px; }
.new:hover { border-style: solid; background: color-mix(in srgb, var(--land) 60%, transparent); }
.top-link { background: none; border: 1px solid var(--edge); color: var(--soft); font-weight: 700; letter-spacing: -.005em;
            min-height: 34px; padding: 0 .7rem; border-radius: 10px; white-space: nowrap; flex: none; }
.people.pick .person { cursor: pointer; }
.people.pick input[type=checkbox] { width: 1.3rem; height: 1.3rem; margin: 0; flex: none; accent-color: var(--ink); }
.file-input { display: none; }
.attach { flex: none; width: 44px; height: 44px; border: 1px solid var(--edge); border-radius: 50%; background: var(--sheet);
          color: var(--ink); font-size: 1.4rem; font-weight: 700; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem; background: var(--sheet); }
.chips:not(:empty) { padding-top: .5rem; border-top: 1px solid var(--edge); }
.chips.sending { opacity: .55; }
.chip { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; background: var(--land); border-radius: 10px 12px 10px 9px;
        padding: .2rem .3rem .2rem .6rem; font-size: .85rem; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; font-weight: 600; }
.chip-x { min-height: 28px; width: 28px; border: 0; background: none; color: var(--soft); font-size: 1.1rem; padding: 0; }
.file-photo { margin: .35rem 0 .2rem; }
.photo { display: block; max-width: min(100%, 22rem); max-height: 22rem; border-radius: 12px 16px 14px 11px;
         background: var(--land); border: 1px solid var(--edge); cursor: zoom-in; object-fit: cover; }
.file { display: flex; align-items: center; gap: .6rem; max-width: 26rem; margin: .35rem 0; padding: .5rem .7rem;
        background: var(--sheet); border: 1px solid var(--edge); border-radius: 12px 16px 14px 11px; }
.file-icon { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 9px; background: var(--land); flex: none; }
.file-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; gap: .8rem; }
.player { display: block; max-width: min(100%, 26rem); margin: .2rem 0 .4rem; border-radius: 12px; }
.field { display: flex; flex-direction: column; gap: .2rem; margin: .5rem 0; }
select { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--edge); border-radius: 12px;
         padding: .6rem .7rem; min-height: 44px; }

/* KAN-959: text, mentions, reactions, threads, menus, Seen, search, pins and profiles. */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.text p { margin: .1rem 0 0; }
.text .item { display: flex; gap: .45rem; }
.text .bullet { flex: none; color: var(--quiet); font-weight: 700; min-width: .9em; }
.text .quote { border-left: 3px solid var(--contour); color: var(--soft); }
.text code, .code-block { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em;
  background: var(--land); border-radius: 6px; }
.text code { padding: .05rem .3rem; }
.code-block { margin: .3rem 0; padding: .55rem .7rem; white-space: pre; overflow-x: auto; }
.text a { color: var(--link); font-weight: 600; overflow-wrap: anywhere; }
.host { color: var(--quiet); font-size: .85em; }
.mention { font-weight: 700; padding: 0 .25rem; border-radius: 5px; color: #17262B; background: var(--land); }
.mention.me { background: var(--pink); color: #fff; }
.msg { position: relative; border-radius: 10px; }
.msg.mentions-me { background: color-mix(in srgb, var(--pink) 8%, transparent); box-shadow: inset 3px 0 0 var(--pink); }
.msg.pinned { background: color-mix(in srgb, var(--land) 45%, transparent); }
.msg.focus { animation: focus 2.4s ease-out; }
@keyframes focus { from { background: color-mix(in srgb, var(--pink) 25%, transparent); } }
.pinned-line { font-size: .78rem; font-weight: 700; letter-spacing: -.005em; color: var(--quiet); }
.status { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14rem; }
.meta strong { white-space: nowrap; }
.edited { background: none; border: 0; color: var(--quiet); font-size: .8rem; min-height: 0; padding: 0; }
.more { flex: none; align-self: flex-start; width: 36px; min-height: 30px; border: 0; background: none; color: var(--quiet);
  font-size: 1.1rem; opacity: .55; }
.msg:hover .more, .more[aria-expanded="true"], .more:focus-visible { opacity: 1; }
@media (hover: hover) { .more { opacity: 0; } }
.reactions { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0 0; }
.react { display: inline-flex; align-items: center; gap: .3rem; min-height: 30px; padding: 0 .55rem; border-radius: 1rem;
  background: var(--sheet); border: 1px solid var(--edge); color: var(--ink); font-size: .9rem; }
.react.on { border-color: var(--ink); background: var(--land); font-weight: 700; }
.custom-emoji { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -.25em; }
.thread-link { display: inline-flex; align-items: center; gap: .45rem; margin: .3rem 0 0; min-height: 34px; padding: .15rem .6rem .15rem .3rem;
  background: none; border: 1px solid var(--edge); border-radius: 10px; color: var(--link); }
.thread-link.unread strong { color: var(--pink); }
.thread-link .faces { display: inline-flex; gap: 2px; }
.thread-count { margin: .6rem 0 .2rem; border-bottom: 1px solid var(--edge); font-size: .8rem; font-weight: 700; letter-spacing: -.005em; color: var(--quiet); padding-bottom: .3rem; }
.seen-line { text-align: right; font-size: .78rem; font-weight: 600; color: var(--quiet); margin: .15rem .3rem 0; }
.menu { margin: .35rem 0 .2rem; padding: .4rem; background: var(--sheet); border: 1px solid var(--edge);
  border-radius: 14px 18px 16px 13px; box-shadow: 0 10px 26px -18px rgba(23,38,43,.5); max-width: 24rem; }
.menu .quick { display: flex; flex-wrap: wrap; gap: .2rem; padding-bottom: .3rem; border-bottom: 1px solid var(--edge); }
.emoji { min-height: 40px; min-width: 40px; border: 0; background: none; font-size: 1.25rem; border-radius: 10px; }
.emoji.on { background: var(--land); }
.emoji-more { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.emoji-more:not(:empty) { padding: .3rem 0; border-bottom: 1px solid var(--edge); }
.emoji-more input { flex: 1; margin: 0; min-width: 10rem; }
.emoji-more button.secondary { width: auto; margin: 0; }
.custom-row { display: flex; flex-wrap: wrap; gap: .1rem; width: 100%; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; color: var(--ink);
  font-weight: 600; padding: .35rem .6rem; min-height: 40px; }
.menu-item:hover { background: var(--land); }
.danger-text { color: var(--problem); }
.history { margin: .3rem 0; padding: .5rem .7rem; border-left: 3px solid var(--contour); }
.version p { margin: .1rem 0 .4rem; }
.edit-row { display: flex; gap: .5rem; }
.edit-row button { width: auto; flex: 1; }
.compose-area { position: relative; }
.suggest { list-style: none; margin: 0; padding: .3rem; position: absolute; left: .9rem; right: .9rem; bottom: 100%;
  background: var(--sheet); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 -8px 24px -16px rgba(23,38,43,.5);
  max-height: 18rem; overflow-y: auto; z-index: 5; }
.msg-content .suggest { position: static; }
.opt { width: 100%; display: flex; align-items: center; gap: .55rem; background: none; border: 0; border-radius: 10px;
  color: var(--ink); text-align: left; padding: .25rem .5rem; min-height: 40px; }
.opt.on, .opt:hover { background: var(--land); }
.search-open { width: 100%; text-align: left; background: var(--field); border: 1px solid var(--edge); color: var(--quiet);
  padding: 0 .9rem; margin: 0 0 .5rem; min-height: 40px; }
.search-open.on { border-color: var(--ink); color: var(--ink); }
.search-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.search-row input { flex: 2; min-width: 12rem; }
.search-row select { flex: 1; min-width: 9rem; }
.results { list-style: none; margin: .4rem 0; padding: 0; }
.result { width: 100%; display: flex; gap: .7rem; align-items: flex-start; background: none; border: 0;
  border-bottom: 1px solid var(--edge); border-radius: 0; color: var(--ink); text-align: left; padding: .6rem 0; }
.result-body { display: flex; flex-direction: column; min-width: 0; }
.snippet { overflow-wrap: anywhere; color: var(--soft); }
.profile-edit .status-row { display: flex; gap: .5rem; }
.profile-edit .status-row input { margin: 0; }
.emoji-input { width: 4.2rem !important; flex: none; text-align: center; }
.swatches { display: flex; flex-wrap: wrap; gap: .45rem; }
.swatch { width: 40px; height: 40px; min-height: 40px; border: 2px solid transparent; border-radius: 28%; padding: 0; }
.swatch.auto { width: auto; padding: 0 .7rem; background: var(--sheet); border-color: var(--edge); color: var(--ink); font-weight: 700; }
.swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--sheet) inset; }
.profile-edit .card-row button.secondary { width: auto; display: inline-block; margin: 0 .8rem 0 0; }
.toggle { display: flex; align-items: center; gap: .6rem; font-weight: 600; min-height: 44px; }
.toggle input { width: 1.3rem; height: 1.3rem; margin: 0; accent-color: var(--ink); }

/* KAN-960: calls, ringing lines, polls, voice clips, scheduled, topics, bookmarks, Activity, Saved. */
.shortcut-row { display: flex; gap: .4rem; margin: 0 0 .5rem; }
.shortcut { flex: 1; background: none; border: 1px solid var(--edge); color: var(--soft); font-weight: 700; letter-spacing: -.005em;
  min-height: 38px; border-radius: 12px; }
.shortcut.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.live-dot { color: var(--live); font-size: .75rem; font-weight: 800; }
.top-link.call { border-color: var(--live); color: var(--live); }
.top-link.call.live { background: var(--live); color: #fff; }
.top-link:disabled { opacity: .6; }
.place-details:not(:empty) { padding: .4rem 1.1rem; border-bottom: 1px solid var(--edge); background: var(--sheet); }
.topic { margin: 0; color: var(--soft); font-size: .92rem; }
.bookmarks { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.bookmark { font-size: .82rem; font-weight: 700; color: var(--link); background: var(--land); padding: .15rem .55rem;
  border-radius: 8px; text-decoration: none; }
.bookmark-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--edge); }
.bookmark-row a { color: var(--link); font-weight: 700; }
.note-line { font-size: .88rem; font-style: italic; }
.huddle-line { display: flex; align-items: center; gap: .7rem; padding: .35rem .6rem; border-radius: 10px;
  background: color-mix(in srgb, var(--live) 12%, transparent); width: fit-content; font-weight: 600; }
.compose-panel:not(:empty) { padding: .5rem .9rem 0; background: var(--sheet); border-top: 1px solid var(--edge); }
.plus-menu { display: flex; flex-wrap: wrap; gap: .2rem; }
.plus-menu .menu-item { width: auto; }
.form-card { display: flex; flex-direction: column; gap: .3rem; padding: .6rem .7rem; margin-bottom: .5rem; background: var(--paper);
  border: 1px solid var(--edge); border-radius: 14px 18px 16px 13px; }
.form-card input { margin: 0; }
.poll-options { display: flex; flex-direction: column; gap: .3rem; }
.recording { flex-direction: row; align-items: center; gap: .7rem; }
.recording button { width: auto; margin: 0; }
.rec-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--problem); animation: blink 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; flex: 1; }
@keyframes blink { 50% { opacity: .3; } }
.wave { display: flex; align-items: center; gap: 1px; height: 22px; margin: .1rem 0; }
.wave span { width: 3px; background: var(--soft); border-radius: 2px; }
.poll { padding: .6rem .7rem; margin: .3rem 0; max-width: 26rem; background: var(--sheet); border: 1px solid var(--edge);
  border-radius: 14px 18px 16px 13px; }
.poll-option { position: relative; width: 100%; display: flex; align-items: center; gap: .5rem; margin-top: .35rem;
  padding: .4rem .6rem; min-height: 40px; background: var(--paper); border: 1px solid var(--edge); border-radius: 10px;
  color: var(--ink); text-align: left; overflow: hidden; }
.poll-option.mine { border-color: var(--ink); font-weight: 700; }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--land) 90%, transparent); }
.poll-text, .poll-count { position: relative; }
.poll-text { flex: 1; }
.voters { margin: .15rem 0 0 .4rem; }
.scheduled-strip:not(:empty) { padding: .3rem .9rem; background: var(--sheet); border-top: 1px solid var(--edge); font-size: .9rem; }
.scheduled summary { cursor: pointer; font-weight: 700; color: var(--link); }
.scheduled-item { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; padding: .25rem 0; }
.scheduled-item .snippet { flex: 1; min-width: 8rem; }
.result.unread strong { color: var(--pink); }
.saved-row { display: flex; align-items: center; gap: .5rem; }
.saved-row .result { flex: 1; }
/* The call: a bar under the open place, and a stage over everything. */
.call-dock:empty { display: none; }
.call-dock { grid-column: 1 / -1; }
.call-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .5rem .9rem; color: #fff;
  background: #1E4D33; border-top: 1px solid rgba(0,0,0,.2); }
.call-bar.ended { background: var(--sheet); color: var(--ink); }
.call-info { display: flex; flex-direction: column; min-width: 8rem; flex: 1; }
.call-info .warn { color: #FFD3CE; }
.call-people { display: flex; gap: .25rem; }
.call-people .avatar.speaking { box-shadow: 0 0 0 2px #9BE8B6; }
.call-controls { display: flex; flex-wrap: wrap; gap: .35rem; }
.call-btn { min-height: 38px; padding: 0 .75rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.4); background: transparent;
  color: inherit; font-weight: 700; letter-spacing: -.005em; }
.call-btn.on { background: rgba(255,255,255,.2); }
.call-btn.leave { background: #B3261E; border-color: #B3261E; color: #fff; }
.stage-wrap { display: none; }
.stage-wrap.open { display: block; position: fixed; inset: 0; z-index: 20; background: #0b1410; }
.stage { display: flex; flex-direction: column; height: 100%; color: #fff; }
.stage-top { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; }
.stage-top strong { flex: 1; letter-spacing: -.012em; }
.stage-grid { flex: 1; min-height: 0; display: grid; gap: .5rem; padding: .5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-content: center; }
.stage-grid.one { grid-template-columns: 1fr; }
.tile { position: relative; background: #17262B; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.tile video { width: 100%; height: 100%; object-fit: cover; }
.tile.screen video { object-fit: contain; }
.tile-name { position: absolute; left: .5rem; bottom: .4rem; font-size: .8rem; font-weight: 700; background: rgba(0,0,0,.5);
  padding: .1rem .45rem; border-radius: 6px; }

/* KAN-964: on a phone, the place's top row keeps room for its name. */
@media (max-width: 520px) {
  .place-top { gap: .45rem; padding: .6rem .7rem; }
  .place-top .top-link { padding: 0 .5rem; }
  .place-top .back { white-space: nowrap; }
}

/* KAN-966: ready-made statuses. */
.status-presets { display: flex; flex-wrap: wrap; gap: .45rem; margin: .3rem 0 .5rem; }
.status-preset { background: var(--land); border: 1px solid var(--edge); color: var(--ink); border-radius: 999px;
                 min-height: 38px; padding: 0 .85rem; font-weight: 600; font-size: .92rem; }

/* KAN-996: adding a device both ways (the code and the camera). */
canvas.qr { display: block; margin: 1rem auto; width: min(280px, 80vw); height: auto; image-rendering: pixelated;
  border-radius: 12px; background: #fff; }
.scan { margin: 1rem 0; }
video.scanner { display: block; width: 100%; max-height: 60vh; object-fit: cover; border-radius: 14px; background: #000; }
.steps-list { padding-left: 1.3rem; margin: .8rem 0; }
.steps-list li { margin: .35rem 0; }
details.lost { margin: 1.4rem 0 .6rem; }
details.lost summary { cursor: pointer; color: var(--quiet); }
