/* Tasks. Colours and type follow the Marochy tokens (square corners, 1 px
   lines, one red accent with gold); the sign-in screen copies Jukebox's gate.
   Motion is quick and springy, and all of it stops under reduced motion. */

@font-face { font-family: "JB"; src: url("fonts/jb-regular.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: "JB"; src: url("fonts/jb-bold.woff2") format("woff2"); font-weight: 700; }

:root {
  --bg: #121212; --fg: #f5f5f5; --accent: #B14242; --accent-hi: #c45252; --gold: #F0BE66; --muted: #969696;
  --surface: #1C1C1C; --surface2: #252525; --surface3: #2D2D2D; --border: #323232; --faint: #646464;
  --f04: rgba(245,245,245,.04); --f08: rgba(245,245,245,.08); --f10: rgba(245,245,245,.10);
  --f16: rgba(245,245,245,.16); --f25: rgba(245,245,245,.25); --f40: rgba(245,245,245,.40);
  --dim: #969696; --green: #6FBF73; --orange: #D66E36;
  --spring: cubic-bezier(.2,.8,.2,1);
  --c-red: #B14242; --c-orange: #D66E36; --c-gold: #F0BE66; --c-green: #6FBF73;
  --c-teal: #4A8B8B; --c-blue: #5B8DD6; --c-purple: #8A63D2; --c-grey: #7d7d7d;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.45 "JB", "JetBrains Mono", ui-monospace, monospace; overflow: hidden; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }
button { font: inherit; color: inherit; }
.grow { flex: 1; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface3); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- icons ---- */
svg.ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.i-slot { display: inline-flex; color: var(--faint); }

/* ---- buttons and fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 10px; color: var(--fg);
       background: transparent; border: 1px solid var(--f16); border-radius: 0; font: 12px "JB", monospace; cursor: pointer; white-space: nowrap;
       transition: background .12s, border-color .12s, transform .12s var(--spring); }
.btn:hover { background: var(--f08); border-color: var(--f25); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.danger { color: #e07a7a; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.icon-only { padding: 5px; border-color: transparent; color: var(--muted); }
.btn.icon-only:hover { color: var(--fg); border-color: var(--f16); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; font-size: 11px; }
.linkish:hover { color: var(--fg); }
.linkish.danger:hover { color: #e07a7a; }

.field { height: 30px; padding: 0 10px; background: var(--f04); color: var(--fg); border: 1px solid var(--f25); border-radius: 0; outline: none; font: 12px "JB", monospace; width: 100%;
         transition: border-color .12s, background .12s, box-shadow .15s; }
.field:hover { background: var(--f08); }
.field:focus { border-color: var(--gold); background: var(--f08); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 14%, transparent); }
.field::placeholder { color: var(--faint); }
textarea.field { height: auto; padding: 8px 10px; resize: none; font: 13px/1.5 "JB", monospace; }
select.field { padding: 0 6px; }
input[type="checkbox"] { accent-color: var(--accent); }
/* JetBrains Mono joins ... and -> into one glyph; while you type, Chromium draws the half-made
   ligature wrong (dots and dashes vanish), so text boxes show the characters as typed. !important
   because every box's font shorthand would reset it. */
input, textarea { font-variant-ligatures: none !important; font-feature-settings: "calt" 0, "liga" 0 !important; }

/* ---- sign-in (copied from Jukebox's #gate / #maro* rules) ---- */
#gate { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 0; overflow-y: auto; scrollbar-width: none; }
#maroHead { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: rise .5s var(--spring) both; }
#mark { position: relative; animation: bob 3.2s ease-in-out 2; }
#maroHead .brand { padding-top: 4px; font-size: 26px; letter-spacing: 0.4px; font-weight: 700; }
#maroHead .tag { color: var(--dim); font-size: 12px; letter-spacing: -0.2px; }
#maroCard { width: min(380px, calc(100% - 24px)); padding: 20px; background: var(--bg); border: 1px solid var(--f16); display: flex; flex-direction: column; gap: 10px; animation: rise .5s .06s var(--spring) both; }
#maroCard.shake { animation: shake .35s; }
#modeSwitch { height: 40px; padding: 4px; display: flex; background: var(--bg); border: 1px solid var(--f16); }
#modeSwitch div { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 12px; cursor: pointer; transition: background .15s, color .15s; }
#modeSwitch div.on { background: var(--f10); color: var(--fg); font-weight: 700; }
#maroCard label { padding-top: 4px; color: var(--dim); font-size: 10px; margin-bottom: -10px; }
#maroCard .field { height: auto; padding: 8px 10px; }
#forgotText { font-size: 11px; letter-spacing: 0.4px; line-height: 1.25; }
#forgotLink { align-self: flex-end; color: var(--dim); font-size: 10px; cursor: pointer; }
#forgotLink:hover { color: var(--fg); text-decoration: underline; }
#maroHint2 { color: var(--dim); font-size: 10px; }
#maroNote { color: var(--gold); font-size: 11px; letter-spacing: 0.4px; line-height: 1.3; }
#maroHint { color: var(--orange); font-size: 11px; letter-spacing: 0.4px; min-height: 1em; }
#maroSubmit { height: 42px; background: var(--accent); color: #fff; border: 0; font: 700 12px "JB", monospace; cursor: pointer; transition: background .12s, transform .12s var(--spring); }
#maroSubmit:hover { background: var(--accent-hi); }
#maroSubmit:active { transform: scale(.98); }
#maroSubmit.busy { opacity: .6; }
#maroFoot { color: var(--dim); font-size: 12px; cursor: pointer; animation: rise .5s .12s var(--spring) both; }
#maroFoot b { color: var(--accent); }

/* ---- pixel marks ---- */
.pixmark, #mark { position: relative; flex: none; }
.pixmark i, #mark i { position: absolute; }
.pixmark.bob, #mark { animation: bob 3.2s ease-in-out 2; }
.pixmark.bob:hover, #mark:hover { animation: bob 3.2s ease-in-out infinite; }
.pixmark .speed, #mark .speed { animation: zip 1.6s ease-in-out 3; }
.pixmark:hover .speed, #mark:hover .speed { animation: zip 1.6s ease-in-out infinite; }

/* ---- layout ---- */
#app { position: fixed; inset: 0; display: flex; overflow: hidden; }
#side { width: 236px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border);
        transition: margin-left .28s var(--spring), opacity .2s; }
#app.side-hidden #side { margin-left: -236px; opacity: 0; pointer-events: none; }
.side-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border); }
.side-brand { font-weight: 700; font-size: 15px; }
.side-home { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px; margin-left: -6px; background: none; border: 1px solid transparent; cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.side-home:hover { border-color: var(--f16); background: var(--f04); }
.side-label { padding: 16px 14px 6px; color: var(--faint); font-size: 10px; letter-spacing: 1.4px; font-weight: 700; }
#boardNav { display: flex; flex-direction: column; overflow-y: auto; padding: 0 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--muted);
            transition: background .12s, color .12s; }
