:root {
  --bg: #f7f7f5;
  --panel: #ffffff;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --text: #1c1917;
  --sub: #78716c;
  --faint: #a8a29e;
  --accent: #f97316;
  --accent-soft: #fff1e6;
  --danger: #dc2626;
  --ok: #16a34a;
  --todo: #a8a29e;
  --doing: #3b82f6;
  --review: #eab308;
  --done: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --side: 236px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* ---------- 骨組み ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 4px 8px 14px; }
.brand-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; font-size: 13px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text); border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: #f5f5f4; }
.nav-item.on { background: var(--accent-soft); color: #9a3412; font-weight: 600; }
.nav-item .ic { width: 18px; text-align: center; }
.nav-item .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; font-weight: 700; }
.nav-label { font-size: 11px; color: var(--sub); padding: 14px 10px 4px; display: flex; justify-content: space-between; align-items: center; letter-spacing: .04em; }
.nav-label button { border: 0; background: none; color: var(--sub); font-size: 16px; line-height: 1; padding: 0 4px; }
.pdot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page-head { padding: 22px 28px 0; }
.page-head h1 { font-size: 21px; margin: 0 0 2px; display: flex; align-items: center; gap: 10px; }
.page-head .desc { color: var(--sub); margin: 2px 0 0; font-size: 13px; white-space: pre-wrap; }
.content { padding: 16px 28px 80px; min-width: 0; }

