:root {
    /*
    | 色はすべてここに集約する。明暗の切り替えは、この値だけを差し替えて行う。
    | 個々の宣言に直値を書かないこと。片方のテーマでしか読めない色が生まれる。
    */

    /* 下地と文字。値はすべて意匠から測ったもの */
    --bl-bg: #fbfbfa;
    --bl-surface: #ffffff;
    --bl-subtle: #f6f5f3;
    --bl-border: #ecEAe6;
    --bl-border-strong: #d5d2ca;
    /* 一覧の罫線。見出しの下だけ少し濃くして、段の始まりを示す */
    --bl-rule: #f1f0ec;
    --bl-rule-soft: #f5f4f1;
    /* 入力欄の縁。面を区切る罫線より少しだけ濃い */
    --bl-input-border: #e7e5e0;
    /* 動きの一覧の日付帯。地よりわずかに濃くして段の頭を示す */
    --bl-feed-date-bg: #f8f8f6;
    --bl-text: #1a1a18;
    /*
    | 添え字の灰。意匠は #8d8b84 だが、白の上で 3.4:1 しか出ず読めない。
    | 色味（色相と彩度）はそのままに、4.5:1 を満たす明るさまで落とした
    | 値を使う。ここだけは意匠より濃い。
    */
    --bl-text-muted: #717069;
    --bl-text-quiet: #5f5d57;
    --bl-text-disabled: #737066;
    --bl-link: #0f766e;

    /* ブランド */
    --bl-green: #0f766e;
    --bl-green-dark: #0b574f;
    --bl-focus-ring: rgba(15, 118, 110, .18);

    /* 濃い面（ヘッダー）の上に載るもの。明暗どちらでも濃い面なので変えない */
    --bl-header: #26241f;
    --bl-header-raised: #3a3831;
    --bl-header-hover: #45423a;
    --bl-header-text: #c9c4b8;
    --bl-header-icon: #b6b1a6;
    --bl-header-strong: #e5e1d7;
    --bl-header-placeholder: #8f8b81;
    --bl-header-rule: #45423a;
    --bl-header-space: #d8d4c9;
    --bl-header-input-bg: #3a3831;
    --bl-header-btn-border: #5f5d57;
    --bl-on-accent: #fff;

    /* 選んでいる項目。柱でも札でも同じ淡い緑を使う */
    --bl-selected-bg: #e9f3f1;
    --bl-selected-text: #0b574f;

    /* 優先度の丸。6px なので、面との差が 3:1 を切ると見えなくなる */
    --bl-pri-high: #a8501f;
    --bl-pri-mid: #5f5d57;
    --bl-pri-low: #949187;

    /* 自分に関わる行の縁と面 */
    --bl-mention-edge: #d98ba6;
    --bl-mention-row: #fdfbfc;

    /* 動きの種類の札 */
    --bl-act-add-bg: #eeeef8;
    --bl-act-add-fg: #4f4d8a;
    --bl-act-edit-bg: #e9f3f1;
    --bl-act-edit-fg: #0b574f;
    --bl-act-done-bg: #fbeeea;
    --bl-act-done-fg: #a8501f;

    /* 面の使い分け */
    --bl-muted-bg: #f1f0ec;
    --bl-row-hover: #f4f4f1;
    --bl-btn-hover: #f1f0ec;
    --bl-th-bg: #f4f4f1;
    --bl-code-bg: #fbfbfa;
    --bl-inline-code-bg: #f1f0ec;
    --bl-quote-text: #6b6963;
    --bl-avatar-empty-bg: #e7e5e0;
    --bl-avatar-empty-text: #5f5d57;
    --bl-board-head: #f1f0ec;
    --bl-board-over: #e9f3f1;
    --bl-weekend: rgba(0, 0, 0, .035);

    /* 状態 */
    --bl-danger: #b3453c;
    /* 断りの面（赤）に載る字。暗いテーマではその赤が明るくなるので反転する */
    --bl-on-danger: #ffffff;
    --bl-success-bg: #e9f3f1;
    --bl-success-border: #a9cfc9;
    --bl-error-bg: #fbeeea;
    --bl-error-border: #efc9be;
    --bl-error-text: #8f362d;
    --bl-notice-bg: #fbf3d8;
    --bl-notice-border: #ecd9b8;
    /*
    | 星の色。#b07514 だと白い面で 3.89:1 しか出ず、「★ 1」の字が読めない。
    | 金色に見える範囲で、4.5:1 を超えるところまで落としている。
    */
    --bl-star: #976510;
    /* 断りの帯の中で使う。淡い橙の面に載るので、印より濃くする */
    --bl-warn-ink: #8a5e19;
    /* 「良い」水準の数字。面の明るさで見え方が変わるので別に持つ */
    /*
    | 文字に使う緑。--bl-green は面や罫線のための色で、暗いテーマでは
    | そのまま沈む。「選んでいる」を緑の字で示すときは必ずこちらを使う。
    */
    --bl-good-text: #0f766e;
    --bl-mention-bg: #e9f3f1;
    --bl-mention-text: #0b574f;

    /*
    | 部品の高さ。padding だけで背を作らないこと。
    | input は line-height が normal、a は body の 1.7 を継承するので、
    | 同じ padding を書いても 2〜4px ずれて横並びが崩れる。
    */
    /* 意匠の骨。ヘッダー 52 / 柱 244 / パンくずの帯 62 */
    /* 部品の角丸。意匠は入力欄 9 / ボタン 8 / カード 16 */
    --bl-radius-control: 9px;

    --bl-top-h: 52px;
    --bl-side-w: 244px;
    --bl-bar-h: 62px;
    --bl-gutter: 32px;

    --bl-control-h: 36px;
    --bl-control-h-sm: 28px;
    --bl-control-h-lg: 42px;
    --bl-control-h-header: 30px;
    --bl-control-px: 10px;

    /*
    | 汎用の角丸。意匠の部品はどれも丸く、いちばん小さいところで 8px。
    | 大きい面はカード 16 / 柱の項目 10 / 入力欄 9 と個別に持つ。
    */
    --bl-radius: 8px;
    --bl-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    --bl-shadow-up: 0 -2px 8px rgba(0, 0, 0, .08);
}

/*
| 暗いテーマ。
|
| 見る人の状態は 3 つある。明示的に選ぶと <html data-theme="..."> が付き、
| 既定の「OS に合わせる」では何も付かない。何も付いていない状態を
| prefers-color-scheme で拾い、明示的な指定はそれより強くする。
*/
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bl-bg: #1b1a17;
        --bl-surface: #242320;
        --bl-subtle: #2a2925;
        --bl-border: #35332e;
        --bl-border-strong: #46443d;
        --bl-rule: #302e29;
        --bl-rule-soft: #2a2925;
        --bl-input-border: #46443d;
        --bl-feed-date-bg: #2a2925;
        --bl-text: #edebe6;
        --bl-text-muted: #a8a59d;
        --bl-text-quiet: #c3c0b8;
        --bl-text-disabled: #929089;
        --bl-link: #5ec8bc;

        --bl-header: #1a1915;
        --bl-header-raised: #2a2925;
        --bl-header-hover: #35332e;
        --bl-header-rule: #35332e;
        --bl-header-input-bg: #121110;

        --bl-selected-bg: #1d3b37;
        --bl-selected-text: #7fd3c6;

        --bl-pri-high: #d99a6c;
        --bl-pri-mid: #a8a59d;
        --bl-pri-low: #79766f;
        --bl-mention-edge: #c97e99;
        --bl-mention-row: #221f21;

        --bl-act-add-bg: #2a2a3a;
        --bl-act-add-fg: #b6b4e0;
        --bl-act-edit-bg: #1d3b37;
        --bl-act-edit-fg: #7fd3c6;
        --bl-act-done-bg: #33251f;
        --bl-act-done-fg: #e0a17a;

        --bl-muted-bg: #302e29;
        --bl-row-hover: #2c2a26;
        --bl-btn-hover: #302e29;
        --bl-th-bg: #2a2925;
        --bl-code-bg: #1f1e1a;
        --bl-inline-code-bg: #302e29;
        --bl-quote-text: #b4b1a9;
        --bl-avatar-empty-bg: #3a3831;
        --bl-avatar-empty-text: #a8a59d;
        --bl-board-head: #2a2925;
        --bl-board-over: #33403d;
        --bl-weekend: rgba(255, 255, 255, .04);

        --bl-danger: #e89a92;
        --bl-on-danger: #2e1d19;
        --bl-success-bg: #16302c;
        --bl-success-border: #2f5c55;
        --bl-error-bg: #2e1d19;
        --bl-error-border: #6b3a31;
        --bl-error-text: #f0afa3;
        --bl-notice-bg: #2c2617;
        --bl-notice-border: #6b5a2c;
        --bl-star: #d9a550;
        --bl-warn-ink: #e2b566;
        --bl-good-text: #2fa39a;
        --bl-mention-bg: #16302c;
        --bl-mention-text: #7fd3c6;

        --bl-shadow: 0 1px 2px rgba(0, 0, 0, .5);
        --bl-shadow-up: 0 -2px 8px rgba(0, 0, 0, .55);
    }
}

:root[data-theme="dark"] {
    --bl-bg: #1b1a17;
    --bl-surface: #242320;
    --bl-subtle: #2a2925;
    --bl-border: #35332e;
    --bl-border-strong: #46443d;
    --bl-rule: #302e29;
    --bl-rule-soft: #2a2925;
    --bl-input-border: #46443d;
    --bl-feed-date-bg: #2a2925;
    --bl-text: #edebe6;
    --bl-text-muted: #a8a59d;
    --bl-text-quiet: #c3c0b8;
    --bl-text-disabled: #929089;
    --bl-link: #5ec8bc;

    --bl-header: #1a1915;
    --bl-header-raised: #2a2925;
    --bl-header-hover: #35332e;
    --bl-header-rule: #35332e;
    --bl-header-input-bg: #121110;

    --bl-selected-bg: #1d3b37;
    --bl-selected-text: #7fd3c6;

    --bl-pri-high: #d99a6c;
    --bl-pri-mid: #a8a59d;
    --bl-pri-low: #79766f;
    --bl-mention-edge: #c97e99;
    --bl-mention-row: #221f21;

    --bl-act-add-bg: #2a2a3a;
    --bl-act-add-fg: #b6b4e0;
    --bl-act-edit-bg: #1d3b37;
    --bl-act-edit-fg: #7fd3c6;
    --bl-act-done-bg: #33251f;
    --bl-act-done-fg: #e0a17a;

    --bl-muted-bg: #302e29;
    --bl-row-hover: #2c2a26;
    --bl-btn-hover: #302e29;
    --bl-th-bg: #2a2925;
    --bl-code-bg: #1f1e1a;
    --bl-inline-code-bg: #302e29;
    --bl-quote-text: #b4b1a9;
    --bl-avatar-empty-bg: #3a3831;
    --bl-avatar-empty-text: #a8a59d;
    --bl-board-head: #2a2925;
    --bl-board-over: #33403d;
    --bl-weekend: rgba(255, 255, 255, .04);

    --bl-danger: #e89a92;
    --bl-on-danger: #2e1d19;
    --bl-success-bg: #16302c;
    --bl-success-border: #2f5c55;
    --bl-error-bg: #2e1d19;
    --bl-error-border: #6b3a31;
    --bl-error-text: #f0afa3;
    --bl-notice-bg: #2c2617;
    --bl-notice-border: #6b5a2c;

    --bl-star: #d9a550;
    --bl-warn-ink: #e2b566;
    --bl-good-text: #2fa39a;
    --bl-mention-bg: #16302c;
    --bl-mention-text: #7fd3c6;

    --bl-shadow: 0 1px 2px rgba(0, 0, 0, .5);
    --bl-shadow-up: 0 -2px 8px rgba(0, 0, 0, .55);
}


* { box-sizing: border-box; }

body {
    margin: 0;
    /*
    | 意匠と同じ Noto Sans JP。実体は public/fonts/noto-sans-jp に置いて
    | 自前で配る（public/css/fonts.css）。読めなかったときのために、
    | これまでの並びをそのまま後ろに残す。
    */
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo,
                 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: var(--bl-text);
    background: var(--bl-bg);
}

a { color: var(--bl-link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- ヘッダー */

.bl-header {
    background: var(--bl-header);
    color: var(--bl-on-accent);
    position: sticky;
    top: 0;
    z-index: 20;
}

.bl-header__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px;
    /* 子に min-width:auto が残ると、詰まったとき右端が数 px はみ出す */
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 48px;
}

.bl-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bl-on-accent);
    font-weight: 700;
    font-size: 15px;
    margin-right: 16px;
    white-space: nowrap;
}
.bl-header__brand:hover { text-decoration: none; }

.bl-header__logo {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--bl-green);
    display: grid;
    place-items: center;
    font-size: 13px;
    color: var(--bl-on-accent);
}

.bl-header__space { font-size: 11px; color: var(--bl-header-space); font-weight: 400; }

.bl-nav { display: flex; gap: 2px; }

.bl-nav a {
    color: var(--bl-header-text);
    padding: 6px 12px;
    border-radius: var(--bl-radius);
    white-space: nowrap;
}
.bl-nav a:hover { background: var(--bl-header-hover); color: var(--bl-on-accent); text-decoration: none; }
.bl-nav a.is-active { background: var(--bl-header-hover); color: var(--bl-on-accent); font-weight: 700; }

.bl-header__search { margin-left: auto; display: flex; }

.bl-header__search input {
    width: 220px;
    height: var(--bl-control-h-header);
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--bl-radius) 0 0 var(--bl-radius);
    background: var(--bl-header-input-bg);
    color: var(--bl-on-accent);
    font-size: 12px;
}
.bl-header__search input::placeholder { color: var(--bl-text-muted); }
.bl-header__search input:focus { outline: none; border-color: var(--bl-green); }

.bl-header__search button {
    border: none;
    height: var(--bl-control-h-header);
    background: var(--bl-green);
    color: var(--bl-on-accent);
    padding: 0 12px;
    border-radius: 0 var(--bl-radius) var(--bl-radius) 0;
    cursor: pointer;
    font-size: 12px;
}
.bl-header__search button:hover { background: var(--bl-green-dark); }

/* ------------------------------------------------------------ レイアウト */

.bl-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px;
}

.bl-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

/* 意匠の画面見出し。17px の中太で、上に少し間を置く */
.bl-page-title { font-size: 17px; font-weight: 600; margin: 0; }

.bl-page-head__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bl-page-subtitle { color: var(--bl-text-muted); font-size: 12px; margin: 2px 0 0; }

.bl-breadcrumb {
    font-size: 12px;
    color: var(--bl-text-muted);
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.bl-breadcrumb span::after { content: "/"; margin-left: 6px; color: var(--bl-border-strong); }
.bl-breadcrumb span:last-child::after { content: ""; }

/* プロジェクト内のサブナビ */
.bl-subnav {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--bl-border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.bl-subnav a {
    padding: 8px 14px;
    color: var(--bl-text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.bl-subnav a:hover { color: var(--bl-text); text-decoration: none; }
.bl-subnav a.is-active { color: var(--bl-text); border-bottom-color: var(--bl-green); font-weight: 700; }

/*
| 意匠のカードは角丸 16px、罫線だけで影を持たない。下地が暖色なので、
| 影を落とすと濁って見える。
*/
.bl-card {
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    margin-bottom: 16px;
}

.bl-card__head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--bl-border);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.bl-card__body { padding: 18px; }
.bl-card__body--flush { padding: 0; }

.bl-grid { display: grid; gap: 16px; }
.bl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bl-grid--sidebar { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }

@media (max-width: 1000px) {
    .bl-grid--2, .bl-grid--3, .bl-grid--sidebar { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 部品 */

/*
| 状態・種別のピル。塗りつぶしではなく、淡い面に濃い文字を載せる
| （色は Backlog 由来で明るさがまちまちなので、塗ると読めない）。
| 実際の色は BadgeColor が元の色から作り、style で当てる。
*/
.bl-badge {
    display: inline-block;
    padding: 1px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--bl-text);
    background: var(--bl-muted-bg);
    white-space: nowrap;
}

.bl-badge--type { border-radius: 5px; }

/*
| 課題詳細の状態。結論なので、ほかの札より一回り大きくする。
| 同じ 11px で並べると、種別と状態のどちらが今の話なのか読み取れない。
*/
.bl-badge--pill { padding: 4px 14px; font-size: 12px; }

/* 面が一段濃いので、字はもう一段濃い方（本文寄り）を使う */
.bl-badge--muted { background: var(--bl-muted-bg); color: var(--bl-text-quiet); }

.bl-avatar {
    --avatar-size: 24px;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: var(--bl-on-accent);
    font-size: calc(var(--avatar-size) * .45);
    font-weight: 700;
    flex: none;
    vertical-align: middle;
}
.bl-avatar--empty { background: var(--bl-avatar-empty-bg); color: var(--bl-avatar-empty-text); }
/* 上げたアイコン。縦横比が違う画像でも円からはみ出さないように切り取る */
.bl-avatar--image { object-fit: cover; background: var(--bl-avatar-empty-bg); }

.bl-user { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.bl-user__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bl-muted { color: var(--bl-text-muted); }
.bl-small { font-size: 11px; }
.bl-nowrap { white-space: nowrap; }
.bl-overdue { color: var(--bl-danger); font-weight: 700; }

/* 必ず入れてもらう欄の印 */
.bl-required { color: var(--bl-danger); }

/*
| 必ず要る見出しの札。ほかの札より 1 段強くする。
| 面と文字は「いちばん強い操作」と同じ組み合わせにする。
*/
.bl-badge--required {
    background: var(--bl-green);
    color: var(--bl-on-accent);
    border-color: transparent;
}

/* 単価の履歴。札と「削除」を 1 組にして横へ並べる */
.bl-cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
}

.bl-empty {
    padding: 40px 16px;
    text-align: center;
    color: var(--bl-text-muted);
}

/* --------------------------------------------------------------- テーブル */

.bl-table-scroll { overflow-x: auto; }

table.bl-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

/*
| 意匠の一覧：見出しは 13px 22px、行は 15px 22px。罫線は行の方が薄い。
| 面で区切らず、余白と罫線の濃淡だけで段を作っている。
*/
table.bl-list th,
table.bl-list td {
    padding: 15px 22px;
    border-bottom: 1px solid var(--bl-rule-soft);
    text-align: left;
    vertical-align: middle;
}

table.bl-list th { padding: 13px 22px; }

/*
 * ヘッダーを position: sticky にしてはいけない。
 * 親の .bl-table-scroll は overflow-x: auto で「スクロールコンテナ」になり
 * （overflow-x を指定すると overflow-y も auto 扱いになる）、sticky の基準が
 * ビューポートではなくこのコンテナになる。コンテナ内での自然位置は 0 なので
 * top: 48px の分だけ下へ押し出され、1 行目に覆いかぶさって見えなくなる。
 */
table.bl-list thead th {
    background: none;
    border-bottom-color: var(--bl-rule);
    color: var(--bl-text-muted);
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

table.bl-list thead th a { color: var(--bl-text-muted); }
table.bl-list thead th a.is-sorted { color: var(--bl-text); }

table.bl-list tbody tr:hover { background: var(--bl-row-hover); }

.bl-list__key { white-space: nowrap; }
.bl-list__key a { color: var(--bl-link); font-size: 12px; }
.bl-list__summary { min-width: 260px; }
.bl-list__summary a { color: var(--bl-text); font-weight: 500; }
.bl-list__summary a:hover { color: var(--bl-link); }

.bl-child-mark { color: var(--bl-text-muted); margin-right: 4px; }

/* 定義リスト（課題の属性） */
.bl-props { margin: 0; font-size: 12px; }
.bl-props dt {
    color: var(--bl-text-muted);
    font-size: 11px;
    padding: 8px 0 0;
}
.bl-props dd {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bl-border);
    word-break: break-word;
}
.bl-props dd:last-child { border-bottom: none; }

/* --------------------------------------------------------- 絞り込みフォーム */

.bl-filter { margin-bottom: 16px; }

.bl-filter__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.bl-field label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 11px;
    color: var(--bl-text-muted);
    margin-bottom: 3px;
    font-weight: 700;
}

/*
| 見出しの右の近道。「処理済みに設定」「私が担当」など。
| 押す回数がいちばん多い組み合わせを一発で入れるためのもの。
*/
.bl-field__set,
.bl-field__hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: var(--bl-link);
    white-space: nowrap;
}

.bl-field__hint { color: var(--bl-text-muted); }
.bl-field__set:hover { text-decoration: underline; }

/*
| 入力と選択は .bl-field の外に置かれることもある（表の中の役割選択など）。
| 要素そのものに当てておかないと、そこだけ素のままの高さになり、
| 隣のボタンと 15px 近くずれる。
|
| .bl-bare を付けたものは外す。**囲みの側が枠を描く**入力（担当者の札、
| 知らせたい相手の窓）で、ここで枠を描くと二重に見える。打ち消しの
| 決まりを後ろに足す手もあるが、この決まりは :not() を 3 つ持つぶん
| 強く、同じだけ強い打ち消しを書くことになる。外す側に書くほうが short。
*/
:is(.bl-container, .bl-content) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.bl-bare),
:is(.bl-container, .bl-content) select:not([multiple]):not(.bl-bare),
.bl-login-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bl-login-page select:not([multiple]) {
    height: var(--bl-control-h);
    padding: 0 var(--bl-control-px);
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    background: var(--bl-surface);
    color: var(--bl-text);
    vertical-align: middle;
}

/* 幅は入れ物側で決める。高さと違い、ここは場所ごとに変わってよい */
.bl-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not(.bl-bare),
.bl-field select:not(.bl-bare) {
    width: 100%;
}

:is(.bl-container, .bl-content) select[multiple] { height: 92px; padding: 4px; }

:is(.bl-container, .bl-content) input:focus,
:is(.bl-container, .bl-content) select:focus,
:is(.bl-container, .bl-content) textarea:focus,
.bl-login-page input:focus {
    outline: none;
    border-color: var(--bl-green);
    box-shadow: 0 0 0 2px var(--bl-focus-ring);
}

/*
| チェックとラジオは、既定では文字のベースラインに乗るため、
| 四角や丸が 2〜3px 上にずれて見える。行の中心でそろえる。
*/
:is(.bl-container, .bl-content) input[type="checkbox"],
:is(.bl-container, .bl-content) input[type="radio"] {
    margin: 0 6px 0 0;
    vertical-align: middle;
}

/* 入れ物ごと中央ぞろえにできるブラウザでは、そちらのほうが確実 */
:is(.bl-container, .bl-content) label:has(> input[type="checkbox"]),
:is(.bl-container, .bl-content) label:has(> input[type="radio"]) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

:is(.bl-container, .bl-content) label:has(> input[type="checkbox"]) > input,
:is(.bl-container, .bl-content) label:has(> input[type="radio"]) > input {
    margin: 0;
}

/*
| 選択肢の行。ラベルが「項目名」ではなく「選択肢そのもの」なので、
| .bl-field の小さい太字ラベルとは別扱いにする。
*/
.bl-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bl-choice label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--bl-text);
    cursor: pointer;
}