.nav-item:hover { background: var(--f04); color: var(--fg); }
.nav-item.on { background: var(--f08); color: var(--fg); font-weight: 700; }
.nav-item.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--accent); animation: grow-y .25s var(--spring); }
.nav-dot { width: 8px; height: 8px; flex: none; transition: transform .2s var(--spring); }
.nav-item:hover .nav-dot { transform: rotate(45deg) scale(1.15); }
.c0 { --tint: var(--c-red); } .c1 { --tint: var(--c-gold); } .c2 { --tint: var(--c-teal); } .c3 { --tint: var(--c-purple); }
.c4 { --tint: var(--c-orange); } .c5 { --tint: var(--c-green); } .c6 { --tint: var(--c-blue); } .c7 { --tint: var(--c-grey); }
.nav-dot { background: var(--tint, var(--c-grey)); }
.nav-ic { width: 12px; flex: none; display: inline-flex; color: var(--gold); }
#sharedNav { display: flex; flex-direction: column; overflow-y: auto; padding: 0 6px; flex: none; max-height: 40vh; }
.invite { margin: 4px 4px 6px; padding: 8px; border: 1px dashed color-mix(in srgb, var(--gold) 60%, transparent); display: flex; flex-direction: column; gap: 6px; animation: rise .25s var(--spring); }
.invite-text { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; }
.invite-text svg { color: var(--gold); flex: none; margin-top: 2px; }
.invite-text small { color: var(--faint); }
.invite .row { gap: 6px; }
.invite .btn { padding: 4px 8px; font-size: 11px; }
#shareBtn.on svg { color: var(--gold); }
/* viewers of a shared board: nothing to add or move */
#app.read-only .add-card, #app.read-only .add-list, #app.read-only .list-menu, #app.read-only .done-toggle { display: none; }
#app.read-only .list-name { cursor: default; }
.card-modal.read-only .chip-add, .card-modal.read-only .cm-done, .card-modal.read-only .cm-sec-head .btn, .card-modal.read-only .desc-empty, .card-modal.read-only .it-del, .card-modal.read-only .cl-add { display: none; }
.card-modal.read-only .desc.clickable { cursor: default; }
.card-modal.read-only .due-chip.none { display: none; }
.card-modal.read-only .due-chip, .card-modal.read-only .cm-where .linkish { pointer-events: none; }
.card-modal.read-only .item input { pointer-events: none; }
.c-who { color: var(--gold); font-size: 11px; font-weight: 700; margin-right: 8px; }
.comment.theirs { border-left: 2px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.share-modal { width: min(560px, 94vw); max-height: 88vh; }
.share-points { margin: 10px 0 14px; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.people { display: flex; flex-direction: column; gap: 4px; }
.person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--f04); }
.person.pending { opacity: .75; }
.avatar { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 11px; }
.person.pending .avatar { background: var(--surface3); color: var(--muted); }
.p-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; overflow: hidden; }
.p-name b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-name small { color: var(--faint); font-size: 10px; }
.p-role { color: var(--muted); font-size: 11px; padding: 0 6px; }
.field.role { width: 110px; flex: none; height: 28px; }
.invite-form { display: flex; gap: 6px; }
.invite-form .btn { flex: none; }
.nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 10px; color: var(--faint); font-weight: 400; }
/* projects in the sidebar: a heading per project, its boards under it */
.side-label-row { display: flex; align-items: center; }
.side-label-add { margin-left: auto; display: inline-flex; padding: 2px; background: none; border: 0; color: var(--faint); cursor: pointer; }
.side-label-add:hover { color: var(--fg); }
/* inside a project: a way back, then the project's name over its boards */
#sideProject { display: flex; flex-direction: column; padding: 8px 6px 0; }
.side-back { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 11px; text-align: left; }
.side-back:hover { color: var(--fg); }
.side-back svg { transition: transform .15s var(--spring); }
.side-back:hover svg { transform: translateX(-2px); }
.side-proj { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding-right: 4px; border: 1px solid transparent; }
.side-proj.on { background: var(--f08); border-color: var(--f10); }
.side-proj-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px; background: none; border: 0; cursor: pointer; color: var(--fg); font: inherit; font-weight: 700; text-align: left; }
.side-proj-open:hover .proj-name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.proj-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-proj .proj-name .inline-edit { font-size: 12px; height: 26px; width: 100%; }
.proj-menu { display: inline-flex; padding: 3px; background: none; border: 0; color: var(--faint); cursor: pointer; }
.proj-menu:hover { color: var(--fg); }
.nav-item.dragging { opacity: .4; }
.nav-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
#boardProject { color: var(--faint); font-size: 13px; white-space: nowrap; margin-right: 2px; }
#boardProject:empty { display: none; }
.side-add { display: flex; align-items: center; gap: 10px; margin: 4px 6px; padding: 8px 10px; background: none; border: 1px dashed var(--border); color: var(--muted); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.side-add:hover { border-color: var(--f25); color: var(--fg); background: var(--f04); }
.side-new { padding: 4px 6px; animation: rise .2s var(--spring); }
.ai-badge { display: flex; align-items: center; gap: 8px; margin: 0 10px 8px; padding: 7px 10px; border: 1px solid var(--border); font-size: 11px; color: var(--muted); cursor: pointer; transition: border-color .15s; }
.ai-badge:hover { border-color: var(--f25); color: var(--fg); }
.side-foot { display: flex; align-items: center; gap: 6px; padding: 10px 8px 10px 14px; border-top: 1px solid var(--border); }
#who { flex: 1; min-width: 0; font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dot { display: inline-block; width: 8px; height: 8px; flex: none; background: var(--faint); }
.dot.live { background: var(--green); }
.dot.wait { background: var(--gold); }
.dot.ok { background: var(--green); }
.dot.bad { background: var(--accent); }

#main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
#side { position: relative; z-index: 1; }
#boardHead { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--border); flex: none; }
#boardHead.empty > :not(#showSide) { visibility: hidden; }
#boardName { margin: 0; font-size: 16px; font-weight: 700; cursor: text; padding: 3px 6px; margin-left: -6px; border: 1px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
#boardName:hover { border-color: var(--f16); }
#boardName .inline-edit { font: 700 16px "JB", monospace; height: 30px; min-width: 240px; }
#boardStats { color: var(--faint); font-size: 11px; white-space: nowrap; }
#searchBox { position: relative; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border: 1px solid var(--f16); width: 220px; transition: width .25s var(--spring), border-color .12s, background .12s; }
#searchBox:hover { border-color: var(--f25); background: var(--f08); }
#searchBox:focus-within { width: 300px; border-color: var(--gold); background: transparent; }
#search { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--fg); font: 12px "JB", monospace; }
#search::placeholder { color: var(--faint); }
#boardHead > .btn.icon-only { width: 30px; height: 30px; padding: 0; border-color: var(--f16); }
#boardHead > .btn.icon-only:hover { border-color: var(--f25); background: var(--f08); }

/* ---- the board ---- */
#board { flex: 1; display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; overflow-x: auto; overflow-y: hidden; scroll-padding-inline: 18px; }
.list { width: 280px; flex: none; display: flex; flex-direction: column; max-height: 100%; background: var(--surface); border: 1px solid var(--border); }
.list-head { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 12px; cursor: grab; user-select: none; }
.list-name { flex: 1; min-width: 0; margin: 0; font: 700 12px "JB", monospace; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 3px 4px; margin-left: -4px; border: 1px solid transparent; cursor: text; overflow-wrap: anywhere; }
.list-name:hover { border-color: var(--f16); color: var(--fg); }
.list-name .inline-edit { text-transform: none; letter-spacing: 0; font-weight: 400; }
.list-head .count { color: var(--faint); font-size: 11px; }
.list-menu { opacity: 0; transition: opacity .12s; }
.list:hover .list-menu, .list-menu:focus { opacity: 1; }
.cards { flex: 1; overflow-y: auto; padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 12px; }
.list-empty { padding: 14px 8px; text-align: center; color: var(--faint); font-size: 11px; border: 1px dashed var(--border); }
.add-card { display: flex; align-items: center; gap: 8px; margin: 0 8px 8px; padding: 7px 8px; background: none; border: 0; color: var(--muted); cursor: pointer; text-align: left; transition: background .12s, color .12s; }
.add-card:hover { background: var(--f08); color: var(--fg); }
.add-card:hover svg { animation: spin-in .3s var(--spring); }
.composer-card { display: flex; flex-direction: column; gap: 8px; animation: rise .18s var(--spring); }
.add-list { width: 280px; flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--f04); border: 1px dashed var(--border); color: var(--muted); cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.add-list:hover { background: var(--f08); border-color: var(--f25); color: var(--fg); }
.add-list-form { width: 280px; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--border); animation: rise .18s var(--spring); }