/* ---------- 表示の切り替え・絞り込み ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 28px 0; }
.tabs { display: inline-flex; background: #efeeec; border-radius: 9px; padding: 3px; gap: 2px; }
.tabs button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--sub); white-space: nowrap; }
.tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.filters select, .filters input[type=search] { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; }
.filters input[type=search] { width: 170px; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--sub); font-size: 13px; user-select: none; }

/* ---------- 部品 ---------- */
.btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 8px; padding: 6px 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: #fafaf9; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #ea580c; }
.btn.ghost { border-color: transparent; background: none; color: var(--sub); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.av { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; position: relative; }
.av.lg { width: 34px; height: 34px; font-size: 14px; }
.av.none { background: #e7e5e4 !important; color: var(--faint); }
.ball-badge { position: absolute; right: -5px; bottom: -4px; font-size: 11px; line-height: 1; filter: drop-shadow(0 0 1px #fff); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 9px; font-size: 12px; white-space: nowrap; background: #f5f5f4; color: var(--sub); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.todo { color: #78716c; } .pill.doing { color: #2563eb; background: #eff6ff; } .pill.review { color: #a16207; background: #fefce8; } .pill.done { color: #15803d; background: #f0fdf4; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--sub); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.prio-high { color: var(--danger); font-weight: 700; font-size: 12px; }
.due { font-size: 12px; color: var(--sub); white-space: nowrap; }
.due.over { color: var(--danger); font-weight: 600; }
.due.soon { color: #c2410c; font-weight: 600; }
.muted { color: var(--sub); }
.empty { color: var(--faint); padding: 18px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: #fff; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.round-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: #fff; display: inline-grid; place-items: center; flex: none; padding: 0; color: transparent; font-size: 11px; }
.round-check:hover { border-color: var(--ok); color: var(--ok); }
.round-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
input.field, select.field, textarea.field { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; }
textarea.field { resize: vertical; min-height: 80px; }
input.field:focus, select.field:focus, textarea.field:focus, .filters input:focus { outline: 2px solid #fed7aa; border-color: var(--accent); }

/* ---------- リスト ---------- */
.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 6px; font-size: 13px; }
.group-head .n { color: var(--faint); font-weight: 400; }
.rows { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 160px 64px 84px 84px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #f1f0ef; cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafaf9; }
.row .title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.row .title span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done .title span.t { color: var(--faint); text-decoration: line-through; }
.row .who { display: flex; gap: 4px; }
.meta-small { color: var(--faint); font-size: 12px; white-space: nowrap; }
.row-head { background: #fafaf9; color: var(--sub); font-size: 12px; cursor: default; }
.row-head:hover { background: #fafaf9; }
.quick-add { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid #f1f0ef; background: #fff; }
.quick-add input { flex: 1; border: 0; outline: none; background: none; padding: 4px 0; }
.quick-add select { border: 1px solid var(--line); border-radius: 6px; max-width: 200px; }

/* ---------- ボード ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #efeeec; border-radius: 12px; padding: 10px; min-height: 140px; }
.col.drop { outline: 2px dashed var(--accent); background: var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; padding: 2px 4px 10px; }
.col-head .n { color: var(--faint); font-weight: 400; }
.tcard { background: #fff; border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.07); cursor: pointer; border-left: 4px solid var(--pc, #ddd); }
.tcard:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.tcard.dragging { opacity: .4; }
.tcard .t { font-weight: 600; margin-bottom: 6px; word-break: break-word; }
.tcard .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tcard .meta .right { margin-left: auto; display: flex; gap: 4px; }
.col .add { width: 100%; border: 0; background: none; color: var(--sub); text-align: left; padding: 6px; border-radius: 6px; }
.col .add:hover { background: rgba(255,255,255,.6); }
.member-load { font-size: 12px; color: var(--sub); font-weight: 400; margin-left: auto; }
.ball-hint { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 9px 14px; margin-bottom: 14px; font-size: 13px; }

/* ---------- ガント ---------- */
.gantt-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 210px); position: relative; }
.gantt { display: grid; position: relative; }
.g-left { position: sticky; left: 0; z-index: 3; background: #fff; border-right: 1px solid var(--line); }
.g-cell { height: 36px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid #f4f3f2; white-space: nowrap; overflow: hidden; }
.g-cell.task { cursor: pointer; }
.g-cell.task:hover { background: #fafaf9; }
.g-cell.task .t { overflow: hidden; text-overflow: ellipsis; }
.g-cell.proj { font-weight: 700; background: #fafaf9; font-size: 13px; }
.g-head { position: sticky; top: 0; z-index: 4; background: #fff; }
.g-headcell { height: 52px; border-bottom: 1px solid var(--line); }
.g-days { display: flex; height: 52px; border-bottom: 1px solid var(--line); }
.g-day { flex: none; border-right: 1px solid #f4f3f2; font-size: 11px; text-align: center; color: var(--sub); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 4px; position: relative; }
.g-day.we { background: #fafaf9; }
.g-day.today { color: var(--accent); font-weight: 700; }
.g-day .m { position: absolute; top: 4px; left: 4px; font-weight: 700; color: var(--text); white-space: nowrap; font-size: 12px; }
.g-row { position: relative; height: 36px; border-bottom: 1px solid #f4f3f2; }
.g-row.proj { background: #fafaf9; }
.g-bg { position: absolute; inset: 0; display: flex; pointer-events: none; }
.g-bg div { flex: none; border-right: 1px solid #f7f6f5; height: 100%; }
.g-bg div.we { background: #fafaf9; }
.g-bar { position: absolute; top: 7px; height: 22px; border-radius: 6px; background: var(--pc); color: #fff; font-size: 12px; display: flex; align-items: center; padding: 0 8px; gap: 6px; white-space: nowrap; overflow: hidden; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.g-bar.done { opacity: .45; }
.g-bar.point { width: 14px !important; height: 14px; top: 11px; border-radius: 3px; transform: rotate(45deg); padding: 0; }
.g-bar .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-bar .ls { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 1; pointer-events: none; opacity: .7; }
.g-progress { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.25); }
.gantt-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }

/* ---------- カレンダー ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cal-head h3 { margin: 0; font-size: 17px; min-width: 120px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal .dow { font-size: 12px; color: var(--sub); text-align: center; padding: 6px 0; border-bottom: 1px solid var(--line); background: #fafaf9; }
.cal .day { min-height: 108px; border-right: 1px solid #f1f0ef; border-bottom: 1px solid #f1f0ef; padding: 4px; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: #fafaf9; color: var(--faint); }
.cal .day.today .dn { background: var(--accent); color: #fff; border-radius: 50%; }
.cal .dn { font-size: 12px; width: 22px; height: 22px; display: grid; place-items: center; margin-bottom: 2px; }
.cal .ev { font-size: 11.5px; border-radius: 5px; padding: 2px 6px; margin-bottom: 3px; background: color-mix(in srgb, var(--pc) 14%, white); border-left: 3px solid var(--pc); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.done { opacity: .5; text-decoration: line-through; }

/* ---------- マイページ ---------- */
.my-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.panel h2 { font-size: 15px; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.panel .lead { color: var(--sub); font-size: 12.5px; margin: 0 0 10px; }
.panel.hot { border-color: #fdba74; box-shadow: 0 0 0 3px #fff7ed; }
.mini { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #f4f3f2; cursor: pointer; }
.mini:last-child { border-bottom: 0; }
.mini:hover { background: #fafaf9; }
.mini .body { min-width: 0; flex: 1; }
.mini .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .sub { font-size: 12px; color: var(--sub); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mini.done .t { text-decoration: line-through; color: var(--faint); }
.msg { background: #fff7ed; border-radius: 8px; padding: 4px 9px; font-size: 12.5px; color: #7c2d12; margin-top: 3px; white-space: pre-wrap; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-width: 130px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: var(--sub); }

/* ---------- お知らせ ---------- */
.feed-item { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #f4f3f2; cursor: pointer; background: #fff; }
.feed-item:hover { background: #fafaf9; }
.feed-item.unread { background: #fffbf5; }
.feed-item.unread .what::after { content: "新着"; margin-left: 8px; font-size: 11px; color: #fff; background: var(--accent); border-radius: 99px; padding: 0 7px; }
.feed-item .when { font-size: 12px; color: var(--faint); }

/* ---------- 詳細の引き出し ---------- */
.scrim { position: fixed; inset: 0; background: rgba(28,25,23,.25); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; z-index: 41; box-shadow: -8px 0 30px rgba(0,0,0,.12); display: flex; flex-direction: column; animation: slidein .16s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: .4; } }
.drawer-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 16px 20px 40px; overflow-y: auto; flex: 1; }
.title-input { width: 100%; font-size: 20px; font-weight: 700; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; margin-left: -6px; resize: none; overflow: hidden; }
.title-input:hover { border-color: var(--line); }
.title-input:focus { outline: none; border-color: var(--accent); }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; align-items: center; margin: 14px 0 18px; }
.props label { color: var(--sub); font-size: 13px; }
.props select, .props input { border: 1px solid transparent; border-radius: 7px; padding: 4px 6px; background: none; max-width: 100%; }
.props select:hover, .props input:hover { border-color: var(--line); }
.ball-box { display: flex; align-items: center; gap: 10px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 8px 10px; flex-wrap: wrap; }
.ball-box .who { font-weight: 700; }
.sec-title { font-size: 13px; font-weight: 700; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.sub-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #f4f3f2; }
.sub-row .t { flex: 1; cursor: pointer; }
.sub-row.done .t { text-decoration: line-through; color: var(--faint); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl { display: flex; gap: 10px; }
.tl .bubble { background: #f5f5f4; border-radius: 10px; padding: 8px 11px; flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.tl.act { color: var(--sub); font-size: 12.5px; align-items: center; }
.tl.act .ic { width: 24px; text-align: center; }
.tl.ballact .bubble { background: #fff7ed; }
.tl .head { font-size: 12px; color: var(--sub); margin-bottom: 2px; }
.comment-box { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.comment-box textarea { flex: 1; min-height: 44px; }

/* ---------- モーダル ---------- */
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.modal h3 { margin: 0 0 4px; font-size: 17px; }
.modal .lead { color: var(--sub); margin: 0 0 14px; font-size: 13px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.modal-scrim { position: fixed; inset: 0; background: rgba(28,25,23,.35); z-index: 60; }
.person-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 12px; }
.person-pick button { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; text-align: left; }
.person-pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12.5px; color: var(--sub); margin-bottom: 4px; }

/* ---------- 管理 ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid #f1f0ef; text-align: left; vertical-align: middle; }
.table th { font-size: 12px; color: var(--sub); background: #fafaf9; font-weight: 600; }
.table select, .table input { border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; }
.role-note { font-size: 12.5px; color: var(--sub); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0 18px; }
.role-note b { color: var(--text); }
.copybox { display: flex; gap: 6px; margin-top: 8px; }
.copybox input { flex: 1; font-size: 12px; }

/* ---------- ログイン ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .box { width: min(380px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.login h1 { font-size: 20px; margin: 10px 0 4px; }
.login .err { color: var(--danger); font-size: 13px; min-height: 20px; margin: 6px 0; }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #292524; color: #fff; padding: 9px 16px; border-radius: 10px; font-size: 13px; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }

.bottom-nav { display: none; }

/* ---------- スマホ ---------- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  .side.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; z-index: 49; background: rgba(0,0,0,.25); }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .topbar .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar button { border: 0; background: none; font-size: 20px; padding: 0 4px; }
  .page-head { padding: 14px 16px 0; }
  .page-head h1 { font-size: 18px; }
  .toolbar { padding: 10px 16px 0; }
  .filters { margin-left: 0; width: 100%; }
  .filters input[type=search] { flex: 1; width: auto; min-width: 0; }
  .tabs { max-width: 100%; overflow-x: auto; }
  .content { padding: 12px 16px 96px; }
  .row { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 2px; }
  .row .c-proj, .row .c-status { display: none; }
  .row .c-due { grid-column: 2; grid-row: 2; }
  .row .who { grid-column: 3; grid-row: 1 / span 2; }
  .row-head { display: none; }
  .my-grid { grid-template-columns: 1fr; }
  .board { grid-auto-columns: 82vw; }
  .cal .day { min-height: 72px; padding: 2px; }
  .cal .ev { font-size: 10px; padding: 1px 3px; }
  .props { grid-template-columns: 92px 1fr; }
  .drawer-body { padding: 14px 16px 60px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--sub); text-decoration: none; position: relative; }
  .bottom-nav a .i { display: block; font-size: 18px; line-height: 1.2; }
  .bottom-nav a.on { color: var(--accent); font-weight: 700; }
  .bottom-nav .count { position: absolute; top: 3px; left: 54%; background: var(--accent); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .table-wrap { overflow-x: auto; }
  .gantt-wrap { max-height: calc(100vh - 250px); }
}

/* ---------- 定例ミーティング ---------- */
.mtg-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.mtg-head select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; }
.kind-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.kind-pick button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--sub); }
.kind-pick button.on { border-color: var(--kc); background: var(--kb); color: var(--kc); font-weight: 700; }
.mtg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mcard-h { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 2px 2px 4px; }
.mcard-h .muted { margin-left: auto; }
.mbox { background: var(--kb); border-left: 4px solid var(--kc); border-radius: 8px; padding: 7px 10px; }
.mbox-h { font-size: 12.5px; font-weight: 700; color: var(--kc); margin-bottom: 3px; }
.mnote { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 13.5px; word-break: break-word; }
.mnote .round-check { margin-top: 2px; }
.mnote.auto a { color: var(--text); }
.mnone { color: var(--faint); font-size: 12.5px; }
.mbox-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--kc); color: #fff; font-size: 11px; text-align: center; }
.note-title { font-weight: 600; }
.note-title.plain { font-weight: 400; }
.note-dt > summary { cursor: pointer; list-style: none; position: relative; padding-left: 15px; }
.note-dt > summary::-webkit-details-marker { display: none; }
.note-dt > summary::before { content: '▸'; position: absolute; left: 0; top: 0; color: var(--kc, var(--sub)); transition: transform .15s; }
.note-dt[open] > summary::before { transform: rotate(90deg); }
.note-dt > summary:hover { text-decoration: underline; text-decoration-color: var(--faint); }
.note-detail { white-space: pre-wrap; margin: 5px 0 4px 15px; padding: 7px 10px; background: #fff; border-radius: 6px; font-size: 13px; line-height: 1.65; color: var(--text); }
.note-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.note-form textarea { min-height: 70px; }
.mtools { display: none; gap: 2px; flex: none; }
.mnote:hover .mtools { display: inline-flex; }
.mtools button { border: 0; background: none; color: var(--sub); padding: 0 3px; font-size: 12px; }
@media (max-width: 820px) { .mtg-grid { grid-template-columns: 1fr; } .mtools { display: inline-flex; } }

/* 議事録 */
.gj { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.gj-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gj-top .lead { flex-basis: 100%; margin: 0; }
.gj-chip { display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 12px; font-size: 13px; background: #fff; color: var(--text); text-decoration: none; }
a.gj-chip:hover { border-color: var(--accent); }
.gj-chip.next { border-color: #fdba74; background: #fff7ed; color: #c2410c; font-weight: 700; }
.gj-sec { padding: 10px 14px 12px; }
.gj-sec .mbox-h { font-size: 14.5px; margin-bottom: 8px; }
.gj-sec p { margin: 4px 0; }
.gj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.gj-list > li { position: relative; padding-left: 15px; }
.gj-list > li::before { content: ''; position: absolute; left: 1px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--kc); }
.gj-list > li.num { display: flex; gap: 9px; padding-left: 0; }
.gj-list > li.num::before { display: none; }
.gj-list > li.num > div { min-width: 0; }
.gj-no { flex: none; width: 21px; height: 21px; margin-top: 2px; border-radius: 50%; background: var(--kc); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 21px; text-align: center; }
.gj-who { display: inline-flex; gap: 5px; align-items: center; margin-left: 7px; padding: 1px 9px 1px 2px; border-radius: 99px; background: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.gj-who .av { width: 20px; height: 20px; font-size: 10.5px; }
.gj-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 5px; }
.gj-pair { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 8px; padding: 5px 9px; font-size: 13px; line-height: 1.4; }
.gj-pair small { display: block; color: var(--sub); font-size: 11.5px; }
.gj-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gj-person.all { grid-column: 1 / -1; }
.gj-person { background: #fff; border-radius: 10px; padding: 9px 12px 11px; min-width: 0; }
.gj-name { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.gj-all { width: 24px; text-align: center; }
.gj-person .gj-list { font-size: 13.5px; line-height: 1.6; gap: 5px; }
@media (min-width: 1100px) { .gj-sec > .gj-list { display: block; columns: 2; column-gap: 28px; } .gj-sec > .gj-list > li { break-inside: avoid; margin-bottom: 8px; } }
@media (max-width: 820px) { .gj-people { grid-template-columns: minmax(0, 1fr); } .gj-sec { padding: 10px 11px 12px; } }

/* ---------- @ の候補 ---------- */
.comment-box { position: relative; }
.mention-menu { position: absolute; left: 0; bottom: calc(100% + 4px); width: min(280px, 100%); background: #fff; border: 1px solid var(--line, #e7e5e4); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; z-index: 5; max-height: 240px; overflow-y: auto; }
.mm-head { font-size: 11.5px; color: var(--sub); padding: 4px 8px 2px; }
.mm-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; }
.mm-item.on, .mm-item:hover { background: #fff7ed; }
.mm-name { font-weight: 600; }
.mm-role { margin-left: auto; font-size: 11.5px; color: var(--sub); }
.mention { color: #c2410c; font-weight: 600; }

/* ---------- 事業(プロジェクトの一つ上の仕切り) ---------- */
.biz-mark { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: -1px; }
.biz-mark.lg { width: 16px; height: 16px; margin-right: 8px; vertical-align: 0; }
.biz-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; border-radius: 8px; }
.biz-head a { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 6px 10px; font-weight: 700; font-size: 13px; color: var(--text); text-decoration: none; border-radius: 8px; }
.biz-head a:hover { background: #f5f5f4; }
.biz-head.on a { background: var(--accent-soft); color: #9a3412; }
.biz-head button { border: 0; background: none; color: var(--sub); font-size: 16px; line-height: 1; padding: 4px 8px; }
.nav-item.sub { padding-left: 30px; font-size: 13px; }
.crumb { font-size: 12.5px; color: var(--sub); padding: 18px 28px 0; }
.crumb + .page-head { padding-top: 4px; }
.crumb a { color: var(--sub); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.crumb a:hover { color: var(--text); }
@media (max-width: 820px) { .crumb { padding: 12px 16px 0; } }

/* ---------- 札(プロジェクトの中の分類)・Notion ---------- */
.label-bar { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 28px 0; }
.lchip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--sub); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lchip:hover { border-color: #a8a29e; color: var(--text); }
.lchip.on { background: #1c1917; border-color: #1c1917; color: #fff; }
.lchip .n { font-size: 11px; opacity: .7; }
.chip.lbl { background: #f5f5f4; border-radius: 4px; padding: 1px 7px; margin-left: 4px; }
.ntag { display: inline-block; font-size: 11px; color: #6d28d9; background: #f3e8ff; border-radius: 4px; padding: 1px 6px; margin-left: 6px; white-space: nowrap; vertical-align: 1px; }
.notion-box { background: #faf5ff; border: 1px solid #e9d5ff; color: #4c1d95; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.6; margin: 10px 0; }
@media (max-width: 820px) { .label-bar { padding: 10px 16px 0; overflow-x: auto; flex-wrap: nowrap; } .lchip { flex: none; } .row .title { flex-wrap: wrap; row-gap: 2px; } .row .title .ntag { margin-left: 0; } }

/* みんなの予定 */
.ev-projs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; font-size: 13px; }
.ev-projs .pcheck { border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; background: #fff; cursor: pointer; color: var(--text); }
.ev-projs .pcheck.on { border-color: var(--accent); background: #fff7ed; }
.ev-projs .pcheck input { margin: 0; }
.ev-projs > .muted { flex: none; white-space: nowrap; }
.g-bar.ev { cursor: pointer; }
.g-evlabel { position: absolute; top: 9px; font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; color: var(--text); }
.g-evmark { position: absolute; top: 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--pc) 14%, white); border-left: 3px solid var(--pc); border-radius: 4px; padding: 2px 6px; cursor: pointer; z-index: 2; box-sizing: border-box; overflow: clip; text-overflow: ellipsis; line-height: 16px; }
.g-evmark.span { background: color-mix(in srgb, var(--pc) 22%, white); }
.g-evmark.span .lbl { position: sticky; display: inline-block; max-width: 100%; overflow: clip; text-overflow: ellipsis; vertical-align: top; }
.g-evline { position: absolute; bottom: 0; width: 0; border-left: 2px dashed var(--pc); opacity: .55; z-index: 1; pointer-events: none; }
.cal .ev.evt { background: var(--pc); color: #fff; border-left-color: var(--pc); font-weight: 600; }
.ev-list { display: flex; flex-direction: column; gap: 8px; }
.ev-row { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--pc); border-radius: var(--radius); padding: 10px 14px; cursor: pointer; }
.ev-row:hover { background: #fafaf9; }
.ev-date { display: flex; flex-direction: column; min-width: 92px; font-size: 13px; }
.ev-date b { font-size: 15px; }
.ev-when { color: var(--pc); font-weight: 700; font-size: 12px; margin-top: 2px; }
.ev-body { min-width: 0; }
.ev-body .t { font-weight: 600; }
.ev-body .sub { display: flex; gap: 8px; align-items: center; margin-top: 3px; font-size: 12px; flex-wrap: wrap; }
.ev-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-kind { display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.ev-kind:has(input:checked) { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 10%, white); font-weight: 600; }
.ev-kind input { margin: 0; }
@media (max-width: 820px) {
  .ev-projs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .ev-projs .pcheck { flex: none; }
  .ev-row { gap: 10px; padding: 9px 11px; }
  .ev-date { min-width: 78px; }
}