.bl-field__range { display: flex; align-items: center; gap: 4px; }
.bl-field__range input { min-width: 0; }

.bl-filter__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bl-border);
}

/*
| inline-flex で中身を中央に置く。inline-block のままだと <a> が
| body の line-height 1.7 を拾い、同じ見た目の <button> と 0.4px ずれる。
*/
.bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 意匠の値：高さ 30 / 角丸 8 / 罫線は薄い方 / 12px の中太 */
    height: 30px;
    padding: 0 13px;
    border: 1px solid var(--bl-border);
    border-radius: 8px;
    background: var(--bl-surface);
    color: var(--bl-text);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
}

/* 表の中など、詰めたいところ。font-size だけ小さくしても背は縮まない */
.bl-btn.bl-small {
    height: var(--bl-control-h-sm);
    padding: 0 12px;
    font-size: 11px;
}

/*
| 一覧の行の中は詰める。行ごとに高さが跳ねると表が読みにくい。
| ここでまとめて小さくしておけば、テンプレート側で .bl-small を
| 書き忘れても、選択欄とボタンの背が食い違わない。
*/
.bl-list .bl-btn,
.bl-list input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bl-list select:not([multiple]) {
    height: var(--bl-control-h-sm);
    font-size: 11px;
}

.bl-list .bl-btn { padding: 0 12px; }
.bl-list input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bl-list select:not([multiple]) { padding: 0 8px; }
.bl-btn:hover { background: var(--bl-btn-hover); text-decoration: none; }

/* 意匠の主なボタンは、罫線を持たず、少しだけ背が高い */
.bl-btn--primary {
    height: 34px;
    padding: 0 18px;
    border-color: transparent;
    border-radius: 9px;
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-size: 13px;
    font-weight: 500;
}

.bl-btn--primary:hover { background: var(--bl-green-dark); }

/* 帯の上に置く、その画面のいちばん強い操作 */
.bl-btn--lg {
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
}

.bl-btn--sm { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 11px; }

.bl-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
}

.bl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bl-result-count { font-size: 12px; color: var(--bl-text-muted); }
.bl-result-count strong { color: var(--bl-text); font-size: 14px; }

/* --------------------------------------------------------------- 課題詳細 */

/* 添付ファイル */
.bl-attachments { display: flex; flex-direction: column; gap: 8px; }

.bl-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-subtle);
}

.bl-attachment__icon {
    width: 32px;
    height: 32px;
    border-radius: var(--bl-radius);
    background: var(--bl-avatar-empty-bg);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    /* 面が一段濃いので、字はもう一段濃い方を使う */
    color: var(--bl-text-quiet);
    flex: none;
    text-transform: uppercase;
}

.bl-attachment__body { min-width: 0; flex: 1; }
.bl-attachment__name { display: block; word-break: break-all; }
.bl-attachment__missing { color: var(--bl-danger); }

.bl-attachment__thumb {
    max-width: 64px;
    max-height: 48px;
    border-radius: 3px;
    border: 1px solid var(--bl-border);
}

/* コメント */
.bl-comment {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--bl-rule);
}
.bl-comment:last-child { border-bottom: none; }

.bl-comment__body { flex: 1; min-width: 0; }

.bl-comment__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bl-comment__who { display: flex; flex-direction: column; gap: 3px; }
.bl-comment__gap { flex: 1; min-width: 8px; }

.bl-comment__author { font-size: 13px; font-weight: 700; white-space: nowrap; }

.bl-comment__time {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-changelog {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--bl-subtle);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    font-size: 12px;
}
.bl-changelog__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.bl-changelog__field { color: var(--bl-text-muted); min-width: 80px; }
.bl-changelog__from { color: var(--bl-text-muted); text-decoration: line-through; }
.bl-changelog__arrow { color: var(--bl-text-muted); }
.bl-changelog__to { font-weight: 700; }

/* --------------------------------------------------------- 本文（記法） */

.bl-markup { word-break: break-word; overflow-wrap: anywhere; }
.bl-markup > *:first-child { margin-top: 0; }
.bl-markup > *:last-child { margin-bottom: 0; }
.bl-markup p { margin: 0 0 .9em; }
.bl-markup h2 { font-size: 18px; border-bottom: 1px solid var(--bl-border); padding-bottom: 4px; margin: 1.4em 0 .6em; }
.bl-markup h3 { font-size: 16px; margin: 1.3em 0 .5em; }
.bl-markup h4 { font-size: 14px; margin: 1.2em 0 .4em; }
.bl-markup h5, .bl-markup h6 { font-size: 13px; margin: 1.1em 0 .4em; }
.bl-markup ul, .bl-markup ol { margin: 0 0 .9em; padding-left: 1.8em; }
.bl-markup li { margin: .15em 0; }
.bl-markup hr { border: none; border-top: 1px solid var(--bl-border); margin: 1.2em 0; }

/*
| 記法の中の pre。.bl-code に包まれないもの（記法によっては素の pre で
| 出る）もここで受ける。長い 1 行が入ると、包みが無いぶん画面ごと
| 横に伸びてしまう。
*/
.bl-markup pre { max-width: 100%; overflow-x: auto; }

.bl-markup blockquote {
    margin: 0 0 .9em;
    padding: 2px 12px;
    border-left: 3px solid var(--bl-border-strong);
    color: var(--bl-quote-text);
    background: var(--bl-subtle);
}

.bl-code {
    position: relative;
    margin: 0 0 .9em;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-code-bg);
}

.bl-code-lang {
    display: block;
    padding: 3px 10px;
    border-bottom: 1px solid var(--bl-border);
    font-size: 11px;
    color: var(--bl-text-muted);
    background: var(--bl-muted-bg);
    border-radius: 12px 12px 0 0;
}

.bl-code pre {
    margin: 0;
    padding: 10px 12px;
    overflow-x: auto;
}

.bl-code code {
    font-family: Consolas, Menlo, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre;
}

.bl-table-wrap { overflow-x: auto; margin: 0 0 .9em; }

table.bl-table { border-collapse: collapse; font-size: 12px; }
table.bl-table th, table.bl-table td {
    border: 1px solid var(--bl-border-strong);
    padding: 5px 10px;
}
table.bl-table th { background: var(--bl-th-bg); font-weight: 700; }

.bl-inline-image { max-width: 100%; height: auto; border: 1px solid var(--bl-border); border-radius: 3px; }
.bl-missing-image { color: var(--bl-text-muted); font-style: italic; }

/* ------------------------------------------------------------ ページャ */

.bl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 14px 0;
}

.bl-pagination a, .bl-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--bl-control-h-sm);
    min-width: 30px;
    padding: 0 8px;
    border: 1px solid var(--bl-border-strong);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    text-align: center;
    font-size: 12px;
}

.bl-pagination a:hover { background: var(--bl-btn-hover); text-decoration: none; }
.bl-pagination .is-current { background: var(--bl-green); border-color: var(--bl-green); color: var(--bl-on-accent); font-weight: 700; }
.bl-pagination .is-disabled { color: var(--bl-text-disabled); background: var(--bl-subtle); }
.bl-pagination .bl-pagination__dots { border: none; background: none; }

/* ------------------------------------------------------------ 統計バー */

.bl-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 12px;
}
.bl-stat-row__label { width: 110px; flex: none; }
.bl-stat-row__bar { flex: 1; height: 8px; background: var(--bl-muted-bg); border-radius: 4px; overflow: hidden; }
.bl-stat-row__fill { height: 100%; border-radius: 4px; }
.bl-stat-row__value { width: 56px; text-align: right; flex: none; color: var(--bl-text-muted); }

.bl-metric { display: flex; gap: 24px; flex-wrap: wrap; }
.bl-metric__item { }
.bl-metric__value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.bl-metric__label { font-size: 11px; color: var(--bl-text-muted); }

/* ------------------------------------------------------------ その他 */

.bl-tag-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* 柱に並べるメンバー。名前は左、役割は右端に寄せる */
.bl-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0;
}

.bl-notice {
    padding: 10px 14px;
    border: 1px solid var(--bl-notice-border);
    background: var(--bl-notice-bg);
    border-radius: var(--bl-radius);
    font-size: 12px;
    margin-bottom: 16px;
}

.bl-footer {
    padding: 24px 16px;
    text-align: center;
    color: var(--bl-text-muted);
    font-size: 11px;
}

/* ------------------------------------------------------------ ログイン */

/*
| 意匠は上寄せ。印・見出し・添え書きを縦に積み、その下に紙を置く。
| 画面の真ん中に置くと、背の高い端末で紙が浮いて見える。
*/
.bl-login-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 56px 20px 60px;
}

.bl-login {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bl-login__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bl-login__logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-size: 21px;
    font-weight: 700;
}

.bl-login__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    color: var(--bl-text);
}

.bl-login__lead {
    margin: 0;
    text-align: center;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-login__paper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px 26px 24px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
}

.bl-login__paper form { display: flex; flex-direction: column; gap: 16px; }

.bl-login__field { margin: 0; }

/* ログイン欄は一覧の絞り込みより大きめにして入力しやすくする */
.bl-login__field label {
    font-size: 12px;
    color: var(--bl-text);
    margin-bottom: 6px;
}

/* ログインは 1 画面 1 目的なので、本文より大きい寸法にする */
.bl-login .bl-field input:not([type="checkbox"]):not([type="radio"]) {
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 6px;
}

.bl-login__hint {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-login__remember { margin: 0; }

.bl-login__submit {
    width: 100%;
    height: 42px;
    padding: 0;
    border-radius: 6px;
    font-size: 14px;
}

/* 「または」の仕切り */
.bl-login__or {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

.bl-login__or::before,
.bl-login__or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bl-rule);
}

.bl-login__alt {
    margin: 0;
    text-align: center;
    font-size: 12px;
}

.bl-login__error {
    padding: 11px 14px;
    border: 1px solid var(--bl-error-border);
    background: var(--bl-error-bg);
    border-radius: 6px;
    color: var(--bl-error-text);
    font-size: 12px;
    line-height: 1.7;
}

.bl-login__status {
    padding: 11px 14px;
    border: 1px solid var(--bl-success-border);
    background: var(--bl-success-bg);
    border-radius: 6px;
    font-size: 12px;
}

.bl-login__note {
    margin: 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.8;
    color: var(--bl-text-muted);
}

.bl-login__note code {
    background: var(--bl-inline-code-bg);
    /*
    | 面が地より濃いぶん、周りと同じ薄い文字色では 4.36:1 まで落ちる。
    | 囲みで既に区別が付いているので、文字は本文と同じ濃さに戻す。
    */
    color: var(--bl-text-quiet);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

/* ヘッダーのログアウト */
.bl-header__user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--bl-header-hover);
    font-size: 12px;
    color: var(--bl-header-text);
    white-space: nowrap;
}

.bl-header__logout {
    display: inline-flex;
    align-items: center;
    height: var(--bl-control-h-header);
    background: none;
    border: 1px solid var(--bl-header-btn-border);
    color: var(--bl-header-text);
    padding: 0 10px;
    white-space: nowrap;
    border-radius: var(--bl-radius);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}

.bl-header__logout:hover { background: var(--bl-header-hover); color: var(--bl-on-accent); }

/* ヘッダーのリンク型ボタン（ユーザー追加など） */
a.bl-header__logout { text-decoration: none; }
a.bl-header__logout:hover { text-decoration: none; }

/* プロジェクト一覧の検索フォーム */
.bl-project-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bl-project-search .bl-field { margin: 0; }
.bl-project-search .bl-field input { width: 220px; }

/* ------------------------------------------------------- サービス側の追加 */

.bl-flash {
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--bl-success-border);
    background: var(--bl-success-bg);
    border-radius: var(--bl-radius);
    font-size: 12px;
}

.bl-flash--error {
    border-color: var(--bl-error-border);
    background: var(--bl-error-bg);
    color: var(--bl-error-text);
}

.bl-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.7;
    background: var(--bl-surface);
    color: var(--bl-text);
    resize: vertical;
}

.bl-field textarea:focus {
    outline: none;
    border-color: var(--bl-green);
    box-shadow: 0 0 0 2px var(--bl-focus-ring);
}

/* 課題詳細の操作ボタンを右端にまとめる */

/* コメントの編集・削除 */
.bl-comment__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bl-comment__actions form { display: inline; }

.bl-link-btn {
    background: none;
    border: none;
    height: auto;
    padding: 0;
    color: var(--bl-text-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.bl-link-btn:hover { color: var(--bl-link); }

.bl-comment__edit { margin-top: 8px; }
.bl-comment__edit .bl-filter__actions { margin-top: 8px; padding-top: 8px; }

/* ------------------------------------------------------------ ボード */

/* 見出しの帯。左に名前と絞り込みの札、右に一言 */
.bl-board__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 16px;
}

.bl-board__heading { margin: 0; font-size: 15px; font-weight: 700; color: var(--bl-text); white-space: nowrap; }
.bl-board__gap { flex: 1; min-width: 8px; }

/* 絞っているときの印。札の字に混ぜず、右肩に小さく */
.bl-board__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bl-green);
}

/* 絞り込みの欄。横に並べ、選んだ瞬間に引き直す */
.bl-board__filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 18px;
}

.bl-board__filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 1 200px;
    min-width: 0;
}

.bl-board__filter > span { font-size: 11px; color: var(--bl-text-muted); }
.bl-board__filter select { width: 100%; }

.bl-board__me {
    width: 36px;
    height: 36px;
    flex: none;
    border: 1px solid var(--bl-input-border);
    border-radius: 999px;
    background: var(--bl-surface);
    color: var(--bl-text-quiet);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.bl-board__me:hover { border-color: var(--bl-green); color: var(--bl-link); }

.bl-board {
    display: flex;
    gap: 16px;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: 8px;
}

/*
| 列は下地より一段沈めた区画。意匠は「面の上に置いた箱」ではなく
| 「下地をくり抜いた区画」に見せている。落とせる列には緑の枠を出す。
*/
.bl-board__column {
    flex: 0 0 268px;
    width: 268px;
    padding: 12px;
    border: 1px solid var(--bl-border);
    border-radius: 14px;
    background: var(--bl-board-head);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 220px);
}

.bl-board__column.is-over { background: var(--bl-board-over); border-color: var(--bl-green); }

.bl-board__head {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 2px 2px;
}

/* 状態の色は見出しの左に丸で置く。帯にすると列の枠と競う */
.bl-board__head::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--bl-status-dot, var(--bl-border-strong));
}

.bl-board__title { font-weight: 700; font-size: 12px; color: var(--bl-text); white-space: nowrap; }

.bl-board__count {
    min-width: 22px;
    padding: 1px 7px;
    border: 1px solid var(--bl-input-border);
    border-radius: 999px;
    background: var(--bl-surface);
    font-size: 11px;
    color: var(--bl-text-quiet);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.bl-board__plus {
    margin-left: auto;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--bl-text-quiet);
    text-decoration: none;
}

.bl-board__plus:hover { background: var(--bl-surface); color: var(--bl-link); text-decoration: none; }

.bl-board__cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    min-height: 40px;
    flex: 1;
}

.bl-board__empty {
    margin: 0;
    padding: 20px 10px;
    text-align: center;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-board__more { margin: 4px 2px 0; font-size: 11px; color: var(--bl-text-muted); }

/* 列の下の「＋ 課題を追加」。破線で、まだ無いものの置き場だと分かるように */
.bl-board__add {
    display: block;
    padding: 10px;
    border: 1px dashed var(--bl-border-strong);
    border-radius: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--bl-text-muted);
    text-decoration: none;
}

.bl-board__add:hover { border-color: var(--bl-green); color: var(--bl-link); text-decoration: none; }