/* a card */
.card { position: relative; background: var(--surface2); border: 1px solid var(--border); padding: 9px 10px; cursor: pointer; user-select: none; outline: none;
        transition: background .12s, border-color .12s, box-shadow .2s, transform .15s var(--spring); }
.card:hover { background: var(--surface3); border-color: var(--faint); transform: translateY(-1px); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.card:focus-visible { border-color: var(--gold); }
.card .cover { margin: -9px -10px 8px; height: 120px; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--surface); }
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--spring); }
.card:hover .cover img { transform: scale(1.04); }
.labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.lab { display: inline-block; padding: 1px 6px; font-size: 10px; font-weight: 700; color: #101010; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab.big { padding: 4px 9px; font-size: 11px; }
.c-red { background: var(--c-red); color: #fff !important; } .c-orange { background: var(--c-orange); } .c-gold { background: var(--c-gold); } .c-green { background: var(--c-green); }
.c-teal { background: var(--c-teal); color: #fff !important; } .c-blue { background: var(--c-blue); color: #fff !important; } .c-purple { background: var(--c-purple); color: #fff !important; } .c-grey { background: var(--c-grey); }
.ctitle-row { display: flex; align-items: flex-start; gap: 0; }
.ctitle { font: 13px/1.4 "JB", monospace; overflow-wrap: anywhere; flex: 1; }
.done-toggle { width: 0; height: 16px; flex: none; margin-top: 1px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--f40); background: transparent; color: transparent; cursor: pointer; opacity: 0; overflow: hidden;
               transition: width .18s var(--spring), margin .18s var(--spring), opacity .15s, background .15s, border-color .15s; }
.card:hover .done-toggle, .card.done .done-toggle { width: 16px; margin-right: 8px; opacity: 1; }
.done-toggle:hover { border-color: var(--green); color: var(--green); }
.card.done .done-toggle { background: var(--green); border-color: var(--green); color: #111; }
.card.done .ctitle { color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 7px; font-size: 11px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge.due { padding: 0 5px; margin-left: -5px; }
.badge.due.late { background: color-mix(in srgb, var(--accent) 80%, transparent); color: #fff; }
.badge.due.soon { background: color-mix(in srgb, var(--gold) 85%, transparent); color: #111; }
.badge.due.done { background: color-mix(in srgb, var(--green) 85%, transparent); color: #111; }
.badge.complete { color: var(--green); }
.card.file-over { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }
.card.ai-touch { animation: ai-glow 1.8s ease-out; }

/* dragging */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; margin: 0; will-change: transform; transition: none !important; }
.ghost-card { background: var(--surface3); border-color: var(--gold); box-shadow: 0 14px 28px rgba(0,0,0,.55), 6px 6px 0 rgba(0,0,0,.3); }
.ghost-list { opacity: .92; box-shadow: 0 18px 40px rgba(0,0,0,.6); border-color: var(--gold); }
.card-placeholder { flex: none; background: repeating-linear-gradient(-45deg, var(--f04) 0 6px, transparent 6px 12px); border: 1px dashed var(--f25); animation: gap-in .16s var(--spring); }
.list-placeholder { flex: none; align-self: stretch; max-height: 100%; background: repeating-linear-gradient(-45deg, var(--f04) 0 8px, transparent 8px 16px); border: 1px dashed var(--f25); }
body.drag-card .list { transition: border-color .12s; }
body.drag-card .list:hover { border-color: var(--f25); }

/* ---- empty board ---- */
.empty-state { margin: auto; max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: rise .45s var(--spring); }
.empty-state h2 { margin: 10px 0 0; font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); line-height: 1.6; }

/* ---- dialogs ---- */
dialog { border: 0; padding: 0; background: transparent; color: var(--fg); max-width: 96vw; max-height: 94vh; overflow: visible; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog.pop[open] { animation: pop-in .26s var(--spring); }
dialog.pop[open]::backdrop { animation: fade-in .2s ease-out; }
.m-modal { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.m-modal > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; font: 700 15px "JB", monospace; }
.m-modal .content { overflow-y: auto; padding: 4px 18px 18px; }
.m-modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }
.confirm-modal { width: min(420px, 92vw); }
.confirm-modal p { margin: 0; color: var(--muted); line-height: 1.5; }

/* search every board: a box at the top, the cards under it as board › list › card */
#findDialog { margin: 10vh auto auto; }
.find-modal { width: min(640px, 94vw); max-height: 76vh; }
.find-head { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border-bottom: 1px solid var(--border); flex: none; }
.find-head .i-slot { color: var(--gold); }
#findInput { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--fg); font: 14px "JB", monospace; }
#findInput::placeholder { color: var(--faint); }
kbd { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border: 1px solid var(--f16); background: var(--f04); color: var(--muted); font: 10px "JB", monospace; }
.find-results { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.find-row { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 8px 10px; background: none; border: 0; border-left: 2px solid transparent; cursor: pointer; text-align: left; color: var(--fg); }
.find-row.on { background: var(--f08); border-left-color: var(--accent); }
.find-path { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--faint); font-size: 11px; }
.find-path > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find-board { color: var(--muted); }
.find-sep { flex: none; }
.find-tag { flex: none; padding: 0 5px; border: 1px solid var(--f16); font-size: 10px; }
.find-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; }
.find-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-title .lab { flex: none; max-width: 120px; }
.find-title .ic { color: var(--green); }
.find-row.done .find-title-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.find-snip { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 11px; }
.find-snip .ic { color: var(--faint); }
.find-kind { flex: none; color: var(--faint); }
.find-snip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-results mark { background: color-mix(in srgb, var(--gold) 28%, transparent); color: var(--fg); }
.find-empty { display: flex; flex-direction: column; gap: 6px; padding: 22px 12px; color: var(--muted); text-align: center; }
.find-foot { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; flex: none; }
.find-keys { display: inline-flex; align-items: center; gap: 4px; }
.find-keys kbd + kbd { margin-left: -2px; }
.find-btn kbd { margin-left: 2px; }
#boardHead > .find-btn { height: 30px; color: var(--muted); }
#boardHead > .find-btn:hover { color: var(--fg); }

/* the card */
.card-modal { width: min(880px, 94vw); height: min(86vh, 900px); }
.card-modal.is-done .cm-title { color: var(--muted); }
.cm-archived { display: flex; align-items: center; gap: 10px; margin: 14px 20px 0; padding: 9px 12px; background: color-mix(in srgb, var(--gold) 10%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); font-size: 12px; animation: rise .2s var(--spring); }
.cm-archived svg { color: var(--gold); flex: none; }
.cm-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 14px 12px 20px; border-bottom: 1px solid var(--border); }
.cm-done { width: 22px; height: 22px; flex: none; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--f40); color: transparent; cursor: pointer;
           transition: background .15s, border-color .15s, color .15s, transform .15s var(--spring); }
.cm-done:hover { border-color: var(--green); color: var(--green); transform: scale(1.08); }
.cm-done.on { background: var(--green); border-color: var(--green); color: #111; animation: pop .35s var(--spring); }
.cm-head-main { flex: 1; min-width: 0; }
.cm-title { width: 100%; background: none; border: 1px solid transparent; color: var(--fg); font: 700 19px/1.35 "JB", monospace; padding: 3px 6px; margin-left: -6px; resize: none; outline: none; overflow: hidden; }
.cm-title:hover { border-color: var(--f16); }
.cm-title:focus { border-color: var(--gold); background: var(--f04); }
.cm-where { color: var(--faint); font-size: 11px; padding-top: 2px; }
.cm-where .linkish { font-size: 11px; color: var(--muted); }
.cm-scroll { flex: 1; overflow-y: auto; }
.cm-grid { display: grid; grid-template-columns: 1fr 170px; gap: 24px; padding: 16px 20px 28px; }
.cm-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.cm-meta { display: flex; flex-wrap: wrap; gap: 18px; }
.meta-group { display: flex; flex-direction: column; gap: 6px; }
.meta-label { color: var(--faint); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip-add { width: 26px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: var(--f08); border: 0; color: var(--muted); cursor: pointer; transition: background .12s, transform .15s var(--spring); }
.chip-add:hover { background: var(--f16); color: var(--fg); transform: rotate(90deg); }
.due-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 0; background: var(--f08); cursor: pointer; font-size: 11px; transition: filter .12s; }
.due-chip:hover { filter: brightness(1.2); }
.due-chip.none { color: var(--muted); }
.due-chip.late { background: var(--accent); color: #fff; }
.due-chip.soon { background: var(--gold); color: #111; }
.due-chip.done { background: var(--green); color: #111; }

.cm-sec { display: flex; flex-direction: column; gap: 10px; }
.cm-sec-head { display: flex; align-items: center; gap: 9px; color: var(--muted); min-height: 28px; }
.cm-sec-head h3 { margin: 0; font: 700 12px "JB", monospace; letter-spacing: 1.2px; text-transform: uppercase; }
.drop-zone { position: relative; display: flex; flex-direction: column; gap: 10px; }
.drop-zone.file-over::after, .editor.file-over::after { content: "Drop to attach"; position: absolute; inset: -4px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 80%, transparent); border: 2px dashed var(--gold); color: var(--gold); font-weight: 700; animation: fade-in .12s; z-index: 2; }
.editor { position: relative; display: flex; flex-direction: column; gap: 8px; animation: rise .16s var(--spring); }
.editor-preview { border-top: 1px solid var(--border); max-height: 40vh; overflow: auto; padding-top: 6px; }
.editor-preview > .hint { color: var(--faint); font-size: 10px; }
.editor-preview .md-inline-image { max-width: 100%; max-height: 40vh; }
.editor-files { margin-top: 6px; }
.editor-files[hidden] { display: none; }
.staged-pic { position: relative; display: block; width: 128px; height: 84px; border: 1px solid var(--f16); background: var(--f04); animation: pop .25s var(--spring); }
.staged-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.staged-del { position: absolute; top: 3px; right: 3px; display: inline-flex; padding: 3px; border: 0; background: rgba(0,0,0,.62); color: var(--fg); cursor: pointer; opacity: 0; transition: opacity .12s; }
.staged-pic:hover .staged-del, .staged-del:focus-visible { opacity: 1; }
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.editor-bar .hint { color: var(--faint); font-size: 10px; margin-left: auto; }
.md-input { min-height: 90px; }
.desc-empty { text-align: left; padding: 14px; min-height: 64px; background: var(--f04); border: 1px dashed var(--border); color: var(--faint); cursor: text; transition: border-color .12s, color .12s, background .12s; }
.desc-empty:hover { border-color: var(--f25); color: var(--muted); background: var(--f08); }
.desc.clickable { cursor: text; padding: 8px 10px; margin: -8px -10px; border: 1px solid transparent; transition: border-color .12s, background .12s; }
.desc.clickable:hover { border-color: var(--f16); background: var(--f04); }

/* rendered markdown */
.md { font: 13px/1.6 "JB", monospace; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .7em; }
.md h3, .md h4, .md h5 { margin: 1em 0 .4em; font-size: 14px; }
.md h3 { font-size: 16px; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.4em; }
.md li.nested { margin-left: 1.2em; }
.md li.task { list-style: none; margin-left: -1.2em; display: flex; gap: 8px; align-items: baseline; }
.md li.task.done > span { color: var(--faint); text-decoration: line-through; }
.md a { color: var(--gold); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent); text-underline-offset: 3px; cursor: pointer; }
.md code { background: var(--f08); padding: 1px 5px; font-size: 12px; }
.md pre { background: var(--bg); border: 1px solid var(--border); padding: 10px 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 .7em; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.md del { color: var(--faint); }

/* attachments */
.atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.atts.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 8px; }
.att { position: relative; background: var(--surface2); border: 1px solid var(--border); cursor: pointer; overflow: hidden; animation: rise .2s var(--spring);
       transition: border-color .12s, transform .15s var(--spring); }
.att:hover { border-color: var(--faint); transform: translateY(-2px); }
.att.img, .att.vid { aspect-ratio: 4 / 3; }
.att.img img, .att.vid video { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg); }
.att .att-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 10px; background: linear-gradient(transparent, rgba(0,0,0,.8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; }
.att .play svg { padding: 8px; width: 36px; height: 36px; background: rgba(0,0,0,.55); box-sizing: content-box; }
.att.row-att { display: flex; align-items: center; gap: 10px; padding: 9px 10px; grid-column: 1 / -1; }
.att-ic { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--f08); color: var(--muted); flex: none; }
.att-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-text b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-text small { color: var(--faint); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--spring); }
.att.row-att .att-actions { position: static; }
.att:hover .att-actions { opacity: 1; transform: none; }
.att-actions .btn.icon-only { background: rgba(18,18,18,.85); color: var(--fg); padding: 4px; }

/* checklists */
.checklist { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border); animation: rise .2s var(--spring); }
.cl-head { display: flex; align-items: center; gap: 8px; }
.cl-name { flex: 1; margin: 0; font-size: 13px; padding: 2px 4px; margin-left: -4px; border: 1px solid transparent; cursor: text; }
.cl-name:hover { border-color: var(--f16); }
.cl-count { color: var(--muted); font-size: 11px; }
.progress { height: 4px; background: var(--surface3); margin: 2px 0 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); transition: width .45s var(--spring), background .3s; }
.progress.full > i { background: var(--green); }
.progress.full { animation: glow-green 1s ease-out; }
.item { display: flex; align-items: center; gap: 10px; padding: 3px 2px; animation: rise .16s var(--spring); }
.item input { margin: 0; width: 15px; height: 15px; cursor: pointer; flex: none; }
.item input:checked { animation: pop .3s var(--spring); }
.it-text { flex: 1; min-width: 0; cursor: text; padding: 1px 4px; border: 1px solid transparent; overflow-wrap: anywhere; transition: color .2s; }
.it-text:hover { border-color: var(--f16); }
.item.done .it-text { color: var(--faint); text-decoration: line-through; }
.it-del { opacity: 0; }
.item:hover .it-del { opacity: 1; }
.cl-add { padding-top: 4px; }

