/* =========================================================
   board.css — vues des tableaux (thème sombre façon Trello, peau V3 « cartoon » calmée d'un cran) :
     views/boards.js  #/tableaux  : .tp-bhome (tuiles .tp-btile* de app.css + tri, compteur du plan, « Partagés avec toi »)
       .tp-bhome__item (> .tp-btile + .tp-btile__role) · .tp-bhome__quota(.is-full) · .tp-bhome__empty > .tp-bhome__art
     views/board.js   #/t/<id>, #/c/<id> :
       .tp-bv (fond = --tp-bv-bg ; .is-readonly = observateur) > .tp-bv__head (48 px, voile + flou : titre, étoile,
         .tp-bv__ro « Lecture seule », filtres, .tp-bv__members (avatars), .tp-bv__share « Partager », « … »)
         + .tp-bv__body > .tp-bv__canvas > ol.tp-bv__lists
       listes   li.tp-blist (304 px, #0e1320 ; .is-new à l'apparition) > __head (__title, __menu) + __scroll > ol.tp-blist__cards
                + form.tp-bcomposer ; __foot
       cartes   li.tp-bcard (.is-new apparition, .is-bumped changement distant, .is-open) > a.tp-bcard__link
                (__cover [--color | --img | --att, .is-fit] 16:9 pleine largeur, __body > __title + __meta (une ligne :
                __labels, __badges > .tp-bbadge échéance / checklist)) + .tp-bcard__edit
       glisser  .tp-bghost (fantôme incliné : rotate / scale CSS) · .tp-bcard-ph / .tp-blist-ph (emplacement) · html.tp-bdragging
       édition rapide  .tp-modal__dialog.tp-bqe (__main, __card, __title, __actions > .tp-bqe__btn)
       popovers  .tp-bpop__* · .tp-blabels · .tp-blabedit · .tp-bcoverpop · .tp-bdates · .tp-bdest
       menu du tableau  .tp-drawer.tp-bmenu (__swatch, __bg, __note) · .tp-barch (éléments archivés)
       partager  .tp-bshare-dialog > .tp-bshare (__sec __h __lead __note __pro __invite __row __result __copy __members
                 __member __who __name __meta __ctl __role __invites __inv __plinks __plink __pubnew)
     views/share.js   #/p/<token> : .tp-pub (--board) > .tp-pub__bar (bandeau « Créé avec LeapViews · Créer un compte »)
       + .tp-pub__main > .tp-bv.tp-bv--public (mêmes listes et faces de cartes, en lecture seule) | .tp-pub__page
       fiche de carte  .tp-pubcard (__cover __title __where __metas __meta __label __sec __h __desc) · .tp-pubscript
                       · .tp-pubatt (--image) · .tp-pubcl (checklists)
   Mouvement : tout est coupé par prefers-reduced-motion (règle globale de base.css) ; l'inclinaison du fantôme reste.
   ========================================================= */

/* ---------- Boards home (#/tableaux) ---------- */
.tp-bhome .tp-section__title .tp-count { margin-left: 2px; }
.tp-bhome__sort { display: inline-flex; align-items: center; gap: 8px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; }
.tp-bhome__sort .tp-select { width: auto; min-width: 228px; }
.tp-bhome__hint { max-width: 68ch; margin: -4px 0 16px; color: var(--tp-text-subtle); }
.tp-bhome__item { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; list-style: none; }
.tp-bhome__skel { height: 96px; border-radius: var(--tp-radius); }
.tp-btile__role {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; padding: 0 2px;
  color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 700;
}
.tp-btile__role .tp-icon { width: 13px; height: 13px; color: var(--tp-mint); }
.tp-btile__role.is-readonly .tp-icon { color: var(--tp-sky); }
.tp-bhome__quota {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 14px; color: var(--tp-text-subtle);
  font-size: 13px; line-height: 18px;
}
.tp-bhome__quota .tp-icon { width: 15px; height: 15px; }
.tp-bhome__quota.is-full { color: var(--tp-sun-text); }
.tp-bhome__quota.is-full .tp-icon { color: var(--tp-sun); }
.tp-bhome__empty { display: flex; align-items: center; gap: 20px; margin: 0 0 18px; }
.tp-bhome__empty .tp-bhome__hint { margin: 0; }
.tp-bhome__art { width: 150px; height: auto; flex: none; animation: tp-float 3.2s ease-in-out infinite; }
@media (max-width: 599px) {
  .tp-bhome__sort { width: 100%; }
  .tp-bhome__sort .tp-select { flex: 1; min-width: 0; }
  .tp-bhome__empty { flex-direction: column; text-align: center; }
  .tp-bhome__art { width: 120px; }
}

