/* 📝 กระดาน (Board) — plan/board/plan.md, MUST-DO §5 N53. Uses the portal tokens (light + dark). */
.bd { max-width: 860px; margin: 0 auto 40px; }
.bd__head h1 { margin: 4px 0 6px; font-size: clamp(24px, 4.5vw, 32px); line-height: 1.35; overflow-wrap: anywhere; }
.bd__meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.bd__meta a { color: var(--red); text-decoration: none; }
.bd__label { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.bd__label a { color: var(--muted); }
.bd__body { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--surface, var(--bg)); font-family: var(--lt-font); font-size: var(--lt-size); line-height: var(--lt-lh);
  white-space: pre-wrap; overflow-wrap: anywhere; min-height: 120px; }
.bd__body .lt-ln, .bd__body .lt-multi { font-family: 'Tilok', sans-serif; color: var(--lt-ln-color); font-size: calc(var(--lt-ln-scale) * 1em); line-height: 1; padding: 0 1px; }   /* one colour on the published board (MUST-DO §5 N54) */
.bd__body .lt-u { border-bottom: 1px dashed var(--muted); }
.bd__tools, .bd__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.bd__btn { font: inherit; font-size: 14.5px; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 999px; padding: 7px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
.bd__btn:hover { border-color: var(--red); }
.bd__btn--main { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.bd__btn--quiet { margin-left: auto; color: var(--muted); }
.bd__btn:disabled { opacity: .6; cursor: default; }
.bd__msg { font-size: 13.5px; color: var(--muted); }
.bd__msg.bad { color: var(--red); }
.bd__panel { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; background: var(--bg); }
.bd__panel h2 { font-size: 17px; margin: 0 0 10px; }
.bd__panel form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 0 0 14px; }
.bd__panel form:last-child { margin-bottom: 0; }
.bd__panel select, .bd__panel textarea { font: inherit; width: 100%; max-width: 480px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); color: var(--text); }
.bd__lbl { font-weight: 600; font-size: 14.5px; }
.bd__lbl small, .bd__modes small { font-weight: 400; color: var(--muted); }
.bd input[type="password"], .bd__url input { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); color: var(--text); }
.bd input[type="password"] { width: 11em; letter-spacing: .2em; }
.bd__url { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; color: var(--muted); max-width: 100%; }
.bd__url input { min-width: 0; flex: 1 1 200px; }
.bd__modes { border: 0; padding: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 6px; }
.bd__modes label { display: block; font-size: 15px; cursor: pointer; }
.bd__note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.bd__note a { color: var(--muted); }
.bd__title { font: inherit; font-size: 18px; font-weight: 600; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; background: var(--bg); color: var(--text); }
.bd__create { display: flex; flex-direction: column; gap: 8px; }
.bd__create .lt { margin-bottom: 6px; }
.bd__pin { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bd__pin label { font-weight: 600; }
.bd__new { border: 1px solid var(--red); background: var(--red-soft, rgba(177, 31, 36, .08)); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-size: 14.5px; }
.bd__new small { color: var(--muted); }
.bd__foot { font-size: 14px; color: var(--muted); }
.bd__foot a { color: var(--red); }
.bd__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
  .bd__body { padding: 14px; font-size: calc(var(--lt-size) - 1px); }
  .bd__btn--quiet { margin-left: 0; }
}

/* N68 · actions on the title row (top-right), ⋯ menu, edit state, pinned bar, pinned editor toolbar */
.bd__titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.bd__titlerow h1 { flex: 1 1 320px; min-width: 0; }
.bd__acts { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.bd__acts .bd__tools, .bd__pinbar .bd__tools { margin: 0; flex-wrap: nowrap; }
.bd__editacts { display: none; align-items: center; gap: 8px; }
#bd.is-editing .bd__acts .bd__tools, #bd.is-editing .bd__pinbar .bd__tools { display: none; }
#bd.is-editing .bd__editacts { display: flex; }
.bd__editacts .bd__msg:empty { display: none; }
.bd__btn--icon { padding: 7px 12px; font-weight: 700; letter-spacing: 1px; }
.bd__more { position: relative; }
.bd__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 70; min-width: 190px; display: flex; flex-direction: column; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .14); }
.bd__menu[hidden] { display: none; }
.bd__menu button { font: inherit; font-size: 14.5px; text-align: left; border: 0; background: none; color: var(--text); padding: 9px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.bd__menu button:hover, .bd__menu button:focus-visible { background: var(--surface, rgba(0, 0, 0, .05)); outline: none; }
.bd__pinbar { position: fixed; left: 0; right: 0; top: 0; z-index: 85; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
  transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform .18s ease, opacity .18s ease, visibility 0s .18s; }
.bd__pinbar.on { transform: none; opacity: 1; visibility: visible; transition: transform .18s ease, opacity .18s ease; }
.bd__pinin { max-width: 860px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; }
.bd__pintitle { flex: 1; min-width: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd__pinbar .bd__btn { padding: 5px 12px; font-size: 14px; }
#bd.is-editing .lt-bar { position: sticky; top: var(--bd-top, 0px); z-index: 60; }   /* the editor toolbar stays on screen on long boards */
@media (max-width: 600px) {
  .bd__titlerow { flex-direction: column; gap: 4px; }
  .bd__titlerow h1 { flex: none; }
  .bd__acts { align-self: flex-end; margin-top: 0; }
  .bd__tools .bd__btn:not(.bd__btn--main) .bd__l, .bd__pinbar .bd__l { display: none; }      /* phones: icons, keep the main label */
  .bd__pinin { padding: 6px 12px; gap: 8px; }
  .bd__editacts .bd__msg { display: none; }
}

/* N69 · PIN: a compact pop-up under the 🔑 button, and a compact card on the 🔒 private page */
.bd__pop { position: absolute; z-index: 95; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); padding: 12px 14px 10px; box-sizing: border-box; }
.bd__pop[hidden] { display: none; }
.bd__pophd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.bd__x { font: inherit; font-size: 14px; border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.bd__x:hover { background: var(--surface, rgba(0, 0, 0, .06)); color: var(--text); }
.bd__pinrow { display: flex; gap: 8px; align-items: stretch; margin: 0; }
.bd input.bd__pinin { flex: 1; min-width: 0; width: auto; font-size: 20px; letter-spacing: .45em; text-align: center; padding: 8px 10px; border-radius: 10px; }
.bd input.bd__pinin::placeholder { letter-spacing: .3em; color: var(--muted); opacity: .7; }
.bd input.bd__pinin:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft, rgba(177, 31, 36, .12)); }
.bd input.bd__pinin:disabled { opacity: .55; }
.bd__pinrow .bd__btn { padding: 8px 16px; }
.bd__pinmsg { display: block; margin: 8px 2px 0; font-size: 12.5px; }
.bd input.bd__pinin.shake { animation: bdshake .35s; border-color: var(--red); }
@keyframes bdshake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.bd__lockcard { max-width: 380px; margin: 56px auto 40px; padding: 22px 22px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, var(--bg)); text-align: center; }
.bd__lockcard h1 { font-size: 22px; margin: 0 0 6px; }
.bd__lockcard p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.bd__lockcard .bd__pinmsg { margin: 10px 0 0; }
@media (max-width: 600px) { .bd__lockcard { margin-top: 28px; } }
.bd__head { padding-top: 22px; }   /* breathing room under the section bar (2026-10-16) */