/* activity */
.comment-composer { padding: 10px; background: var(--surface2); border: 1px solid var(--border); }
.comment-composer .md-input { min-height: 56px; }
.staged { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; background: var(--f08); font-size: 11px; animation: pop .25s var(--spring); }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; display: inline-flex; padding: 2px; }
.chip button:hover { color: var(--fg); }
.comment { padding: 10px 12px; background: var(--surface2); border-left: 2px solid var(--gold); animation: rise .22s var(--spring); }
.comment.editing { border-left-color: var(--accent); }
.c-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.c-when { color: var(--faint); font-size: 10px; }
.c-meta .linkish { opacity: 0; transition: opacity .12s; }
.comment:hover .c-meta .linkish { opacity: 1; }

/* the side column */
.cm-side { display: flex; flex-direction: column; gap: 6px; }
.side-title { color: var(--faint); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; padding: 4px 0 2px; }
.side-title:not(:first-child) { padding-top: 14px; }
.side-btn { display: flex; align-items: center; gap: 9px; padding: 7px 10px; background: var(--f08); border: 0; cursor: pointer; text-align: left; font-size: 12px; transition: background .12s, transform .15s var(--spring); }
.side-btn:hover { background: var(--f16); transform: translateX(2px); }
.side-btn.danger:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.side-meta { color: var(--faint); font-size: 10px; padding-top: 12px; }