.bl-card-item {
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.bl-card-item[draggable="true"] { cursor: grab; }
.bl-card-item[draggable="true"]:hover { border-color: var(--bl-success-border); box-shadow: 0 4px 14px rgba(26, 26, 24, .06); }
.bl-card-item.is-dragging { opacity: .4; }

.bl-card-item__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.bl-card-item__key {
    font-size: 11px;
    color: var(--bl-link);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-card-item__summary {
    color: var(--bl-text);
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}
.bl-card-item__summary:hover { color: var(--bl-link); }

.bl-card-item__foot { display: flex; align-items: center; gap: 9px; padding-top: 2px; }
.bl-card-item__gap { flex: 1; }

.bl-card-item__due {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-card-item__due.is-over { color: var(--bl-danger); font-weight: 700; }
.bl-card-item__pri { font-size: 11px; color: var(--bl-text-muted); white-space: nowrap; }

/* --------------------------------------------------- ガントチャート */

/*
| 意匠は 3 段の帯（見出し／絞り込み／期間の操作）と、その下に 1 枚の
| カード。カードの左に課題の一覧、右に時間の軸。
*/
.bl-gantt__bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
}

.bl-gantt__heading { margin: 0; font-size: 15px; font-weight: 700; color: var(--bl-text); white-space: nowrap; }
.bl-gantt__gap { flex: 1; min-width: 8px; }

.bl-gantt__filters,
.bl-gantt__controls {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
}

.bl-gantt__controls { padding-bottom: 14px; }

.bl-gantt__control {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.bl-gantt__control--pick { flex: 0 1 168px; }
.bl-gantt__control > span { font-size: 11px; color: var(--bl-text-muted); }
.bl-gantt__control select { width: 100%; }
.bl-gantt__controls .bl-checkbox { height: var(--bl-control-h); display: inline-flex; align-items: center; }

/* 前へ・次へ。2 つで 1 組の四角い札 */
.bl-gantt__arrows { display: flex; gap: 6px; }

.bl-gantt__arrows button {
    width: 32px;
    height: var(--bl-control-h);
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-surface);
    color: var(--bl-text-quiet);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.bl-gantt__arrows button:hover { border-color: var(--bl-green); color: var(--bl-link); }

/* カード。左に一覧、右に軸 */
.bl-gantt {
    display: flex;
    min-height: 320px;
    border: 1px solid var(--bl-border);
    border-radius: 14px;
    background: var(--bl-surface);
    overflow: hidden;
    font-size: 12px;
}

.bl-gantt > .bl-empty { flex: 1; }

.bl-gantt__list {
    flex: 0 0 372px;
    width: 372px;
    border-right: 1px solid var(--bl-border);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 畳んだ一覧。取っ手だけを残す */
.bl-gantt__list--shut {
    flex: 0 0 40px;
    width: 40px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
}

.bl-gantt__list-top {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 30px;
    padding: 0 14px;
    border-bottom: 1px solid var(--bl-rule);
    background: var(--bl-code-bg);
}

.bl-gantt__add {
    height: 22px;
    padding: 0 10px;
    border-radius: 6px;
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-size: 11px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}

.bl-gantt__add:hover { background: var(--bl-green-dark); text-decoration: none; }

.bl-gantt__list-head,
.bl-gantt__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px 84px;
    gap: 10px;
    align-items: center;
    padding: 0 14px;
}

.bl-gantt__list-head {
    height: 26px;
    border-bottom: 1px solid var(--bl-rule);
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

/* 1 行の高さは軸の側と揃える（38px）。ずれると線が読めなくなる */
.bl-gantt__item {
    height: 38px;
    border-bottom: 1px solid var(--bl-rule-soft);
    color: inherit;
    text-decoration: none;
}

.bl-gantt__item:hover { background: var(--bl-row-hover); text-decoration: none; }

.bl-gantt__item-title {
    font-size: 12px;
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-gantt__timeline { flex: 1; min-width: 0; overflow: auto; }
.bl-gantt__scroll { min-width: 900px; }

.bl-gantt__track {
    position: relative;
    height: 38px;
    border-bottom: 1px solid var(--bl-rule-soft);
}

/* 頭の目盛り。一覧の側の「隠す」「件名」の 2 段（30 + 26）と背を揃える */
.bl-gantt__track--head { height: 56px; background: var(--bl-code-bg); border-bottom: 1px solid var(--bl-rule); }

.bl-gantt__tick,
.bl-gantt__grid {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--bl-rule);
}

.bl-gantt__tick {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 6px;
    font-size: 10px;
    /*
    | 目盛りは読む数字なので、添え字より一段濃い方を使う。
    | 週末の目盛りは面が少し濃くなるぶん、薄いままだと沈む。
    */
    color: var(--bl-text-quiet);
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

.bl-gantt__tick span { white-space: nowrap; }

.bl-gantt__tick.is-weekend,
.bl-gantt__grid.is-weekend { background: var(--bl-weekend); }

.bl-gantt__tick.is-today { color: var(--bl-good-text); font-weight: 700; }

.bl-gantt__today {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 2px solid var(--bl-danger);
    z-index: 2;
}

.bl-gantt__bar {
    position: absolute;
    top: 8px;
    height: 22px;
    border-radius: 5px;
    z-index: 1;
    min-width: 6px;
}
.bl-gantt__bar:hover { filter: brightness(1.08); }

/* 片方の日付しか無い課題は点として出す */
.bl-gantt__bar.is-point { border-radius: 11px; opacity: .75; }

.bl-gantt__bar.is-overdue { box-shadow: 0 0 0 2px var(--bl-danger); }

/*
| 名前はバーの右に添える。バーの中に入れると、短いバーでは読めなくなる。
| 押せるのはバーだけにして、名前は下の線を邪魔しない。
*/
.bl-gantt__bar-label {
    position: absolute;
    top: 0;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    pointer-events: none;
    font-size: 12px;
    color: var(--bl-text);
}

.bl-gantt__bar-key { font-size: 11px; color: var(--bl-text-quiet); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .bl-gantt__list { flex-basis: 260px; width: 260px; }
    .bl-gantt__list-head, .bl-gantt__item { grid-template-columns: minmax(0, 1fr) 30px 70px; }
}

/* ------------------------------------------------------ 一括更新バー */

.bl-bulk {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border-strong);
    border-radius: var(--bl-radius);
    box-shadow: var(--bl-shadow-up);
    z-index: 10;
}

.bl-bulk__count { font-size: 12px; white-space: nowrap; padding-bottom: 6px; }
.bl-bulk__count strong { font-size: 15px; }
.bl-bulk .bl-field { min-width: 160px; }
.bl-bulk .bl-checkbox { padding-bottom: 6px; }

/* ---------------------------------------------------------- お知らせ */

.bl-header__bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: var(--bl-control-h-header);
    color: var(--bl-header-text);
    font-size: 12px;
    padding: 0 10px;
    border: 1px solid var(--bl-header-btn-border);
    border-radius: var(--bl-radius);
    white-space: nowrap;
}
.bl-header__bell:hover { background: var(--bl-header-hover); color: var(--bl-on-accent); text-decoration: none; }

.bl-header__badge {
    display: inline-block;
    margin-left: 4px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--bl-danger);
    color: var(--bl-on-accent);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.bl-notice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--bl-border);
    color: var(--bl-text);
}
.bl-notice-row:last-child { border-bottom: none; }
.bl-notice-row:hover { background: var(--bl-row-hover); text-decoration: none; }

.bl-notice-row__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    flex: none;
}
.bl-notice-row.is-unread { background: var(--bl-success-bg); }
.bl-notice-row.is-unread .bl-notice-row__dot { background: var(--bl-green); }
.bl-notice-row.is-unread .bl-notice-row__title { font-weight: 700; }

.bl-notice-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bl-notice-row__title { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-notice-row__meta { font-size: 11px; color: var(--bl-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-notice-row__time { flex: none; white-space: nowrap; }

/* ------------------------------------------------------------ スター */

.bl-star { color: var(--bl-text-muted); }
.bl-star.is-on { color: var(--bl-star); border-color: var(--bl-star); font-weight: 700; }
button.bl-link-btn.bl-star { text-decoration: none; }

/* ------------------------------------------------------------ 入力の補助 */

/*
| ツールバー付きのテキスト入力。枠は 1 つに見せたいので、外側に境界を持たせ、
| 中の textarea からは境界を外す。
*/
/*
| 枠は「本文 ＋ 道具の帯」の囲み（__box）が持つ。.bl-editor そのものは
| 入れ物で、下にプレビューの札や知らせる相手の欄が続くことがある。
*/
.bl-editor { display: flex; flex-direction: column; gap: 10px; }

.bl-editor__box {
    border: 1px solid var(--bl-input-border);
    border-radius: 12px;
    background: var(--bl-surface);
    overflow: visible;
}

.bl-editor__box:focus-within {
    border-color: var(--bl-green);
    box-shadow: 0 0 0 2px var(--bl-focus-ring);
}

/*
| 道具の帯は**本文の下**に置く（意匠のとおり）。書いている最中に目が
| 向くのは書いている行で、その近くに道具があるほうが手が届く。
*/
.bl-editor__bar {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    padding: 5px 8px;
    border-top: 1px solid var(--bl-rule);
    background: var(--bl-code-bg);
    border-radius: 0 0 12px 12px;
}

.bl-editor__grow { flex: 1; min-width: 4px; }

.bl-editor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 26px;
    padding: 0 5px;
    border: 1px solid transparent;
    border-radius: var(--bl-radius);
    background: none;
    color: var(--bl-text-muted);
    font-size: 12px;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.bl-editor__btn:hover {
    background: var(--bl-btn-hover);
    border-color: var(--bl-border);
    color: var(--bl-text);
}

.bl-editor__sep {
    width: 1px;
    height: 16px;
    margin: 0 4px;
    background: var(--bl-border);
}

.bl-editor__format {
    font-size: 10px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

/*
| 囲みの側が枠を持つので、中の textarea は線を消す。
|
| **余白はここで持たせる。** 枠を外すと、.bl-field textarea が持っていた
| padding も一緒に外れる（.bl-field の中に置かないため）。素の textarea の
| 既定は 2px しかなく、字が縁に貼り付く。
*/
:is(.bl-container, .bl-content) .bl-editor textarea,
.bl-field .bl-editor textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 12px 12px 0 0;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.85;
    color: var(--bl-text);
    resize: vertical;
}

:is(.bl-container, .bl-content) .bl-editor textarea:focus {
    outline: none;
    box-shadow: none;
}

/* ------------------------------------------------------------ メンション */

.bl-editor__mention { position: relative; }

.bl-editor__picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    width: 240px;
    padding: 6px;
    border: 1px solid var(--bl-border-strong);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
}

.bl-editor__picker[hidden] { display: none; }

.bl-editor__search { width: 100%; }

.bl-editor__people {
    max-height: 220px;
    margin: 6px 0 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.bl-editor__people button {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 5px 6px;
    border: none;
    border-radius: var(--bl-radius);
    background: none;
    /* button は色を継がない。指定しないと暗いテーマで黒い文字のままになる */
    color: var(--bl-text);
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.bl-editor__people button:hover { background: var(--bl-row-hover); }

/* 本文の中で「呼ばれた」ことが目に入るようにする */
.bl-mention {
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--bl-mention-bg);
    color: var(--bl-mention-text);
    font-weight: 700;
}

/* ------------------------------------------------- コメント欄と基本情報 */

/*
| コメントの入力欄。
|
| ふだんは 1 行の帯に畳んでおく（Backlog と同じ）。課題を読みに来ただけの
| 人にとって、画面の下半分がいつも入力欄で埋まっているのは邪魔でしかない。
*/
.bl-composer {
    padding: 14px 22px 18px;
    border-top: 1px solid var(--bl-rule);
}

/*
| 畳んだ入力欄は画面の下に貼り付ける（意匠のとおり）。
|
| 長いやり取りを読んでいる途中で書き始められるようにするためのもの。
| いちばん下まで巻き戻す手間が要らなくなる。
|
| **貼り付けるのは畳んでいるときだけ。** 開いた入力欄は背が高く、
| 貼り付けると画面の半分を覆って、読みながら書けなくなる。
|
| position: sticky なので、流れの中の場所は変わらない。いちばん下まで
| 巻けば元の位置に落ち着き、最後のコメントに被らない。巻く途中だけ
| 浮いて見える。ページが短くて巻けないときは、何も起きない。
*/
.bl-composer--shut {
    display: flex;
    align-items: center;
    gap: 12px;

    position: sticky;
    bottom: 0;
    z-index: 20;
    /*
    | 貼り付いている間はコメントがこの下を通るので、地色を敷く。
    | 枠と内側の余白は .bl-composer が持っているものをそのまま使う
    | （負の margin で外へ広げると、余白の値が違う幅で行きすぎる）。
    */
    background: var(--bl-surface);
}

/*
| 画面が低いときは貼り付けない。縦に 480px しかない窓で 70px の帯が
| 居座ると、読める高さがそのぶん減る。
*/
@media (max-height: 480px) {
    .bl-composer--shut { position: static; }
}

/* 畳んだ帯。入力欄に見えるが、押すと本物が開く */
.bl-composer__line {
    appearance: none;
    font: inherit;
    flex: 1;
    min-width: 0;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-bg);
    font-size: 13px;
    color: var(--bl-text-muted);
    text-align: left;
    cursor: text;
}

.bl-composer__line:hover { border-color: var(--bl-border-strong); }

/* 意匠は閉じると登録を真ん中に並べる */
.bl-btn--ghost {
    border-color: var(--bl-success-border);
    color: var(--bl-link);
}

.bl-btn--ghost:hover { background: var(--bl-selected-bg); }

.bl-composer__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 4px;
}

.bl-comment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

/* 畳んだら本文だけ。ただのコメントを書くときは基本情報の欄が要らない */
.bl-comment-form.is-shut { grid-template-columns: minmax(0, 1fr); }

/* 開け閉めの取っ手。意匠は右の縁に置く */
.bl-composer__head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/*
| 右の面は 2 列。意匠のとおり、状態と担当者が上、日付、その下に
| マイルストーンと完了理由、いちばん下に時間。
*/
.bl-comment-form__side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    align-content: start;
}

.bl-comment-form__side .bl-field { margin-bottom: 0; min-width: 0; }
.bl-field--wide { grid-column: 1 / -1; }

/* 予定と実績。2 つで 1 組なので、見出しは 1 つにして横に並べる */
.bl-field__pair { display: flex; align-items: center; gap: 8px; }
.bl-field__pair input { flex: 1 1 0; min-width: 0; }

/*
| 顔つきの選び欄。意匠は担当者を札の形で出す。誰が持っているかは
| いちばん多く確かめる値なので、選ぶ前から顔が見えるようにする。
*/
.bl-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--bl-control-h);
    padding: 0 6px 0 10px;
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-surface);
}

.bl-picker:focus-within {
    border-color: var(--bl-green);
    box-shadow: 0 0 0 2px var(--bl-focus-ring);
}

/*
| 中の select は枠を持たない（.bl-bare）。枠は囲みの側。
| border を 0 と書くのは、素の select が持つ既定の枠を消すため
| （骨の決まりから外した時点で、ブラウザの既定が出てくる）。
*/
.bl-picker select {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    font-size: 13px;
    font-family: inherit;
    color: var(--bl-text);
    background: none;
}

.bl-picker select:focus { outline: none; }

.bl-picker__clear {
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-picker__clear:hover { background: var(--bl-row-hover); color: var(--bl-text); }

/*
| 知らせたい相手。
|
| 本文に @ で書けば届くが、書かずに知らせたいこともある。選んだ人は札で
| 並べ、その後ろに絞り込みの窓を置く（Gmail の宛先と同じ形）。
*/
.bl-notify { position: relative; }

.bl-notify__chosen {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: var(--bl-control-h);
    padding: 4px 10px;
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-surface);
}

.bl-notify__chosen:focus-within {
    border-color: var(--bl-green);
    box-shadow: 0 0 0 2px var(--bl-focus-ring);
}

.bl-notify__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px 2px 6px;
    border-radius: 999px;
    background: var(--bl-muted-bg);
    font-size: 12px;
}

.bl-notify__chip button {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--bl-text-muted);
}

.bl-notify__chip button:hover { background: var(--bl-btn-hover); color: var(--bl-text); }

/* 窓は枠を持たない（.bl-bare）。枠は囲みの側 */
.bl-notify__search {
    flex: 1 1 200px;
    min-width: 0;
    height: 26px;
    padding: 0;
    border: 0;
    font-size: 13px;
    font-family: inherit;
    color: var(--bl-text);
    background: none;
}

.bl-notify__search:focus { outline: none; }

.bl-notify__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 30;
    width: min(280px, 100%);
    max-height: 220px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--bl-border-strong);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
}

.bl-notify__list button {
    display: block;
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: left;
}

.bl-notify__list button:hover { background: var(--bl-row-hover); }

/* 選んだ添付の名前。素の file 欄は 🖇 の裏に隠す */
.bl-composer__files {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bl-composer__files:empty { display: none; }

@media (max-width: 900px) {
    .bl-comment-form { grid-template-columns: 1fr; }
}



/* ------------------------------------------------------------ プレビュー */

.bl-editor__preview {
    padding: 10px 12px;
    border-radius: 12px 12px 0 0;
    background: var(--bl-surface);
    overflow-x: auto;
}

.bl-editor__preview[hidden] { display: none; }

/* 押している間だけ色を変え、いま何を見ているかを分かるようにする */
.bl-editor__preview-btn[aria-pressed="true"] {
    background: var(--bl-green);
    border-color: var(--bl-green);
    color: var(--bl-on-accent);
}

/* カードの見出しに置いた「引用」を右端へ寄せる */
.bl-card__head .bl-link-btn { margin-left: auto; }

/* ------------------------------------------------------- 収支（意匠 T-17） */

/*
| 数字を大きく並べる区画。意匠の寸法に合わせている。
| 角丸 12px はこの画面の札だけで使う。罫線は共通のトークン。
*/
.bl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.bl-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
}

.bl-stat__label { font-size: 11px; color: var(--bl-text-muted); }

.bl-stat__value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bl-text);
    font-variant-numeric: tabular-nums;
}

.bl-stat__hint { font-size: 11px; color: var(--bl-text-muted); }

/* 粗利率は水準で色を変える。赤字がひと目で分かるように */
.bl-stat__value--good { color: var(--bl-good-text); }
.bl-stat__value--warn { color: var(--bl-warn-ink); }
.bl-stat__value--bad { color: var(--bl-danger); }

/*
| 断りの帯。エラーではないので赤ではなく橙にする。
| 「黙って小さい数字を見せない」ための表示なので、消せないようにしてある。
*/
.bl-alert {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    border: 1px solid var(--bl-notice-border);
    border-radius: 10px;
    background: var(--bl-notice-bg);
    color: var(--bl-text);
    font-size: 12px;
    margin-bottom: 14px;
}

.bl-alert__icon { flex: none; color: var(--bl-warn-ink); font-size: 14px; }
.bl-alert a { margin-left: auto; white-space: nowrap; }

/* 構成比の横棒。誰に工数が寄っているかを一目で見せる */
.bl-share {
    display: block;
    width: 100%;
    min-width: 60px;
    height: 6px;
    border-radius: 999px;
    background: var(--bl-muted-bg);
    overflow: hidden;
}

.bl-share__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--bl-green);
}

/* 見積を超えた分は赤、下回った分は控えめに */
.bl-delta--over { color: var(--bl-danger); font-weight: 700; }
.bl-delta--under { color: var(--bl-text-muted); }

/* ------------------------------------------------- 工数の週表（意匠 T-17） */

.bl-week-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 16px;
}

.bl-week-bar__gap { flex: 1; min-width: 8px; }

/* 前へ・次へ。30px の四角い札 */
.bl-week-bar__arrow {
    width: 30px;
    height: 30px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bl-input-border);
    border-radius: 9px;
    background: var(--bl-surface);
    color: var(--bl-text-quiet);
    font-size: 12px;
    text-decoration: none;
}

.bl-week-bar__arrow:hover { border-color: var(--bl-green); color: var(--bl-link); text-decoration: none; }

