/* 無限転記ノート（本物の画面）。見た目の土台は rookies_notes_mock.css で、ここにはモックに無いものだけを書く
   （docs/rookies-notes-spec.md §5）。モックはボタンで画面を切り替えるが、本物はリンクで開き直すので、リンク用の見た目を足す */
.nn a { color: inherit; text-decoration: none; }

.nn-topline-link { padding: 4px 12px; border: 1px solid #fff8e880; border-radius: 6px; }
.nn-topline-link:hover { background: #fff8e826; }

.nn-segment a { border-radius: 22px; color: #263a53; padding: 5px 20px; font-size: 14px; }
.nn-segment a.is-active { background: var(--category-ink); color: white; box-shadow: 0 2px 4px #1d354333; }

.nn-page-footer :is(a, .is-disabled) {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 76px; padding: 0 12px;
  border: 1px solid #ac987d88; border-radius: 17px; background: #fffbf19c; color: #375775;
}
.nn-page-footer a:hover { background: #f4e6c9; }
.nn-page-footer .is-disabled { opacity: .4; }

.nn-month { margin: 0; }
.nn-side-empty { margin: 4px 0; font-size: 13px; color: #8b8273; }
.nn-sidebar .nn-side-item[hidden] { display: none; }

.nn-day small { margin-left: 10px; font-size: 13px; color: #74705d; }

/* kkb の行の色のうち、モックのペンに無いもの（色みは kkb の案件別・個人用の画面に合わせる） */
.nn [data-pen="pink"] { --pen-color: #d6336c; }
.nn [data-pen="orange"] { --pen-color: #e8590c; }
.nn [data-pen="yellow"] { --pen-color: #f08c00; }
.nn [data-pen="teal"] { --pen-color: #099268; }
.nn [data-pen="brown"] { --pen-color: #8a5a2b; }
.nn [data-pen="gray"] { --pen-color: #868e96; }

/* 直せる行の文字は、押せることが分かるように */
.nn-entry[data-note-editable="true"] .nn-entry-text { cursor: text; }
.nn-entry-text { cursor: default; }
/* 直している間は、その行の付箋とメニューを押せなくする */
.nn-entry.is-editing .nn-stickers { pointer-events: none; opacity: .45; }
.nn-editor.is-busy { opacity: .6; pointer-events: none; }
.nn-toast.is-alert { background: #8c1d2c; }

/* 転記の窓（中身は turbo-frame に読み込む） */
.nn-transfer-group h3 .nn-tab-icon { width: 20px; height: 20px; }
.nn-checks label.is-stale { color: #8b8273; text-decoration: line-through dotted; }
.nn-checks:empty::after { content: "候補がありません"; color: #8b8273; font-size: 13px; }
.nn-transfer-group .nn-search { grid-column: 1; }
.nn-transfer-group .nn-checks { grid-column: 2; }
.nn-dialog input.nn-search { margin-top: 6px; font: 18px/1.6 var(--hand); }
.nn-dialog-error { margin: 8px 0 0; color: #b11f33; font-size: 13px; }
.nn-entry .nn-entry-text[role="button"] { cursor: pointer; }

/* コメントの窓・検索の窓（転記の窓と同じ枠を使い、幅だけ狭くする） */
.nn-transfer:is(.nn-comments, .nn-search-panel) { width: 640px; }
.nn button.nn-topline-link { background: none; color: inherit; font-size: inherit; text-shadow: inherit; }
.nn-panel-error { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fde8ea; color: #8c1d2c; font-size: 13px; }
.nn-comment-empty { margin: 8px 0 16px; color: #8b8273; font-size: 13px; }
.nn-comment-list, .nn-search-results { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.nn-comment-list li { padding: 10px 12px; border: 1px solid #e4dacc; border-radius: 9px; background: #fffefb; }
.nn-comment-meta { display: flex; gap: 12px; align-items: baseline; font-size: 12px; color: #687583; }
.nn-comment-meta strong { font-size: 13px; color: #20354e; }
.nn-comment-body { margin: 6px 0 0; font: 16px/1.6 var(--hand); white-space: pre-wrap; overflow-wrap: anywhere; }
.nn-comment-actions { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; font-size: 12px; }
.nn-comment-actions summary { cursor: pointer; color: #285777; }
.nn-comment-actions form { margin: 0; }
.nn-comment-actions details form { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.nn-comment-actions button { border: 0; background: none; padding: 0; color: #285777; font-size: 12px; }
.nn-comment-actions button.is-danger { color: #b11f33; }
.nn-comment-actions button.nn-primary, .nn-search-form button.nn-primary { padding: 6px 14px; border-radius: 8px; background: #145780; color: white; font-size: 13px; }
.nn-transfer textarea { width: 100%; padding: 8px 10px; border: 1px solid #bccbd3; border-radius: 6px; font: 16px/1.6 var(--hand); }
.nn-comment-form .nn-panel-actions { margin-top: 12px; }
.nn-search-form { display: flex; gap: 8px; margin: 16px 0; }
.nn-search-form button.nn-primary { border: 0; white-space: nowrap; }
.nn-search-results a { display: block; padding: 8px 12px; border: 1px solid #e4dacc; border-radius: 9px; background: #fffefb; }
.nn-search-results a:hover { background: #ffe9a968; }
.nn-search-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #687583; }
.nn-search-content { display: block; margin-top: 2px; font: 16px/1.6 var(--hand); overflow-wrap: anywhere; }

/* ---- 2026-11-19 の見直し（平良） ---- */

/* ペンの 5 色は、はっきりした色にする。カラーユニバーサルデザイン推奨配色セット（アクセントカラー）の 赤・緑・青・紫 と、黒。
   色だけに頼らないよう、ツールバーの色の札には色の名前（title・aria-label）を付けてある */
.nn [data-pen="ink"] { --pen-color: #111111; --swatch: #111111; }
.nn [data-pen="red"] { --pen-color: #ff4b00; }
.nn [data-pen="green"] { --pen-color: #03af7a; }
.nn [data-pen="blue"] { --pen-color: #005aff; }
.nn [data-pen="purple"] { --pen-color: #990099; }

/* 分類のタブは小さめに */
.nn-tabs { height: 40px; gap: 6px; }
.nn-tabs .nn-tab { padding: 6px 16px 7px; gap: 7px; font-size: 14px; border-radius: 11px 11px 0 0; }
.nn-tabs .nn-tab.is-active { padding-bottom: 11px; }
.nn-tab span { font-size: 15px; }
.nn-tab-icon { width: 18px; height: 18px; }

/* ノートの縦の大きさは、行数に関係なく固定する（見出しの行 ＋ 17 行 ＋ 書く行）。はみ出す分は、ノートの中でスクロールする */
.nn-entries { flex: none; min-height: 0; height: calc(var(--note-line) * 19); overflow-y: auto; scrollbar-gutter: stable; }
.nn-book { min-height: 0; }

/* 行の頭のメモ番号と時刻は、初めはどちらも出さない。表示の設定で、別々に出せる */
.nn-entry-number { flex: none; width: 32px; text-align: right; font-size: 15px; color: #5d6b7a; font-variant-numeric: tabular-nums; }
.nn-entry :is(.nn-entry-number, time) { display: none; }
.nn.is-showing-number .nn-entry .nn-entry-number { display: block; }
.nn.is-showing-time .nn-entry time { display: block; }

/* 上の細い行の歯車と、表示の設定の窓 */
.nn button.nn-gear { display: inline-flex; align-items: center; padding: 4px 8px; }
.nn-settings label { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; font-size: 14px; }
.nn-settings select { min-width: 180px; padding: 6px 10px; border: 1px solid #bccbd3; border-radius: 6px; background: white; color: #20354b; }

/* 入力の欄の吹き出しの「消す」 */
.nn-colors .nn-panel-actions button.is-danger { color: #b11f33; border-color: #e7b9c0; }

/* 行はいつも 1 行に収める（ノートの縦の大きさを固定するため。モックは幅が狭いと、付箋を 2 段目に折り返す）。
   長い文は … で切り、全文は転記の窓か直す欄で読める */
@media (min-width: 761px) and (max-width: 1250px) {
  .nn-entry:has(.nn-stickers) { display: flex; padding-block: 0; }
  .nn-entry:has(.nn-stickers) :is(.nn-entry-text, .nn-editor) { white-space: nowrap; line-height: inherit; padding-block: 4px; }
  .nn-stickers { max-width: 43%; }
}
.nn-entry { height: var(--note-line); }
.nn-entry.is-editing { height: auto; }
.nn-entry .nn-entry-text { white-space: nowrap; }
.nn-stickers { flex-wrap: nowrap; overflow: hidden; }

/* ---- 2026-11-19 の見直し 2（平良） ---- */

/* 自分のみ ⇔ 全員表示は、題の横に置く（その下の 1 行を無くして、場所を節約する） */
.nn-page-heading { justify-content: flex-start; gap: 14px; margin-bottom: 6px; }
.nn-page-heading .nn-segment { flex: none; }
.nn-page-heading .nn-segment a { padding: 4px 14px; font-size: 13px; white-space: nowrap; }
.nn-scope-count { font-size: 12px; color: #60748b; white-space: nowrap; }
.nn-page h1 { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* 分類のタブは、右のノート（ページ）の位置にそろえ、革の表紙より前に出す（表紙の縁に重ねて、ページから生えているように見せる） */
.nn { --nn-side: 255px; --nn-side-gap: 26px; }
.nn-tabs {
  position: relative; z-index: 3;
  padding-left: calc(var(--nn-side) + var(--nn-side-gap) + 10px + 24px);
  margin-bottom: -11px;
}
.nn-book { z-index: 1; }
@media (max-width: 1100px) { .nn { --nn-side: 210px; } }
@media (max-width: 760px) { .nn-tabs { padding-left: 12px; margin-bottom: 0; } }
/* モックはタブの高さを決め打ちにしているので、小さくした高さで上書きする（選んでいるタブだけ少し高い） */
.nn-tabs .nn-tab, .nn-tabs .nn-tab.is-active { height: 34px; flex: 0 1 190px; }
.nn-tabs .nn-tab.is-active { height: 40px; }

/* 付箋が行に入り切らないときは、名前を出さず、アイコンと数だけにする（Stimulus が is-compact を付ける）。
   押すと転記の窓が開き、だれ・どこに転記しているかが分かる */
.nn-sticker-count { display: none; flex: none; font-size: 12px; font-weight: 700; }
.nn-stickers.is-compact .nn-sticker { padding-inline: 9px 7px; }
.nn-stickers.is-compact :is(.nn-sticker-name, .nn-sticker small) { display: none; }
.nn-stickers.is-compact .nn-sticker-count { display: inline; }

/* 検索の窓の絞り込み（記入者・日付） */
.nn-search-form { flex-wrap: wrap; }
.nn-search-form .nn-search { flex: 1; min-width: 0; }
.nn-search-filters { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: #445566; }
.nn-search-filters label { display: flex; align-items: center; gap: 6px; }
.nn-search-filters :is(select, input) { padding: 5px 8px; border: 1px solid #bccbd3; border-radius: 6px; background: white; color: #20354b; font-size: 13px; }

/* メンバー（会議別・プロジェクト別の見出しの入口と、窓） */
.nn .nn-member-button { flex: none; padding: 3px 12px; border: 1px solid var(--category-color); border-radius: 16px; background: #fffdfa; color: var(--category-ink); font-size: 12px; white-space: nowrap; }
.nn .nn-member-button:hover { background: var(--category-color); }
.nn-transfer.nn-members { width: 560px; }
.nn-members-note { margin: 14px 0; font-size: 12px; color: #687583; }
.nn-member-list { list-style: none; margin: 0 0 16px; padding: 0; }
.nn-member-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 4px; border-bottom: 1px solid #ece4d6; font-size: 15px; }
.nn-member-list li.is-stale { color: #8b8273; }
.nn-member-list small { margin-left: 4px; font-size: 12px; color: #8b8273; }
.nn-member-list form { margin: 0; }
.nn-member-list button { border: 0; background: none; padding: 2px 6px; font-size: 12px; color: #b11f33; }
.nn-member-add { margin: 0; }
.nn-member-candidates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 30px; }
.nn-member-candidates button { padding: 4px 12px; border: 1px solid var(--category-color); border-radius: 16px; background: white; color: #20354e; font-size: 13px; }
.nn-member-candidates button:hover { background: var(--category-color); }

/* 名前を変える（管理の権限がある人にだけ出る鉛筆）と、その窓の注意書き */
.nn .nn-rename-button { flex: none; border: 0; background: none; padding: 2px 6px; border-radius: 6px; color: #60748b; font-size: 16px; }
.nn .nn-rename-button:hover { background: #e8f3fc; }
.nn-dialog-note { margin: 8px 0 0; font-size: 12px; color: #687583; }

/* 履歴の窓 */
.nn-transfer.nn-history { width: 640px; }
.nn-history-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nn-history-list li { padding: 8px 12px; border: 1px solid #e4dacc; border-radius: 9px; background: #fffefb; }
.nn-history-title { padding: 1px 8px; border-radius: 10px; background: #eef4f8; color: #285777; }
.nn-history-line { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.nn-panel-actions a.nn-panel-link { margin-right: auto; align-self: center; color: #285777; font-size: 13px; text-decoration: underline; }

/* 新着の数の丸（分類のタブ・左の一覧） */
.nn-unread { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d6002a; color: white; font: 700 11px/18px system-ui, sans-serif; text-align: center; }
.nn-tab .nn-unread { font-size: 11px; }
.nn-sidebar .nn-side-item .nn-unread { margin-left: auto; }

/* ---- 2026-11-19 の見直し 3（平良） ---- */

/* 転記・履歴・検索・メンバーの窓は、画面の中央に出す（モックは右寄せ） */
.nn-transfer { left: 50%; right: auto; top: 50%; transform: translate(-50%, -50%); }

/* 入力の欄のツールバーは、いつも入力の欄のすぐ下に出す（2026-11-26 平良の指示。前は上で、入り切らないときだけ下）。
   ノートの下の端の行では、Stimulus がツールバーの見える位置までスクロールする */
.nn-editor .nn-colors { inset: calc(100% + 7px) auto auto 0; }
.nn-editor .nn-colors::after { top: -5px; border-width: 1px 0 0 1px; }

/* 1 ページ 15 行（見出しの行 ＋ 15 行 ＋ 書く行 ＝ 17 行分）。ブラウザの 1 画面に収まるよう、行の高さを画面の高さに合わせて詰める
   （ノートの外の分＝上の行・タブ・見出し・ページ送り・下の案内・余白が 約 275px。行は 26〜38px の間） */
.nn-entries { --note-line: clamp(26px, calc((100dvh - 275px) / 17), 38px); height: calc(var(--note-line) * 17); }
.nn-rings { top: 24px; bottom: 24px; }

/* ---- 2026-11-20 の見直し（平良の修正要望） ---- */

/* 初めのフォントは Zen Maru Gothic（表示の設定でまだ選んでいないとき。Rookies::NotesHelper::NOTE_DEFAULT_FONT と合わせる） */
.nn { --hand: "Zen Maru Gothic", system-ui, sans-serif; }

/* 左上のロゴ。押すと、回覧板の一覧と同じランチャーが開く。ロゴの画像は地が透過（mugen-tenki-logo.png）で、机の木目の上にそのまま置く。
   紺の文字が木目に沈まないよう、ふちに白い光を付ける */
.nn .nn-brand-menu {
  display: inline-flex; align-items: center; margin-right: auto; padding: 2px 8px;
  border: 0; border-radius: 9px; background: transparent;
}
.nn .nn-brand-menu:hover { background: #fff8e833; }
.nn .nn-brand-menu img { display: block; width: auto; height: 38px; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #fffc); }
.nn-topline { padding-block: 5px; }
@media (max-width: 760px) { .nn .nn-brand-menu img { height: 28px; } }

/* 右上のしおりは無くした。しおりのために空けていた見出しの右の余白も戻す */
.nn .nn-page-heading { padding-right: 0; }

/* 左の一覧の開閉。閉じると、ノートが横いっぱいに広がる（Stimulus が .nn に is-side-closed を付ける） */
/* ボタンに枠線・背景は付けない（押せることは、色が濃くなることで示す） */
.nn .nn-side-toggle {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border: 0; background: transparent; color: #7d8ea0;
}
.nn .nn-side-toggle:is(:hover, :focus-visible) { outline: none; color: #145780; }
.nn.is-side-closed .nn-side-toggle-arrow { transform: scaleX(-1); transform-origin: 14.75px 12px; }
.nn.is-side-closed { --nn-side: 0px; --nn-side-gap: 0px; }
.nn.is-side-closed .nn-book { grid-template-columns: minmax(0, 1fr); }
.nn.is-side-closed :is(.nn-sidebar, .nn-spine, .nn-rings) { display: none; }
.nn.is-side-closed .nn-page { padding-left: 27px; }
@media (max-width: 760px) { .nn.is-side-closed .nn-page { padding-left: 12px; border-radius: 8px; } }

/* メモ番号・時刻の切り替え（見出しの右端。自分のみ ⇔ 全員表示と同じ色のスイッチを、つなげずに 1 つずつ並べる） */
.nn-page-heading .nn-toggles { flex: none; display: flex; gap: 8px; margin-left: auto; }
.nn-page-heading .nn-toggles button {
  padding: 5px 14px; border: 0; border-radius: 22px; background: #eeeae2; box-shadow: inset 0 1px 3px #14264e18;
  color: #263a53; font-size: 13px; white-space: nowrap;
}
.nn-page-heading .nn-toggles button.is-active { background: var(--category-ink); color: white; box-shadow: 0 2px 4px #1d354333; }
.nn-page-heading .nn-meta { flex: none; }
/* 1000px 以下（スマホと、タブレットの縦）は、見出しを折り返す。折り返さないと、会議別・業務別など「メンバー」のボタンがある見出しで、
   題（h1）が幅 0 まで縮んで見えなくなる（2026-12-01） */
@media (max-width: 1000px) { .nn-page-heading { flex-wrap: wrap; row-gap: 6px; } .nn-page h1 { max-width: 100%; } }

/* メモ番号は shared_memos の id（桁が多いので、幅は中身に合わせる） */
.nn-entry-number { width: auto; min-width: 32px; font-size: 13px; }

/* タブレット（指・ペン）は、自分のメモの長押しで直す。長押しで文字が選ばれたり、ブラウザのメニューが出たりしないようにする */
.nn-entry[data-note-editable="true"] .nn-entry-text { -webkit-touch-callout: none; }
@media (pointer: coarse) {
  .nn-entry[data-note-editable="true"] .nn-entry-text { -webkit-user-select: none; user-select: none; }
}

/* 入力の途中で外を押したときの確認の窓 */
.nn-leave .nn-panel-actions { margin-top: 18px; }

/* 検索の結果の付箋（ノートの行と同じ見た目）。行ごと押せるので付箋は押せない。入り切らなければ折り返す */
.nn-stickers.nn-search-stickers { justify-content: flex-start; flex-wrap: wrap; max-width: none; margin-top: 4px; overflow: visible; }
.nn-search-stickers .nn-sticker { max-width: 100%; }
.nn-search-stickers .nn-sticker:hover { transform: rotate(var(--slip-angle)); filter: none; }
.nn-sticker--day { --slip-angle: .3deg; }

/* ---- 部署別（2026-11-25）。分類の色は藤色。タブは人別と会議別の間 ---- */
[data-category="unit"] { --category-color: #d9cdf3; --category-ink: #55408a; }
.nn-tab-4 { background: linear-gradient(120deg, #f1eaff, #c3b2ea); --paper-offset: 80px; }
.nn-sticker--unit { --slip-angle: .55deg; }
/* ---- 業務別（2026-12-01）。分類の色は青緑。タブは会議別の右 ---- */
[data-category="work"] { --category-color: #b9e6dd; --category-ink: #1f6b5e; }
.nn-tab-5 { background: linear-gradient(120deg, #e2f8f3, #9fd9cc); --paper-offset: 140px; }
.nn-sticker--work { --slip-angle: -.5deg; }
/* タブは 6 枚を 1 列に並べる（モックは 4 枚の決め打ち）。名前の長い「プロジェクト別」だけ幅を広く取り、
   狭い幅では、文字・アイコン・余白を小さくして、名前が切れないようにする */
.nn-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.45fr); max-width: 1300px; }
.nn-tab .nn-tab-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) {
  .nn-tabs { gap: 4px; }
  .nn-tabs .nn-tab, .nn-tabs .nn-tab.is-active { padding-inline: 4px; gap: 3px; font-size: 12.5px; }
  .nn-tabs .nn-tab-icon { width: 16px; height: 16px; }
}
/* 900px 以下（タブレットの縦）は、タブが 6 枚だと「プロジェクト別」が切れるので、文字を少し小さくして、その 1 枚をさらに広く取る */
@media (max-width: 900px) {
  .nn-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.8fr); }
  .nn-tabs .nn-tab, .nn-tabs .nn-tab.is-active { font-size: 11.5px; }
}
@media (max-width: 600px) {
  .nn-tabs .nn-tab, .nn-tabs .nn-tab.is-active { padding-inline: 2px; font-size: 11.5px; }
  .nn-tabs .nn-tab-icon { width: 14px; height: 14px; }
}
/* 480px 以下は、アイコンの下に名前を置く（縦に並べるので、名前は切らない） */
@media (max-width: 480px) {
  .nn-tabs .nn-tab, .nn-tabs .nn-tab.is-active { font-size: 10px; }
  .nn-tabs .nn-tab-icon { width: 16px; height: 16px; }
  .nn-tab .nn-tab-label { overflow: visible; }
}
/* 360px 以下（小さいスマホ）は、タブが 6 枚だと「プロジェクト別」がタブからはみ出すので、その 1 枚をさらに広く取る */
@media (max-width: 360px) {
  .nn-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 2fr); }
}

/* スマホの幅（760px 以下）の行は 1 段（2026-11-26 平良の指示。前は 名前・本文 の 2 段）。名前・本文・付箋を横に並べ、本文は折り返さず … で切る。
   付箋はいつも最小（アイコンと数だけ。名前は出さない）。押すと転記の窓が開き、全文と転記先が読める */
@media (max-width: 760px) {
  .nn .nn-entries .nn-entry { display: flex; align-items: center; gap: 6px; min-height: 0; height: var(--note-line); padding-block: 0; }
  .nn .nn-entries .nn-entry.is-editing { height: auto; }
  .nn .nn-entries .nn-entry .nn-entry-text { flex: 1; min-width: 0; padding: 0 2px; line-height: inherit; white-space: nowrap; }
  .nn .nn-entries .nn-entry .nn-person { flex: none; }
  .nn .nn-entries .nn-entry .nn-stickers { flex: none; flex-wrap: nowrap; justify-content: flex-end; gap: 3px; max-width: none; padding-left: 0; overflow: visible; }
  .nn-entries .nn-stickers .nn-sticker { min-height: 24px; padding: 2px 6px 3px 8px; gap: 2px; }
  .nn-entries .nn-stickers .nn-sticker .nn-tab-icon { width: 15px; height: 15px; }
  .nn-entries .nn-stickers :is(.nn-sticker-name, .nn-sticker small) { display: none; }
  .nn-entries .nn-stickers .nn-sticker-count { display: inline; }
}
.nn-check-hint { margin-left: 4px; font-size: 11px; color: #687583; }
.nn-transfer-note { margin: 10px 0 0; font-size: 12px; color: #687583; }

/* 左の一覧を開いたままの狭い幅（761〜1100px）では、題の横のボタンが場所を取って、題が 1 文字まで切れていた。
   すき間・ボタンの余白・題の文字を少し小さくして、題を読めるようにする（長い名前は今までどおり … で切る） */
@media (min-width: 761px) and (max-width: 1100px) {
  .nn-page-heading { gap: 8px; }
  .nn-page h1 { font-size: 24px; }
  .nn-page-heading .nn-segment a { padding: 4px 9px; font-size: 12px; }
  .nn-page-heading .nn-toggles { gap: 4px; }
  .nn-page-heading .nn-toggles button { padding-inline: 9px; font-size: 12px; }
}

/* ---- スマホの幅（760px 以下。2026-11-25 平良の指示） ----
   ・リング・背・革の表紙・ページの左の罫は出さない（紙だけにする）
   ・まず左の一覧だけを出し、一覧から選ぶとノートだけを出す（2 段階。選んだ後は .nn に is-note-open が付く＝URL の open）。
     ノートの見出しの「一覧」で 1 段目へ戻る。左の一覧の開閉のボタン（広い幅用）は出さない */
.nn .nn-back { display: none; }
@media (max-width: 760px) {
  .nn :is(.nn-rings, .nn-spine, .nn-side-toggle) { display: none; }
  .nn-book::before, .nn .nn-page::before { display: none; }
  .nn .nn-book { display: block; padding: 0; min-height: 0; }
  .nn .nn-book :is(.nn-sidebar, .nn-page) { border-radius: 8px; box-shadow: 0 2px 5px #4c2b1850; }
  .nn .nn-book .nn-page { padding: 9px 12px; min-height: 0; }
  .nn .nn-tabs { margin-bottom: 0; }

  /* 1 段目: 左の一覧だけ（広い幅の一覧と同じ中身を、縦に並べる。行は指で押しやすい高さに） */
  html[data-note-turn] .nn:not(.is-note-open) .nn-sidebar { position: relative; view-transition-name: note-paper; --curl-layer: note-curl; }
  .nn:not(.is-note-open) :is(.nn-page, .nn-hint) { display: none; }
  .nn:not(.is-note-open) .nn-book .nn-sidebar { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 18px; }
  .nn-sidebar h2 { display: flex; }
  .nn-sidebar :is(.nn-search, .nn-side-label, .nn-new) { display: block; }
  .nn-sidebar .nn-search { width: 100%; }
  .nn-sidebar .nn-side-item { display: flex; width: 100%; min-height: 44px; padding: 8px 10px; font-size: 16px; white-space: normal; }

  /* 2 段目: ノートだけ */
  .nn.is-note-open .nn-book .nn-sidebar { display: none; }
  .nn .nn-back {
    flex: none; display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 10px 0 4px;
    border: 1px solid #ac987d88; border-radius: 18px; background: #fffbf19c; color: #375775; font-size: 13px;
  }
}

/* ---- 転記の窓は、5 つの列（2026-12-01 に業務別を足した）を横に並べる（2026-11-26 平良の指示。前は 分類ごとに横一列）。履歴・メンバーなどの窓は今までどおり ----
   列: 見出し・検索・候補（縦に並び、列の中でスクロール）・選択中の数。下の行: 今選んでいる転記先の札（× で外す）・履歴・キャンセル・設定 */
.nn-transfer.nn-transfer--columns {
  display: flex; flex-direction: column; width: 1600px; max-width: calc(100vw - 40px);
  height: min(820px, calc(100dvh - 40px)); max-height: none; padding: 22px 26px; overflow: hidden; border-radius: 18px; background: #fff;
}
.nn-transfer--columns .nn-panel-heading { flex: none; }
.nn-transfer--columns .nn-panel-heading h2 { display: flex; align-items: center; gap: 14px; font-size: 22px; color: #14264e; }
.nn-transfer--columns .nn-panel-heading h2 img { display: block; width: auto; height: 34px; }
.nn-transfer--columns .nn-panel-heading h2 span { padding-left: 14px; border-left: 2px solid #c9d3df; line-height: 1.2; }
.nn-transfer--columns .nn-panel-heading > button { padding: 0 6px; color: #14264e; line-height: 1; }
.nn-transfer-selected {
  flex: none; display: flex; align-items: baseline; gap: 14px; margin: 14px 0; padding: 10px 16px;
  border: 1px solid #cde6f6; border-radius: 10px; background: #e8f3fc; color: #14264e;
}
.nn-transfer-selected-label { flex: none; display: inline-flex; align-items: center; gap: 6px; align-self: center; padding-right: 14px; border-right: 1px solid #b9cfe0; font-size: 13px; font-weight: 700; }
.nn-transfer-selected time { flex: none; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nn-transfer.nn-transfer--columns .nn-transfer-selected blockquote {
  flex: 1; min-width: 0; max-height: 3.4em; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow-y: auto; font: 16px/1.7 var(--hand);
}
.nn-transfer-form { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.nn-transfer-tabs { display: none; }
.nn-transfer-columns { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.nn-transfer--columns .nn-transfer-group {
  display: flex; flex-direction: column; gap: 10px; min-height: 0; margin: 0; padding: 14px 9px 12px;
  border: 1px solid color-mix(in srgb, var(--category-color) 70%, white); border-radius: 14px;
  background: color-mix(in srgb, var(--category-color) 22%, white);
}
/* 列が 5 つになったので、見出しを少し小さくして「プロジェクト別へ転記」が切れないようにする（2026-12-01） */
.nn-transfer--columns .nn-transfer-group h3 { flex: none; gap: 6px; padding: 0; color: #14264e; font-size: 14px; white-space: nowrap; }
.nn-transfer--columns .nn-transfer-group h3 .nn-tab-icon { flex: none; width: 24px; height: 24px; color: var(--category-ink); }
.nn-transfer--columns .nn-transfer-group h3 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nn-transfer--columns .nn-transfer-group h3 button { flex: none; margin-left: auto; padding: 3px 7px; border-color: var(--category-ink); border-radius: 14px; color: var(--category-ink); font-size: 11px; white-space: nowrap; }
.nn-transfer--columns .nn-transfer-group .nn-search {
  flex: none; padding: 9px 11px 9px 36px; border-color: #c9d0d8; background-color: #fff; font: 15px/1.4 system-ui, sans-serif;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355657a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px 50%; background-size: 17px 17px;
}
.nn-transfer--columns .nn-checks { flex: 1; min-height: 0; flex-direction: column; align-items: stretch; gap: 2px; overflow: hidden auto; font-size: 16px; scrollbar-width: thin; }
.nn-transfer--columns .nn-checks label { flex: none; gap: 12px; min-height: 35px; padding: 4px 10px; border-radius: 7px; color: #14264e; white-space: normal; cursor: pointer; }
.nn-transfer--columns .nn-checks label[hidden] { display: none; }
.nn-transfer--columns .nn-checks label:hover { background: color-mix(in srgb, var(--category-color) 40%, white); }
.nn-transfer--columns .nn-checks label:has(input:checked) { background: color-mix(in srgb, var(--category-color) 78%, white); font-weight: 700; }
.nn-transfer--columns .nn-checks input { flex: none; width: 18px; height: 18px; margin: 0; }
.nn-transfer--columns .nn-check-name { min-width: 0; overflow-wrap: anywhere; }
.nn-transfer--columns .nn-check-hint { flex: none; margin-left: auto; font-weight: 400; }
.nn-transfer--columns .nn-checks:empty::after { padding: 8px 10px; }
.nn-transfer-count {
  flex: none; margin: 0; padding: 9px 10px; border-radius: 8px; background: color-mix(in srgb, var(--category-color) 80%, white);
  color: #14264e; font-size: 15px; font-weight: 700; text-align: center;
}
.nn-transfer--columns .nn-transfer-note { flex: none; margin: 8px 2px 0; }
.nn-transfer-footer { flex: none; display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.nn-transfer-total { flex: none; color: #285777; font-size: 14px; font-weight: 700; white-space: nowrap; }
.nn-transfer-chips { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.nn-transfer-chips:empty::after { content: "まだ選んでいません"; color: #8b8273; font-size: 13px; }
.nn .nn-transfer-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 5px 10px 5px 12px;
  border: 1px solid color-mix(in srgb, var(--category-color) 80%, white); border-radius: 18px;
  background: color-mix(in srgb, var(--category-color) 45%, white); color: #14264e; font-size: 13px; font-weight: 700;
}
.nn-transfer-chip:hover { background: var(--category-color); }
.nn-transfer-chip .nn-tab-icon { flex: none; width: 17px; height: 17px; color: var(--category-ink); filter: none; }
.nn-transfer-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nn-transfer-chip i { flex: none; color: #55657a; font-style: normal; font-weight: 400; }
.nn-transfer-footer .nn-panel-actions { flex: none; align-items: center; margin: 0; }
.nn-transfer-footer .nn-panel-actions a.nn-panel-link { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; white-space: nowrap; }
.nn-transfer-footer .nn-panel-actions button { padding: 11px 20px; font-weight: 700; white-space: nowrap; }
.nn-transfer-footer .nn-panel-actions .nn-primary { border-color: #14264e; background: #14264e; }

/* 狭めの幅（761〜1100px。タブレット）は、列を 3 つ・2 つの 2 段に並べる。下の段の 2 つ（業務別・プロジェクト別）は幅を半分ずつ取る
   （上の段と同じ幅だと、見出しの「プロジェクト別へ転記」が切れるため） */
@media (min-width: 761px) and (max-width: 1100px) {
  .nn-transfer-columns { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 12px; }
  .nn-transfer--columns .nn-transfer-group { grid-column: span 2; }
  .nn-transfer--columns .nn-transfer-group:nth-child(n+4) { grid-column: span 3; }
  .nn-transfer.nn-transfer--columns { height: calc(100dvh - 40px); }
  .nn-transfer-footer { flex-wrap: wrap; }
  .nn-transfer-chips { flex-basis: 60%; }
}

/* スマホの幅（760px 以下）は、画面いっぱいの窓にして、列を 1 つずつ出す（上のタブで切り替える。タブの数は、その列で選んでいる数）。
   下に、選んでいる転記先の札（横にスクロール）と、ボタンを置く */
@media (max-width: 760px) {
  .nn-transfer.nn-transfer--columns {
    inset: 0; transform: none; width: 100vw; max-width: none; height: 100dvh; padding: 12px 12px 10px; border: 0; border-radius: 0;
  }
  .nn-transfer--columns .nn-panel-heading h2 { gap: 8px; font-size: 16px; }
  .nn-transfer--columns .nn-panel-heading h2 img { height: 24px; }
  .nn-transfer--columns .nn-panel-heading h2 span { padding-left: 8px; }
  .nn-transfer-selected { flex-wrap: wrap; gap: 4px 10px; margin: 8px 0; padding: 8px 10px; }
  .nn-transfer-selected-label { padding-right: 10px; font-size: 12px; }
  .nn-transfer.nn-transfer--columns .nn-transfer-selected blockquote { flex-basis: 100%; max-height: 3.2em; font-size: 15px; line-height: 1.6; }
  /* タブは 5 つ。名前の長い「プロジェクト別」だけ幅を広く取る（同じ幅だと名前が切れる） */
  .nn-transfer-tabs { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.75fr); gap: 3px; margin-bottom: 8px; }
  .nn .nn-transfer-tabs button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px 2px 5px;
    border: 1px solid color-mix(in srgb, var(--category-color) 70%, white); border-radius: 10px;
    background: color-mix(in srgb, var(--category-color) 22%, white); color: #14264e; font-size: 11px; font-weight: 700;
  }
  .nn-transfer-tabs button[aria-selected="true"] { border-color: var(--category-ink); background: var(--category-color); box-shadow: inset 0 -3px 0 var(--category-ink); }
  .nn-transfer-tabs button .nn-tab-icon { width: 20px; height: 20px; color: var(--category-ink); filter: none; }
  .nn-transfer-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nn-transfer-tabs button b {
    position: absolute; top: -5px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--category-ink); color: #fff; font: 700 11px/18px system-ui, sans-serif;
  }
  .nn-transfer-columns { display: block; }
  .nn-transfer--columns .nn-transfer-group { display: none; height: 100%; padding: 10px 8px 8px; }
  .nn-transfer--columns[data-active-kind="person"] .nn-transfer-group[data-kind="person"],
  .nn-transfer--columns[data-active-kind="unit"] .nn-transfer-group[data-kind="unit"],
  .nn-transfer--columns[data-active-kind="meeting"] .nn-transfer-group[data-kind="meeting"],
  .nn-transfer--columns[data-active-kind="work"] .nn-transfer-group[data-kind="work"],
  .nn-transfer--columns[data-active-kind="project"] .nn-transfer-group[data-kind="project"] { display: flex; }
  .nn-transfer--columns .nn-transfer-group h3 { font-size: 16px; }
  .nn-transfer--columns .nn-transfer-group h3 .nn-tab-icon { width: 24px; height: 24px; }
  .nn-transfer--columns .nn-checks label { min-height: 44px; }
  .nn-transfer--columns .nn-transfer-note { margin-top: 6px; font-size: 11px; }
  .nn-transfer-footer { flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; }
  .nn-transfer-chips { flex-basis: 0; }
  .nn-transfer-footer .nn-panel-actions { flex-basis: 100%; gap: 8px; }
  .nn-transfer-footer .nn-panel-actions a.nn-panel-link { margin-right: auto; }
  .nn-transfer-footer .nn-panel-actions button { padding: 11px 14px; }
  /* 360px 以下（小さいスマホ）は、ボタンを詰めて「転記を設定する」が画面の外へ出ないようにする */
  @media (max-width: 360px) {
    .nn-transfer-footer .nn-panel-actions { gap: 6px; }
    .nn-transfer-footer .nn-panel-actions a.nn-panel-link { gap: 3px; margin-right: auto; font-size: 12px; }
    .nn-transfer-footer .nn-panel-actions button { padding: 10px 9px; font-size: 13px; }
  }
}