/* ---- popovers ---- */
#popover { position: fixed; z-index: 2000; width: 270px; max-height: 70vh; overflow-y: auto; padding: 10px; background: var(--surface); border: 1px solid var(--f25); box-shadow: 0 14px 34px rgba(0,0,0,.55);
           display: flex; flex-direction: column; gap: 6px; animation: pop-in .18s var(--spring); transform-origin: top left; }
#popover.menu { width: 200px; padding: 4px; gap: 0; }
.pop-title { text-align: center; color: var(--muted); font-size: 11px; padding: 2px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.pop-label { color: var(--faint); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding-top: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: none; border: 0; cursor: pointer; text-align: left; font-size: 12px; color: var(--fg); }
.menu-item:hover { background: var(--f08); }
.menu-item.danger { color: #e07a7a; }
.menu-sep { height: 1px; background: var(--border); margin: 4px 0; }
.lab-row { display: flex; gap: 4px; align-items: center; }
.lab-pick { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding: 0 10px; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; color: #111; text-align: left; transition: filter .12s, transform .15s var(--spring); }
.lab-pick:hover { filter: brightness(1.12); transform: translateX(2px); }
.lab-pick:disabled { cursor: default; transform: none; filter: none; }
.lab-pick.on { box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.lab-new { display: flex; flex-direction: column; gap: 8px; }
.lab-body { display: flex; flex-direction: column; gap: 6px; }
.lab-new .btn { justify-content: center; }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.sw { height: 22px; border: 0; cursor: pointer; transition: transform .15s var(--spring); }
.sw:hover { transform: scale(1.12); }
.sw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg); }
.quick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.quick .btn { padding: 6px 4px; }
.link-form { display: flex; flex-direction: column; gap: 6px; }
#popover.archive-pop { width: 340px; }
.arch-list { display: flex; flex-direction: column; gap: 4px; }
.arch-row { display: flex; align-items: center; gap: 4px; }
.arch-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; background: var(--f04); border: 0; cursor: pointer; text-align: left; color: var(--fg); transition: background .12s, transform .15s var(--spring); }
.arch-open:hover { background: var(--f08); transform: translateX(2px); }
.arch-open b { font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch-open small { color: var(--faint); font-size: 10px; }
.arch-row .btn { padding: 5px 8px; }

/* ---- lightbox ---- */
.md-inline-image { display: block; max-width: min(100%, 720px); max-height: 520px; object-fit: contain; cursor: zoom-in; margin: 8px 0; }
.md-image-wrap { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.md-image-remove { position: absolute; top: 12px; right: 4px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.md-image-wrap:hover .md-image-remove, .md-image-wrap:focus-within .md-image-remove { opacity: 1; pointer-events: auto; }
.inline-upload-status { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font: 11px var(--mono); }
.inline-upload-item { opacity: .8; }
#lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 30px; animation: fade-in .18s; }
#lightbox img, #lightbox video { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; animation: pop-in .25s var(--spring); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lb-bar { display: flex; align-items: center; gap: 10px; color: var(--muted); }

/* ---- settings ---- */
#settingsPage { position: fixed; inset: 0; z-index: 2500; display: flex; flex-direction: column; background: var(--bg); }
#settingsPage > header { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 max(18px, calc((100vw - 720px) / 2)); border-bottom: 1px solid var(--border); font: 700 15px "JB", monospace; }
#settingsPage > .content { width: min(720px, 100%); flex: 1; min-height: 0; overflow-y: auto; align-self: center; padding: 10px 18px 24px; }
.set-sec { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.set-sec:last-child { border-bottom: 0; }
.set-sec h3 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 13px; }
.set-sec h3 svg { color: var(--gold); }
.set-sec p { margin: 0; line-height: 1.55; }
.ai-link { display: flex; flex-direction: column; gap: 10px; animation: rise .2s var(--spring); }
.ai-url { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border); }
.ai-url code { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.how summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.how summary:hover { color: var(--fg); }
.how ul { margin: 8px 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cmd { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; background: var(--bg); border: 1px solid var(--border); }
.cmd code { flex: 1; font-size: 11px; overflow-x: auto; white-space: nowrap; color: var(--gold); }
.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 34px; height: 18px; flex: none; background: var(--surface3); border: 1px solid var(--f25); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--muted); transition: transform .22s var(--spring), background .2s; }
.switch-row input:checked + .switch { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); background: #fff; }

/* ---- the AI's tag: where it is and what it's doing ---- */
.ai-tag { position: fixed; left: 0; top: 0; z-index: 900; pointer-events: none; will-change: transform; transition: opacity .25s; }
.ai-tag.lost { opacity: 0; }
.ai-tag.leaving .ai-tag-in { animation: ai-leave .55s ease-in forwards; }
.ai-tag-in { position: relative; display: flex; align-items: center; gap: 7px; padding: 5px 9px 5px 7px; background: var(--surface3); border: 1px solid var(--bot, var(--gold)); color: var(--bot, var(--gold));
             font: 700 10px/1 "JB", monospace; letter-spacing: .5px; white-space: nowrap; box-shadow: 0 6px 16px rgba(0,0,0,.45), 3px 3px 0 rgba(0,0,0,.3); animation: ai-float 2.4s ease-in-out infinite; }
/* the little nub that points at what it's on */
.ai-tag-in::after { content: ""; position: absolute; width: 7px; height: 7px; background: var(--surface3); border: 0 solid var(--bot, var(--gold)); transform: rotate(45deg); }
.ai-tag[data-place="above"] .ai-tag-in::after { right: 14px; bottom: -5px; border-right-width: 1px; border-bottom-width: 1px; }
.ai-tag[data-place="below"] .ai-tag-in::after { left: 14px; top: -5px; border-left-width: 1px; border-top-width: 1px; }
.ai-tag[data-place="beside"] .ai-tag-in::after { left: -5px; top: calc(50% - 4px); border-left-width: 1px; border-bottom-width: 1px; }
.ai-bot { position: relative; flex: none; display: block; }
.ai-bot i { position: absolute; display: block; background: var(--bot, var(--gold)); }
.ai-bot .eye { background: var(--fg); animation: ai-blink 3.2s infinite; }
.ai-bot .tip { background: var(--accent); animation: blink 1.2s steps(2) infinite; }
.ai-tag[data-mode="read"] .ai-bot .eye { animation: ai-scan 1.1s ease-in-out infinite, ai-blink 3.2s infinite; }
.ai-tag[data-mode="write"] .ai-bot { animation: ai-hop .45s ease-in-out infinite; }
.ai-tag[data-mode="oops"] .ai-tag-in { border-color: var(--accent); color: #e07a7a; }
.ai-word { display: inline-block; }
.ai-name { font-weight: 700; white-space: nowrap; }
.ai-tag[data-place="stack"] .ai-tag-in::after { display: none; }
.ai-where { color: var(--fg); font-weight: 400; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.ai-where:empty { display: none; }
.ai-where::before { content: "· "; color: var(--faint); }
.ai-dots { display: inline-flex; gap: 2px; margin-left: -4px; align-self: flex-end; }
.ai-dots i { width: 2px; height: 2px; background: currentColor; opacity: .25; animation: ai-dot 1.2s infinite; }
.ai-dots i:nth-child(2) { animation-delay: .2s; }
.ai-dots i:nth-child(3) { animation-delay: .4s; }
/* what it's on lights up */
.card.ai-here { border-color: color-mix(in srgb, var(--gold) 75%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent), 0 0 18px rgba(240,190,102,.14); }
.list-head.ai-here .list-name { color: var(--gold); }
.nav-item.ai-here { color: var(--fg); }
.nav-ai { flex: none; padding: 1px 4px; background: var(--bot, var(--gold)); color: #111; font-size: 9px; font-weight: 700; letter-spacing: .5px; animation: ai-chip 1.6s ease-in-out infinite; }

/* ---- toasts and the burst ---- */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 9px 14px; background: var(--surface3); border: 1px solid var(--f25); border-left: 3px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 12px; animation: toast-in .3s var(--spring); max-width: 70vw; }
.toast.error { border-left-color: var(--accent); }
.toast { display: flex; align-items: center; gap: 14px; pointer-events: auto; }
.toast-act { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.toast-act:hover { color: var(--fg); }
.toast.out { animation: toast-out .25s ease-in forwards; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 5000; }
#fx .px { position: fixed; display: block; }

/* ---- motion ---- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes zip { 0%, 100% { transform: translateX(0); opacity: 1; } 50% { transform: translateX(-3px); opacity: .55; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin-in { from { transform: rotate(-90deg) scale(.6); } to { transform: none; } }
@keyframes gap-in { from { height: 0 !important; opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes ai-glow { 0% { box-shadow: 0 0 0 0 rgba(240,190,102,.0); border-color: var(--border); } 15% { box-shadow: 0 0 0 3px rgba(240,190,102,.55), 0 0 22px rgba(240,190,102,.35); border-color: var(--gold); } 100% { box-shadow: 0 0 0 0 rgba(240,190,102,0); border-color: var(--border); } }
@keyframes ai-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ai-leave { to { transform: translateY(-16px) scale(.9); opacity: 0; } }
@keyframes ai-scan { 0%, 100% { translate: -1px 0; } 50% { translate: 1px 0; } }
@keyframes ai-blink { 0%, 90%, 100% { scale: 1 1; } 94% { scale: 1 .2; } }
@keyframes ai-hop { 50% { translate: 0 -2px; } }
@keyframes ai-dot { 0%, 100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes ai-chip { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes glow-green { 0% { box-shadow: 0 0 0 0 rgba(111,191,115,.6); } 100% { box-shadow: 0 0 0 8px rgba(111,191,115,0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* The window is behind others or minimised: hold every animation still, so an
   open window costs nothing while you're not looking at it. AI bots keep moving:
   they only exist while an AI works, and you may be watching from another window. */
html.paused :not(.ai-tag, .ai-tag *), html.paused :not(.ai-tag, .ai-tag *)::before, html.paused :not(.ai-tag, .ai-tag *)::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 760px) {
  .cm-grid { grid-template-columns: 1fr; }
  #searchBox { width: 150px; }
  .find-btn kbd { display: none; }
}

/* who else is on a shared board: faces in the header, a tag on the card they have open */
#hereFaces { display: flex; align-items: center; margin-right: 4px; }
#hereFaces[hidden] { display: none; }
.here-face { width: 24px; height: 24px; margin-left: -6px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-teal); color: #111; font-weight: 700; font-size: 11px; border: 2px solid var(--bg); animation: rise .25s var(--spring); }
.here-face:first-child { margin-left: 0; }
.here-face.more { background: var(--surface3); color: var(--muted); }
.ai-face { flex: none; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--bot, var(--gold)); color: #111; font-size: 9px; font-weight: 700; }
.ai-tag.person .ai-dots { display: none; }
.nav-ai.more { background: var(--surface3); color: var(--muted); animation: none; }
.ctx-anchor { position: fixed; width: 0; height: 0; pointer-events: none; }
/* history: who changed what, with a way back */
.hist-pop { width: 360px; max-width: calc(100vw - 20px); }
.hist-body { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.hist-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--border); }
.hist-row:last-child { border-bottom: 0; }
.hist-row.deleted .hist-text span { color: #e07a7a; }
.hist-text { flex: 1; min-width: 0; font-size: 12px; line-height: 1.4; }
.hist-text b { font-weight: 700; }
.hist-text span { color: var(--muted); }
.hist-text small { display: block; color: var(--faint); font-size: 10px; }
.hist-restore { flex: none; padding: 3px 7px; font-size: 11px; }

/* ---- phones ---------------------------------------------------------------------------- */
#sideScrim { display: none; }
@media (max-width: 600px) {
  /* an app, not a web page: no pinch or double-tap zoom, no grey flash on taps, no rubber band or
     pull-to-refresh, and long-pressing a button doesn't select its text */
  html, body { touch-action: pan-x pan-y; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
  button, .nav-item, .tile, .side-head, .list-head, #boardHead { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  #app { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  /* the sign-in screen clears the notch and the home bar too */
  #gate { padding: calc(28px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); }
  #settingsPage { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  #settingsPage > header { padding: 0 10px; }
  #settingsPage > .content { padding: 8px 14px 20px; }
  /* the sidebar slides over the board, with a dimmed board behind it */
  #side { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
          transition: transform .28s var(--spring); box-shadow: 0 0 40px rgba(0,0,0,.5); }
  #app.side-hidden #side { margin-left: 0; transform: translateX(-105%); opacity: 1; }
  #sideScrim { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.55); transition: opacity .2s; }
  #app.side-hidden #sideScrim { opacity: 0; pointer-events: none; }
  /* the header keeps the name and icons */
  #boardHead { gap: 6px; padding: 0 8px; }
  #boardStats, #boardProject, #hereFaces { display: none; }
  #boardName { font-size: 15px; max-width: none; flex: 1; min-width: 0; }
  #boardHead .grow { display: none; }
  #searchBox { width: 40px; height: 40px; padding: 0; justify-content: center; flex: none; overflow: hidden; }
  #searchBox:not(:focus-within) #search { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  #searchBox:not(:focus-within):active { transform: scale(.96); }
  #searchBox:hover { background: var(--f08); border-color: var(--f25); }
  #searchBox:focus-within { width: 46vw; padding: 0 4px 0 10px; justify-content: flex-start; }
  #shareBtn span { display: none; }
  #labelsBtn, #archiveBtn { display: none; }
  #shareBtn, #boardHead > .btn.icon-only { width: 40px; height: 40px; padding: 0; }
  #boardHead > * { flex-shrink: 0; }
  #boardHead > #boardName { flex-shrink: 1; }
  body.drawer-open .ai-tag { display: none; }
  /* one list at a time, snapping as you swipe */
  #board { padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); gap: 10px; scroll-snap-type: x mandatory; scroll-padding-inline: 10px; }
  .list { width: calc(100vw - 44px); scroll-snap-align: start; }
  .add-list-col, .add-list { scroll-snap-align: start; }
  .card { touch-action: pan-x pan-y; -webkit-touch-callout: none; user-select: none; }
  /* the card window fills the screen */
  .card-modal { width: 100vw; height: 100dvh; max-width: 100vw; }
  /* search: the top of the screen, results above the keyboard; the board header has no room for it
     (the sidebar and the board menu have it) */
  #findDialog { margin: 0 auto auto; }
  .find-modal { width: 100vw; max-height: 70dvh; padding-top: env(safe-area-inset-top); }
  .find-head { height: 54px; }
  #findInput { font-size: 16px; }
  .find-esc, .find-keys, #boardHead > .find-btn { display: none; }
  .find-row { padding: 10px; }
  .page-head .find-btn span, .page-head .find-btn kbd { display: none; }
  .page-head .find-btn { width: 40px; height: 40px; padding: 0; }
  dialog { max-width: 100vw; max-height: 100dvh; }
  .cm-grid { padding: 12px 14px 24px; gap: 16px; }
  .cm-side { flex-direction: row; flex-wrap: wrap; }
  .cm-side .side-title { width: 100%; }
  #popover { max-width: calc(100vw - 20px); }
  .ai-where { max-width: 90px; }
}

/* ---- All projects and a project's page: tiles, like Trello's workspace pages ---------- */
#home { flex: 1; min-height: 0; overflow-y: auto; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 28px 40px; }
.page-head { display: flex; align-items: center; gap: 14px; padding: 26px 0 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.page-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-title h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-title small { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11px; flex-wrap: wrap; }
.project-bar { display: block; width: 220px; max-width: 100%; height: 4px; background: var(--f08); }
.project-bar i { display: block; height: 100%; background: var(--green); }
.page-name { display: flex; align-items: center; gap: 4px; min-width: 0; }
.page-title.editable h1 { cursor: text; padding: 2px 6px; margin-left: -6px; border: 1px solid transparent; }
.page-title.editable h1:hover { border-color: var(--f16); }
.page-title h1 .inline-edit { font: 700 20px "JB", monospace; height: 34px; min-width: 260px; }
.page-head .btn.on svg { color: var(--gold); }
.page-sec { padding-top: 24px; }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--faint); font-size: 10px; letter-spacing: 1.4px; font-weight: 700; }
.invites { display: flex; flex-wrap: wrap; gap: 10px; }
.invites .invite { margin: 0; min-width: 240px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 124px; padding: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--fg); text-align: left; cursor: pointer; overflow: hidden;
        transition: border-color .15s, background .15s, transform .18s var(--spring), box-shadow .18s; }
.tile:hover { border-color: var(--f25); background: var(--surface2); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.tile:active { transform: translateY(0) scale(.99); }
.tile:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; width: 100%; margin-bottom: 4px; }
.tile-name { font-size: 14px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta { color: var(--faint); font-size: 11px; }
.tile-foot { margin-top: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 24px; }
.tile-strip { display: flex; gap: 3px; flex-wrap: wrap; }
.tile-strip .nav-dot { width: 7px; height: 7px; }
.tile-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold); font-size: 10px; }
.board-tile { padding-top: 22px; }
.tile-band { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--tint); transition: height .2s var(--spring); }
.board-tile:hover .tile-band { height: 12px; }
.tile-bar { flex: 1; max-width: 110px; height: 4px; background: var(--f08); }
.tile-bar i { display: block; height: 100%; background: var(--green); }
.tile-add { align-items: center; justify-content: center; gap: 8px; color: var(--muted); border-style: dashed; background: transparent; }
.tile-add:hover { color: var(--fg); background: var(--f04); }
.tile-new { cursor: default; gap: 10px; border-color: var(--gold); }
.tile-new:hover { transform: none; box-shadow: none; background: var(--surface); border-color: var(--gold); }
.tile-new-label { color: var(--muted); font-size: 11px; }
.tile-new .row { margin-top: auto; }
.tile.ai-here { border-color: color-mix(in srgb, var(--gold) 75%, transparent); }
.proj-square { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: #111; font-weight: 700; font-size: 16px; }
.proj-square.sm { width: 20px; height: 20px; font-size: 11px; }
.proj-square.lg { width: 56px; height: 56px; font-size: 26px; }

/* ---- faces: round avatars of who worked on a card ---- */
.faces { display: inline-flex; align-items: center; flex: none; }
.face { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; margin-left: -5px; display: inline-flex; align-items: center; justify-content: center; background: var(--face, var(--c-grey)); color: #111;
        font-weight: 700; font-size: 10px; line-height: 1; border: 2px solid var(--surface); box-sizing: content-box; overflow: hidden; transition: transform .15s var(--spring); }
.faces .face:first-child, #hereFaces .face:first-child { margin-left: 0; }
.faces .face:hover, .faces .face:focus-visible { transform: translateY(-2px); z-index: 1; }
.face:focus-visible { outline: 1px solid var(--gold); outline-offset: 1px; z-index: 1; }
.face.more { background: var(--surface3); color: var(--muted); font-size: 9px; }
.face-bot { width: 66%; height: auto; fill: #111; }
.face-bot .eye { fill: var(--face); }
.faces.lg .face, #hereFaces .face { width: 26px; height: 26px; font-size: 12px; margin-left: -7px; border-color: var(--bg); }
.card .badges .card-faces { margin-left: auto; }
.card .face { border-color: var(--surface2); }
.cm-faces { align-self: center; margin-right: 6px; }
.who-worked { display: flex; flex-direction: column; gap: 6px; }
.who-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.who-row .face { margin-left: 0; }
.hist-row > .face { margin-left: 0; width: 24px; height: 24px; font-size: 11px; border-color: var(--surface); }
.card .badges { align-items: center; }
/* name tag over a hovered or focused face */
.face-tag { position: fixed; z-index: 3000; pointer-events: none; background: var(--surface3); border: 1px solid var(--f25); color: var(--fg);
            font: 11px/1.3 "JB", monospace; padding: 3px 7px; white-space: nowrap; max-width: calc(100vw - 16px); overflow: hidden; text-overflow: ellipsis;
            box-shadow: 0 4px 14px rgba(0,0,0,.5); opacity: 0; transition: opacity .12s ease-out; }
.face-tag.on { opacity: 1; }
.face-tag::after { content: ""; position: absolute; left: var(--arrow-x, 50%); bottom: -4px; width: 6px; height: 6px; background: var(--surface3);
                   border-right: 1px solid var(--f25); border-bottom: 1px solid var(--f25); transform: translateX(-50%) rotate(45deg); }
.face-tag[data-place="below"]::after { bottom: auto; top: -4px; border-right: 0; border-bottom: 0; border-left: 1px solid var(--f25); border-top: 1px solid var(--f25); }

/* phones: tiles in one column, a little tighter */
@media (max-width: 600px) {
  .page { padding: 0 14px 28px; }
  .page-head { padding: 16px 0 14px; gap: 10px; }
  .page-title h1 { font-size: 18px; }
  .page-title { flex: 1 1 auto; }
  .project-bar { width: 100%; }
  .proj-square.lg { width: 44px; height: 44px; font-size: 20px; }
  .page-head .faces { display: none; }
  .tiles { grid-template-columns: 1fr; gap: 10px; }
  .tile { min-height: 96px; }
  .cm-faces { display: none; }
}

/* ---- wallpapers: a photo behind the board or project page, darkened so text stays readable ---- */
#main.has-wall { background: linear-gradient(rgba(18,18,18,.42), rgba(18,18,18,.62)), var(--wall) center / cover no-repeat, var(--bg); }
#main.has-wall.wall-light { background: linear-gradient(rgba(18,18,18,.6), rgba(18,18,18,.75)), var(--wall) center / cover no-repeat, var(--bg); }
#main.has-wall #boardHead { background: rgba(18,18,18,.62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: rgba(255,255,255,.08); }
#main.has-wall .page-head { border-bottom-color: rgba(255,255,255,.12); }
#main.has-wall .page-title small, #main.has-wall .sec-title, #main.has-wall .muted { color: #c8c8c8; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
#main.has-wall .page-title h1 { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
#main.has-wall .list { background: rgba(28,28,28,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#main.has-wall .tile { background: rgba(28,28,28,.88); }
.tile-band.has-wall { height: 64px; background: var(--wall) center / cover no-repeat, var(--tint); }
.tile-band.has-wall::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--tint); }
.board-tile:hover .tile-band.has-wall { height: 64px; }
.tile:has(> .tile-band.has-wall) { padding-top: 76px; }
#popover.wall-pop { width: 316px; }
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 4px; }
.wall-choice { position: relative; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; padding: 0; background: var(--surface2); border: 1px solid var(--border); color: var(--fg); font: inherit; font-size: 11px; cursor: pointer; }
.wall-choice.has-wall { background: var(--wall) center / cover no-repeat; }
.wall-choice span { padding: 1px 6px; background: rgba(18,18,18,.7); }
.wall-choice:hover { border-color: var(--f25); }
.wall-choice.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.wall-credit { margin: 8px 0 0; text-align: center; }
@media (max-width: 600px) {
  #popover.wall-pop { width: calc(100vw - 20px); }
  .tile-band.has-wall { height: 52px; }
  .tile:has(> .tile-band.has-wall) { padding-top: 64px; }
}