.bl-week-bar__range {
    font-size: 14px;
    font-weight: 700;
    color: var(--bl-text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 週合計は保存の手前に置いて、入れた量が目に入るようにする */
.bl-week-bar__total {
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 表の紙。下に「＋ 行を追加」の帯がぶら下がる */
.bl-time__card {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    overflow: hidden;
}

.bl-time__add {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--bl-rule);
}

.bl-time__add select { flex: 0 1 200px; width: auto; }
.bl-time__add-hours { width: 90px; }
.bl-time__add-note { flex: 1 1 200px; min-width: 0; }

.bl-time__alert { margin-top: 14px; }

/* 最近の入力。日付／課題／内容／時間／取り消し の 1 行 */
.bl-time__recent {
    margin-top: 20px;
    padding: 16px 20px 18px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bl-time__recent-title {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-time__row {
    display: grid;
    grid-template-columns: 96px 96px minmax(0, 1fr) 62px 60px;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-top: 1px solid var(--bl-rule-soft);
    font-size: 12px;
}

.bl-time__date { color: var(--bl-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-time__key { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-time__note { color: var(--bl-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-time__hours { text-align: right; color: var(--bl-text-quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }

.bl-time__undo {
    justify-self: end;
    font-size: 12px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

.bl-time__undo:hover { color: var(--bl-error-text); }

@media (max-width: 640px) {
    .bl-time__row { grid-template-columns: 90px minmax(0, 1fr) 56px 56px; }
    .bl-time__key { display: none; }
}

.bl-sheet__head { min-width: 220px; }

.bl-sheet__project {
    display: block;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-sheet__day {
    width: 70px;
    text-align: center;
    white-space: nowrap;
}

.bl-sheet__weekday { display: block; font-size: 11px; }

.bl-sheet__date {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--bl-text);
    font-variant-numeric: tabular-nums;
}

/*
| マス。一覧の td は左右 22px の余白を持つので、そのままだと 70px の列に
| 26px しか残らず、入力欄が潰れる。ここだけ余白を詰める。
*/
.bl-list td.bl-sheet__cell,
.bl-list th.bl-sheet__cell {
    width: 70px;
    padding: 5px 4px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.bl-sheet__cell input {
    width: 62px;
    padding: 0 4px;
    border-radius: 7px;
    text-align: center;
}

.bl-sheet__total { font-weight: 700; white-space: nowrap; }

/* 入れ過ぎの日。列の見出しと日計に印を付ける */
.bl-sheet__day.is-long,
.bl-sheet__cell.is-long {
    background: var(--bl-notice-bg);
    color: var(--bl-warn-ink);
}

/*
| 1 マスに複数の記録がある場合。まとめて 1 件に置き換えると作業内容が
| 消えるので、合計だけを出して触らせない。
*/
.bl-sheet__locked {
    display: inline-block;
    padding: 0 6px;
    border-radius: var(--bl-radius);
    background: var(--bl-muted-bg);
    color: var(--bl-text-muted);
    cursor: help;
}

/* --------------------------------------------- スペースホーム（意匠 T-17） */

.bl-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 26px;
    align-items: start;
}

@media (max-width: 1100px) {
    /*
    | minmax(0, 1fr) にするのは、1fr のままだと**中身より狭くできない**ため。
    | grid の子は既定で min-width: auto なので、中の表や帯が広いと段が
    | そのぶん膨らみ、狭い画面で横に流れる（375px で 528px になっていた）。
    */
    .bl-home { grid-template-columns: minmax(0, 1fr); }
}

.bl-home__side { display: flex; flex-direction: column; gap: 16px; }
.bl-home__feed { align-self: start; }

/* 参加している案件。頭文字・キー・未完了件数を 1 行に */
/* ------------------------------------------- スペースホームのプロジェクト */

/*
| 意匠は 1 枚のカードに案件を積み、行に触れると
|
|   キー           → その案件でよく開く行き先
|   未完了 + 棒    → 設定への歯車
|
| が入れ替わる。開いたときだけ道が出るので、普段は数字が読める。
*/
.bl-projects { display: flex; flex-direction: column; gap: 10px; }

.bl-projects__head { display: flex; align-items: center; gap: 10px; }

.bl-projects__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-projects__chevron { font-size: 12px; color: var(--bl-text-muted); }
.bl-projects__spacer { flex: 1; }

/* 絞り込みの窓を開くボタン。開いている間は緑で塗って、押した状態を示す */
.bl-projects__search {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--bl-input-border);
    background: var(--bl-surface);
    color: var(--bl-text-quiet);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex: none;
}

/*
| 触れたときの緑は --bl-link を使う。--bl-green（#0f766e）は白抜きの面に
| 使う濃さなので、暗い配色で字に使うと 2.9:1 までしか出ない。
*/
.bl-projects__search:hover { border-color: var(--bl-link); color: var(--bl-link); }

.bl-projects__search.is-on {
    border-color: var(--bl-green);
    background: var(--bl-green);
    color: var(--bl-on-accent);
}

.bl-projects__body { display: flex; flex-direction: column; gap: 8px; }

.bl-projects__query {
    height: var(--bl-control-h);
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-surface);
    padding: 0 12px;
    font-size: 13px;
    color: var(--bl-text);
}

.bl-projects__list {
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    overflow: hidden;
}

.bl-projects__empty {
    padding: 22px 18px;
    font-size: 12px;
    color: var(--bl-text-muted);
    text-align: center;
}

/* 続きを開く帯。矢印だけを中央に置く */
.bl-projects__more {
    width: 100%;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--bl-text-muted);
}

.bl-projects__more:hover { background: var(--bl-row-hover); }

.bl-projects__all { font-size: 12px; align-self: flex-end; }

/*
| 1 行。列は 意匠と同じ「印・角丸・本文・右」。
| 開いた行は本文が 2 段になるので、高さは中身に任せる。
*/
.bl-project-row {
    display: grid;
    grid-template-columns: 22px 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--bl-rule-soft);
}

.bl-project-row:last-of-type { border-bottom: 0; }
.bl-project-row.is-open { background: var(--bl-selected-bg); }

.bl-project-row__pin {
    justify-self: center;
    font-size: 12px;
    line-height: 1;
    /* 留めていない行でも場所は空けておく。触れるたびに列がずれないように */
    min-width: 14px;
    display: flex;
    justify-content: center;
    /*
    | 留めていない印も、押せると分かる濃さにする。意匠は #c4c1b9 だが、
    | それだと面に対して 3.8:1 までしか出ない。
    */
    color: var(--bl-text-muted);
}

.bl-project-row__pin.is-on { color: var(--bl-link); }
.bl-project-row__pin:hover { color: var(--bl-link); }
.bl-project-row__pin svg { display: block; }

.bl-project-row__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.bl-project-row__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bl-project-row__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-project-row__name:hover { color: var(--bl-link); }

/* キーは押すと道を開いたままにする。触れられない機器でも辿れるように */
.bl-project-row__key {
    font-size: 11px;
    color: var(--bl-text-muted);
    letter-spacing: .04em;
    text-align: left;
}

.bl-project-row__menu { display: flex; align-items: center; flex-wrap: wrap; }

.bl-project-row__link {
    padding: 2px 10px;
    border-right: 1px solid var(--bl-border-strong);
    font-size: 12px;
    color: var(--bl-selected-text);
    white-space: nowrap;
}

.bl-project-row__link:last-child { border-right: 0; }
.bl-project-row__link:hover { text-decoration: underline; }

.bl-project-row__side { display: flex; align-items: center; gap: 12px; }

.bl-project-row__open {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 「どこまで終わったか」の棒。未完了の数だけでは多い少ないが分からない */
.bl-project-row__bar {
    width: 64px;
    height: 5px;
    border-radius: 999px;
    background: var(--bl-muted-bg);
    overflow: hidden;
    flex: none;
}

.bl-project-row__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    /* 溝との差が要る。暗い配色では --bl-green だと溝に沈んで見えない */
    background: var(--bl-link);
}

.bl-project-row__gear {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    color: var(--bl-selected-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
}

.bl-project-row__gear:hover { background: var(--bl-surface); }

/* ------------------------------------------- スペースホームの自分の課題 */

/*
| 意匠は表ではなく格子。行そのものが課題へのリンクで、どこを押しても開く。
| 列は「キー・件名・状態・期限日」。状態は札のままにして、優先度は
| キーの前の小さな丸で示す（札を 2 つ並べると、どちらが状態か分からない）。
*/
.bl-mine { display: flex; flex-direction: column; gap: 12px; }

.bl-mine__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 見出しごと開け閉めできる。プロジェクトの一覧と同じ作り */
.bl-mine__toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-mine__chevron { font-size: 12px; color: var(--bl-text-muted); }

.bl-mine__card {
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
}

.bl-mine__filters {
    min-width: 440px;
    padding: 16px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-mine__row-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-mine__label { width: 52px; font-size: 11px; color: var(--bl-text-muted); flex: none; }

/*
| 札。ほかの画面の絞り込み（.bl-chip）は塗りつぶしだが、こちらは淡い面に
| 濃い字にする。同じ画面に状態の札が並ぶので、強さを分けておきたい。
*/
.bl-mine__chip {
    height: 26px;
    padding: 0 11px;
    border-radius: 999px;
    color: var(--bl-text-quiet);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.bl-mine__chip:hover { background: var(--bl-row-hover); color: var(--bl-text); }

.bl-mine__chip.is-on {
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-mine__chip-count { color: var(--bl-text-muted); font-variant-numeric: tabular-nums; }
.bl-mine__chip.is-on .bl-mine__chip-count { color: inherit; opacity: .65; }

.bl-mine__scroll { min-width: 440px; }

.bl-mine__row {
    display: grid;
    grid-template-columns: 118px minmax(150px, 1fr) 92px 74px;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--bl-rule-soft);
    color: var(--bl-text);
    text-decoration: none;
}

.bl-mine__row:hover { background: var(--bl-row-hover); text-decoration: none; }

.bl-mine__row--head {
    padding: 11px 20px;
    border-bottom: 1px solid var(--bl-rule);
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

.bl-mine__row--head:hover { background: none; }

.bl-mine__key {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 12px;
    color: var(--bl-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.bl-mine__summary {
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-mine__due {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 期限が近い・過ぎた。色だけに頼らず、切れたものには印も付ける */
.bl-mine__due.is-today { color: var(--bl-warn-ink); }
.bl-mine__due.is-overdue { color: var(--bl-danger); }
.bl-mine__fire { font-size: 12px; line-height: 1; }

.bl-mine__count {
    padding: 13px 20px;
    font-size: 12px;
    color: var(--bl-text-muted);
}

/*
| 続きを開く帯。
|
| 矢印だけだと押した先に何があるのか分からないので、言葉を添える。
| プロジェクトの一覧（意匠どおり矢印だけ）とは、そこだけ作りが違う。
*/
.bl-mine__more {
    width: 100%;
    padding: 11px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--bl-link);
    border-bottom: 1px solid var(--bl-rule-soft);
}

.bl-mine__more:hover { background: var(--bl-row-hover); text-decoration: underline; }
.bl-mine__more-mark { font-size: 11px; color: var(--bl-text-muted); }

/*
| 優先度の丸。
|
| 6px の点なので、面との差が 3:1 を切ると見えない。意匠の「低」は
| #a8a59d（白地に 2.6:1）だが、そこだけ少し濃くしている。
*/
.bl-pri {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: var(--bl-pri-mid);
}

.bl-pri--high { background: var(--bl-pri-high); }
.bl-pri--mid { background: var(--bl-pri-mid); }
.bl-pri--low { background: var(--bl-pri-low); }

/* --------------------------------------------------- 課題一覧の検索条件 */

/*
| 意匠は 2 段。ふだんは「シンプルな検索」で足り、日付や登録者まで絞りたい
| ときだけ「高度な検索」を開く。全部を 1 枚に並べると、よく使う 3 つを
| 探すのに毎回目で追うことになる。
*/
.bl-search {
    display: block;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    padding: 18px 22px 22px;
    margin-bottom: 18px;
}

.bl-search__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.bl-search__title { font-size: 13px; font-weight: 700; white-space: nowrap; }
.bl-search__spacer { flex: 1; }

/* 段の切り替え。押せる 2 つを 1 つの受け皿に載せる */
.bl-search__modes {
    display: flex;
    padding: 3px;
    border-radius: 10px;
    background: var(--bl-muted-bg);
    gap: 3px;
}

.bl-search__mode {
    height: 28px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--bl-text-quiet);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.bl-search__mode:hover { color: var(--bl-text); }

.bl-search__mode.is-on {
    background: var(--bl-surface);
    color: var(--bl-selected-text);
    font-weight: 500;
    box-shadow: var(--bl-shadow);
}

.bl-search__body { display: flex; flex-direction: column; gap: 14px; }

.bl-search__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.bl-search__label {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

/* 札の並びでは、見出しの幅を揃えて札の出だしをそろえる */
.bl-search__row > .bl-search__label { width: 64px; flex: 0 0 64px; }

/* 1 つだけ選ぶ札 */
.bl-search__pill {
    height: 28px;
    padding: 0 12px;
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: 999px;
    color: var(--bl-text-quiet);
    font-size: 12px;
    display: flex;
    align-items: center;
}

.bl-search__pill:hover { background: var(--bl-row-hover); color: var(--bl-text); }

.bl-search__pill.is-on {
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-weight: 500;
}

.bl-search__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 14px;
    padding-top: 4px;
}

.bl-search__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bl-search__head-row { display: flex; align-items: baseline; gap: 8px; }
.bl-search__head-row .bl-search__label { flex: 1; }

.bl-search__clear { font-size: 11px; color: var(--bl-link); }
.bl-search__clear:hover { text-decoration: underline; }

/* 高度な検索の見出し */
.bl-search__tabs {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-search__tab {
    padding: 9px 16px;
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-search__tab:hover { color: var(--bl-text); }

.bl-search__tab.is-on {
    color: var(--bl-selected-text);
    font-weight: 500;
    box-shadow: inset 0 -2px 0 var(--bl-green);
}

.bl-search__lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 16px;
}

/*
| 複数選べる一覧。押して選ぶ・押して外す。
| ctrl を押しながら、のような約束を要らなくする。
*/
.bl-search__list {
    height: 132px;
    overflow: auto;
    border: 1px solid var(--bl-input-border);
    border-radius: 10px;
    background: var(--bl-bg);
    padding: 5px;
}

.bl-search__item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 9px;
    border-radius: 7px;
    color: var(--bl-text);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-search__item:hover { background: var(--bl-muted-bg); }

.bl-search__item.is-on {
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-search__checks {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 8px 2px;
}

/* 案件の選び方。数が多いので、名前で絞る窓を添える */
.bl-search__projects {
    display: flex;
    flex-direction: column;
    gap: 7px;
    max-width: 520px;
}

.bl-search__badge {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-size: 11px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.bl-search__dates { display: flex; flex-direction: column; gap: 14px; }

.bl-search__range {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bl-search__range > .bl-search__label { width: 58px; flex: 0 0 58px; }
.bl-search__range input { flex: 0 1 150px; min-width: 0; }

/* 「未設定」は縮めない。詰まると 1 文字ずつ縦に折れて読めなくなる */
.bl-search__range .bl-checkbox { flex: none; white-space: nowrap; }

.bl-search__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 18px;
}

/* 絞り込みの札。件数を添えて、押す前に何件あるか分かるようにする */
.bl-filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bl-filter-row__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.bl-filter-row__label {
    width: 48px;
    flex: none;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: var(--bl-control-h-sm);
    padding: 0 11px;
    border: 1px solid var(--bl-border-strong);
    border-radius: 999px;
    background: var(--bl-surface);
    color: var(--bl-text);
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
}

.bl-chip:hover { background: var(--bl-btn-hover); text-decoration: none; }

.bl-chip.is-on {
    background: var(--bl-green);
    border-color: var(--bl-green);
    color: var(--bl-on-accent);
}

.bl-chip__count { font-variant-numeric: tabular-nums; opacity: .8; }

/* 期限切れが 1 件でもあれば、選んでいなくても色で気づけるようにする */
.bl-chip.is-overdue:not(.is-on) { border-color: var(--bl-danger); color: var(--bl-danger); }

.bl-chip--quiet {
    height: auto;
    padding: 2px 9px;
    border-color: var(--bl-border);
    background: var(--bl-subtle);
    color: var(--bl-text-muted);
}

/* 最近の更新 */
/*
| 動きの一覧。意匠は日付ごとに 1 枚のカードで、見出しは上に素で置く。
*/
.bl-feed { display: flex; flex-direction: column; gap: 12px; }

.bl-feed__title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.bl-feed .bl-card { margin-bottom: 0; }

.bl-feed__date {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--bl-rule);
    background: var(--bl-feed-date-bg);
    color: var(--bl-text-quiet);
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px 16px 0 0;
}

.bl-feed__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--bl-rule);
    /* 名指しされた行だけ縁を付ける。付かない行とも幅を揃えておく */
    border-left: 3px solid transparent;
}

.bl-feed__item:last-child { border-bottom: 0; }

/*
| 自分に関わる行（名指しされた・担当が自分に向いた）。
|
| 左の縁に色を付ける。並びを追わなくても「自分が読む番の行」が分かる。
| 面はごく薄くする。濃くすると、そこだけ別の区画に見える。
*/
.bl-feed__item.is-mine {
    border-left-color: var(--bl-mention-edge);
    background: var(--bl-mention-row);
}

.bl-feed__body { min-width: 0; flex: 1; }

.bl-feed__head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
}

.bl-feed__actor { font-weight: 700; }

/*
| 何をしたか（追加・更新・コメント・完了）の札。
|
| 文の中に埋めると「更新」「追加」が本文に紛れる。短い札にして、
| 種類ごとに色を変える。
*/
.bl-feed__action {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    background: var(--bl-muted-bg);
    color: var(--bl-text-quiet);
}

.bl-feed__action--created { background: var(--bl-act-add-bg); color: var(--bl-act-add-fg); }
.bl-feed__action--updated { background: var(--bl-act-edit-bg); color: var(--bl-act-edit-fg); }
.bl-feed__action--closed { background: var(--bl-act-done-bg); color: var(--bl-act-done-fg); }
.bl-feed__time { margin-left: auto; font-size: 11px; color: var(--bl-text-muted); }

.bl-feed__issue {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    font-size: 12px;
}

.bl-feed__issue span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-feed__excerpt {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--bl-text-muted);
    line-height: 1.7;
}

.bl-feed__changes { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }

/*
| 担当が自分に向いた更新。
|
| 変えた項目の札に色を付ける。行の左の色（名指し）とは別の知らせなので、
| 印の場所を分けてある。
*/
.bl-feed__changes.is-mine .bl-chip--quiet {
    background: var(--bl-notice-bg);
    border-color: var(--bl-notice-border);
    color: var(--bl-warn-ink);
}

.bl-feed__stars {
    flex: none;
    font-size: 11px;
    color: var(--bl-star);
    white-space: nowrap;
}

/* 札で選ぶ絞り込み。中身はチェックボックスのままにして、JS 無しでも使える */
.bl-chip--check { cursor: pointer; gap: 0; }

.bl-chip--check input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.bl-chip--check:has(input:checked) {
    background: var(--bl-green);
    border-color: var(--bl-green);
    color: var(--bl-on-accent);
}

/* キーボードで辿れることを示す。見えない入力に枠は出せないので札側に出す */
.bl-chip--check:has(input:focus-visible) {
    outline: 2px solid var(--bl-green);
    outline-offset: 2px;
}

/* 角丸を 16px にしたので、中身が角からはみ出さないように切り取る */
.bl-card__body--flush { overflow: hidden; border-radius: inherit; }
.bl-card__head + .bl-card__body--flush { border-radius: 0 0 16px 16px; }

/* ------------------------------------------------- 表示の切り替え（意匠 T-17）
| 「すべて表示 / コメントのみ」のような、2〜3 択の並び。選択欄よりも
| 今どちらを見ているかが分かりやすい。
*/
.bl-seg {
    display: inline-flex;
    border: 1px solid var(--bl-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--bl-subtle);
}

.bl-seg__item {
    padding: 0 12px;
    line-height: calc(var(--bl-control-h-sm) - 2px);
    font-size: 11px;
    color: var(--bl-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.bl-seg__item + .bl-seg__item { border-left: 1px solid var(--bl-border); }
.bl-seg__item:hover { background: var(--bl-surface); color: var(--bl-text); text-decoration: none; }

.bl-seg__item.is-on {
    background: var(--bl-surface);
    color: var(--bl-good-text);
    font-weight: 700;
}

/* ------------------------------------------------------- 道具帯（意匠 T-17）
| ガントのように「絞り込み」と「見え方の調整」が並ぶ画面のための帯。
| カードで囲わず、地の上に直接置く。囲うと本体（表や図）と競って重くなる。
*/
.bl-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.bl-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

.bl-toolbar__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--bl-border);
}

.bl-toolbar__label {
    font-size: 11px;
    font-weight: 700;
    color: var(--bl-text-muted);
}

.bl-toolbar__spacer { flex: 1 1 auto; }

/*
| 道具帯の中の絞り込みは、意匠に合わせて「見出しを上、札を下」の細い列に。
| 一覧画面のように横 1 本で置くと、5 つ並んだときに縦へ伸びてしまう。
*/
.bl-toolbar__filters .bl-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 0;
    /* 意匠の 1 群ぶんの幅。狭めると札が 1 個ずつ折り返して縦に伸びる */
    flex: 0 1 168px;
    min-width: 140px;
}

/*
| 札の置き場は 2 段ぶんで打ち止めにして、あとは中で送る。担当者のように
| 人数が増える群があると、帯だけで画面の半分を占めてしまう。
*/
.bl-toolbar__filters .bl-filter-row__chips {
    max-height: 62px;
    overflow-y: auto;
    align-content: flex-start;
}

.bl-toolbar__filters .bl-filter-row__label {
    width: auto;
    font-weight: 700;
}

/* 幅が足りないときは検索欄から縮める。名前や記号を欠けさせない */
.bl-header__inner > * { min-width: 0; }
.bl-header__search { flex: 0 1 auto; }
.bl-header__user { flex: none; }

/* ----------------------------------------------- 本文と道案内（意匠 T-17）
| Wiki のように「読む本文」と「行き先の案内」が並ぶ画面の骨。
| 狭い画面では案内を下へ回す。読むものが先で、案内は後。
*/
.bl-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.bl-split__main { min-width: 0; }
.bl-split__side { min-width: 0; }

@media (max-width: 900px) {
    .bl-split { grid-template-columns: minmax(0, 1fr); }
}

.bl-side-search {
    display: flex;
    gap: 6px;
}

.bl-side-search input { flex: 1 1 auto; min-width: 0; }

/* 見出しやページ名の並び。字下げで階層を示す */
.bl-outline {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bl-outline__item {
    display: block;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--bl-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-outline__item:hover { background: var(--bl-subtle); text-decoration: none; }

.bl-outline__item.is-on {
    background: var(--bl-subtle);
    color: var(--bl-good-text);
    font-weight: 700;
}

.bl-outline__item--l3 { padding-left: 18px; color: var(--bl-text-muted); }
.bl-outline__item--l4 { padding-left: 30px; color: var(--bl-text-muted); }

/* 目次から飛んだとき、見出しがヘッダの下に潜らないようにする */
.bl-markup :is(h2, h3, h4, h5, h6) { scroll-margin-top: 64px; }

/* ------------------------------------------------- まとめ操作の帯（意匠 T-17）
| 表の上に置いて、チェックした行に何をするかを選ぶ。
*/
.bl-bulkbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--bl-border);
    background: var(--bl-subtle);
}

.bl-list__check { width: 34px; text-align: center; }
.bl-list__check input { margin: 0; }

.bl-file-icon { color: var(--bl-text-muted); margin-right: 2px; }

.bl-rename > td { background: var(--bl-subtle); }

/* 帯の中に並べる小さな form。1 行に収めて背を揃える */
.bl-inline-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/*
| 取り消しにくい操作のボタン。色だけを変え、形は他と同じにする。
| 形まで目立たせると、押す前に読む欄より先に目へ入ってしまう。
*/
.bl-btn--danger {
    color: var(--bl-danger);
    border-color: var(--bl-danger);
}

.bl-btn--danger:hover {
    background: var(--bl-danger);
    color: var(--bl-surface);
}

.bl-notice--error {
    border-color: var(--bl-danger);
    color: var(--bl-danger);
    background: var(--bl-surface);
}

/* ------------------------------------------------------- 設定の骨（意匠 T-17）
| 設定は項目が多い。横一列に並べると端が切れるか 2 段に折り返して、
| 今どこにいるのかが読みにくい。意匠に倣って左の柱に積む。
*/
/*
| 名前の帯。意匠では設定の面の上に、白い帯で持ち主の名前だけを出す。
| パンくずと同じ高さに並べると、どちらが今の場所か読めなくなる。
*/
.bl-settings__band {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
}

.bl-settings__band > div:first-child { flex: 1; min-width: 0; }

.bl-settings__name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-settings__sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-settings {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    overflow: hidden;
}

/*
| 柱は面ごと灰色にする。意匠のとおり。境目が色で付くので、
| 「ここまでが行き先」が罫線に頼らず読める。
*/
.bl-settings__rail {
    display: flex;
    flex-direction: column;
    padding: 14px 0;
    background: var(--bl-muted-bg);
    border-right: 1px solid var(--bl-border);
}

.bl-settings__group { padding-bottom: 8px; }

.bl-settings__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 20px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bl-text-quiet);
}

.bl-settings__link {
    display: block;
    margin: 0 12px 3px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    color: var(--bl-text-quiet);
    text-decoration: none;
}

.bl-settings__link:hover {
    background: var(--bl-row-hover);
    color: var(--bl-text);
    text-decoration: none;
}

/* いま居るところ。白く浮かせて、灰色の柱から 1 枚だけ抜き出す */
.bl-settings__link.is-on {
    background: var(--bl-surface);
    border-color: var(--bl-border-strong);
    color: var(--bl-text);
    font-weight: 700;
}

.bl-settings__body {
    min-width: 0;
    padding: 22px 26px 34px;
    background: var(--bl-surface);
}

/*
| 設定の面の中のカード。
|
| 意匠の設定は「白い面に、太い見出しと欄が縦に並ぶ」で、面の中に
| もう 1 枚カードを置かない。12 の画面が .bl-card で組んであるので、
| 面の中では枠と地色を消して見出しの帯だけにする。画面ごとに
| 書き直さなくても、意匠の見え方になる。
*/
.bl-settings__body .bl-card {
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    margin: 0 0 28px;
    max-width: 760px;
}

.bl-settings__body .bl-card:last-child { margin-bottom: 0; }

.bl-settings__body .bl-card__head {
    padding: 0 0 14px;
    border: 0;
    background: none;
    font-size: 16px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-settings__body .bl-card__head .bl-small { font-size: 12px; font-weight: 400; }
.bl-settings__body .bl-card__body { padding: 0; }
.bl-settings__body .bl-card__body--flush { padding: 0; }

/* 一覧を持つカードは、表だけ枠で囲う（面の縁と表の縁が重ならないように） */
.bl-settings__body .bl-card .bl-table-scroll {
    border: 1px solid var(--bl-border);
    border-radius: 10px;
    overflow: hidden;
}

/* 欄は意匠の幅（350px）で止める。横いっぱいに伸びた入力欄は、短い値ほど読みにくい */
.bl-settings__body .bl-field { max-width: 350px; }
.bl-settings__body .bl-field label { font-size: 12px; color: var(--bl-text-quiet); font-weight: 400; }
.bl-settings__body .bl-field textarea { max-width: 550px; }
.bl-settings__body .bl-field--wide, .bl-settings__body .bl-field.bl-login__field { max-width: 550px; }

/* 面の見出し。太い字と、その右に添える件数や断り書き */
.bl-panel { display: flex; flex-direction: column; gap: 16px; }

.bl-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bl-panel__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-panel__note {
    height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--bl-muted-bg);
    font-size: 11px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-panel__actions { margin-left: auto; }

/* 面の中の欄。1 列に積んで、見出しを字で示す */
.bl-panel__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 430px;
}

.bl-panel__label { font-size: 13px; color: var(--bl-text-quiet); }

/* スペースの印。意匠の「スペース画像」の代わりに頭文字を出す */
.bl-panel__mark {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bl-green);
    color: var(--bl-on-accent);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .02em;
}

/*
| 容量の帯。案件ごとの取り分を横に並べる。
| 意匠は「1 GB 中 157 MB」だが、こちらに利用プランが無いので
| 総量に対する取り分（何がかさんでいるか）だけを見せる。
*/
.bl-usage {
    display: flex;
    height: 22px;
    border: 1px solid var(--bl-border-strong);
    border-radius: 3px;
    background: var(--bl-surface);
    overflow: hidden;
}

.bl-usage__seg { height: 100%; }

.bl-usage__legend {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bl-usage__key {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-usage__chip {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex: none;
}

.bl-usage__total {
    border-radius: 3px;
    background: var(--bl-subtle);
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--bl-text);
}

.bl-panel__form { display: flex; flex-direction: column; gap: 18px; }

/* 変えられない値。入力欄と同じ場所に、枠なしで置く */
.bl-panel__value { margin: 0; font-size: 13px; color: var(--bl-text); }

/* 意匠は保存を右端に寄せる。欄より下、面の幅いっぱいで */
.bl-panel__actions-row {
    display: flex;
    justify-content: flex-end;
    max-width: 430px;
}

/* 一覧の中の案件の印。柱やカードのものより一回り小さい */
.bl-pmark {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* 開け閉めの取っ手。動きの一覧や案件の一覧と同じ見え方にする */
.bl-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
}

/* 数の列。桁を揃えて右に寄せる */
.bl-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* 絞り込みの帯。一覧の上に置く */
.bl-panel__filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-radius: 3px;
    background: var(--bl-subtle);
    padding: 12px 14px;
}

.bl-panel__filter label { font-size: 12px; color: var(--bl-text-quiet); white-space: nowrap; }

.bl-panel__filter input[type="search"],
.bl-panel__filter input[type="text"] {
    flex: 1 1 240px;
    min-width: 0;
    border-radius: 999px;
}

/* 狭い画面では柱を上に寝かせ、横に流す */
@media (max-width: 820px) {
    .bl-settings { grid-template-columns: minmax(0, 1fr); }

    .bl-settings__rail {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        border-right: 0;
        border-bottom: 1px solid var(--bl-border);
        padding: 12px;
    }

    .bl-settings__group {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 0;
    }

    .bl-settings__head { padding: 0 8px 0 0; }

    .bl-settings__link { margin: 0; }

    .bl-settings__body { padding: 18px 16px 26px; }
}

/*
|==============================================================================
| 骨格（意匠 T-17 第 2 段）
|==============================================================================
| 意匠の作り：
|
|   ┌──────────────────────────────────────────┐ 52px 濃い帯
|   │ B  ダッシュボード プロジェクト …   ⌕検索  🔔 ? 田 │ 全体の行き先
|   ├────────────┬─────────────────────────────┤
|   │ 244px の柱  │ 62px  パンくず      [課題の追加] │
//  │ プロジェクト │─────────────────────────────│
|   │ の行き先     │ 本文  padding 0 32px 48px    │
|   └────────────┴─────────────────────────────┘
|
| 柱はプロジェクトの中にいるときだけ出す。一覧やダッシュボードには出さない。
*/

body {
    background: var(--bl-bg);
}

.bl-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ------------------------------------------------------------------ 濃い帯 */

.bl-top {
    flex: none;
    height: var(--bl-top-h);
    background: var(--bl-header);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.bl-top__logo {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--bl-header-raised);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.bl-top__logo:hover { background: var(--bl-header-hover); text-decoration: none; }

.bl-top__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.bl-top__link {
    display: block;
    padding: 0 12px;
    line-height: 32px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--bl-header-text);
    text-decoration: none;
    white-space: nowrap;
}

.bl-top__link:hover {
    background: var(--bl-header-raised);
    color: #fff;
    text-decoration: none;
}

.bl-top__link.is-on {
    background: var(--bl-header-raised);
    color: #fff;
    font-weight: 500;
}

/* 「＋」。意匠では緑の丸で、ここだけが色を持つ */
.bl-top__add {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bl-green);
    color: #fff;
    font-size: 15px;
    line-height: 26px;
    text-align: center;
    text-decoration: none;
}

.bl-top__add:hover { background: var(--bl-green-dark); color: #fff; text-decoration: none; }

.bl-top__spacer { flex: 1 1 auto; min-width: 8px; }

.bl-top__search {
    flex: 0 1 300px;
    min-width: 0;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--bl-header-input-bg);
}

.bl-top__search::before {
    content: '⌕';
    flex: none;
    font-size: 12px;
    color: var(--bl-header-placeholder);
}

.bl-top__search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    font-size: 12px;
}

.bl-top__search input::placeholder { color: var(--bl-header-placeholder); }
.bl-top__search input:focus { outline: none; }

/* 送信ボタンは要らない。Enter で送れるので、帯の中では隠す */
.bl-top__search button {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.bl-top__icon {
    flex: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: var(--bl-header-icon);
    text-decoration: none;
    position: relative;
}

.bl-top__icon:hover { background: var(--bl-header-raised); color: #fff; text-decoration: none; }

.bl-top__count {
    position: absolute;
    top: 1px;
    right: 1px;
    min-width: 14px;
    padding: 0 3px;
    border-radius: 999px;
    background: var(--bl-danger);
    color: var(--bl-on-danger);
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

.bl-top__me {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px 0 6px;
    border-radius: 999px;
    text-decoration: none;
}

.bl-top__me:hover { background: var(--bl-header-raised); text-decoration: none; }
.bl-top__me .bl-avatar { width: 26px; height: 26px; font-size: 11px; }
.bl-top__caret { color: var(--bl-header-icon); font-size: 11px; }

.bl-top__rule {
    flex: none;
    width: 1px;
    height: 24px;
    margin: 0 10px;
    background: var(--bl-header-rule);
}

.bl-top__space {
    flex: none;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--bl-header-space);
    text-decoration: none;
    white-space: nowrap;
}

.bl-top__space:hover { color: #fff; text-decoration: none; }

.bl-top__space-mark {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bl-header-raised);
    color: var(--bl-header-space);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------ 柱と本文の並び */

.bl-shell {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    min-height: 0;
}

.bl-side {
    flex: 0 0 var(--bl-side-w);
    background: var(--bl-surface);
    border-right: 1px solid var(--bl-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--bl-top-h);
    align-self: flex-start;
    max-height: calc(100vh - var(--bl-top-h));
    overflow-y: auto;
}

.bl-side__head { padding: 22px 14px 18px; }

/* 案件の名前は淡い面の板に載せる。柱の中で 1 段上に見える */
.bl-side__card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px 14px;
    border-radius: 12px;
    background: var(--bl-subtle);
    text-decoration: none;
}

.bl-side__card:hover { background: var(--bl-row-hover); text-decoration: none; }

.bl-side__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--bl-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-side__meta {
    font-size: 11px;
    color: var(--bl-text-muted);
    letter-spacing: .06em;
}

.bl-side__nav {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 14px;
}

.bl-side__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    line-height: 19px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--bl-text-quiet);
    text-decoration: none;
}

.bl-side__link:hover { background: var(--bl-subtle); color: var(--bl-text); text-decoration: none; }

.bl-side__link.is-on {
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-side__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-side__count {
    flex: none;
    font-size: 11px;
    color: var(--bl-text-quiet);
    font-variant-numeric: tabular-nums;
}

/* 選んでいる行では、面が淡い緑になるので行の色をそのまま継ぐ */
.bl-side__link.is-on .bl-side__count { color: inherit; }

.bl-side__foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 20px 22px;
}

.bl-side__foot .bl-avatar { width: 30px; height: 30px; font-size: 12px; }
.bl-side__who { min-width: 0; }
.bl-side__who strong { display: block; font-size: 12px; font-weight: 400; }

.bl-side__role {
    display: block;
    font-size: 11px;
    color: var(--bl-text-muted);
}

/* ---------------------------------------------------------------- 本文の側 */

.bl-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* パンくずと、その画面の主な操作を載せる帯 */
.bl-bar {
    flex: none;
    min-height: var(--bl-bar-h);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 var(--bl-gutter);
}

.bl-bar__crumb {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    overflow: hidden;
}

.bl-bar__crumb a {
    color: var(--bl-text-muted);
    text-decoration: none;
    white-space: nowrap;
}

.bl-bar__crumb a:hover { color: var(--bl-text); text-decoration: underline; }

.bl-bar__crumb > span:last-child {
    color: var(--bl-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-bar__crumb > span + span::before {
    content: '/';
    margin-right: 8px;
    color: var(--bl-border-strong);
    font-weight: 400;
}

.bl-bar__actions {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-content {
    flex: 1 1 auto;
    padding: 0 var(--bl-gutter) 48px;
    min-width: 0;
}

/* ------------------------------------------------------------ 狭い画面 */

@media (max-width: 960px) {
    .bl-shell { flex-direction: column; }

    .bl-side {
        flex: none;
        position: static;
        max-height: none;
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--bl-border);
    }

    .bl-side__nav { flex-direction: row; flex-wrap: wrap; }
    .bl-side__foot { display: none; }

    .bl-top__nav { display: none; }

    :root { --bl-gutter: 16px; }
}

/* --------------------------------------------------- 課題詳細（意匠 T-17） */

/*
| 意匠は 1 列。件名・登録者・本文・関連課題・基本情報を **1 枚のカード**に
| まとめる。ここまでが「この課題そのもの」で、添付・子課題・コメントは
| 別のカードに分かれる。
|
| 基本情報を右の脇に出さないのは、本文の幅が狭まって詳細や再現手順が
| 読みにくくなるため。本文の続きに 2 列で畳む。
*/
.bl-issue > div { min-width: 0; }

.bl-issue-card {
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    background: var(--bl-surface);
    padding: 22px 26px 14px;
    margin-bottom: 18px;
}

/* 1 行目。左に「何の課題か」、右に「いつまでに、今どこか」 */
.bl-issue-card__top {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bl-issue-card__gap { flex: 1; min-width: 8px; }

.bl-issue-card__key {
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-issue-card__date {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-issue-card__date.is-over { color: var(--bl-danger); font-weight: 700; }

.bl-issue-card__title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bl-issue-card__title {
    flex: 1 1 320px;
    min-width: 0;
    margin: 0;
    font-size: 22px;
    line-height: 1.55;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-issue-card__acts {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bl-issue-card__parent {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-issue-card__unhook { margin-left: 4px; }

/* 登録した人の行。ここまでが「誰の、いつの話か」 */
.bl-issue-card__by {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-issue-card__who { display: flex; flex-direction: column; gap: 3px; }

.bl-issue-card__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
    white-space: nowrap;
}

.bl-issue-card__at {
    font-size: 11px;
    color: var(--bl-text-muted);
    font-variant-numeric: tabular-nums;
}

.bl-issue-card__body { padding-top: 20px; }

/* 基本情報の開け閉め。意匠は面の下、真ん中に山形だけを置く */
.bl-issue-card__fold {
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.bl-fold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-fold:hover { background: var(--bl-row-hover); color: var(--bl-text); }

/*
| 丸い操作の札。意匠の詳細画面はボタンをすべて 999px の丸にしている。
| 四角い .bl-btn と混ぜると、同じ強さの操作が 2 通りの形で並ぶ。
*/
.bl-pill {
    /* button でも a でも同じ形にする。地色と字は自分で決める */
    appearance: none;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 13px;
    flex: 0 0 auto;
    border: 1px solid var(--bl-input-border);
    border-radius: 999px;
    background: var(--bl-surface);
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    text-decoration: none;
}

.bl-pill:hover {
    border-color: var(--bl-green);
    color: var(--bl-link);
    text-decoration: none;
}

.bl-pill.is-on {
    border-color: var(--bl-success-border);
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
}

.bl-pill--danger { color: var(--bl-error-text); }
.bl-pill--danger:hover { border-color: var(--bl-danger); color: var(--bl-error-text); }

/* 星を付けたものは色で示す。数字だけだと「付けたかどうか」が読めない */
.bl-pill.bl-star.is-on {
    border-color: var(--bl-notice-border);
    background: var(--bl-notice-bg);
    color: var(--bl-star);
}

/*
| 関連課題。本文と同じカードの中に、見出しと行だけで置く。
| 別のカードに切ると「この課題の話」と「よその課題の話」が並んでしまう。
*/
.bl-related { padding-top: 24px; }

.bl-related__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.bl-related__head .bl-fold { font-size: 13px; font-weight: 700; color: var(--bl-text); }

.bl-related__count {
    font-size: 12px;
    color: var(--bl-text-muted);
    font-variant-numeric: tabular-nums;
}

.bl-related__scroll { overflow-x: auto; }
.bl-related__rows { min-width: 640px; }

.bl-related__row {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr) 150px 104px 78px;
    gap: 12px;
    align-items: center;
    padding: 11px 4px;
    border-bottom: 1px solid var(--bl-rule-soft);
    color: inherit;
    text-decoration: none;
}

.bl-related__row:hover { background: var(--bl-row-hover); text-decoration: none; }

.bl-related__key {
    font-size: 12px;
    color: var(--bl-link);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-related__summary {
    font-size: 13px;
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-related__who { min-width: 0; }

.bl-related__due {
    font-size: 12px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-related__due.is-over { color: var(--bl-danger); }

/* 編集できるときは右端に「解除」の列が足される */
.bl-related__gap { flex: 1; min-width: 8px; }
.bl-related__rows--editable .bl-related__row { grid-template-columns: 116px minmax(0, 1fr) 150px 104px 78px 44px; }
.bl-related__unlink { color: var(--bl-text-muted); white-space: nowrap; }
.bl-related__unlink:hover { color: var(--bl-danger); }
.bl-related__empty { margin: 4px 0 0; font-size: 12px; color: var(--bl-text-muted); }
.bl-related__row a.bl-related__summary { color: var(--bl-text); }
.bl-related__row a.bl-related__summary:hover { text-decoration: underline; }

.bl-related__row .bl-badge--pill { justify-self: end; }

/*
| 基本情報。名前と値の組を 2 列に流す。列の幅は 320px を下限にして、
| 狭い画面では勝手に 1 列へ落ちる。
*/
.bl-fields {
    display: grid;
    /*
    | min() を挟むのは、面の幅が 320px を切ったときに列がはみ出さない
    | ようにするため。素の minmax(320px, 1fr) は下限を守るので、
    | 狭い画面では枠から 30px ほど飛び出す。
    */
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 0 40px;
    margin: 0;
    padding-top: 22px;
}

.bl-fields__row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bl-rule-soft);
}

.bl-fields dt { font-size: 12px; color: var(--bl-text-muted); }

.bl-fields dd {
    margin: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--bl-text);
}

/* ------------------------------------------------- 課題の登録・編集（意匠 T-17） */

/*
| 意匠は上から「操作の帯 → 種別 → 件名 → 詳細 → その他の項目」。
| 書くものが先、決めるものが後。状態や担当者を件名より先に並べると、
| 書きに来た人が毎回それを飛ばして下へ目を落とすことになる。
*/
.bl-form { display: flex; flex-direction: column; gap: 14px; }

/* 操作の帯。長い画面なので、保存を探して下まで巻かずに済むよう上に置く */
.bl-form__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.bl-form__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-form__gap { flex: 1; min-width: 8px; }

/* 下にも同じ組を置く。書き終えた場所からそのまま押せる */
.bl-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.bl-form__from { margin: 0 0 14px; font-size: 12px; color: var(--bl-text-muted); }

.bl-form__label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 700;
    color: var(--bl-text-muted);
}

/* 種別は選択肢が短いので、幅も詰める */
.bl-form__type select { width: 220px; max-width: 100%; }

/* 件名は主役。ほかの欄より一回り大きく、縁も強くする */
.bl-form__summary {
    width: 100%;
    height: 42px;
    font-size: 14px;
    border-color: var(--bl-green);
    border-radius: 10px;
}

/* 親課題の札。押すとポップアップが開く */
.bl-form__parent {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bl-pill--accent {
    border-color: var(--bl-success-border);
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-pill--accent:hover { background: var(--bl-mention-bg); color: var(--bl-selected-text); }

.bl-form__chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 30px;
    padding: 0 6px 0 12px;
    border: 1px solid var(--bl-input-border);
    border-radius: 8px;
    background: var(--bl-surface);
    font-size: 12px;
}

.bl-form__chip-key { color: var(--bl-link); white-space: nowrap; }

.bl-form__chip button {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-form__chip button:hover { background: var(--bl-row-hover); color: var(--bl-text); }

/*
| そのほかの項目。1 枚の面にまとめ、名前と中身の組を 2 列で流す。
|
| 列の下限は詳細の基本情報（320px）より広い 380px。こちらは触る欄で、
| 選択肢の一覧や「私が担当」の札まで入るぶん場所が要る。3 列に割れると
| 1 つあたりが狭くなり、選択肢の名前が切れる。
*/
.bl-form__card .bl-fields {
    grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
}

.bl-form__card {
    margin-top: 6px;
    padding: 8px 24px 16px;
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    background: var(--bl-surface);
}

/* 課題詳細の基本情報より 1 段ゆったり。ここは触る欄なので背が要る */
.bl-fields__row--form {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 15px 0;
}

.bl-fields__row--form dt { padding-top: 9px; }
.bl-fields__row--form dd { display: block; }

.bl-form__control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bl-form__control > select,
.bl-form__control > textarea { flex: 1 1 180px; min-width: 0; }

.bl-form__control > input[type="file"] { flex: 1 1 220px; min-width: 0; }

/* 日付と時間は桁が決まっている。伸ばしても読みやすくならない */
.bl-form__narrow { flex: 0 1 200px; min-width: 0; }

.bl-form__suffix { font-size: 12px; color: var(--bl-text-muted); white-space: nowrap; }

.bl-form__hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.7;
    color: var(--bl-text-muted);
}

/*
| 複数選ぶ欄。<select multiple> は使わない（ctrl を押しながら、という
| 約束を要らなくする）。押して選ぶ・押して外すだけ。
*/
.bl-form__many {
    flex: 1 1 180px;
    min-width: 0;
    max-height: 132px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--bl-input-border);
    border-radius: var(--bl-radius-control);
    background: var(--bl-surface);
}

.bl-form__option {
    display: block;
    width: 100%;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 12px;
    color: var(--bl-text-quiet);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-form__option:hover { background: var(--bl-row-hover); color: var(--bl-text); }

.bl-form__option.is-on {
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-form__note { margin-top: 18px; }

@media (max-width: 720px) {
    .bl-form__card { padding: 4px 14px 12px; }
    .bl-fields__row--form { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .bl-fields__row--form dt { padding-top: 0; }
}

/* ------------------------------------------------- プロジェクトホーム（意匠 T-17） */

/* 上の帯。案件の印と名前、右端にメンバーの顔を重ねる */
.bl-phome__head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 20px;
}

.bl-phome__mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
}

.bl-phome__name { margin: 0; font-size: 17px; font-weight: 700; color: var(--bl-text); white-space: nowrap; }
.bl-phome__key { font-size: 12px; color: var(--bl-text-muted); letter-spacing: .04em; }
.bl-phome__gap { flex: 1; min-width: 8px; }

/* 顔を重ねる。縁を地の色で抜いて、重なりが読めるようにする */
.bl-phome__faces { display: flex; align-items: center; padding-left: 6px; }

.bl-phome__face {
    margin-left: -6px;
    border-radius: 50%;
    border: 2px solid var(--bl-bg);
    display: flex;
}

.bl-phome__face--more {
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: var(--bl-muted-bg);
    color: var(--bl-text-quiet);
    font-size: 10px;
}

/* 左に動き、右に今の状態。狭い画面では縦に積む */
.bl-phome {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.bl-phome__main { flex: 1 1 460px; min-width: 0; }
.bl-phome__side { flex: 1 1 300px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }

.bl-phome__section { display: flex; flex-direction: column; gap: 10px; }
.bl-phome__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--bl-text); }

.bl-phome__card {
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    background: var(--bl-surface);
    padding: 18px;
}

.bl-phome__card--list { padding: 6px 18px 14px; }

/* 状態の帯。左から右へ進んでいくように、状態の並び順のまま塗る */
.bl-phome__bar {
    display: flex;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bl-muted-bg);
}

.bl-phome__bar > span { height: 100%; }

.bl-phome__rate {
    margin: 8px 0 0;
    text-align: right;
    font-size: 11px;
    color: var(--bl-text-quiet);
    font-variant-numeric: tabular-nums;
}

.bl-phome__chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.bl-phome__chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.bl-phome__chip:hover { text-decoration: none; }

.bl-phome__chip-name {
    font-size: 11px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bl-phome__chip-count {
    width: 100%;
    padding: 5px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    background: var(--bl-muted-bg);
}

/* マイルストーン・カテゴリーの 1 行 */
.bl-phome__row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--bl-rule-soft);
}

.bl-phome__row:last-child { border-bottom: 0; }

.bl-phome__row-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 12px;
}

.bl-phome__row-head a { font-weight: 500; }

.bl-phome__row-rate {
    margin-left: auto;
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bl-phome__row-sub { font-size: 11px; color: var(--bl-text-muted); font-variant-numeric: tabular-nums; }

.bl-phome__meter {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bl-muted-bg);
}

.bl-phome__meter > span { display: block; height: 100%; border-radius: 999px; background: var(--bl-green); }

/* カテゴリーは違う色で。状態の進み具合と読み違えないように */
.bl-phome__meter--cat > span { background: var(--bl-act-add-fg); }

@media (max-width: 520px) {
    .bl-phome__chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------- ファイル（意匠 T-17） */

/* 左右 2 段。左に一覧、右に「最近」と「検索」。狭い画面では縦に積む */
.bl-files { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.bl-files__main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.bl-files__side { flex: 1 1 320px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; }
.bl-files__gap { flex: 1; min-width: 8px; }

.bl-files__head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 今いる場所。「ファイル / フォルダ名」を太字で並べる */
.bl-files__path {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-files__path a { color: var(--bl-text-quiet); }
.bl-files__path a:hover { color: var(--bl-link); }
.bl-files__crumb { display: inline-flex; align-items: center; gap: 8px; }
.bl-files__crumb > span:last-child { color: var(--bl-link); }
/* 仕切りも字なので、読める濃さにする（罫線の色では 1.8:1 しか出ない） */
.bl-files__slash { font-size: 14px; font-weight: 400; color: var(--bl-text-muted); }

.bl-files__card,
.bl-files__panel {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
}

.bl-files__card { overflow: hidden; }
.bl-files__panel { padding: 16px; }
.bl-files__panel--list { padding: 6px 16px 12px; }

/* まとめ操作の帯。一覧の上と下に同じものを置く */
.bl-files__bulk {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 16px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-files__card > .bl-files__bulk:last-child { border-bottom: 0; border-top: 1px solid var(--bl-rule); }
.bl-files__bulk select { width: auto; }

.bl-files__table th.bl-num, .bl-files__table td.bl-num { text-align: right; }
.bl-files__by { text-align: right; }
.bl-files__by .bl-user { justify-content: flex-end; }

/* 新しいフォルダ。1 行の欄 */
.bl-files__new {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bl-files__new-label { font-size: 13px; color: var(--bl-text-quiet); white-space: nowrap; }
.bl-files__new input[type="text"] { flex: 1 1 260px; min-width: 0; border-color: var(--bl-green); }

/* 新しいファイル。破線の置き場 */
.bl-files__new-file { display: flex; flex-direction: column; gap: 14px; }

.bl-files__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 20px;
    border: 2px dashed var(--bl-border-strong);
    border-radius: 12px;
    background: var(--bl-code-bg);
    text-align: center;
}

.bl-files__drop.is-over { border-color: var(--bl-green); background: var(--bl-selected-bg); }

.bl-files__drop-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--bl-text-quiet);
}

.bl-files__submit { display: flex; align-items: center; justify-content: center; gap: 12px; }

.bl-files__section { display: flex; flex-direction: column; gap: 10px; }
.bl-files__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--bl-text); }

/* 最近更新されたファイルの 1 行 */
.bl-files__recent {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bl-rule-soft);
    text-decoration: none;
}

.bl-files__recent:last-child { border-bottom: 0; }
.bl-files__recent:hover { text-decoration: none; }
.bl-files__recent:hover .bl-files__recent-name { text-decoration: underline; }

.bl-files__recent-name {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 13px;
    color: var(--bl-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-files__recent-sub { font-size: 11px; line-height: 1.6; color: var(--bl-text-muted); }

/* 検索の欄 */
.bl-files__search { display: flex; flex-direction: column; gap: 14px; }
.bl-files__field { display: flex; flex-direction: column; gap: 7px; }
.bl-files__field > span { font-size: 12px; color: var(--bl-text-quiet); }
.bl-files__range { display: flex; align-items: center; gap: 10px; }
.bl-files__range > input, .bl-files__range > select { flex: 1 1 0; min-width: 0; }

/* ------------------------------------------------- Wiki（意匠 T-17） */

/* 左右 2 段。左に紙、右に道案内。狭い画面では縦に積む */
.bl-wiki { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.bl-wiki__main { flex: 1 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.bl-wiki__side { flex: 1 1 300px; max-width: 100%; display: flex; flex-direction: column; gap: 20px; }
.bl-wiki__gap { flex: 1; min-width: 8px; }

.bl-wiki__bar,
.bl-wiki__page-row {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-wrap: wrap;
}

.bl-wiki__heading { margin: 0; font-size: 15px; font-weight: 700; color: var(--bl-text); }
.bl-wiki__heading a { color: inherit; }
.bl-wiki__page-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--bl-text); min-width: 0; }

.bl-wiki__paper {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    padding: 26px 30px 30px;
}

.bl-wiki__paper--flush { padding: 0; overflow: hidden; }

/* 紙の中の見出し。意匠は h1 の下に緑の太線、h2 の下に細い線 */
.bl-wiki__paper .bl-markup h1 {
    font-size: 20px;
    line-height: 1.5;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bl-green);
    margin: 0 0 .8em;
}

.bl-wiki__by {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding-top: 4px;
    font-size: 12px;
    color: var(--bl-text-quiet);
}

.bl-wiki__section { display: flex; flex-direction: column; gap: 10px; }

.bl-wiki__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-wiki__count { font-size: 12px; font-weight: 400; color: var(--bl-text-muted); }

.bl-wiki__panel {
    border: 1px solid var(--bl-border);
    border-radius: 10px;
    background: var(--bl-surface);
    padding: 14px;
}

.bl-wiki__panel--list { padding: 6px; display: flex; flex-direction: column; }

.bl-wiki__search { display: flex; align-items: center; gap: 10px; }
.bl-wiki__search input { flex: 1; min-width: 0; }

.bl-wiki__link {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 13px;
    color: var(--bl-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.bl-wiki__link:hover { background: var(--bl-row-hover); text-decoration: none; }
.bl-wiki__link.is-on { background: var(--bl-selected-bg); color: var(--bl-selected-text); font-weight: 500; }

/* 見出しは段で下げる。本文の中の位置が読めるように */
.bl-wiki__link--l2 { padding-left: 24px; font-size: 12px; }
.bl-wiki__link--l3 { padding-left: 36px; font-size: 12px; }
.bl-wiki__link--l4 { padding-left: 48px; font-size: 12px; }

/* ------------------------------------------------- 案件の収支（意匠 T-17） */

/* 期間の帯。‹ 開始 〜 終了 › 全期間。押した瞬間に引き直す */
.bl-pl__period {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 16px;
}

.bl-pl__gap { flex: 1; min-width: 8px; }
.bl-pl__date { flex: 0 1 150px; min-width: 0; }

.bl-pl__arrow {
    width: 28px;
    height: 28px;
    flex: none;
    border: 1px solid var(--bl-input-border);
    border-radius: 8px;
    background: var(--bl-surface);
    color: var(--bl-text-quiet);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.bl-pl__arrow:hover { border-color: var(--bl-green); color: var(--bl-link); }

.bl-pl__alert { margin: 0 0 18px; }

/* メンバー別と受注を横に並べる。狭ければ縦に */
.bl-pl__row { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin-bottom: 18px; }

.bl-pl__card {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.bl-pl__row > .bl-pl__card { margin-bottom: 0; }
.bl-pl__members { flex: 1 1 340px; min-width: 0; }
.bl-pl__contract { flex: 1 1 300px; min-width: 0; }
.bl-pl__card--flush { padding: 0; gap: 0; overflow: hidden; }

.bl-pl__head { display: flex; align-items: center; gap: 10px; }
.bl-pl__head--rule { padding: 15px 20px; border-bottom: 1px solid var(--bl-rule); }
.bl-pl__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--bl-text); }
.bl-pl__note { margin-left: auto; font-size: 11px; color: var(--bl-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* メンバーの 1 行。顔・名前・（単価未設定）・時間・原価、その下に帯と割合 */
.bl-pl__member { display: flex; flex-direction: column; gap: 7px; }
.bl-pl__member-line { display: flex; align-items: center; gap: 10px; min-width: 0; }

.bl-pl__member-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-pl__unrated {
    flex: none;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bl-notice-bg);
    color: var(--bl-warn-ink);
    font-size: 10px;
    white-space: nowrap;
}

.bl-pl__member-hours { flex: none; font-size: 12px; color: var(--bl-text-quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-pl__member-cost { flex: 0 0 78px; text-align: right; font-size: 12px; color: var(--bl-text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-pl__member-line .bl-share { flex: 1; }
.bl-pl__share { flex: 0 0 40px; text-align: right; font-size: 11px; color: var(--bl-text-muted); font-variant-numeric: tabular-nums; }

.bl-pl__contract-form { display: flex; align-items: center; gap: 10px; }
.bl-pl__contract-form input { width: 160px; }
.bl-pl__contract-sum { margin: 0; font-size: 11px; color: var(--bl-text-quiet); font-variant-numeric: tabular-nums; }

.bl-pl__table th.bl-num, .bl-pl__table td.bl-num { text-align: right; }

/* ------------------------------------------------- 課題一覧の帯とまとめて操作 */

/* 表の上の帯。左に件数（選択中なら操作）、右に「まとめて操作」ほか */
.bl-listbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bl-listbar__gap { flex: 1; min-width: 8px; }

/*
| 選んだ件数。緑のボタンの中に置く。
|
| 白を重ねて明るくすると、白い字との差が 3.4:1 まで落ちる。黒を重ねて
| **暗くする**ほうへ倒す（下の緑がどの明るさでも、白との差が広がる）。
*/
.bl-listbar__count {
    min-width: 18px;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .24);
    font-size: 11px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* 一覧は列が増えると横に伸びる。表だけを流す */
.bl-listbar + .bl-alert { margin-bottom: 12px; }

/* ------------------------------------------------------------ 表示設定 */


.bl-display {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px 26px 26px;
    overflow-y: auto;
}

.bl-display__section { display: flex; flex-direction: column; gap: 12px; }

.bl-display__title {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-display__note { font-size: 11px; font-weight: 400; color: var(--bl-text-muted); }

.bl-display__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bl-display__row select { flex: 0 1 200px; width: auto; }

/* 出す列。名前が長いものもあるので、下限を広めに取る */
.bl-display__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px 20px;
}

.bl-display__actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------- まとめて操作 */

/* 中身が背の高い作りなので、上寄せではなく中央に置く */
.bl-modal--center { align-items: center; padding: 28px; }

/*
| 左に選んだ課題、右に編集する欄。**横に 2 列。**
| 何件に効くのかを見ながら欄を決められるように、両方を同時に見せる。
| 折り返しは使わない（折り返すと、箱が少し狭いだけで縦に積まれる）。
| 狭い画面では下の @media で縦に積む。
*/
.bl-bulk__panes {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.bl-bulk__picked {
    flex: 0 0 38%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--bl-border);
}

.bl-bulk__count {
    margin: 0;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--bl-rule);
    font-size: 12px;
    color: var(--bl-text-quiet);
    font-variant-numeric: tabular-nums;
}

.bl-bulk__list { flex: 1; min-height: 120px; overflow-y: auto; }

.bl-bulk__row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
    padding: 13px 20px;
    border-bottom: 1px solid var(--bl-rule-soft);
}

.bl-bulk__key { font-size: 12px; color: var(--bl-link); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-bulk__summary { font-size: 13px; line-height: 1.6; color: var(--bl-text); }

.bl-bulk__form {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bl-bg);
}

.bl-bulk__lead {
    margin: 0;
    padding: 16px 22px 12px;
    border-bottom: 1px solid var(--bl-border);
    font-size: 12px;
    color: var(--bl-text-quiet);
}

.bl-bulk__fields { padding: 4px 22px 8px; }

/* 「名前 | 中身」の組。課題の登録・編集と同じ寸法にする */
.bl-bulk__field {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-bulk__field--tall { align-items: start; border-bottom: 0; }
.bl-bulk__field--tall .bl-bulk__label { padding-top: 10px; }

.bl-bulk__label { font-size: 12px; color: var(--bl-text-quiet); }

.bl-bulk__control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-bulk__control > select { flex: 1 1 190px; min-width: 0; max-width: 280px; }
.bl-bulk__control > input[type="date"] { flex: 0 1 170px; min-width: 0; }

.bl-bulk__notice {
    margin: 0 22px 20px;
    padding: 10px 14px;
    border: 1px solid var(--bl-notice-border);
    border-radius: 9px;
    background: var(--bl-notice-bg);
    color: var(--bl-warn-ink);
    font-size: 12px;
    line-height: 1.7;
}

.bl-bulk__foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 22px;
    border-top: 1px solid var(--bl-border);
    background: var(--bl-surface);
}

.bl-bulk__gap { flex: 1; min-width: 8px; }

/* 2 列が入らない幅では縦に積む。一覧は背を抑えて、欄が見えるようにする */
@media (max-width: 900px) {
    .bl-bulk__panes { flex-direction: column; overflow-y: auto; }
    .bl-bulk__picked { flex: none; border-right: 0; border-bottom: 1px solid var(--bl-border); }
    .bl-bulk__list { max-height: 32vh; }
    .bl-bulk__form { overflow: visible; }
}

@media (max-width: 720px) {
    .bl-bulk__field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .bl-bulk__field--tall .bl-bulk__label { padding-top: 0; }
}

/* ------------------------------------------------ ガントのバーを掴む */

/* 掴めるバーだけ手の形にする。掴めないものが掴めそうに見えない方がよい */
.bl-gantt__bar.is-grabbable { cursor: grab; }
.bl-gantt__bar.is-grabbable:active { cursor: grabbing; }

/*
| 端の取っ手。細いと掴めないので、見た目より広い当たりを持たせる
| （見えている幅は 3px、掴める幅は 10px）。
*/
.bl-gantt__grip {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    cursor: ew-resize;
    touch-action: none;
}

.bl-gantt__grip--start { left: -3px; }
.bl-gantt__grip--end { right: -3px; }

/* 掴めるところが分かるよう、バーに触れたときだけ線を出す */
.bl-gantt__bar.is-grabbable:hover .bl-gantt__grip::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .85);
}

/* 掴んでいる最中に文字が選択されると、掴んだまま範囲が伸びて見える */
.bl-gantt__bar { touch-action: none; user-select: none; }

/* ------------------------------------------------ 絵文字と記法の早見 */

/* 絵文字の一覧。名前で絞り込めるので、並びは覚えやすい順のまま */
.bl-editor__picker--emoji { width: 268px; }

.bl-editor__emoji {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.bl-editor__emoji button {
    appearance: none;
    border: 0;
    border-radius: 7px;
    background: none;
    /*
    | 字の色を継がせる。button は既定で buttontext（黒）になるので、
    | 暗い配色では黒地に黒になる。**絵文字は自前の色を持つので普段は
    | 見えるが**、色を持たない字形で描かれる環境（絵文字の書体が無い、
    | ❗ や ✅ のように文字としての姿もあるもの）では読めなくなる。
    */
    color: inherit;
    padding: 4px 0;
    font-size: 17px;
    line-height: 1.2;
    cursor: pointer;
}

.bl-editor__emoji button:hover { background: var(--bl-subtle); }

/* 記法の早見。入力欄の下に開き、閉じれば元の高さに戻る */
.bl-editor__help {
    border-top: 1px solid var(--bl-border);
    padding: 12px 14px 14px;
    background: var(--bl-code-bg);
}

.bl-editor__help-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

.bl-editor__help-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 4px 20px;
    margin: 0;
}

/* 「書き方」と「何になるか」を 1 行に並べる */
.bl-editor__help-list > div {
    display: grid;
    grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding: 2px 0;
}

.bl-editor__help-list dt { margin: 0; min-width: 0; }

.bl-editor__help-list dt code {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.bl-editor__help-list dd {
    margin: 0;
    font-size: 11px;
    color: var(--bl-text-quiet);
}

/* -------------------------------------------- バックログ（スプリント） */

.bl-backlog__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bl-backlog__bar input[type="text"] { flex: 0 1 240px; }
.bl-backlog__bar select { flex: 0 1 180px; }
.bl-backlog__gap { flex: 1; min-width: 8px; }

.bl-backlog__picked {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid var(--bl-border);
    border-radius: 999px;
    background: var(--bl-surface);
}

/* 左に段、右に柱。狭ければ柱を下へ回す */
.bl-backlog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.bl-backlog__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bl-backlog__rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

@media (max-width: 1000px) {
    .bl-backlog { grid-template-columns: minmax(0, 1fr); }
}

/* ---- 段 ---- */

.bl-sprint {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    overflow: hidden;
}

/* いま動いている期間だけ、左に印を付ける */
.bl-sprint.is-running { border-left: 3px solid var(--bl-green); }

.bl-sprint__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border-bottom: 1px solid var(--bl-rule);
    background: var(--bl-code-bg);
}

.bl-sprint__caret {
    appearance: none;
    border: 0;
    background: none;
    color: var(--bl-text-quiet);
    font: inherit;
    cursor: pointer;
    padding: 0 2px;
}

.bl-sprint__title { font-size: 13px; font-weight: 700; color: var(--bl-text); }
.bl-sprint__points { font-size: 12px; color: var(--bl-text-quiet); font-variant-numeric: tabular-nums; }
.bl-sprint__form { padding: 14px; border-bottom: 1px solid var(--bl-rule); }

.bl-sprint .bl-alert { margin: 10px 14px; }

/* ---- 1 件 ---- */

.bl-sprint__item {
    display: grid;
    grid-template-columns: 16px 16px auto 88px minmax(0, 1fr) 24px auto 40px auto auto;
    gap: 10px;
    align-items: center;
    padding: 9px 14px;
    border-bottom: 1px solid var(--bl-rule-soft);
    font-size: 12px;
}

.bl-sprint__item:last-of-type { border-bottom: 0; }

/* 終わったものは沈める。消さないのは、何が終わったのかを見せるため */
.bl-sprint__item.is-done .bl-sprint__summary { color: var(--bl-text-muted); }

.bl-sprint__grip { color: var(--bl-text-muted); cursor: grab; }
.bl-sprint__item[draggable="true"]:active { cursor: grabbing; }

.bl-sprint__key { color: var(--bl-link); white-space: nowrap; font-variant-numeric: tabular-nums; }

.bl-sprint__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.bl-sprint__summary {
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-sprint__body .bl-small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-sprint__pri { color: var(--bl-text-quiet); text-align: center; }

.bl-sprint__item select { height: 28px; font-size: 11px; max-width: 130px; }

/*
| 狭い画面では段の列を畳んで、折り返す並びにする。
|
| **隠さずに折り返す。** 列を落とすと、そこに居た「移す」やポイントの
| ＋ / − まで消える。段は .bl-sprint が overflow: hidden で切るので、
| はみ出したぶんは画面から辿れなくなる（横に流れないぶん気づけない）。
*/
@media (max-width: 760px) {
    .bl-sprint__item {
        display: flex;
        flex-wrap: wrap;
        row-gap: 6px;
    }

    /* 件名は 1 行を丸ごと使う。ほかは横に並べる */
    .bl-sprint__body { flex: 1 1 100%; order: -1; }
    .bl-sprint__item select { max-width: 100%; }
}

.bl-sprint__drop {
    margin: 0;
    border: 1px dashed var(--bl-border);
    border-radius: 10px;
    margin: 10px 14px;
}

.bl-sprint__add {
    display: block;
    padding: 10px 14px;
    border-top: 1px solid var(--bl-rule);
    font-size: 12px;
    color: var(--bl-link);
}

/* ---- ポイントの ＋ / − ---- */

.bl-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.bl-points button {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--bl-border);
    border-radius: 6px;
    background: var(--bl-bg);
    color: var(--bl-text-quiet);
    font: inherit;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
}

.bl-points button:hover { border-color: var(--bl-border-strong); color: var(--bl-text); }

.bl-points__value {
    min-width: 1.6em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--bl-text);
}

/* ---- 右の柱 ---- */

.bl-rail__big { margin: 0 0 8px; font-size: 20px; color: var(--bl-text); }

.bl-rail__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    margin: 12px 0 0;
    font-size: 11px;
}

.bl-rail__stats > div { display: flex; justify-content: space-between; gap: 8px; }
.bl-rail__stats dt { margin: 0; color: var(--bl-text-muted); }
.bl-rail__stats dd { margin: 0; color: var(--bl-text); font-variant-numeric: tabular-nums; }

/* 残りの棒。地の棒の上に、進んだぶんを重ねる */
.bl-meter {
    height: 6px;
    border-radius: 999px;
    background: var(--bl-rule);
    overflow: hidden;
}

.bl-meter__fill { height: 100%; background: var(--bl-green); }

/* ---- バーンダウン ---- */

.bl-burn {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 90px;
    margin-bottom: 8px;
}

.bl-burn__day {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    gap: 3px;
}

.bl-burn__bar {
    width: 100%;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
    background: var(--bl-green);
}

.bl-burn__label {
    font-size: 9px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

.bl-load { margin-bottom: 10px; }
.bl-load__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 11px; }

/* ------------------------------------------ スペースからのお知らせ */

/*
| ダッシュボードの上に出る帯。ベル（自分に起きたこと）とは色を変えて、
| 別のものだと見て分かるようにする。
*/
.bl-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
    padding: 13px 16px;
    border: 1px solid var(--bl-notice-border);
    border-radius: 12px;
    background: var(--bl-notice-bg);
    color: var(--bl-warn-ink);
}

.bl-notice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-notice__title { font-size: 13px; }

/* 本文の中の字も帯の色に合わせる（既定は本文の色で、地に沈む） */
.bl-notice .bl-markup { color: var(--bl-warn-ink); }
.bl-notice .bl-muted { color: var(--bl-warn-ink); opacity: .8; }
.bl-notice .bl-link-btn { color: var(--bl-warn-ink); flex: none; }

/* ------------------------------------------------ 最近見た項目 */

/* 種類（課題 / プロジェクト / Wiki）と中身を 1 行に */
.bl-menu__body .bl-recent__kind {
    display: inline-block;
    min-width: 5.5em;
    margin-right: 8px;
    color: var(--bl-text-muted);
    font-size: 11px;
}

.bl-recent__label {
    display: inline-block;
    max-width: 18em;
    vertical-align: bottom;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* summary は既定で三角が出る。ほかの menu と同じく消す */
.bl-menu > summary.bl-top__icon { list-style: none; }
.bl-menu > summary.bl-top__icon::-webkit-details-marker { display: none; }


/* ------------------------------------------------------ チーム */

.bl-team__faces { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }

/* ---------------------------------------------- 子課題の入れ子表示 */

/*
| 子と孫を入れ子で出す。表（.bl-list）を使わないのは、行に親子の関係が
| あるため。列も日々見るものに絞ってある（件名・担当者・状態・期限）。
*/
.bl-tree { display: flex; flex-direction: column; }

.bl-tree__group + .bl-tree__group { border-top: 1px solid var(--bl-rule-soft); }

.bl-tree__row {
    display: grid;
    grid-template-columns: 46px auto 88px minmax(0, 1fr) 24px auto 84px;
    gap: 10px;
    align-items: center;
    padding: 9px 4px;
    font-size: 12px;
}

/* 孫。左に寄せた分だけ字下げして、ぶら下がっていることを見せる */
.bl-tree__row.is-nested {
    padding-left: 26px;
    background: var(--bl-code-bg);
    border-top: 1px solid var(--bl-rule-soft);
}

.bl-tree__row.is-nested .bl-tree__summary::before {
    content: '└ ';
    color: var(--bl-text-muted);
}

.bl-tree__lead { display: flex; justify-content: flex-start; min-width: 0; }

/* 畳む取っ手。数を添えて、閉じたままでも進み具合が読めるようにする */
.bl-tree__caret {
    appearance: none;
    border: 0;
    background: none;
    color: var(--bl-text-quiet);
    font: inherit;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 4px;
    border-radius: 7px;
    cursor: pointer;
}

.bl-tree__caret:hover { background: var(--bl-subtle); color: var(--bl-text); }
.bl-tree__count { font-variant-numeric: tabular-nums; }

.bl-tree__key { color: var(--bl-link); white-space: nowrap; font-variant-numeric: tabular-nums; }

.bl-tree__summary {
    color: var(--bl-text);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-tree__due {
    color: var(--bl-text-quiet);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* 狭い画面では、担当者と期限を落として件名を残す */
@media (max-width: 640px) {
    .bl-tree__row { grid-template-columns: 40px auto minmax(0, 1fr) auto; }
    .bl-tree__key, .bl-tree__due { display: none; }
}

/* ------------------------------------------------ 本文の折りたたみ */

/*
| 畳んだ本文。**頭の数行は見せたまま**にして、何の話かは読めるようにする。
| 高さで切るので、下の端は薄く消して「まだ続く」ことを見せる。
*/
.bl-issue-card__body.is-shut {
    position: relative;
    max-height: 220px;
    overflow: hidden;
}

.bl-issue-card__body.is-shut::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: linear-gradient(to bottom, transparent, var(--bl-surface));
    pointer-events: none;
}

.bl-issue-card__fold {
    display: block;
    margin: 6px 0 2px;
    font-size: 12px;
}

/* ------------------------------------------------ コメントの続きを読む */

.bl-comments__more {
    display: flex;
    justify-content: center;
    padding: 4px 0 14px;
}

.bl-comments__more button { font-size: 12px; }

/* -------------------------------------------- 一覧に戻る帯・前後の課題 */

/*
| 課題詳細の見出しの上。一覧から来たときだけ出る。
| 横に長い件名を並べるので、はみ出す前に畳んで「…」で切る。
*/
.bl-trail {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 12px;
}

.bl-trail__back { color: var(--bl-link); white-space: nowrap; }

.bl-trail__rule {
    width: 1px;
    height: 14px;
    background: var(--bl-border);
    flex: none;
}

/* 前後の行き先。長い件名で帯が伸びないよう、それぞれの幅を抑える */
.bl-trail__step {
    min-width: 0;
    max-width: 22em;
    color: var(--bl-text-quiet);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

a.bl-trail__step:hover { color: var(--bl-link); }

/* 行き先が無い側も場所は残す。左右で位置が動くと、続けて押せない */
.bl-trail__step.is-off { color: var(--bl-text-muted); }

/* ⋯ の札。丸くして、字を真ん中に置く */
.bl-pill--icon {
    width: 32px;
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    list-style: none;
}

.bl-pill--icon::-webkit-details-marker { display: none; }

/* menu の中の「削除」。並びの最後に置き、色で他と分ける */
.bl-menu__body .bl-menu__danger { color: var(--bl-error-text); }
.bl-menu__body .bl-menu__danger:hover { background: var(--bl-error-bg); }

/* 写した / 写せなかった、の断り */
.bl-menu__note {
    display: block;
    padding: 2px 10px 6px;
    color: var(--bl-text-muted);
}

/* ------------------------------------------------------------ 短い URL */

/* 作った URL をその場で写せるように、読み取り専用の欄で出す */
.bl-shorturl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 4px 3px 10px;
    border: 1px solid var(--bl-border);
    border-radius: 9px;
    background: var(--bl-surface);
}

.bl-shorturl > input {
    width: 220px;
    max-width: 40vw;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 11px;
    color: var(--bl-text-quiet);
}

/* --------------------------------------------------- まとめる帯（グループ化） */

/*
| 行のあいだに挟む見出し。**行より濃い地色を敷いて、行と見間違えないようにする。**
| 罫線だけで分けると、列がずれた行に見える。
*/
.bl-list__group > td {
    padding: 7px 22px;
    background: var(--bl-code-bg);
    border-top: 1px solid var(--bl-border);
    border-bottom: 1px solid var(--bl-rule);
}

/* 表の先頭に来たときは上の線が二重になる */
.bl-list tbody tr:first-child.bl-list__group > td { border-top: 0; }

.bl-list__group-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--bl-text);
}

.bl-list__group-count {
    margin-left: 10px;
    font-size: 11px;
    color: var(--bl-text-quiet);
    font-variant-numeric: tabular-nums;
}

/* ---- ガントの帯 ---- */

/*
| 左の一覧と右の軸で**同じ背**にする（30px）。ずれると、下の行から
| ぜんぶ 1 行ずつ食い違って線が読めなくなる。
*/
.bl-gantt__group,
.bl-gantt__track--group {
    height: 30px;
    background: var(--bl-code-bg);
    border-bottom: 1px solid var(--bl-rule);
}

.bl-gantt__group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
}

.bl-gantt__group-count {
    font-weight: 400;
    color: var(--bl-text-quiet);
    font-variant-numeric: tabular-nums;
}

/* 軸の側は帯の中身を描かない。背だけ揃えて、行の対応を保つ */
.bl-gantt__track--group { position: relative; }

/* ------------------------------------------- 他のプロジェクトからコピー */

/* 押す前に中身を見せる一覧。1 行に 1 項目、注意書きはその下にぶら下げる */
.bl-copy__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 14px 0 4px;
    border: 1px solid var(--bl-rule);
    border-radius: 9px;
    max-height: 340px;
    overflow-y: auto;
}

.bl-copy__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--bl-rule-soft);
    cursor: pointer;
}

.bl-copy__item:last-child { border-bottom: 0; }

/* 掴める的を大きくする。チェックだけだと 13px しかない */
.bl-copy__item:hover { background: var(--bl-row-hover); }

/* 持ってこないものは薄くする。行ごと消すより、
   「あるが持ってこない」と見えている方が読み取りやすい */
.bl-copy__item:has(input:disabled) { cursor: default; opacity: .72; }
.bl-copy__item:has(input:disabled):hover { background: transparent; }

.bl-copy__item > input { margin-top: 2px; flex: none; }

.bl-copy__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

/* 注意書き。「同じ名前がある」「種別が無い」の 2 つに使う */
.bl-warn-text { color: var(--bl-warn-ink); }
.bl-error-text { color: var(--bl-error-text); }

/* ------------------------------------------------------------ ポップアップ */

/*
| 課題を選ぶポップアップ。意匠は緑の帯を頭に置き、その下に窓と一覧。
| 上寄せにするのは、一覧が伸びても頭の位置が動かないようにするため。
*/
.bl-modal {
    position: fixed;
    inset: 0;
    z-index: 58;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 20px;
    background: rgba(26, 26, 24, .32);
}

.bl-modal__box {
    width: 100%;
    max-width: 720px;
    max-height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bl-border);
    border-radius: 14px;
    background: var(--bl-surface);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(26, 26, 24, .26);
}

/*
| 広い箱。**基本の箱より後ろに書く。** 同じ強さの規則は後に書いた方が
| 勝つので、前に置くと max-width が 720px のまま効かず、まとめて操作の
| 2 列（320 + 420）が入りきらずに縦へ積まれてしまう。
*/
.bl-modal__box--wide { max-width: 760px; }
.bl-modal__box--bulk { max-width: 1120px; max-height: 100%; }

/* 頭の帯。濃い緑なので、上に載るものは明暗どちらでも同じ色でよい */
.bl-modal__head {
    flex: none;
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: var(--bl-green);
}

.bl-modal__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--bl-on-accent);
    white-space: nowrap;
}

.bl-modal__check {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--bl-on-accent);
    white-space: nowrap;
    cursor: pointer;
}

.bl-modal__close {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--bl-on-accent);
}

.bl-modal__close:hover { background: rgba(255, 255, 255, .18); }

.bl-modal__search {
    flex: none;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-modal__search input { width: 100%; }

.bl-modal__body {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
}

.bl-modal__note {
    margin: 0;
    padding: 26px 18px;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-modal__row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 13px 18px;
    border-bottom: 1px solid var(--bl-rule-soft);
    text-align: left;
}

.bl-modal__row:hover { background: var(--bl-row-hover); }

.bl-modal__key {
    font-size: 12px;
    color: var(--bl-link);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.bl-modal__summary {
    font-size: 13px;
    line-height: 1.6;
    color: var(--bl-text);
    min-width: 0;
}

/* 付け替えになることの断り。押す前に分かるように */
.bl-modal__note-inline {
    display: block;
    font-size: 11px;
    color: var(--bl-warn-ink);
}

/*
| 子課題のタブの頭。足すための札と、足せないときの断り書き。
|
| :has(.bl-list) で padding を 0 にする決まりがあるので、こちらで
| 上書きする（頭の札が縁にくっつかないように）。
*/
.bl-tabs__panel.bl-children {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 20px 4px;
}

.bl-children__head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* 断り書きは 1 行の説明。行き先の札を右端へ飛ばさない */
.bl-children__head .bl-alert {
    margin: 0;
    align-items: flex-start;
    line-height: 1.8;
}

.bl-children__head .bl-alert a { margin-left: 0; }

/*
| 表は面の縁まで伸ばす。ただし狭い画面では、負の余白のぶんだけ
| 画面からはみ出すので、そこでは揃えない。
*/
@media (min-width: 641px) {
    .bl-children .bl-table-scroll { margin: 0 -20px; }
}

@media (max-width: 640px) {
    .bl-modal { padding: 20px 12px; }
    .bl-modal__row { grid-template-columns: 100px minmax(0, 1fr); row-gap: 6px; }
    .bl-modal__row .bl-badge--pill { grid-column: 2; justify-self: start; }
}

/* --------------------------------------------------- 濃い帯の中の menu */

/*
| details で作る。JS を持たないので、読み込みの途中でも開くし、Esc で閉じる。
*/
.bl-menu { position: relative; }
.bl-menu > summary { list-style: none; cursor: pointer; }
.bl-menu > summary::-webkit-details-marker { display: none; }

.bl-menu__body {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 208px;
    /* 狭い画面でも画面の外へはみ出さない */
    max-width: min(320px, calc(100vw - 32px));
    padding: 6px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bl-menu__who {
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--bl-border);
}

.bl-menu__who strong { display: block; font-size: 12px; font-weight: 500; }
.bl-menu__who span { font-size: 11px; color: var(--bl-text-muted); }

.bl-menu__body a,
.bl-menu__body button {
    display: block;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--bl-text);
    font: inherit;
    font-size: 12px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.bl-menu__body a:hover,
.bl-menu__body button:hover { background: var(--bl-subtle); text-decoration: none; }
.bl-menu__body form { margin: 0; }

/* ------------------------------------------- 保存した条件（意匠 T-17 / T-18） */

.bl-savedfilter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--bl-border);
}

/* 絞り込みの帯の中に置くときは、上の区切りを重ねない */
.bl-toolbar .bl-savedfilter { border-top: 0; padding-top: 0; }

/* 左から開く menu。右端に置くと画面の外へはみ出す */
.bl-menu--left .bl-menu__body { right: auto; left: 0; }
.bl-menu--right .bl-menu__body { right: 0; left: auto; }

/*
| ------------------------------------------------ お知らせの吹き出し
| 基本の .bl-menu__body より後ろに置く（同じ強さなので、前に書くと幅が効かない）
*/

/* 行が 2 段になるので、最近見た項目より広く取る */
.bl-menu__body--bell {
    min-width: 360px;
    max-width: min(440px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - 80px));
    overflow-y: auto;
}

