/* Boards UI (static/boards.js).  Every selector is namespaced .bd-*.
   Colours come from CSS variables with fallbacks so a host can theme it:
   --bd-surface --bd-text --bd-muted --bd-border --bd-accent --bd-list-bg --bd-card-bg --bd-height
   Dark: automatic via prefers-color-scheme, or force with data-bd-theme="dark|light",
   or a host class (.dark / [data-theme="dark"]). */

.bd-root { display: block; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.bd { --_surface: var(--bd-surface, #ffffff); --_surface2: var(--bd-surface-2, #f4f5f7); --_text: var(--bd-text, #172b4d);
  --_muted: var(--bd-muted, #5e6c84); --_border: var(--bd-border, #dfe1e6); --_accent: var(--bd-accent, #0c66e4);
  --_list: var(--bd-list-bg, #f1f2f4); --_card: var(--bd-card-bg, #ffffff); --_hover: rgba(9,30,66,.07);
  --_danger: #c9372c; --_ok: #1f845a;
  position: relative; width: 100%; min-width: 0; color: var(--_text); font-size: 14px; line-height: 1.4;
  font-family: inherit; }
.bd, .bd *, .bd *::before, .bd *::after { box-sizing: border-box; }
/* :where() keeps these resets at zero specificity so every .bd-* component rule wins */
:where(.bd) button { font: inherit; cursor: pointer; color: inherit; }
:where(.bd) input, :where(.bd) textarea, :where(.bd) select { font: inherit; color: var(--_text); }
.bd [hidden] { display: none !important; }
.bd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* dark */
.bd[data-bd-theme="dark"] { --_surface: var(--bd-surface, #22272b); --_surface2: var(--bd-surface-2, #2c333a); --_text: var(--bd-text, #dee4ea);
  --_muted: var(--bd-muted, #9fadbc); --_border: var(--bd-border, #3b444c); --_list: var(--bd-list-bg, #1d2125); --_card: var(--bd-card-bg, #2c333a);
  --_hover: rgba(255,255,255,.08); --_accent: var(--bd-accent, #579dff); }
@media (prefers-color-scheme: dark) {
  .bd[data-bd-theme="auto"] { --_surface: var(--bd-surface, #22272b); --_surface2: var(--bd-surface-2, #2c333a); --_text: var(--bd-text, #dee4ea);
    --_muted: var(--bd-muted, #9fadbc); --_border: var(--bd-border, #3b444c); --_list: var(--bd-list-bg, #1d2125); --_card: var(--bd-card-bg, #2c333a);
    --_hover: rgba(255,255,255,.08); --_accent: var(--bd-accent, #579dff); }
}
:is([data-theme="dark"], .dark, .dark-mode, .theme-dark) .bd[data-bd-theme="auto"] { --_surface: var(--bd-surface, #22272b); --_surface2: var(--bd-surface-2, #2c333a);
  --_text: var(--bd-text, #dee4ea); --_muted: var(--bd-muted, #9fadbc); --_border: var(--bd-border, #3b444c); --_list: var(--bd-list-bg, #1d2125);
  --_card: var(--bd-card-bg, #2c333a); --_hover: rgba(255,255,255,.08); --_accent: var(--bd-accent, #579dff); }

/* generic bits */
.bd-h1 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.bd-h2 { font-size: 1.05rem; font-weight: 700; margin: 26px 0 10px; }
.bd-h3 { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--_muted); margin: 16px 0 6px; }
.bd-hint { color: var(--_muted); font-size: .82rem; margin: 4px 0 8px; }
.bd-hint.pad { padding: 4px 8px; }
.bd-empty { color: var(--_muted); padding: 14px; border: 1px dashed var(--_border); border-radius: 10px; text-align: center; }
.bd-empty.sm { padding: 8px; font-size: .85rem; }
.bd-empty.onboard { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); align-self: flex-start; }
.bd-count { color: var(--_muted); font-size: .8rem; font-weight: 600; }
.bd-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--_muted); background: var(--_hover); padding: 1px 6px; border-radius: 999px; }
.bd-link { background: none; border: 0; color: var(--_accent); text-decoration: underline; padding: 0; }
.bd-err { color: var(--_danger); font-size: .82rem; margin-top: 4px; }
.bd-lbl { display: block; font-size: .78rem; font-weight: 600; color: var(--_muted); margin: 8px 0; }
.bd-lbl input, .bd-lbl select { display: block; width: 100%; margin-top: 4px; }
.bd-lbl.sm { margin: 4px 0 8px; }
.bd input[type=text], .bd input[type=search], .bd input[type=date], .bd input[type=time], .bd textarea, .bd .bd-select {
  background: var(--_surface); border: 1px solid var(--_border); border-radius: 8px; padding: 7px 10px; max-width: 100%; }
.bd input:focus, .bd textarea:focus, .bd select:focus { outline: 2px solid var(--_accent); outline-offset: 0; }
.bd button:focus-visible, .bd .bd-card:focus-visible, .bd [role=button]:focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; }
.bd-btn { background: var(--_surface2); border: 1px solid var(--_border); border-radius: 8px; padding: 7px 14px; font-weight: 600; }
.bd-btn:hover { filter: brightness(.96); }
.bd-btn.sm { padding: 3px 10px; font-size: .8rem; }
.bd-btn.block { display: block; width: 100%; text-align: left; margin-top: 6px; }
.bd-btn.primary { background: var(--_accent); border-color: transparent; color: #fff; }
.bd-btn.danger { color: var(--_danger); border-color: rgba(201,55,44,.4); background: transparent; }
.bd-btn[disabled] { opacity: .5; cursor: not-allowed; }
.bd-icon-btn { background: transparent; border: 0; border-radius: 6px; width: 30px; height: 30px; font-size: 1.1rem; color: var(--_muted); }
.bd-icon-btn:hover { background: var(--_hover); color: var(--_text); }
.bd-x { background: transparent; border: 0; font-size: 1.3rem; color: var(--_muted); padding: 0 8px; border-radius: 6px; }
.bd-x:hover { background: var(--_hover); color: var(--_text); }
.bd-add-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.bd-av { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: .68rem; font-weight: 700; flex: 0 0 auto; }
.bd-av.sm { width: 22px; height: 22px; font-size: .58rem; }
.bd-av.more { background: #6b778c; }
.bd-role { font-size: .68rem; font-weight: 700; text-transform: capitalize; padding: 1px 7px; border-radius: 999px; background: var(--_hover); color: var(--_muted); }
.bd-role-admin { background: rgba(12,102,228,.15); color: var(--_accent); }
.bd-role-observer { background: rgba(245,205,71,.28); color: #7f5f01; }
.bd-role.onbar { background: rgba(255,255,255,.22); color: #fff; }

/* skeleton */
@keyframes bd-pulse { 0%,100% { opacity: .55 } 50% { opacity: 1 } }
.bd-skel { background: var(--_hover); border-radius: 10px; animation: bd-pulse 1.2s infinite; }
.bd-skel-tile { height: 92px; }
.bd-skel-line { height: 14px; margin: 8px 0; max-width: 360px; }
.bd-skel-list { flex: 0 0 280px; width: 280px; height: 220px; background: rgba(255,255,255,.35); }

/* HOME */
.bd-home { padding: 4px 0 24px; }
.bd-home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bd-search input { width: 260px; max-width: 100%; }
.bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.bd-tile-wrap { position: relative; min-width: 0; }
.bd-tile { --bd-tile: #3b4a63; display: flex; flex-direction: column; justify-content: space-between; width: 100%; min-height: 92px; text-align: left; border: 0; border-radius: 12px;
  padding: 12px; color: #fff; background: linear-gradient(135deg, var(--bd-tile), color-mix(in srgb, var(--bd-tile) 70%, #000)); box-shadow: 0 1px 2px rgba(9,30,66,.25); min-width: 0; }
.bd-tile:hover { filter: brightness(1.08); }
.bd-tile-title { font-weight: 700; font-size: 1rem; word-break: break-word; padding-right: 26px; }
.bd-tile-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .75rem; margin-top: 10px; }
.bd-tile .bd-role, .bd-tile .bd-tag, .bd-tile .bd-count { background: rgba(255,255,255,.22); color: #fff; padding: 1px 7px; border-radius: 999px; font-size: .68rem; }
.bd-tile-star { position: absolute; top: 6px; right: 8px; background: transparent; border: 0; color: rgba(255,255,255,.75); font-size: 1.2rem; width: 28px; height: 28px; border-radius: 6px; }
.bd-tile-star:hover, .bd-tile-star.on { color: #f5cd47; background: rgba(0,0,0,.15); }
.bd-tile-new { background: transparent; color: var(--_muted); border: 2px dashed var(--_border); box-shadow: none; align-items: center; justify-content: center; font-weight: 600; }
.bd-tile-new:hover { filter: none; background: var(--_hover); color: var(--_text); }
.bd-tile-closed { filter: grayscale(.5); cursor: default; }
.bd-tile-closed:hover { filter: grayscale(.5); }
.bd-closed-link { margin-top: 22px; }

/* BOARD */
.bd-board { --bd-bg: #3b4a63; display: flex; flex-direction: column; height: var(--bd-height, min(78vh, 900px)); min-height: 420px; background: var(--bd-bg);
  border-radius: 14px; overflow: hidden; transition: background .25s; position: relative; max-width: 100%; }
.bd-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: rgba(0,0,0,.24); color: #fff; flex: 0 0 auto; flex-wrap: wrap; row-gap: 6px; }
.bd-bar-btn { background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 6px; padding: 6px 11px; font-weight: 600; white-space: nowrap; }
.bd-bar-btn:hover { background: rgba(255,255,255,.3); }
.bd-bar-btn.active { background: #fff; color: #172b4d; }
.bd-bar-link { background: none; border: 0; color: #fff; text-decoration: underline; padding: 0 4px; font-size: .82rem; }
.bd-star.on { color: #f5cd47; }
.bd-title { background: transparent; border: 2px solid transparent; color: #fff; font-size: 1.15rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; cursor: text; text-align: left; max-width: 100%; word-break: break-word; }
.bd-title:hover { background: rgba(255,255,255,.16); }
.bd-title.static { margin: 0; cursor: default; }
.bd-title.static:hover { background: transparent; }
.bd .bd-title-input { font-size: 1.1rem; font-weight: 700; padding: 3px 8px; min-width: min(240px, 100%); background: #fff; color: #172b4d; border: 2px solid #4c9aff; }
.bd-chip { font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.2); }
.bd-spacer { flex: 1 1 8px; }
.bd-avs { display: flex; }
.bd-avs .bd-av { margin-left: -6px; border: 2px solid rgba(0,0,0,.25); }
.bd-avs .bd-av:first-child { margin-left: 0; }
.bd-body { flex: 1 1 auto; display: flex; min-height: 0; position: relative; }
.bd-lists { flex: 1 1 auto; display: flex; gap: 12px; padding: 14px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; min-width: 0; -webkit-overflow-scrolling: touch; }
.bd-list { flex: 0 0 284px; width: 284px; max-height: 100%; display: flex; flex-direction: column; background: var(--_list); border-radius: 16px; box-shadow: 0 1px 2px rgba(9,30,66,.2); }
.bd-list.dragging, .bd-card.dragging { opacity: .4; }
.bd-list-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px 4px 8px; cursor: grab; }
.bd-list-head:active { cursor: grabbing; }
.bd-list-title { flex: 1; min-width: 0; margin: 0; text-align: left; background: transparent; border: 2px solid transparent; font-weight: 600; font-size: 1rem; padding: 3px 6px; border-radius: 6px; word-break: break-word; cursor: text; }
button.bd-list-title:hover { background: var(--_hover); }
.bd .bd-list-title-input { flex: 1; min-width: 0; font-weight: 700; padding: 3px 6px; border: 2px solid #4c9aff; }
.bd-cards { flex: 1 1 auto; overflow-y: auto; padding: 2px 8px 4px; display: flex; flex-direction: column; gap: 8px; min-height: 14px; }
.bd-card { position: relative; background: var(--_card); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 1px rgba(9,30,66,.2), 0 0 0 1px rgba(9,30,66,.04); cursor: pointer; word-break: break-word; }
.bd-card:hover { box-shadow: 0 0 0 2px var(--_accent) inset, 0 1px 1px rgba(9,30,66,.25); }
.bd-card-title { font-weight: 500; font-size: .98rem; line-height: 1.35; padding-right: 22px; }
.bd-card-edit { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 6px; background: var(--_hover); color: var(--_muted); font-size: .8rem; opacity: 0; transition: opacity .12s; }
.bd-card:hover .bd-card-edit, .bd-card:focus-within .bd-card-edit { opacity: 1; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.bd-lchip { color: #172b4d; border-radius: 4px; padding: 1px 8px; font-size: .72rem; font-weight: 700; min-width: 36px; text-align: center; display: inline-block; }
.bd-lchip.empty { min-width: 40px; height: 8px; padding: 0; }
.bd-lchip.wide { padding: 3px 10px; font-size: .8rem; }
.bd-lchip.wide.empty { height: 22px; min-width: 56px; }
.bd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; color: var(--_muted); font-size: .78rem; align-items: center; }
.bd-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; }
.bd-badge.due.ok { background: var(--_hover); }
.bd-badge.due.soon { background: #f5cd47; color: #172b4d; }
.bd-badge.due.over { background: #f87168; color: #fff; }
.bd-badge.due.done { background: #4bce97; color: #172b4d; }
.bd-badge.ok { color: var(--_ok); }
.bd-card-avs { margin-left: auto; display: flex; }
.bd-card-avs .bd-av { margin-left: -4px; border: 2px solid var(--_card); }
.bd-drop { height: 4px; border-radius: 4px; background: #4c9aff; flex: 0 0 4px; margin: -2px 0; }
.bd-lists > .bd-drop-col { flex: 0 0 4px; width: 4px; align-self: stretch; background: #4c9aff; border-radius: 4px; }
.bd-add { margin: 4px 8px 8px; }
.bd-add-btn { width: 100%; text-align: left; background: transparent; border: 0; color: var(--_muted); padding: 8px; border-radius: 8px; }
.bd-add-btn:hover { background: var(--_hover); color: var(--_text); }
.bd-add textarea, .bd-addlist input { width: 100%; resize: none; }
.bd-addlist { flex: 0 0 284px; width: 284px; background: rgba(255,255,255,.24); border-radius: 12px; padding: 8px; }
.bd-addlist .bd-add-btn { color: #fff; }
.bd-addlist .bd-add-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.bd-addlist.open { background: var(--_list); }
.bd-addlist.open .bd-x { color: var(--_muted); }
.bd-state { padding: 40px 16px; text-align: center; }

/* DRAWER */
.bd-drawer { flex: 0 0 340px; width: 340px; max-width: 100%; background: var(--_surface); border-left: 1px solid var(--_border); display: flex; flex-direction: column; min-height: 0; box-shadow: -8px 0 24px rgba(9,30,66,.25); z-index: 5; }
.bd-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--_border); }
.bd-drawer-head h3 { margin: 0; font-size: 1rem; }
.bd-drawer-body { padding: 12px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.bd-members { list-style: none; margin: 0; padding: 0; }
.bd-member { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.bd-member-main { flex: 1; min-width: 0; }
.bd-member-name { font-weight: 600; word-break: break-all; }
.bd-time { color: var(--_muted); font-size: .74rem; }
.bd-addmem { display: flex; gap: 6px; flex-wrap: wrap; }
.bd-addmem input { flex: 1 1 140px; min-width: 0; }
.bd-suggest { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.bd-sug { display: flex; gap: 8px; align-items: center; text-align: left; background: transparent; border: 0; padding: 5px 6px; border-radius: 6px; word-break: break-all; }
.bd-sug:hover { background: var(--_hover); }
.bd-acts { list-style: none; margin: 0; padding: 0; }
.bd-act { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--_border); }
.bd-act > div { min-width: 0; flex: 1; word-break: break-word; }
.bd-comment { background: var(--_surface2); border: 1px solid var(--_border); border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.bd-arch { list-style: none; padding: 0; margin: 0; }
.bd-arch li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--_border); }
.bd-arch li > span:first-child { word-break: break-word; min-width: 0; }
.bd-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.bd-swatch { width: 44px; height: 32px; border-radius: 8px; border: 2px solid transparent; padding: 0; }
.bd-swatches.sm .bd-swatch { width: 30px; height: 24px; border-radius: 6px; }
.bd-swatch.on { border-color: var(--_text); box-shadow: 0 0 0 2px var(--_surface) inset; }

/* POPOVERS, CONFIRM, TOASTS */
.bd-pop-bg { position: fixed; inset: 0; z-index: 1300; }
.bd-pop { position: fixed; z-index: 1301; background: var(--_surface); border: 1px solid var(--_border); border-radius: 10px; box-shadow: 0 10px 30px rgba(9,30,66,.35); overflow-y: auto; }
.bd-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; font-weight: 700; font-size: .85rem; color: var(--_muted); border-bottom: 1px solid var(--_border); }
.bd-pop-body { padding: 8px; }
.bd-pop hr { border: 0; border-top: 1px solid var(--_border); margin: 6px 0; }
.bd-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 8px 10px; border-radius: 6px; }
.bd-menu-item:hover { background: var(--_hover); }
.bd-menu-item.danger { color: var(--_danger); }
.bd-opt { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; }
.bd-opt.inline { display: inline-flex; }
.bd-pop .bd-btn { margin-top: 8px; }
.bd-pop input[type=text] { width: 100%; }
.bd-overlay { position: fixed; inset: 0; background: rgba(9,30,66,.62); z-index: 1200; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 4vh 12px; }
.bd-overlay.conf { z-index: 1400; align-items: center; }
.bd-dialog { background: var(--_surface); border-radius: 12px; padding: 18px; max-width: 420px; width: 100%; box-shadow: 0 12px 40px rgba(9,30,66,.5); }
.bd-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 1500; display: flex; flex-direction: column; gap: 8px; align-items: center; max-width: calc(100vw - 24px); pointer-events: none; }
.bd-toast { background: #172b4d; color: #fff; padding: 9px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(9,30,66,.4); pointer-events: auto; max-width: 100%; }
.bd-toast.err { background: #c9372c; }

/* CARD MODAL */
.bd-modal { background: var(--_surface2); border-radius: 12px; width: 100%; max-width: 780px; padding: 18px 20px 22px; position: relative; box-shadow: 0 12px 40px rgba(9,30,66,.5); outline: 0; }
.bd-close { position: absolute; right: 10px; top: 8px; background: transparent; border: 0; font-size: 1.6rem; color: var(--_muted); border-radius: 6px; width: 34px; height: 34px; }
.bd-close:hover { background: var(--_hover); }
.bd-modal .bd-modal-title { width: calc(100% - 40px); font-size: 1.25rem; font-weight: 700; border: 2px solid transparent; background: transparent; padding: 4px 8px; border-radius: 6px; }
.bd-modal .bd-modal-title:hover { background: var(--_hover); }
.bd-modal .bd-modal-title:focus { background: var(--_surface); border-color: var(--_accent); outline: 0; }
.bd-in-list { color: var(--_muted); font-size: .84rem; margin: 2px 8px 6px; }
.bd-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 18px; }
.bd-modal-main section { margin-bottom: 4px; }
.bd-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bd-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.bd-modal textarea { width: 100%; min-height: 70px; resize: vertical; }
.bd-md { display: block; width: 100%; text-align: left; background: var(--_surface); border: 0; border-radius: 8px; padding: 8px 12px; min-height: 40px; cursor: text; line-height: 1.5; word-break: break-word; }
.bd-md.empty { color: var(--_muted); background: var(--_hover); }
.bd-md p { margin: .4em 0; } .bd-md ul, .bd-md ol { margin: .4em 0; padding-left: 22px; }
.bd-md code { background: var(--_hover); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.bd-md pre { background: #172b4d; color: #fff; padding: 10px; border-radius: 8px; overflow-x: auto; }
.bd-md pre code { background: transparent; }
.bd-md a { color: var(--_accent); } .bd-md h1, .bd-md h2, .bd-md h3 { margin: .6em 0 .3em; }
.bd-progress { height: 8px; background: var(--_border); border-radius: 6px; overflow: hidden; margin: 4px 0 8px; }
.bd-progress > div { height: 100%; background: var(--_accent); transition: width .2s; }
.bd-progress.full > div { background: var(--_ok); }
.bd-check { display: flex; align-items: center; gap: 8px; padding: 3px 2px; }
.bd-check input[type=checkbox] { width: 17px; height: 17px; flex: 0 0 auto; }
.bd-check-text { flex: 1; padding: 2px 6px; border-radius: 6px; cursor: text; word-break: break-word; }
.bd-check-text:hover { background: var(--_hover); }
.bd-check.done .bd-check-text { text-decoration: line-through; color: var(--_muted); }
.bd-check .bd-check-edit { flex: 1; min-width: 0; }
.bd-check .bd-x { opacity: .5; } .bd-check:hover .bd-x { opacity: 1; }
.bd-inline-add { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.bd-inline-add input { flex: 1; min-width: 140px; }
.bd-link-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.bd-link-row a, .bd-link-row span { flex: 1; word-break: break-all; color: var(--_accent); }

/* mobile: nothing may push the page wider; boards scroll inside */
@media (max-width: 720px) {
  .bd-board { height: var(--bd-height, calc(100vh - 180px)); min-height: 380px; border-radius: 10px; }
  .bd-list, .bd-addlist { flex-basis: 252px; width: 252px; }
  .bd-modal-grid { grid-template-columns: minmax(0, 1fr); }
  .bd-drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 100%); }
  .bd-search input { width: 100%; }
  .bd-search { flex: 1 1 100%; }
  .bd-bar { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .bd-skel { animation: none; } .bd-board, .bd-progress > div { transition: none; } }

/* Optional subtitle under a pinned tile (client portals: "Shared with ..."). */
.bd-tile-sub { display: block; margin-top: 4px; font-size: .75rem; font-weight: 400; line-height: 1.3; opacity: .9; padding-right: 26px; }