/* ---- profile pictures: in place of the initial once loaded ---- */
.face.pic, .ai-face.pic { background: var(--surface3); overflow: hidden; }
.face.pic img, .ai-face.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-face.pic { border-radius: 50%; }
.set-sec .row > .face { margin-left: 0; width: 30px; height: 30px; font-size: 13px; }
#whoFace .face { margin-left: 0; }

/* ---- phones: text read without zooming, buttons big enough for a thumb (each size about 2px up) ---- */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .small { font-size: 13px; }
  .btn { font-size: 14px; }
  .linkish { font-size: 13px; }
  .field { font-size: 14px; }
  textarea.field { font-size: 15px; }
  #maroHead .tag { font-size: 14px; }
  #modeSwitch div { font-size: 14px; }
  #maroCard label { font-size: 12px; }
  #forgotText { font-size: 13px; }
  #forgotLink { font-size: 12px; }
  #maroHint2 { font-size: 12px; }
  #maroNote { font-size: 13px; }
  #maroHint { font-size: 13px; }
  #maroSubmit { font-size: 14px; }
  #maroFoot { font-size: 14px; }
  .side-label { font-size: 12px; }
  .invite-text { font-size: 14px; }
  .invite .btn { font-size: 13px; }
  .c-who { font-size: 13px; }
  .share-points { font-size: 14px; }
  .avatar { font-size: 13px; }
  .p-name { font-size: 14px; }
  .p-name small { font-size: 12px; }
  .p-role { font-size: 13px; }
  .nav-count { font-size: 12px; }
  .side-back { font-size: 13px; }
  .side-proj .proj-name .inline-edit { font-size: 14px; }
  #boardProject { font-size: 15px; }
  .ai-badge { font-size: 13px; }
  #who { font-size: 13px; }
  #boardStats { font-size: 13px; }
  #search { font-size: 14px; }
  .list-name { font-size: 14px; }
  .list-head .count { font-size: 13px; }
  .list-empty { font-size: 13px; }
  .lab { font-size: 12px; }
  .lab.big { font-size: 13px; }
  .ctitle { font-size: 15px; }
  .badges { font-size: 13px; }
  .cm-archived { font-size: 14px; }
  .cm-where { font-size: 13px; }
  .cm-where .linkish { font-size: 13px; }
  .meta-label { font-size: 12px; }
  .due-chip { font-size: 13px; }
  .cm-sec-head h3 { font-size: 14px; }
  .editor-bar .hint { font-size: 12px; }
  .md { font-size: 15px; }
  .md code { font-size: 14px; }
  .att .att-name { font-size: 12px; }
  .att-text small { font-size: 12px; }
  .cl-name { font-size: 15px; }
  .cl-count { font-size: 13px; }
  .chip { font-size: 13px; }
  .c-when { font-size: 12px; }
  .side-title { font-size: 12px; }
  .side-btn { font-size: 14px; }
  .side-meta { font-size: 12px; }
  .pop-title { font-size: 13px; }
  .pop-label { font-size: 12px; }
  .menu-item { font-size: 14px; }
  .lab-pick { font-size: 14px; }
  .arch-open b { font-size: 14px; }
  .arch-open small { font-size: 12px; }
  .set-sec h3 { font-size: 15px; }
  .ai-url code { font-size: 14px; }
  .how summary { font-size: 14px; }
  .how ul { font-size: 14px; }
  .cmd code { font-size: 13px; }
  .ai-tag-in { font-size: 12px; }
  .nav-ai { font-size: 11px; }
  .toast { font-size: 14px; }
  .here-face { font-size: 13px; }
  .ai-face { font-size: 11px; }
  .hist-text { font-size: 14px; }
  .hist-text small { font-size: 12px; }
  .hist-restore { font-size: 13px; }
  .page-title small { font-size: 13px; }
  .sec-title { font-size: 12px; }
  .tile-meta { font-size: 13px; }
  .tile-badge { font-size: 12px; }
  .tile-new-label { font-size: 13px; }
  .proj-square.sm { font-size: 13px; }
  .face { font-size: 12px; }
  .face-tag { font-size: 12px; }
  .face.more { font-size: 11px; }
  .faces.lg .face, #hereFaces .face { font-size: 14px; }
  .hist-row > .face { font-size: 13px; }
  .wall-choice { font-size: 13px; }
  .set-sec .row > .face { font-size: 15px; }
  .btn { min-height: 40px; }
  .btn.icon-only, #shareBtn { min-width: 40px; }
  .menu-item { min-height: 42px; }
  .nav-item { min-height: 40px; }
  .ai-tag[data-place="dock"] .ai-tag-in::after { display: none; }
}

/* ---- a board's own picture, in place of its colour ---- */
.board-pic { width: 14px; height: 14px; flex: none; border-radius: 3px; object-fit: cover; display: inline-block; vertical-align: middle; }
.board-pic.lg, .nav-dot.lg { width: 56px; height: 56px; border-radius: 8px; }
#boardPic:empty { display: none; }
#boardPic .board-pic { width: 26px; height: 26px; border-radius: 5px; }
.tile-pic { position: absolute; left: 12px; top: 38px; width: 44px; height: 44px; border-radius: 8px; border: 2px solid var(--surface); z-index: 1; }
.tile:has(> .tile-pic) .tile-name { margin-left: 52px; }
.tile-strip .board-pic { width: 7px; height: 7px; border-radius: 2px; }
.pic-pop { display: grid; justify-items: start; gap: 10px; padding-top: 6px; }
.wall-up { gap: 4px; flex-direction: column; color: var(--muted); border-style: dashed; }