.bl-bell__head { display: flex; align-items: baseline; gap: 8px; }
.bl-bell__gap { flex: 1; min-width: 8px; }

/*
| 1 行のお知らせ。menu の a の既定（1 行・block）を上書きして、
| 印・顔・本文の 3 列にする。
*/
.bl-menu__body a.bl-bell__row {
    display: grid;
    grid-template-columns: 8px 24px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px 10px;
}

.bl-bell__dot {
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 50%;
    background: transparent;
}

.bl-bell__row.is-unread .bl-bell__dot { background: var(--bl-green); }

.bl-bell__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.bl-bell__title {
    font-size: 12px;
    line-height: 1.5;
    color: var(--bl-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bl-bell__row.is-unread .bl-bell__title { font-weight: 500; }
.bl-bell__key { color: var(--bl-link); font-variant-numeric: tabular-nums; }

.bl-bell__meta {
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-bell__time { font-size: 11px; color: var(--bl-text-muted); font-variant-numeric: tabular-nums; }

.bl-bell__empty { margin: 0; padding: 14px 10px; font-size: 12px; color: var(--bl-text-muted); }

.bl-menu__body a.bl-bell__all {
    margin-top: 4px;
    border-top: 1px solid var(--bl-border);
    border-radius: 0;
    text-align: center;
    color: var(--bl-link);
}


.bl-menu__body--form { min-width: 268px; padding: 12px; gap: 10px; }
.bl-menu__body--form .bl-field { margin: 0; }

.bl-menu__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.bl-menu > summary.bl-btn { display: inline-flex; }

/* --------------------------------------------- 条件の要約と件数（意匠 T-17） */

/*
| いま何で絞っているかを 1 行で示す帯。結果が少ないときに
| 「絞りすぎたのか、そもそも無いのか」を、まず条件から疑えるようにする。
*/
.bl-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--bl-text);
}

.bl-summary__item { display: inline-flex; align-items: baseline; gap: 6px; }

.bl-summary__label {
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-summary__label::before { content: '['; }
.bl-summary__label::after { content: ']'; }

.bl-summary__clear { font-size: 11px; }

.bl-result-count {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-result-count strong { color: var(--bl-text); font-weight: 700; }

/* スペースホームのお知らせ。一覧の行より少しだけ詰める */
.bl-notice-row__body { flex: 1 1 auto; min-width: 0; display: block; }

.bl-notice-row__head {
    display: block;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-notice-row__issue {
    display: block;
    font-size: 12px;
    color: var(--bl-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bl-notice-row__key { color: var(--bl-link); }

.bl-notice-row__time {
    flex: none;
    font-size: 11px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

/* 未読は左に印を立てる。色だけで示すと、見分けにくい人に届かない */
/* 未読は左に印も立てる。面の色だけで示すと、見分けにくい人に届かない */
.bl-notice-row.is-unread { border-left: 3px solid var(--bl-green); padding-left: 11px; }
.bl-notice-row.is-unread .bl-notice-row__head { font-weight: 700; }

/*
| 未読の行は面が淡い緑になる。白より一段暗いので、その上の添え字は
| もう一段濃い方を使わないと 4.5:1 に届かない。
*/
.bl-notice-row.is-unread :is(.bl-muted, .bl-notice-row__time, .bl-notice-row__issue, .bl-notice-row__meta) {
    color: var(--bl-text-quiet);
}

/* --------------------------------------------------- タブ（意匠 T-17） */

/*
| 添付ファイルと子課題のタブ。
|
| 前は「隠したラジオ」で切り替えていたが、この画面が React になったときに
| 印（is-on）と中身の出し分けが JS 側へ移った。**CSS には古いラジオ用の
| 決まりだけが残り、`.bl-tabs__panel { display: none }` が効いたまま
| 中身が一切出ていなかった。** 出す・出さないは React が決める。
*/
.bl-tabs { padding: 0; }

.bl-tabs__bar {
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding: 0 14px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    font-size: 13px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-tabs__tab:hover { color: var(--bl-text); }

/* 選んでいる札。下に緑の線を内側の影で引く。高さが動かない */
.bl-tabs__tab.is-on {
    font-weight: 700;
    color: var(--bl-selected-text);
    box-shadow: inset 0 -2px 0 var(--bl-green);
}

.bl-tabs__tab.is-on .bl-tabs__count { color: var(--bl-link); }

.bl-tabs__count {
    font-size: 11px;
    font-weight: 400;
    color: var(--bl-text-muted);
    font-variant-numeric: tabular-nums;
}

.bl-tabs__panel { padding: 16px 20px 20px; }
.bl-tabs__panel:has(.bl-list) { padding: 0; }

/*
| 札を button で作ったとき（React 側）も、a のときと同じ形にする。
| ブラウザが button へ入れる既定の余白と字体を打ち消す。
*/
button.bl-chip {
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

/*
| button で作った札・タブ・切り替え。
|
| 同じ見た目のものを、Blade では a や label、React では button で作っている。
| button はブラウザが独自の面（buttonface）と字体を当てるので、打ち消さないと
| そこだけ薄い灰色の面が付き、上に載る字の読みやすさが落ちる。
*/
button:is(
    .bl-tabs__tab, .bl-seg__item, .bl-chip, .bl-side__link, .bl-top__link,
    .bl-projects__toggle, .bl-projects__search, .bl-projects__more,
    .bl-project-row__pin, .bl-project-row__key,
    .bl-mine__chip, .bl-mine__toggle, .bl-mine__more,
    .bl-search__mode, .bl-search__pill, .bl-search__tab,
    .bl-search__item, .bl-search__clear,
    .bl-toggle, .bl-fold, .bl-field__set,
    .bl-picker__clear, .bl-notify__chip button, .bl-notify__list button,
    .bl-modal__close, .bl-modal__row,
    .bl-form__option, .bl-form__chip button,
    .bl-time__undo
) {
    appearance: none;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

/* 打ち消したあとで、選ばれている状態の面だけ戻す */
button.bl-seg__item.is-on { background: var(--bl-surface); }

/* 選んでいる段・札は面を持つ */
button.bl-search__mode.is-on { background: var(--bl-surface); }
button.bl-search__pill.is-on { background: var(--bl-green); }
button.bl-search__item.is-on { background: var(--bl-selected-bg); }

/* 絞り込みの窓を開く丸は、自前で面と枠を持つ */
button.bl-projects__search {
    border: 1px solid var(--bl-input-border);
    background: var(--bl-surface);
}

button.bl-projects__search.is-on {
    border-color: var(--bl-green);
    background: var(--bl-green);
}

/*
|--------------------------------------------------------------------------
| ドキュメント（ブロックを積んで書く文書）
|--------------------------------------------------------------------------
|
| 左に並び、右に本文。本文は「見ている」と「書いている」で入れ替わるが、
| 面そのものは 1 枚のまま。保存の操作が無いので、押す場所も変わらない。
|
| class は Blade（resources/views/documents/）とも共有している。
| 同じ文書が画面と紙で違う形になっては困る。
*/
.bl-doc {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    min-height: 60vh;
}

/* 面を持たない押しどころ。素の button の見た目を消す */
.bl-doc :is(
    .bl-doc__scope, .bl-doc__toggle, .bl-doc__tool,
    .bl-doc__hint, .bl-doc__addbtn, .bl-doc__paletteitem
) {
    appearance: none;
    background: none;
    border: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.bl-doc__rail {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--bl-border);
    background: var(--bl-surface);
}

.bl-doc__railtop {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-doc__new { justify-content: center; }
.bl-doc__search { width: 100%; }

.bl-doc__scopes {
    display: flex;
    gap: 4px;
    padding: 10px 12px 8px;
}

.bl-doc__scope {
    flex: 1 1 0;
    min-width: 0;
    height: var(--bl-control-h-sm);
    border-radius: 7px;
    font-size: 12px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-doc__scope:hover { background: var(--bl-row-hover); color: var(--bl-text); }

.bl-doc__scope.is-on {
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
    font-weight: 500;
}

.bl-doc__tree {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 4px 8px 20px;
}

.bl-doc__node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 7px;
}

.bl-doc__node:hover { background: var(--bl-row-hover); }
.bl-doc__node.is-on { background: var(--bl-selected-bg); }

.bl-doc__toggle {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    font-size: 9px;
    color: var(--bl-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-doc__toggle:hover { background: var(--bl-muted-bg); color: var(--bl-text); }

.bl-doc__nodeicon { flex: 0 0 auto; font-size: 13px; }

.bl-doc__nodetitle {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    color: var(--bl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-doc__node.is-on .bl-doc__nodetitle { font-weight: 700; }

.bl-doc__draft {
    flex: 0 0 auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bl-notice-bg);
    color: var(--bl-warn-ink);
    font-size: 10px;
    white-space: nowrap;
}

.bl-doc__empty {
    padding: 24px 10px;
    text-align: center;
    font-size: 12px;
    color: var(--bl-text-muted);
}

/* 右。上に操作の帯、その下が紙 */
.bl-doc__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bl-doc__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-bottom: 1px solid var(--bl-border);
}

.bl-doc__crumbs {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    font-size: 12px;
    color: var(--bl-text-muted);
}

.bl-doc__gap { flex: 1 1 auto; min-width: 8px; }

.bl-doc__saved { font-size: 12px; color: var(--bl-good-text); white-space: nowrap; }

.bl-doc__editors { display: flex; gap: 2px; }

.bl-doc__paper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 820px;
    width: 100%;
    padding: 24px 20px 48px;
}

.bl-doc__head { display: flex; align-items: center; gap: 8px; }

.bl-doc__emoji {
    flex: 0 0 46px;
    width: 46px;
    text-align: center;
    font-size: 22px;
}

.bl-doc__titleinput {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 24px;
    font-weight: 700;
}

.bl-doc__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}

.bl-doc__tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    padding: 4px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-subtle);
    margin-bottom: 14px;
}

.bl-doc__tool {
    min-width: 30px;
    height: var(--bl-control-h-sm);
    padding: 0 6px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--bl-text-quiet);
}

.bl-doc__tool:hover { background: var(--bl-btn-hover); color: var(--bl-text); }
.bl-doc__tool.is-bold { font-weight: 700; }

/* 本文 */
.bl-doc__row { display: flex; align-items: flex-start; gap: 4px; border-radius: 6px; }
.bl-doc__row.is-on { background: var(--bl-subtle); }

/*
| ブロックを操作する取っ手。
|
| 意匠では触れるまでほとんど見えない灰（#dedbd4）だが、それだと白の上で
| 1.6:1 しか出ない。**押せるものが見えない**のは、意匠の狙い（本文の邪魔を
| しない）より重い。読める灰まで濃くして、触れたときにさらに濃くする。
*/
.bl-doc__handle {
    flex: 0 0 20px;
    width: 20px;
    padding-top: 4px;
    color: var(--bl-text-muted);
    font-size: 12px;
    position: relative;
}

.bl-doc__row:hover .bl-doc__handle { color: var(--bl-text); }

/*
| 取っ手から出す menu は左へ開く。共通の menu は右端を柱に合わせるが、
| ここは柱そのものが 20px なので、右に合わせると本文の外へ出てしまう。
*/
.bl-menu__body--handle {
    left: 0;
    right: auto;
    min-width: 140px;
}
.bl-doc__handle > summary { cursor: pointer; list-style: none; text-align: center; }
.bl-doc__handle > summary::-webkit-details-marker { display: none; }

.bl-doc__cell { flex: 1 1 auto; min-width: 0; }

.bl-doc__input {
    display: block;
    width: 100%;
    resize: none;
    overflow: hidden;
    line-height: 1.7;
}

.bl-doc__input--h1 { font-size: 22px; font-weight: 700; }
.bl-doc__input--h2 { font-size: 17px; font-weight: 700; }
.bl-doc__input--code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.bl-doc__h1 { font-size: 22px; font-weight: 700; margin: 14px 0 6px; }
.bl-doc__h2 { font-size: 17px; font-weight: 700; margin: 12px 0 6px; }
.bl-doc__p { margin: 4px 0; min-height: 1.7em; }

.bl-doc__bullet { display: flex; gap: 8px; margin: 2px 0; }
.bl-doc__bullet > span:first-child { color: var(--bl-text-muted); }

.bl-doc__todo { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0; }

/* 面と枠を自分で持つので、上のまとめた打ち消しには入れない */
.bl-doc__check {
    appearance: none;
    font: inherit;
    cursor: pointer;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 4px;
    border: 1px solid var(--bl-border-strong);
    border-radius: 4px;
    background: var(--bl-surface);
    color: var(--bl-on-accent);
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-doc__check.is-on {
    border-color: var(--bl-green);
    background: var(--bl-green);
}

.bl-doc__done { color: var(--bl-text-muted); text-decoration: line-through; }

.bl-doc__quote {
    margin: 8px 0;
    padding: 2px 0 2px 12px;
    border-left: 3px solid var(--bl-border-strong);
    color: var(--bl-quote-text);
}

.bl-doc__code {
    margin: 8px 0;
    padding: 12px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-code-bg);
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.bl-doc__rule { margin: 16px 0; border: 0; border-top: 1px solid var(--bl-border); }

.bl-doc__issue {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-subtle);
}

.bl-doc__issuekey { font-size: 12px; font-weight: 500; white-space: nowrap; }
.bl-doc__issuetext { flex: 1 1 160px; min-width: 0; font-size: 13px; }
.bl-doc__issueinput { flex: 0 1 200px; }

.bl-doc__tablewrap { margin: 10px 0; overflow-x: auto; }

.bl-doc__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bl-doc__table :is(th, td) {
    border: 1px solid var(--bl-border);
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.bl-doc__table th { background: var(--bl-th-bg); font-weight: 500; }
.bl-doc__table :is(th, td) input { width: 100%; height: var(--bl-control-h-sm); }

.bl-doc__tablebar { display: flex; gap: 6px; margin-top: 6px; }

/* 挿入 */
.bl-doc__add { display: flex; align-items: center; gap: 6px; position: relative; margin-top: 8px; }

.bl-doc__addbtn {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: var(--bl-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-doc__addbtn:hover { background: var(--bl-btn-hover); color: var(--bl-text); }
.bl-doc__hint { font-size: 13px; color: var(--bl-text-muted); text-align: left; }

.bl-doc__palette {
    position: absolute;
    top: 28px;
    left: 0;
    z-index: 30;
    width: 260px;
    max-height: 320px;
    overflow: auto;
    padding: 6px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-surface);
    box-shadow: var(--bl-shadow);
}

.bl-doc__palettehead {
    padding: 4px 8px;
    font-size: 11px;
    color: var(--bl-text-muted);
}

.bl-doc__paletteitem {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    text-align: left;
}

.bl-doc__paletteitem:hover { background: var(--bl-row-hover); }

.bl-doc__paletteicon {
    flex: 0 0 24px;
    width: 24px;
    text-align: center;
    color: var(--bl-text-quiet);
}

.bl-doc__palettelabel { display: block; font-size: 13px; }
.bl-doc__paletteitem .bl-small { display: block; }

/* 更新履歴 */
.bl-doc__history {
    margin-top: 20px;
    padding: 12px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-subtle);
}

.bl-doc__historyhead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }

.bl-doc__historyrow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px 0;
    border-top: 1px solid var(--bl-rule);
}

.bl-doc__historytext { flex: 1 1 160px; min-width: 0; font-size: 13px; }

/* コメント */
.bl-doc__comments { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--bl-border); }
.bl-doc__commenthead { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.bl-doc__comment { display: flex; gap: 10px; padding: 8px 0; }
.bl-doc__commentmeta { display: flex; align-items: baseline; gap: 8px; }
.bl-doc__commentname { font-size: 13px; font-weight: 500; }
.bl-doc__commenttext { margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; }

.bl-doc__commentadd { display: flex; gap: 8px; margin-top: 10px; }
.bl-doc__commentadd input { flex: 1 1 auto; min-width: 0; }

/* 共有の窓 */
.bl-doc__sharebody { padding: 16px 18px 20px; }

.bl-doc__shareadd { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bl-doc__shareadd select { flex: 1 1 140px; min-width: 0; }

.bl-doc__sharelist { display: flex; flex-direction: column; gap: 2px; }

.bl-doc__sharerow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--bl-rule);
}

.bl-doc__sharename { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.bl-doc__unshare { color: var(--bl-danger); }

.bl-doc__sharehead { margin: 16px 0 8px; font-size: 13px; font-weight: 500; }

/*
| 範囲を選ぶ行。radio を抱えた label は既定で inline-flex になっているので、
| 面の中でだけ縦に積み直す（説明の一行が隣へ回り込まないように）。
*/
.bl-doc__sharebody label.bl-doc__mode.bl-doc__mode {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
}
.bl-doc__modelabel { display: block; font-size: 13px; }
.bl-doc__mode .bl-small { display: block; }

.bl-doc__link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 8px 10px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-subtle);
}

.bl-doc__linkurl {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 共有リンクと印刷の面（Blade） */
.bl-doc__title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }

.bl-doc__printbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--bl-border);
    background: var(--bl-subtle);
    font-size: 12px;
}

@media (max-width: 900px) {
    /* 狭いときは並びを上に、本文を下に積む */
    .bl-doc { grid-template-columns: minmax(0, 1fr); }

    .bl-doc__rail {
        border-right: 0;
        border-bottom: 1px solid var(--bl-border);
    }

    .bl-doc__tree { max-height: 260px; }
    .bl-doc__paper { padding: 16px 12px 32px; }
    .bl-doc__bar { padding: 10px 12px; }
}

/*
|--------------------------------------------------------------------------
| 組織設定（スペースを持っている側の面）
|--------------------------------------------------------------------------
|
| ふだんの骨とは別の面。濃い帯も左の柱も出さず、この面だけの濃い柱を
| 左に置く。柱は明暗どちらでも濃いままにする（ヘッダーと同じ扱い）。
*/
.bl-org {
    --bl-org-rail: #1e2b29;
    --bl-org-rail-raised: #2b3937;
    --bl-org-rail-text: #c2cfcc;
    /*
    | 添え字と群の見出し。意匠は #7f9490 / #6f847f だが、後者は濃い柱の上で
    | 3.9:1 しか出ない。色味はそのままに、4.5:1 を超える明るさまで上げる。
    */
    --bl-org-rail-muted: #93a8a4;

    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--bl-bg);
}

.bl-org__rail {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bl-org-rail);
    color: var(--bl-org-rail-text);
}

.bl-org__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--bl-org-rail-raised);
}