/* ---------- Board view ---------- */
.tp-bv {
  position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden;
  background: var(--tp-bv-bg, #0079bf); background-position: center; background-size: cover; color: var(--tp-text);
}
.tp-bv.is-missing { display: block; overflow: auto; background: var(--tp-bg); }

.tp-bv__head {
  position: relative; z-index: 3; display: flex; align-items: center; gap: 4px; flex: none; min-height: 48px;
  padding: 8px 10px 8px 12px; background: #0000003d; color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.tp-bv__h1 { min-width: 0; margin: 0; font-size: 18px; line-height: 32px; }
.tp-bv__title {
  display: block; max-width: 100%; height: 32px; padding: 0 10px; overflow: hidden; border: 0; border-radius: var(--tp-radius-sm);
  background: transparent; color: #fff; font: 600 19px/32px var(--tp-font-display); letter-spacing: 0.01em; text-align: left;
  text-overflow: ellipsis; white-space: nowrap; transition: background-color var(--tp-dur) var(--tp-ease);
}
.tp-bv__title:hover { background: #ffffff33; }
.tp-bv__title[aria-disabled="true"] { cursor: default; }
.tp-bv__title[aria-disabled="true"]:hover { background: transparent; }
.tp-bv__title-input {
  height: 32px; max-width: 100%; padding: 0 10px; border: 0; border-radius: var(--tp-radius-sm); background: var(--tp-surface);
  box-shadow: inset 0 0 0 2px var(--tp-accent-hover); color: var(--tp-text-strong); font: 600 19px/32px var(--tp-font-display); outline: none;
}
.tp-bv__title-measure { position: absolute; top: 0; left: -9999px; visibility: hidden; white-space: pre; font: 600 19px/32px var(--tp-font-display); }
.tp-bv__hbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 32px; height: 32px; padding: 0 8px;
  border: 0; border-radius: var(--tp-radius-sm); background: transparent; color: #fff; font-weight: 600; line-height: 20px;
  transition: background-color var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-bv__hbtn:hover { background: #ffffff33; }
.tp-bv__hbtn:active { transform: scale(0.94); }
.tp-bv__hbtn[aria-expanded="true"] { background: #ffffff4d; }
.tp-bv__star .tp-icon { transition: transform 260ms var(--tp-spring); }
.tp-bv__star:hover .tp-icon { transform: scale(1.08); }
.tp-bv__star.is-on, .tp-bv__star.is-on:hover { color: var(--tp-sun); }
.tp-bv__spacer { flex: 1; min-width: 8px; }
.tp-bv__filters { display: flex; min-width: 0; }
.tp-bv__filters .tp-filterbar__tags { display: none; }
.tp-bv__filters .tp-filterbar__btn {
  --tp-btn-edge: transparent; --tp-btn-shadow: none; --tp-btn-shadow-active: none; --tp-btn-press: 0px;
  min-height: 32px; padding: 4px 10px; background: transparent; color: #fff;
}
.tp-bv__filters .tp-filterbar__btn:hover { background: #ffffff33; color: #fff; }
.tp-bv__filters .tp-filterbar__btn[aria-expanded="true"] { background: #ffffff4d; }
/* Active: light button with dark text and icon, like « Partager » (--tp-accent-text is white: unreadable here). */
.tp-bv__filters .tp-filterbar__btn.is-active, .tp-bv__filters .tp-filterbar__btn.is-active:hover { background: var(--tp-text-strong); color: #0b0f17; }
.tp-bv__clear { font-size: 13px; }

/* Read-only badge, members, « Partager » */
.tp-bv__ro {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 26px; margin-left: 4px; padding: 0 10px;
  border: 1px solid #00000040; border-radius: 13px; background: #00000059; color: #fff; font-size: 12px; line-height: 16px; font-weight: 700;
  animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-bv__ro .tp-icon { width: 14px; height: 14px; color: var(--tp-sky-text); }
.tp-bv__members {
  display: inline-flex; align-items: center; flex: none; height: 36px; margin: 0 2px; padding: 0 6px 0 2px; border: 0;
  border-radius: 18px; background: transparent; transition: background-color var(--tp-dur) var(--tp-ease);
}
.tp-bv__members:hover { background: #ffffff26; }
.tp-bv__members .tp-members > * { box-shadow: 0 0 0 2px #00000066; transition: transform 200ms var(--tp-spring); }
.tp-bv__members:hover .tp-members > :not(.tp-members__more) { transform: translateY(-1px); }
.tp-bv__members .tp-members__more { background: #00000066; color: #fff; }
.tp-bv__share {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; margin: 0 4px; padding: 0 12px;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-text-strong); color: #0b0f17;
  box-shadow: var(--tp-shadow-raised); font-family: var(--tp-font); font-weight: 700; line-height: 20px;
  transition: background-color var(--tp-dur) var(--tp-ease), transform 120ms var(--tp-ease), box-shadow 120ms var(--tp-ease);
}
.tp-bv__share:hover { background: #fff; }
.tp-bv__share:active { transform: translateY(2px); box-shadow: none; }
.tp-bv__share .tp-icon { width: 16px; height: 16px; }

.tp-bv__body { position: relative; flex: 1; min-height: 0; }
.tp-bv__canvas { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-color: #ffffff66 #00000026; }
.tp-bv__canvas::-webkit-scrollbar { height: 12px; }
.tp-bv__canvas::-webkit-scrollbar-track { margin: 0 12px; border-radius: 6px; background: #00000026; }
.tp-bv__canvas::-webkit-scrollbar-thumb { border: 0; border-radius: 6px; background: #ffffff66; }
.tp-bv__canvas.is-panning { cursor: grabbing; }
.tp-bv__lists {
  display: flex; align-items: flex-start; gap: 12px; width: max-content; min-width: 100%; height: 100%;
  margin: 0; padding: 12px 12px 18px; list-style: none;
}

/* ---------- Lists ---------- */
.tp-blist {
  position: relative; display: flex; flex-direction: column; flex: none; width: 304px; max-height: 100%;
  border: 1px solid #00000040; border-radius: var(--tp-radius-lg); background: #0e1320; box-shadow: var(--tp-shadow-pop);
  color: var(--tp-text); white-space: normal;
}
.tp-blist.is-new { animation: tp-rise 300ms var(--tp-ease-out) both; }
.tp-blist__head { display: flex; align-items: flex-start; gap: 4px; flex: none; padding: 6px 6px 0; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tp-blist__h { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 20px; }
.tp-blist__title {
  display: block; width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: var(--tp-radius-md);
  background: transparent; color: var(--tp-text-strong); font: 800 14px/20px var(--tp-font); letter-spacing: 0.01em;
  text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
.tp-blist__title-input {
  display: block; width: 100%; min-height: 32px; margin: 0; padding: 6px 8px; overflow: hidden; border: 0; border-radius: var(--tp-radius-md);
  background: var(--tp-surface); box-shadow: inset 0 0 0 2px var(--tp-accent-hover); color: var(--tp-text-strong);
  font: 800 14px/20px var(--tp-font); resize: none; outline: none;
}
.tp-blist__menu { width: 32px; height: 32px; color: var(--tp-text-subtle); }
.tp-blist__scroll { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; margin: 0 4px; padding: 0 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.tp-blist__cards { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 6px 0 4px; list-style: none; }
.tp-blist__cards.is-empty { padding: 2px 0 0; }
.tp-bv.is-dragging-card .tp-blist__cards { min-height: 12px; }
.tp-blist.is-drop-target { border-color: #a6c5e259; }
.tp-blist__foot { flex: none; padding: 4px 8px 8px; }
.tp-blist__add {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 12px 6px 8px; border: 0;
  border-radius: var(--tp-radius-md); background: transparent; color: var(--tp-text-subtle); font-weight: 700; text-align: left;
  transition: background-color var(--tp-dur) var(--tp-ease), color var(--tp-dur) var(--tp-ease);
}
.tp-blist__add .tp-icon { transition: transform 220ms var(--tp-spring); }
.tp-blist__add:hover { background: var(--tp-hover-strong); color: var(--tp-text-strong); }
.tp-blist__add:hover .tp-icon { transform: rotate(90deg); }

/* ---------- Card faces ---------- */
.tp-bcard {
  position: relative; display: block; flex: none; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md);
  background: var(--tp-surface); box-shadow: var(--tp-shadow-raised); color: var(--tp-text);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  transition: transform 180ms var(--tp-spring), box-shadow 180ms var(--tp-ease), border-color var(--tp-dur) var(--tp-ease);
}
.tp-bcard:hover { border-color: #3a4866; transform: translateY(-1px); box-shadow: var(--tp-shadow-pop); }
.tp-bcard.is-open { border-color: var(--tp-accent); }
.tp-bcard:focus-within { z-index: 1; }
.tp-bcard.is-new { animation: tp-bcard-in 320ms var(--tp-spring) both; }
.tp-bcard.is-bumped { animation: tp-bcard-bump 620ms var(--tp-ease-out); }
@keyframes tp-bcard-in { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
@keyframes tp-bcard-bump {
  0%, 100% { transform: none; }
  22% { transform: scale(1.015); border-color: var(--tp-accent-hover); }
  55% { transform: scale(0.995); border-color: var(--tp-accent); }
}
.tp-bcard__link { display: block; overflow: hidden; border-radius: calc(var(--tp-radius-md) - 2px); color: inherit; text-decoration: none; cursor: pointer; }
.tp-bcard__link:hover { color: inherit; text-decoration: none; }
.tp-bcard__link:focus-visible { outline: 2px solid var(--tp-accent-hover); outline-offset: 2px; }
.tp-bcard__cover { position: relative; display: block; }
.tp-bcard__cover--color { height: 32px; background: var(--tp-label); }
.tp-bcard__cover--img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--tp-bg-sunken); }
.tp-bcard__cover--att { width: 100%; }
/* An image far from 16:9 (portrait, square, panorama) is shown whole in the 16:9 frame, never cropped to a strip. */
.tp-bcard__cover--att.is-fit { background: #05070b; }
.tp-bcard__cover--att.is-fit .tp-bcard__img { object-fit: contain; }
.tp-bcard__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tp-bcard__cover--img.is-short .tp-bcard__img { left: 50%; width: auto; aspect-ratio: 9 / 16; transform: translateX(-50%); }
.tp-bcard__cover--img.is-short { background: #05070b; } /* a YouTube Short as it is, on a plain background */
.tp-bcard__ytsrc { display: block; padding: 3px 8px 0; color: var(--tp-text-subtlest); font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 0.02em; }
.tp-bcard__cover.is-broken img { display: none; }
.tp-bcard__cover.is-broken::after {
  content: "Miniature indisponible"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--tp-text-subtlest); font-size: 12px;
}
.tp-bcard__cover--att.is-broken::after { content: "Image indisponible"; }
.tp-bcard__body { display: flex; flex-direction: column; gap: 6px; min-height: 36px; padding: 10px 12px; }
.tp-bcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.tp-bcard__labels { display: flex; flex-wrap: wrap; gap: 4px; cursor: pointer; }
.tp-bcard__meta .tp-bcard__labels .tp-label:not(.is-expanded) { width: 28px; min-width: 0; height: 6px; padding: 0; border-radius: 3px; }
.tp-bcard__labels .tp-label.is-expanded { max-width: 100%; }
.tp-bcard__title { display: block; padding-right: 18px; color: var(--tp-text-strong); font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.tp-bcard__done { display: inline-flex; margin-right: 4px; vertical-align: -3px; color: var(--tp-success); }
.tp-bcard__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: -2px 0 -2px -4px; }
.tp-bcard__members { display: inline-flex; margin-left: auto; padding: 2px 0 2px 4px; }
.tp-bcard__members .tp-members > * { box-shadow: 0 0 0 2px var(--tp-surface); }
.tp-bbadge {
  display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 2px 5px; border-radius: var(--tp-radius-xs);
  color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 600;
}
.tp-bbadge .tp-icon { width: 14px; height: 14px; }
.tp-bbadge.is-complete { background: var(--tp-green); color: var(--tp-accent-text); }
.tp-bbadge--published { background: var(--tp-mint-bg); color: var(--tp-mint-text); }
.tp-bbadge--due { transition: background-color var(--tp-dur) var(--tp-ease); }
.tp-bbadge--due[data-due-toggle] { cursor: pointer; }
.tp-bbadge--due[data-due-toggle]:hover { background: var(--tp-hover-strong); }
.tp-bbadge--due.is-complete, .tp-bbadge--due.is-complete:hover { background: var(--tp-green); color: var(--tp-accent-text); }
.tp-bbadge--due.is-overdue, .tp-bbadge--due.is-overdue:hover { background: var(--tp-red); color: var(--tp-accent-text); }
.tp-bbadge--due.is-soon, .tp-bbadge--due.is-soon:hover { background: var(--tp-yellow); color: var(--tp-accent-text); }
.tp-bbadge__ic, .tp-bbadge__hov { display: inline-flex; }
.tp-bbadge__hov { display: none; }
.tp-bbadge--due[data-due-toggle]:hover .tp-bbadge__ic { display: none; }
.tp-bbadge--due[data-due-toggle]:hover .tp-bbadge__hov { display: inline-flex; }
.tp-bcard__edit {
  position: absolute; top: 4px; right: 4px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--tp-line); border-radius: 50%; background: var(--tp-surface-2); color: var(--tp-text-subtle); opacity: 0;
  transform: scale(0.8); transition: opacity var(--tp-dur) var(--tp-ease), background-color var(--tp-dur) var(--tp-ease), transform 220ms var(--tp-spring);
}
.tp-bcard:hover .tp-bcard__edit, .tp-bcard:focus-within .tp-bcard__edit { opacity: 1; transform: none; }
.tp-bcard__edit:hover { background: var(--tp-surface-3-hover); color: var(--tp-text-strong); }
.tp-bv.is-dragging .tp-bcard__edit { opacity: 0; }
@media (hover: none) { .tp-bcard__edit { display: none; } .tp-bcard:hover { transform: none; } }

/* ---------- Read-only (observer) ---------- */
.tp-bv.is-readonly .tp-blist__foot,
.tp-bv.is-readonly .tp-bv__addlist,
.tp-bv.is-readonly .tp-bcard__edit,
.tp-bv.is-readonly .tp-blist__menu,
.tp-bv.is-readonly .tp-bcomposer { display: none !important; }
.tp-bv.is-readonly .tp-blist__head, .tp-bv.is-readonly .tp-blist__title { cursor: default; }
.tp-bv.is-readonly .tp-blist__cards { padding-bottom: 8px; }

/* ---------- Composers ---------- */
.tp-bcomposer { padding: 6px 0 8px; }
.tp-bcomposer__input {
  display: block; width: 100%; min-height: 56px; max-height: 240px; padding: 8px 10px; overflow-y: auto;
  border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-surface); box-shadow: var(--tp-shadow-raised);
  color: var(--tp-text-strong); font: inherit; line-height: 20px; resize: none;
  transition: border-color var(--tp-dur) var(--tp-ease);
}
.tp-bcomposer:not([hidden]) .tp-bcomposer__input { animation: tp-pop-in 200ms var(--tp-spring); }
.tp-bcomposer__input::placeholder { color: var(--tp-text-subtlest); opacity: 1; }
.tp-bcomposer__input:focus { outline: none; border-color: var(--tp-accent); }
.tp-bcomposer__input[aria-invalid="true"] { border-color: var(--tp-danger); }
.tp-bcomposer__input[readonly] { opacity: 0.7; }
.tp-bcomposer__status { margin-top: 8px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; }
.tp-bcomposer__status .tp-icon, .tp-bcomposer__status .tp-spinner { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -3px; }
.tp-bcomposer__status.is-error { color: var(--tp-danger); }
.tp-bcomposer__status .tp-link { font-size: 12px; }
.tp-bcomposer__row { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.tp-bcomposer__row .tp-icon-btn { color: var(--tp-text-subtle); }

.tp-bv__addlist { flex: none; width: 304px; }
.tp-bv__addlist-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 12px; border: 1.5px dashed #ffffff59; border-radius: var(--tp-radius-lg);
  background: #ffffff33; color: #fff; font-family: var(--tp-font); font-weight: 700; text-align: left;
  transition: background-color var(--tp-dur) var(--tp-ease), border-color var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-bv__addlist-btn .tp-icon { transition: transform 220ms var(--tp-spring); }
.tp-bv__addlist-btn:hover { background: #ffffff4d; border-color: #ffffff99; }
.tp-bv__addlist-btn:hover .tp-icon { transform: rotate(90deg); }
.tp-bv__addlist-btn:active { transform: scale(0.98); }
.tp-bv__addlist-form {
  padding: 8px; border: 1px solid #00000040; border-radius: var(--tp-radius-lg); background: #0e1320; box-shadow: var(--tp-shadow-pop);
  animation: tp-pop-in 200ms var(--tp-spring);
}
.tp-bv__addlist-form .tp-input { min-height: 34px; padding: 5px 12px; }

/* ---------- Drag and drop ---------- */
html.tp-bdragging, html.tp-bdragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.tp-bcard.is-drag-source, .tp-blist.is-drag-source { display: none; }
.tp-bcard-ph { flex: none; list-style: none; border: 1.5px dashed #a6c5e259; border-radius: var(--tp-radius-md); background: #a6c5e21a; }
.tp-blist-ph { flex: none; width: 304px; max-height: 100%; list-style: none; border: 1.5px dashed #ffffff40; border-radius: var(--tp-radius-lg); background: #0000003d; }
.tp-bghost {
  position: fixed; top: 0; left: 0; z-index: 600; margin: 0; list-style: none; pointer-events: none; will-change: transform;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 16px 30px rgba(3, 6, 8, 0.4);
  transform-origin: 50% 40%; transition: none; /* follows the pointer frame by frame (no .tp-bcard transition) */
}
/* Tilt + lift (individual transform properties: the JS only moves the ghost with `transform`). */
.tp-bghost--card { rotate: 4deg; scale: 1.04; animation: tp-bghost-pick 200ms var(--tp-spring); }
.tp-bghost--list { max-height: none; overflow: hidden; rotate: 2deg; scale: 1.02; animation: tp-bghost-pick 200ms var(--tp-spring); }
@keyframes tp-bghost-pick { from { rotate: 0deg; scale: 1; } }
.tp-bghost .tp-bcard__edit { display: none; }
.tp-bghost.is-landing {
  rotate: 0deg; scale: 1; box-shadow: var(--tp-shadow-raised);
  transition: transform 180ms var(--tp-ease), width 180ms var(--tp-ease), height 180ms var(--tp-ease), rotate 180ms var(--tp-ease),
    scale 180ms var(--tp-ease), box-shadow 180ms var(--tp-ease);
}
.tp-bcard.is-landing, .tp-blist.is-landing { visibility: hidden; }

/* ---------- Quick edit (pencil) ---------- */
.tp-modal__dialog.tp-bqe {
  position: absolute; width: auto; max-width: none; max-height: none; margin: 0; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.tp-bqe > .tp-modal__head { display: none; }
.tp-bqe > .tp-modal__body { display: flex; align-items: flex-start; gap: 8px; padding: 0; overflow: visible; }
.tp-bqe.is-flipped > .tp-modal__body { flex-direction: row-reverse; }
.tp-bqe__main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: var(--tp-bqe-w, 256px); }
.tp-bqe__card { width: 100%; overflow: hidden; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-surface); box-shadow: var(--tp-shadow-raised); }
.tp-bqe__card .tp-bcard__cover { pointer-events: none; }
.tp-bqe__body { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 4px; }
.tp-bqe__body .tp-bcard__labels { padding-right: 0; cursor: default; }
.tp-bqe__title {
  display: block; width: 100%; min-height: 60px; padding: 0 0 4px; border: 0; background: transparent; color: var(--tp-text-strong);
  font: inherit; line-height: 20px; overflow-wrap: anywhere; resize: none; outline: none;
}
.tp-bqe__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tp-bqe__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: var(--tp-surface-2); color: var(--tp-text); font-weight: 700; text-align: left; white-space: nowrap;
  box-shadow: var(--tp-shadow-raised); transition: background-color var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
  animation: tp-pop-in 220ms var(--tp-spring) both;
}
.tp-bqe__btn:nth-child(2) { animation-delay: 20ms; }
.tp-bqe__btn:nth-child(3) { animation-delay: 40ms; }
.tp-bqe__btn:nth-child(4) { animation-delay: 60ms; }
.tp-bqe__btn:nth-child(5) { animation-delay: 80ms; }
.tp-bqe__btn:nth-child(6) { animation-delay: 100ms; }
.tp-bqe__btn:nth-child(7) { animation-delay: 120ms; }
.tp-bqe__btn:hover { background: var(--tp-surface-3-hover); color: var(--tp-text-strong); transform: translateX(3px); }
.tp-bqe.is-flipped .tp-bqe__actions { align-items: flex-end; }
.tp-bqe.is-flipped .tp-bqe__btn:hover { transform: translateX(-3px); }
.tp-bqe.is-narrow > .tp-modal__body { flex-direction: column; align-items: stretch; }
.tp-bqe.is-narrow .tp-bqe__main { width: 100%; }
.tp-bqe.is-narrow .tp-bqe__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-bqe.is-narrow .tp-bqe__btn { width: 100%; white-space: normal; }
.tp-bqe.is-narrow .tp-bqe__btn:hover { transform: none; }

/* ---------- Popover contents ---------- */
.tp-bpop__sub { margin: 12px 0 6px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 700; }
.tp-bpop__sub:first-child { margin-top: 0; }
.tp-bpop__hint { margin-bottom: 8px; color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; }
.tp-bpop__actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }

.tp-blabels { display: flex; flex-direction: column; }
.tp-blabels__list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; list-style: none; }
.tp-blabels__row { display: flex; align-items: center; gap: 4px; }
.tp-blabels__pick { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.tp-blabels__pick input { flex: none; width: 18px; height: 18px; margin: 0 4px; }
.tp-blabels__bar { display: flex; flex: 1; min-width: 0; transition: filter var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring); }
.tp-blabels__pick:hover .tp-blabels__bar { filter: brightness(1.1); transform: translateX(2px); }
.tp-blabels__none { padding: 4px 0; color: var(--tp-text-subtle); }
.tp-blabels__toggle { margin-top: 8px; }

.tp-blabedit__preview { display: grid; place-items: center; margin: 0 -12px; padding: 20px 16px; background: var(--tp-bg-sunken); }
.tp-blabedit__preview .tp-label { max-width: 100%; }
.tp-blabedit__colors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tp-blabedit__color, .tp-bcoverpop__color {
  display: grid; place-items: center; height: 32px; padding: 0; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: var(--tp-label); color: var(--tp-accent-text); transition: filter var(--tp-dur) var(--tp-ease), transform 200ms var(--tp-spring);
}
.tp-blabedit__color:hover, .tp-bcoverpop__color:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tp-blabedit__color.is-selected, .tp-bcoverpop__color.is-selected, .tp-bcoverpop__thumb.is-selected {
  box-shadow: 0 0 0 2px var(--tp-surface-2), 0 0 0 4px var(--tp-accent-hover);
}

.tp-bcoverpop__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.tp-bcoverpop__thumb {
  position: relative; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-sm);
  background: var(--tp-surface-3); transition: transform 200ms var(--tp-spring);
}
.tp-bcoverpop__thumb:hover { transform: translateY(-1px); }
.tp-bcoverpop__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tp-bcoverpop__thumb.is-broken img { display: none; }
.tp-bcoverpop__colors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }

.tp-bdates { gap: 12px; }
.tp-bdates__group { display: flex; flex-direction: column; gap: 4px; }
.tp-bdates__row { display: flex; align-items: center; gap: 6px; }
.tp-bdates__row .tp-check { flex: none; min-height: 28px; }
.tp-bdates__row .tp-input { flex: 1; min-width: 0; }
.tp-bdates__row .tp-bdates__time { flex: 0 0 96px; }
.tp-bdates input::-webkit-calendar-picker-indicator { filter: invert(0.75); cursor: pointer; }

.tp-bdest__row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.tp-bdest__keeps { display: flex; flex-direction: column; }
.tp-bdest__title { min-height: 56px; resize: none; }
.tp-bdest .tp-bpop__sub { margin: 4px 0 -4px; }

/* ---------- Board menu (drawer inside the board) ---------- */
.tp-drawer.tp-bmenu { z-index: 20; }
.tp-bmenu__swatch { width: 20px; height: 16px; flex: none; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xs); background: #0079bf; }
.tp-bmenu__bg .tp-bgpick--all { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tp-bmenu__bg .tp-bgpick__opt--lg { height: 72px; border-radius: var(--tp-radius); }
.tp-bmenu__bg .tp-bgpick__opt.is-selected { box-shadow: 0 0 0 2px var(--tp-surface-2), 0 0 0 4px var(--tp-accent-hover); }
.tp-bmenu__note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 9px 10px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-bg-sunken); color: var(--tp-text-subtle); font-size: 12px; line-height: 17px;
}
.tp-bmenu__note .tp-icon { width: 15px; height: 15px; margin-top: 1px; color: var(--tp-sky); }

.tp-barch { display: flex; flex-direction: column; gap: 8px; }
.tp-barch__tabs .tp-seg__opt { flex: 1; }
.tp-barch__tabs .tp-seg__opt span { justify-content: center; width: 100%; }
.tp-barch__list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; list-style: none; }
.tp-barch__card {
  display: block; padding: 8px 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-md); background: var(--tp-surface);
  box-shadow: var(--tp-shadow-raised); color: var(--tp-text); overflow-wrap: anywhere; text-decoration: none;
}
.tp-barch__card:hover { border-color: #3a4866; color: var(--tp-text-strong); text-decoration: none; }
.tp-barch__name { display: block; padding: 8px 12px; border-radius: var(--tp-radius-md); background: #0e1320; color: var(--tp-text); font-weight: 700; overflow-wrap: anywhere; }
.tp-barch__meta { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-barch__meta .tp-icon { width: 12px; height: 12px; flex: none; }
.tp-barch__acts { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-barch__acts .tp-link { font-size: 12px; text-decoration: underline; }
.tp-barch__empty { padding: 16px 0; color: var(--tp-text-subtle); text-align: center; }

/* ---------- « Partager » (modal) ---------- */
.tp-bshare { display: flex; flex-direction: column; gap: 22px; }
.tp-bshare.is-loading { gap: 10px; }
.tp-bshare.is-loading .tp-skeleton--block { height: 64px; }
.tp-bshare__sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-bshare__sec:not(:first-child) { padding-top: 18px; border-top: 1px solid var(--tp-border); }
.tp-bshare__h { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; }
.tp-bshare__h .tp-icon { width: 17px; height: 17px; color: var(--tp-text-subtle); }
.tp-bshare__lead { color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; }
.tp-bshare__note {
  display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-surface-2); color: var(--tp-text-subtle); font-size: 13px; line-height: 18px;
}
.tp-bshare__note .tp-icon { width: 16px; height: 16px; margin-top: 1px; color: var(--tp-sky); }
.tp-bshare__pro {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--tp-sun-edge); border-radius: var(--tp-radius);
  background: var(--tp-sun-bg); animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-bshare__pro-ic {
  display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 1px solid var(--tp-sun-edge); border-radius: 50%;
  background: var(--tp-sun); color: #2a1f02; box-shadow: var(--tp-shadow-raised); animation: tp-wiggle 900ms var(--tp-ease) 300ms 2;
}
.tp-bshare__pro-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; color: var(--tp-text); font-size: 13px; line-height: 18px; }
.tp-bshare__pro-text strong { color: var(--tp-sun-text); font-family: var(--tp-font); font-size: 15px; font-weight: 800; }
.tp-bshare__invite { display: flex; flex-direction: column; gap: 6px; }
.tp-bshare__row { display: flex; align-items: stretch; gap: 8px; }
.tp-bshare__row .tp-input { flex: 1 1 auto; min-width: 0; }
.tp-bshare__row .tp-select { flex: 0 0 156px; width: 156px; }
.tp-bshare__row .tp-button { flex: none; }
.tp-bshare__result {
  display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--tp-mint-edge);
  border-radius: var(--tp-radius); background: var(--tp-mint-bg); animation: tp-pop-in 240ms var(--tp-spring);
}
.tp-bshare__result-lead { display: flex; align-items: flex-start; gap: 8px; color: var(--tp-text-strong); font-size: 13px; line-height: 18px; }
.tp-bshare__result-lead .tp-icon { width: 16px; height: 16px; margin-top: 1px; color: var(--tp-mint); }
.tp-bshare__copy { display: flex; align-items: center; gap: 6px; }
.tp-bshare__copy .tp-input { flex: 1; min-width: 0; font-family: var(--tp-font-mono); font-size: 12px; }
.tp-bshare__members, .tp-bshare__invites, .tp-bshare__plinks { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.tp-bshare__member, .tp-bshare__inv {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: var(--tp-radius-md);
  transition: background-color var(--tp-dur) var(--tp-ease), opacity var(--tp-dur) var(--tp-ease);
}
.tp-bshare__member:hover, .tp-bshare__inv:hover { background: var(--tp-hover); }
.tp-bshare__member.is-busy { opacity: 0.6; }
.tp-bshare__who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tp-bshare__name { overflow: hidden; color: var(--tp-text-strong); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tp-bshare__you { color: var(--tp-text-subtlest); font-weight: 600; }
.tp-bshare__meta { overflow: hidden; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.tp-bshare__ctl { display: flex; align-items: center; gap: 6px; flex: none; }
.tp-bshare__ctl .tp-select { width: 150px; }
.tp-bshare__role { color: var(--tp-text-subtle); font-size: 13px; font-weight: 700; }
.tp-bshare__inv-ic {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--tp-line); border-radius: 50%;
  background: var(--tp-surface-3); color: var(--tp-text-subtle);
}
.tp-bshare__plinks { gap: 10px; }
.tp-bshare__plink {
  display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-bg-sunken);
}
.tp-bshare__plink.is-new { border-color: var(--tp-accent-edge); animation: tp-pop-in 240ms var(--tp-spring); }
.tp-bshare__plink-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tp-bshare__plink-foot .tp-link { flex: none; font-size: 13px; }
.tp-bshare__pubnew { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
@media (max-width: 599px) {
  .tp-bshare__row { flex-wrap: wrap; }
  .tp-bshare__row .tp-input { flex-basis: 100%; }
  .tp-bshare__row .tp-select { flex: 1 1 auto; width: auto; }
  .tp-bshare__member { flex-wrap: wrap; }
  .tp-bshare__ctl { margin-left: 46px; }
  .tp-bshare__ctl .tp-select { width: 140px; }
  .tp-bshare__pro { flex-wrap: wrap; }
  .tp-bshare__pro-text { flex-basis: calc(100% - 52px); }
  .tp-bshare__pro .tp-button { margin-left: 50px; }
}

/* ---------- Public view (#/p/<token>) ---------- */
.tp-pub { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.tp-pub--board { height: 100vh; height: 100dvh; overflow: hidden; }
.tp-pub__bar {
  position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; flex: none; min-height: 56px;
  padding: 8px 16px; border-bottom: 1px solid var(--tp-line); background: var(--tp-bg-sunken);
}
.tp-pub__brand {
  display: inline-flex; align-items: center; gap: 8px; color: var(--tp-text-strong); font-family: var(--tp-font-display);
  font-size: 19px; line-height: 24px; font-weight: 600; text-decoration: none;
}
.tp-pub__brand:hover { color: #fff; text-decoration: none; }
.tp-pub__made { display: flex; align-items: center; gap: 6px; color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; font-weight: 600; }
.tp-pub__dot { color: var(--tp-text-subtlest); }
.tp-pub__spacer { flex: 1; }
.tp-pub__main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tp-pub--board .tp-pub__main > .tp-bv { flex: 1; height: auto; min-height: 0; }
.tp-bv--public .tp-bcard__link {
  display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
}
.tp-bv--public .tp-bcard__labels { cursor: inherit; padding-right: 0; }
.tp-pub__lhead { align-items: center; padding: 6px 10px 2px 6px; cursor: default; }
.tp-pub__ltitle { cursor: default; }
.tp-pub__lcount {
  display: inline-grid; place-items: center; flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--tp-surface-3); color: var(--tp-text-subtle); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.tp-pub__lempty { padding: 4px 6px 8px; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; list-style: none; }
.tp-pub__title { cursor: default; }
.tp-pub__title:hover { background: transparent; }
.tp-pub__total { flex: none; padding: 0 8px; color: #ffffffd9; font-size: 13px; font-weight: 700; }
.tp-pub__empty { display: grid; place-items: center; min-height: 100%; padding: 24px; }
.tp-pub__empty .tp-empty { padding: 24px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius-xl); background: var(--tp-surface); box-shadow: var(--tp-shadow-pop); }
.tp-pub__skel-title { width: 220px; height: 22px; }
.tp-pub__skel-h { width: 60%; height: 16px; margin: 8px; }
.tp-pub__skel-card { border-color: transparent; background: transparent; box-shadow: none; }
.tp-pub__skel-card:hover { transform: none; box-shadow: none; border-color: transparent; }
.tp-pub__skel-card .tp-skeleton { height: 64px; border-radius: var(--tp-radius-md); }
.tp-pub__page { padding-top: 24px; }
.tp-pub__crumb { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--tp-text-subtle); font-size: 13px; font-weight: 700; }
.tp-pub__sheet { padding: 20px; }
.tp-pub__cta {
  display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px; border: 1px solid var(--tp-sun-edge);
  border-radius: var(--tp-radius-lg); background: var(--tp-sun-bg); box-shadow: var(--tp-shadow-pop);
}
.tp-pub__cta > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; color: var(--tp-text); }
.tp-pub__cta strong { color: var(--tp-sun-text); font-family: var(--tp-font); font-size: 16px; font-weight: 800; }
@media (max-width: 599px) {
  .tp-pub__bar { padding: 8px 12px; }
  .tp-pub__made { order: 3; flex-basis: 100%; font-size: 12px; }
  .tp-pub__login { display: none; }
  .tp-pub__total { display: none; }
  .tp-pub__sheet { padding: 14px; }
  .tp-pub__cta { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Read-only card sheet (public modal and card page) */
.tp-pubcard { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tp-pubcard__cover { overflow: hidden; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.tp-pubcard__cover .tp-bcard__cover--color { height: 56px; }
.tp-pubcard__cover .tp-bcard__cover--img { width: 100%; max-height: 320px; }
.tp-pubcard__title { font-size: 24px; line-height: 30px; overflow-wrap: anywhere; }
.tp-pubcard__where { display: flex; align-items: center; gap: 6px; margin-top: -8px; color: var(--tp-text-subtle); font-size: 13px; line-height: 18px; }
.tp-pubcard__where .tp-icon { flex: none; }
.tp-pubcard__metas { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.tp-pubcard__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.tp-pubcard__label { color: var(--tp-text-subtle); font-size: 12px; line-height: 16px; font-weight: 700; }
.tp-pubcard__labels, .tp-pubcard__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tp-pubcard__labels .tp-label.is-expanded { height: 28px; min-width: 48px; padding: 0 12px; border-radius: var(--tp-radius-xs); font-size: 13px; line-height: 28px; }
.tp-pubcard__sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tp-pubcard__h { display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 22px; }
.tp-pubcard__h .tp-icon { width: 17px; height: 17px; color: var(--tp-text-subtle); }
.tp-pubcard__hrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tp-pubcard__hrow .tp-pubcard__h { margin-right: auto; }
.tp-pubcard__desc {
  padding: 10px 12px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: var(--tp-bg-sunken);
  color: var(--tp-text); white-space: pre-wrap; overflow-wrap: anywhere;
}
/* Rendered Markdown (paragraphs, lists): the line breaks are already in the HTML. */
.tp-pubcard__desc.tp-cdmd { white-space: normal; }
.tp-pubcard__muted { color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; }
.tp-pubcard__refs { display: flex; flex-direction: column; gap: 8px; }
.tp-pubcard__atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tp-pubscript {
  max-height: 440px; overflow: auto; padding: 14px 16px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-field-bg); color: var(--tp-text-strong); font-size: 15px; line-height: 24px; overflow-wrap: anywhere;
}
.tp-pubscript p { margin: 0 0 10px; }
.tp-pubscript p:last-child { margin-bottom: 0; }
.tp-pubscript__h { margin: 16px 0 6px; color: var(--tp-sun-text); font-family: var(--tp-font); font-size: 15px; line-height: 22px; font-weight: 800; }
.tp-pubscript__h:first-child { margin-top: 0; }
.tp-pubscript .tp-pubscript__dir { color: var(--tp-text-subtlest); font-style: italic; }
.tp-pubatt {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 1px solid var(--tp-line); border-radius: var(--tp-radius);
  background: var(--tp-surface-2); box-shadow: var(--tp-shadow-raised); color: var(--tp-text); text-align: left; text-decoration: none;
  transition: background-color var(--tp-dur) var(--tp-ease), transform 180ms var(--tp-spring);
}
.tp-pubatt:hover { background: var(--tp-surface-3); color: var(--tp-text-strong); text-decoration: none; transform: translateY(-1px); }
.tp-pubatt__thumb { position: relative; flex: none; width: 64px; height: 44px; overflow: hidden; border-radius: var(--tp-radius-xs); background: var(--tp-bg-sunken); }
.tp-pubatt__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tp-pubatt__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tp-pubatt__name { overflow: hidden; color: var(--tp-text-strong); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tp-pubatt__meta { overflow: hidden; color: var(--tp-text-subtlest); font-size: 12px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.tp-pubatt__ext { color: var(--tp-text-subtlest); }
.tp-pubcl { display: flex; flex-direction: column; gap: 8px; }
.tp-pubcl + .tp-pubcl { margin-top: 12px; }
.tp-pubcl__title { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; }
.tp-pubcl__title .tp-icon { color: var(--tp-text-subtle); }
.tp-pubcl__bar { display: flex; align-items: center; gap: 10px; }
.tp-pubcl__pct { flex: none; width: 40px; color: var(--tp-text-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.tp-pubcl__track { flex: 1; height: 8px; overflow: hidden; border-radius: 4px; background: var(--tp-surface-3); }
.tp-pubcl__fill { display: block; height: 100%; border-radius: 4px; background: var(--tp-accent); transition: width 400ms var(--tp-ease-out); }
.tp-pubcl__fill.is-done { background: var(--tp-success); }
.tp-pubcl__items { display: flex; flex-direction: column; gap: 2px; list-style: none; }
.tp-pubcl__item { display: flex; align-items: flex-start; gap: 8px; padding: 4px 6px; border-radius: var(--tp-radius-sm); }
.tp-pubcl__item .tp-icon { margin-top: 2px; color: var(--tp-text-subtlest); }
.tp-pubcl__item.is-done .tp-icon { color: var(--tp-success); }
.tp-pubcl__item.is-done > span:first-of-type { color: var(--tp-text-subtle); text-decoration: line-through; }

/* ---------- Small screens ---------- */
@media (max-width: 599px) {
  .tp-bv__head { flex-wrap: wrap; padding: 8px 6px 8px 8px; }
  .tp-bv__title, .tp-bv__title-input, .tp-bv__title-measure { font-size: 16px; }
  .tp-bv__filters .tp-filterbar__btn > span:not(.tp-filterbar__count), .tp-bv__clear > span, .tp-bv__share > span, .tp-bv__ro > span { display: none; }
  .tp-bv__share { padding: 0 8px; }
  .tp-bv__ro { padding: 0 6px; }
  .tp-bv__members .tp-members > :nth-child(n+3):not(.tp-members__more) { display: none; }
  .tp-bv__canvas { scroll-snap-type: x mandatory; scroll-padding: 0 12px; }
  .tp-bv.is-dragging .tp-bv__canvas { scroll-snap-type: none; }
  .tp-blist, .tp-bv__addlist, .tp-blist-ph { width: min(304px, calc(100vw - 48px)); scroll-snap-align: start; }
}