.bl-org__mark {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--bl-green);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-org__brandtext { display: flex; flex-direction: column; min-width: 0; }

.bl-org__brandname {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-org__brandsub {
    font-size: 10px;
    letter-spacing: .12em;
    color: var(--bl-org-rail-muted);
}

.bl-org__nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 6px 12px 20px;
}

.bl-org__grouplabel {
    padding: 16px 12px 7px;
    font-size: 10px;
    letter-spacing: .12em;
    color: var(--bl-org-rail-muted);
}

.bl-org__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: var(--bl-org-rail-text);
    font-size: 13px;
    text-decoration: none;
}

.bl-org__item:hover { background: var(--bl-org-rail-raised); text-decoration: none; }

.bl-org__item.is-on {
    background: var(--bl-green);
    color: #fff;
    font-weight: 500;
}

.bl-org__icon {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--bl-org-rail-muted);
}

/*
| 選んでいる項目の印。意匠は #bfe3de だが、緑の面の上で 3.98:1 しか
| 出ない。同じ系統のまま、4.5:1 を超えるところまで明るくする。
*/
.bl-org__item.is-on .bl-org__icon { color: #e8f6f3; }

.bl-org__label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bl-org__badge {
    flex: 0 0 auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bl-org-rail-raised);
    color: var(--bl-org-rail-text);
    font-size: 10px;
    white-space: nowrap;
}

.bl-org__item.is-on .bl-org__badge { background: rgba(255, 255, 255, .22); color: #fff; }

.bl-org__me {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 20px;
    border-top: 1px solid var(--bl-org-rail-raised);
}

.bl-org__metext { display: flex; flex-direction: column; min-width: 0; }
.bl-org__mename { font-size: 12px; color: #fff; }
.bl-org__merole { font-size: 11px; color: var(--bl-org-rail-muted); }

/* 右 */
.bl-org__main { display: flex; flex-direction: column; min-width: 0; }

.bl-org__bar {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 28px;
    border-bottom: 1px solid var(--bl-border);
    background: var(--bl-surface);
}

.bl-org__crumb { font-size: 11px; color: var(--bl-text-muted); }
.bl-org__title { margin: 0; font-size: 17px; font-weight: 700; }
.bl-org__gap { flex: 1 1 auto; min-width: 8px; }

.bl-org__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 20px 28px 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bl-org__panel {
    padding: 18px 20px;
    border: 1px solid var(--bl-border);
    border-radius: 14px;
    background: var(--bl-surface);
}

.bl-org__panelhead {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
}

/* 組織の姿 */
.bl-org__orghead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.bl-org__orgmark {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bl-green);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-org__orgtext { display: flex; flex-direction: column; min-width: 0; }
.bl-org__orgname { font-size: 16px; font-weight: 700; }

.bl-org__state {
    flex: 0 0 auto;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--bl-border-strong);
    background: var(--bl-surface);
    font-size: 11px;
    color: var(--bl-text-quiet);
    white-space: nowrap;
}

.bl-org__state.is-on {
    border-color: var(--bl-green);
    background: var(--bl-selected-bg);
    color: var(--bl-selected-text);
}

.bl-org__counts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.bl-org__count {
    flex: 1 1 120px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-subtle);
}

.bl-org__countvalue {
    display: block;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bl-org__countlabel { display: block; font-size: 11px; color: var(--bl-text-muted); }

/* 入口 */
.bl-org__cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.bl-org__card {
    flex: 1 1 200px;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    background: var(--bl-surface);
    color: var(--bl-text);
    text-decoration: none;
}

.bl-org__card:hover {
    border-color: var(--bl-green);
    background: var(--bl-subtle);
    text-decoration: none;
}

.bl-org__cardname { display: block; font-size: 13px; font-weight: 500; }
.bl-org__card .bl-small { display: block; }

/* 絞り込みと表 */
.bl-org__filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.bl-org__filter label { font-size: 12px; color: var(--bl-text-muted); }
.bl-org__filter select { flex: 0 1 200px; }

.bl-org__table {
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    overflow: hidden;
}

.bl-org__thead,
.bl-org__trow {
    display: grid;
    grid-template-columns: 130px 150px 96px minmax(0, 1fr) 130px;
    gap: 10px;
    padding: 9px 12px;
    font-size: 12px;
}

.bl-org__thead {
    background: var(--bl-th-bg);
    color: var(--bl-text-muted);
    font-size: 11px;
}

.bl-org__trow { border-top: 1px solid var(--bl-rule); }
.bl-org__trow:hover { background: var(--bl-row-hover); }

.bl-org__cellat,
.bl-org__cellip { color: var(--bl-text-muted); font-variant-numeric: tabular-nums; }

.bl-org__kind {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--bl-muted-bg);
    font-size: 11px;
    white-space: nowrap;
}

.bl-org__empty {
    padding: 24px 12px;
    text-align: center;
    font-size: 12px;
    color: var(--bl-text-muted);
}

/* 最近の動き */
.bl-org__log { display: flex; flex-direction: column; }

.bl-org__logrow {
    display: grid;
    grid-template-columns: 120px 140px 90px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid var(--bl-rule);
    font-size: 12px;
}

.bl-org__logat, .bl-org__loguser { color: var(--bl-text-muted); }
.bl-org__logkind { color: var(--bl-text-quiet); }

/* メールの選択 */
.bl-org__body label.bl-org__mode.bl-org__mode {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--bl-border);
    border-radius: 12px;
    cursor: pointer;
}

.bl-org__mode:hover { border-color: var(--bl-green); }
.bl-org__modelabel { display: block; font-size: 13px; font-weight: 500; }
.bl-org__mode .bl-small { display: block; }
.bl-org__note { margin-top: 14px; }

@media (max-width: 900px) {
    /* 狭いときは柱を上に積む */
    .bl-org { grid-template-columns: minmax(0, 1fr); }
    .bl-org__nav { max-height: 220px; }
    .bl-org__body { padding: 16px 12px 32px; }
    .bl-org__bar { padding: 12px; }

    .bl-org__thead { display: none; }

    .bl-org__trow,
    .bl-org__logrow {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}
