:root {
  --bg: #f3f5f7; --panel: #fff; --line: #dfe3e8; --line2: #eef0f3; --text: #1f2a37; --muted: #6b7684; --muted2: #98a2b0;
  --accent: #3566d6; --accent2: #2a52b3; --accent-bg: #e9effc; --accent-ring: rgba(53,102,214,.18); --danger: #d64545; --danger-bg: #fdecec; --warn: #d9822b; --warn-bg: #fff3e6;
  --header: #101a30; --header2: #1b2744; --header-text: #c9d3e6; --sidebar: #fff; --radius: 6px; --shadow: 0 1px 2px rgba(16,26,48,.06), 0 1px 6px rgba(16,26,48,.05);
  --sat: #f2b84b;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: #2d5fc7; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.boot { padding: 60px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- ヘッダー ---------- */
.gh { position: sticky; top: 0; z-index: 50; height: 48px; background: var(--header); color: #fff; display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.gh .logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: #fff; letter-spacing: .04em; margin-right: 8px; }
.omark { width: 26px; height: 26px; color: #fff; flex: none; }
.gh .logo:hover { text-decoration: none; }
.gh .nav a { color: var(--header-text); padding: 6px 10px; border-radius: 4px; font-size: 13px; }
.gh .nav a:hover, .gh .nav a.on { color: #fff; background: var(--header2); text-decoration: none; }
.gh .sp { flex: 1; }
.gh .search { position: relative; }
.gh .search input { width: 260px; height: 32px; border: 0; border-radius: 4px; background: var(--header2); color: #fff; padding: 0 10px 0 30px; outline: none; }
.gh .search input::placeholder { color: #8797b5; }
.gh .search::before { content: "⌕"; position: absolute; left: 10px; top: 5px; color: #8797b5; font-size: 16px; }
.gh .search .drop { position: absolute; top: 36px; right: 0; width: 420px; max-width: 90vw; background: #fff; color: var(--text); border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.2); max-height: 60vh; overflow: auto; }
.gh .search .drop a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line2); }
.gh .search .drop a:hover { background: var(--bg); text-decoration: none; }
.gh .ibtn { position: relative; color: var(--header-text); background: none; border: 0; width: 36px; height: 36px; border-radius: 4px; cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.gh .ibtn:hover { background: var(--header2); color: #fff; }
.gh .ibtn .cnt { position: absolute; top: 3px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; display: grid; place-items: center; font-weight: 700; }
.gh .me { display: flex; align-items: center; gap: 8px; color: #fff; padding: 4px 8px; border-radius: 4px; cursor: pointer; position: relative; }
.gh .me:hover { background: var(--header2); }
.menu { position: absolute; top: 40px; right: 0; background: #fff; color: var(--text); border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.2); min-width: 200px; padding: 6px 0; z-index: 60; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 14px; color: var(--text); background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .who { padding: 6px 14px 8px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- レイアウト ---------- */
.frame { display: flex; min-height: calc(100vh - 48px); }
.side { width: 210px; flex: none; background: var(--sidebar); border-right: 1px solid var(--line); padding: 14px 0; position: sticky; top: 48px; height: calc(100vh - 48px); overflow: auto; }
.side .pj { padding: 4px 16px 12px; border-bottom: 1px solid var(--line2); margin-bottom: 8px; }
.side .pj .k { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.side .pj .n { font-weight: 600; font-size: 15px; word-break: break-all; }
.side a.item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: var(--text); border-left: 3px solid transparent; }
.side a.item:hover { background: var(--bg); text-decoration: none; }
.side a.item.on { background: var(--accent-bg); border-left-color: var(--accent); color: var(--accent2); font-weight: 600; }
.side a.item .ic { width: 18px; text-align: center; color: var(--muted); }
.side a.item.on .ic { color: var(--accent2); }
.main { flex: 1; min-width: 0; padding: 20px 24px 60px; }
.main.narrow { max-width: 900px; margin: 0 auto; }
.main.wide { max-width: 1400px; margin: 0 auto; }
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ph h1 { flex: 1; min-width: 200px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .hd { padding: 10px 16px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 10px; }
.card .hd h2 { flex: 1; }
.card .bd { padding: 16px; }
.card + .card, .card + .grid { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.grid2 > *, .grid3 > * { min-width: 0; }
.mnav { display: none; }
@media (max-width: 900px) {
  .grid2, .grid3 { grid-template-columns: 1fr; } .side { display: none; } .main { padding: 12px 14px 40px; }
  .gh { padding: 0 8px; gap: 2px; } .gh .nav { display: none; } .gh .logo { font-size: 15px; margin-right: 0; } .omark { width: 22px; height: 22px; } .gh .search input { width: 44vw; } .gh .me span.nowrap { display: none; }
  .mnav { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow-x: auto; }
  .mnav a.item { flex: 1; justify-content: center; padding: 8px 6px; color: var(--text); font-size: 13px; white-space: nowrap; border-bottom: 3px solid transparent; }
  .mnav a.item.on { color: var(--accent2); border-bottom-color: var(--accent); font-weight: 600; }
  .mnav a.item .ic { display: none; }
  .ihead { flex-wrap: wrap; } .ihead h1 { font-size: 18px; flex: 0 0 100%; order: 3; }
  .card .bd { padding: 12px; } .filters { padding: 10px 12px; } .cform .quick { grid-template-columns: 1fr 1fr; }
  .board { min-height: auto; } .col { width: 82vw; max-height: 70vh; }
}

/* ---------- 部品 ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; white-space: nowrap; font-size: 13px; }
.btn:hover { background: var(--bg); }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.pri:hover { background: var(--accent2); }
.btn.dan { color: var(--danger); border-color: #f0c2c2; }
.btn.dan:hover { background: var(--danger-bg); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn.lnk { border: 0; background: none; color: #2d5fc7; padding: 0 4px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input, textarea.input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
textarea.input { height: auto; min-height: 120px; padding: 8px 10px; line-height: 1.5; resize: vertical; font-family: var(--font); }
.input.sm { height: 28px; font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field .help { font-size: 12px; color: var(--muted2); margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row > * { min-width: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; line-height: 18px; vertical-align: middle; }
.badge.o { background: #fff; border: 1px solid currentColor; }
.chip { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 12px; background: var(--line2); color: var(--muted); white-space: nowrap; line-height: 20px; }
.tag { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 12px; background: #eef2f7; color: #4a5a6d; white-space: nowrap; line-height: 20px; }
.pr { font-weight: 700; font-size: 12px; white-space: nowrap; }
.pr.p1 { color: var(--danger); } .pr.p2 { color: #7a8794; } .pr.p3 { color: #2d5fc7; }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #c8d3df; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; flex: none; }
.av.lg { width: 34px; height: 34px; font-size: 14px; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.due.over { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.ikey { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted2); }
.err { color: var(--danger); background: var(--danger-bg); border: 1px solid #f3c7c7; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; }
.note { color: #6a5b2a; background: var(--warn-bg); border: 1px solid #f2dcbf; padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 16px; min-width: 130px; }
.stat .v { font-size: 22px; font-weight: 700; } .stat .l { font-size: 12px; color: var(--muted); }
.stat.warn .v { color: var(--danger); }

/* ---------- テーブル ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line2); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; white-space: nowrap; user-select: none; }
.tbl th.sort { cursor: pointer; } .tbl th.sort:hover { color: var(--text); }
.tbl th.sort.on { color: var(--accent2); }
.tbl tr:hover td { background: #fbfcfd; }
.tbl td.subj { width: 100%; min-width: 220px; }
.tbl td.subj a { color: var(--text); font-weight: 500; }
.tbl td.subj a:hover { color: #2d5fc7; }
.tbl .r { text-align: right; }
.tblwrap { overflow-x: auto; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 10px 16px; color: var(--muted); font-size: 13px; }

/* ---------- フィルタ ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line2); background: #fafbfc; border-radius: var(--radius) var(--radius) 0 0; }
.filters select, .filters input { height: 30px; font-size: 13px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; max-width: 180px; }
.filters input[type=search] { width: 200px; }

/* ---------- 課題詳細 ---------- */
.ihead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ihead h1 { font-size: 22px; font-weight: 600; flex: 1; word-break: break-word; }
.imeta { color: var(--muted); font-size: 12px; margin-bottom: 16px; display: flex; gap: 14px; flex-wrap: wrap; }
.props { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 20px; }
.props .p { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line2); align-items: center; }
.props .p .k { width: 90px; flex: none; font-size: 12px; color: var(--muted); }
.props .p .v { flex: 1; min-width: 0; }
.md { line-height: 1.7; word-break: break-word; }
.md p { margin: 0 0 .8em; } .md p:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.2em 0 .5em; } .md h1 { font-size: 20px; } .md h2 { font-size: 17px; border-bottom: 1px solid var(--line2); padding-bottom: 4px; } .md h3 { font-size: 15px; }
.md ul, .md ol { margin: 0 0 .8em; padding-left: 1.6em; }
.md li.task { list-style: none; margin-left: -1.3em; }
.md code { font-family: var(--mono); font-size: 12.5px; background: #f0f2f5; padding: 1px 5px; border-radius: 3px; }
.md pre { background: var(--header); color: #e6edf3; padding: 12px 14px; border-radius: 6px; overflow-x: auto; margin: 0 0 .8em; }
.md pre code { background: none; color: inherit; padding: 0; font-size: 12.5px; }
.md blockquote { border-left: 3px solid var(--line); margin: 0 0 .8em; padding: 2px 12px; color: var(--muted); }
.md table { border-collapse: collapse; margin: 0 0 .8em; } .md th, .md td { border: 1px solid var(--line); padding: 4px 10px; }
.md img { max-width: 100%; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md .mention { background: var(--accent-bg); color: var(--accent2); padding: 0 4px; border-radius: 3px; font-weight: 600; }
.cmts { margin-top: 20px; }
.cmt { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line2); }
.cmt .body { flex: 1; min-width: 0; }
.cmt .top { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cmt .top b { color: var(--text); font-size: 13px; }
.cmt .top .acts { margin-left: auto; opacity: 0; }
.cmt:hover .top .acts { opacity: 1; }
.changes { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: 12.5px; }
.changes .c { color: var(--muted); }
.changes .c b { color: var(--text); font-weight: 600; }
.changes .c .arrow { margin: 0 6px; color: var(--muted2); }
.changes .c .from { text-decoration: line-through; color: var(--muted2); }
.cform { margin-top: 16px; padding: 16px; background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius); }
.cform .quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.cform .quick label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.mdtools { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.mdtools button { background: none; border: 0; color: #2d5fc7; cursor: pointer; padding: 2px 6px; font-size: 12px; }
.mdtools button.on { background: var(--line2); border-radius: 3px; color: var(--text); }
.preview { min-height: 120px; padding: 10px; border: 1px dashed var(--line); border-radius: 4px; background: #fff; }
.children { margin: 10px 0 0; }
.children .ch { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line2); }

/* ---------- 最近の更新 ---------- */
.feed .it { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.feed .it:last-child { border-bottom: 0; }
.feed .it .b { flex: 1; min-width: 0; font-size: 13px; }
.feed .it .b .l { color: var(--muted); font-size: 12px; }
.feed .it .b .l b { color: var(--text); }
.feed .it .ex { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .it .ch { font-size: 12px; color: var(--muted); }

/* ---------- ボード ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 60vh; }
.col { flex: none; width: 280px; background: #eaedf1; border-radius: 8px; display: flex; flex-direction: column; max-height: calc(100vh - 170px); }
.col .ch { padding: 10px 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.col .ch .n { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12px; }
.col .cards { padding: 0 8px 8px; overflow-y: auto; flex: 1; min-height: 60px; }
.col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.kcard { background: #fff; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: grab; border-left: 3px solid #ccc; }
.kcard:active { cursor: grabbing; }
.kcard.drag { opacity: .4; }
.kcard .t { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kcard .s a { color: var(--text); font-weight: 500; }
.kcard .f { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.kcard .f .sp { flex: 1; }

/* ---------- 設定 ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--accent2); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.list .li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); }
.list .li .g { flex: 1; min-width: 0; }
.list .li .acts { display: flex; gap: 4px; }
.sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; vertical-align: middle; }
input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; }
.bar { height: 8px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- ログイン（深い紺の宇宙＋軌道リング） ---------- */
.login { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 80% at 70% 0%, #1b2a4f 0%, #101a30 55%, #0b1224 100%); overflow: hidden; }
.login .rings { position: absolute; inset: -20%; pointer-events: none; opacity: .55;
  background: repeating-radial-gradient(ellipse 60% 30% at 62% 38%, transparent 0 110px, rgba(201,211,230,.13) 110px 112px); }
.login .rings::after { content: ""; position: absolute; left: 62%; top: 38%; width: 7px; height: 7px; margin: -3px; border-radius: 50%; background: var(--sat); box-shadow: 0 0 18px 4px rgba(242,184,75,.35); }
.login .box { position: relative; width: 100%; max-width: 380px; }
.login .brand { text-align: center; margin-bottom: 22px; color: #fff; }
.login .brand .omark { width: 56px; height: 56px; }
.login .brand h1 { margin-top: 8px; font-size: 26px; letter-spacing: .06em; }
.login .brand .tagline { color: var(--header-text); font-size: 13px; margin-top: 6px; letter-spacing: .02em; }
.login .card { border: 0; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.login .foot { color: #8797b5; font-size: 12px; text-align: center; margin-top: 16px; line-height: 1.7; }

/* ---------- モーダル / トースト ---------- */
.mback { position: fixed; inset: 0; background: rgba(20,30,40,.45); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); max-height: 90vh; overflow: auto; }
.modal .hd { padding: 14px 18px; border-bottom: 1px solid var(--line2); font-weight: 600; }
.modal .bd { padding: 18px; }
.modal .ft { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { background: var(--header); color: #fff; padding: 8px 16px; border-radius: 6px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.25); animation: tin .2s ease-out; }
#toast div.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.notif.unread { background: #f3f6fd; }
.notif .b { flex: 1; min-width: 0; }
.notif .b .l { font-size: 12px; color: var(--muted); }
.notif .b .ex { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font-family: var(--mono); font-size: 11px; background: var(--line2); padding: 0 5px; border-radius: 3px; }
.checks { display: flex; gap: 6px 14px; flex-wrap: wrap; }
.checks label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); font-weight: 400; }
.subtitle { color: var(--muted); font-size: 13px; margin-top: -8px; margin-bottom: 16px; }

/* ---------- ガントチャート ---------- */
.pbar { display: inline-block; width: 90px; height: 8px; background: var(--line2); border-radius: 4px; vertical-align: middle; overflow: hidden; }
.pbar > i { display: block; height: 100%; background: var(--accent); }
.gantt { overflow-x: auto; padding: 14px 16px 16px; }
.gname { flex: 0 0 300px; min-width: 0; } .gown { flex: 0 0 90px; } .gpct { flex: 0 0 44px; text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ghead { display: flex; align-items: flex-end; }
.gmonths { flex: 1; display: flex; }
.gmonths span { text-align: center; font-size: 11px; font-weight: 700; color: var(--accent2); border-left: 1px solid var(--line); padding-bottom: 2px; overflow: hidden; white-space: nowrap; }
.gmonths span small { font-weight: 400; color: var(--muted2); margin-left: 3px; font-size: 9px; }
.gweeks { display: flex; margin-bottom: 6px; }
.gw { flex: 1; display: grid; }
.gw span { font-size: 9px; color: var(--muted2); text-align: center; font-family: var(--mono); }
.gw span.cur { color: var(--danger); font-weight: 700; }
.gbody { position: relative; }
.gtoday { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.gphase { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent2); background: var(--accent-bg); padding: 3px 10px; margin: 8px 0 4px; border-radius: 3px; }
.grow { display: flex; align-items: center; margin-bottom: 3px; border-radius: 4px; cursor: pointer; }
.grow:hover { background: var(--bg); } .grow.sel { background: var(--accent-bg); }
.grow .gname { font-size: 12px; color: var(--text); padding: 3px 10px 3px 4px; line-height: 1.3; display: flex; align-items: center; gap: 5px; }
.grow .gname .gs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .gname .ikey { white-space: nowrap; flex: none; }
.grow .gname .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.grow .gown { font-size: 11px; color: var(--muted); text-align: right; padding-right: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gtrack { flex: 1; position: relative; height: 20px; background: #f6f8fa; border-radius: 3px;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / var(--weeks) - 1px), var(--line2) calc(100% / var(--weeks) - 1px), var(--line2) calc(100% / var(--weeks))); }
.gbar { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; overflow: hidden; cursor: grab; border: 1px solid var(--c); user-select: none; touch-action: none; }
.gbar > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); }
.gbar.closed { opacity: .55; }
.gbar.late { outline: 2px solid var(--danger); outline-offset: -1px; }
.gbar.dragging { opacity: .7; cursor: grabbing; }
.gbar .gh-r { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.gnodate { font-size: 10px; color: var(--muted2); padding-left: 8px; line-height: 20px; }
.gms { display: flex; align-items: center; margin-top: 10px; }
.gmst { flex: 1; position: relative; height: 40px; }
.gmst i { position: absolute; top: 0; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.gmst i.lo { top: 18px; }
.gmst i span { display: block; color: var(--sat); font-size: 11px; line-height: 1; }
.gmst i em { display: block; font-style: normal; font-size: 9px; color: var(--accent2); font-weight: 700; margin-top: 1px; }
.glegend { display: flex; gap: 16px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line2); font-size: 11px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.glegend i { display: inline-block; width: 18px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.gpanel { position: fixed; right: 0; top: 48px; bottom: 0; width: 360px; max-width: 100vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -8px 0 26px rgba(0,0,0,.09); padding: 20px 20px 30px; overflow-y: auto; transform: translateX(100%); transition: transform .18s ease; z-index: 40; }
.gpanel.open { transform: none; }
.gpanel .close { position: absolute; right: 12px; top: 10px; background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
.gpanel h2 { font-size: 16px; margin: 4px 0 6px; line-height: 1.4; } .gpanel h2 a { color: var(--text); }
.gpanel .meta { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 2; }
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segs button { padding: 7px; font-size: 12px; border: 1px solid var(--line); background: #fff; border-radius: 5px; cursor: pointer; color: var(--muted); }
.segs button.on { background: var(--c); border-color: var(--c); color: #fff; font-weight: 700; }

/* ---------- 複数担当者 ---------- */
.avs { display: inline-flex; align-items: center; }
.avs .av { margin-left: -6px; box-shadow: 0 0 0 2px #fff; } .avs .av:first-child { margin-left: 0; }
.who .wn { white-space: nowrap; }
.apick { gap: 6px; }
.chipck { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 13px; background: #fff; user-select: none; }
.chipck input { position: absolute; opacity: 0; width: 0; height: 0; }
.chipck.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent2); font-weight: 600; }
.chipck .av { width: 20px; height: 20px; font-size: 10px; }

/* ---------- @メンション補完 ---------- */
.mbox { position: absolute; z-index: 150; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 30px rgba(16,26,48,.18); min-width: 240px; max-width: 320px; padding: 4px 0; }
.mbox .mi { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.mbox .mi.on, .mbox .mi:hover { background: var(--accent-bg); }
.mbox .mi .n { font-weight: 600; } .mbox .mi .l { color: var(--muted); font-size: 12px; margin-left: auto; font-family: var(--mono); }

/* ---------- 資料 ---------- */
.dz { border: 2px dashed var(--line); border-radius: var(--radius); padding: 16px; text-align: center; background: #fff; transition: border-color .15s, background .15s; }
.dz.over { border-color: var(--accent); background: var(--accent-bg); }
.dz .dz-in { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dz .dz-in .muted { flex-basis: 100%; margin-top: 4px; }
.dz .dz-prog { margin-top: 10px; display: flex; align-items: center; gap: 10px; } .dz .dz-prog .bar { flex: 1; }
.flist .fi { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line2); }
.flist .fi:last-child { border-bottom: 0; }
.fic { font-size: 22px; width: 30px; text-align: center; flex: none; }
.flist .fb { flex: 1; min-width: 0; }
.flist .fname { font-weight: 600; color: var(--text); word-break: break-all; }
.flist .fname:hover { color: var(--accent2); }
.flist .fdesc { font-size: 13px; color: var(--muted); }
.flist .fmeta { font-size: 12px; color: var(--muted2); margin-top: 2px; }
.flist .facts { display: flex; gap: 4px; flex: none; }
.mback.pv { padding: 16px; }
.pv-modal { max-width: min(1100px, 96vw); width: 100%; height: 92vh; display: flex; flex-direction: column; }
.pv-modal .hd { display: flex; align-items: center; gap: 10px; }
.pv-modal .pv-title { font-weight: 600; word-break: break-all; }
.pv-body { flex: 1; min-height: 0; overflow: auto; background: #f3f5f7; }
.pv-center { display: grid; place-items: center; min-height: 100%; padding: 12px; }
.pv-center img { max-width: 100%; max-height: calc(92vh - 80px); box-shadow: var(--shadow); background: #fff; }
.pv-frame { width: 100%; height: 100%; border: 0; display: block; }
.pv-doc { background: #fff; margin: 16px auto; max-width: 860px; padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.pv-pre { white-space: pre-wrap; word-break: break-all; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
@media (max-width: 900px) { .flist .facts { flex-direction: column; } .pv-doc { margin: 8px; padding: 14px; } }

/* ---------- カレンダー ---------- */
.calwrap { grid-template-columns: 1fr 280px; }
@media (max-width: 900px) { .calwrap { grid-template-columns: 1fr; } }
.cal { padding: 12px 12px 0; }
.chead { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.chead .we { color: var(--muted2); }
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); border-left: 1px solid var(--line2); border-top: 1px solid var(--line2); }
.cday { min-height: 96px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 4px 4px 6px; font-size: 12px; position: relative; }
.cday.out { background: #fafbfc; color: var(--muted2); } .cday.we { background: #fbfbfd; } .cday.out.we { background: #f8f9fb; }
.cday.today { background: #eef3ff; }
.cnum { display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin-bottom: 3px; height: 18px; }
.cday.today .cnum { color: var(--accent2); }
.cadd { border: 0; background: none; color: var(--muted2); cursor: pointer; font-size: 13px; line-height: 1; padding: 0 3px; opacity: 0; border-radius: 3px; }
.cday:hover .cadd { opacity: 1; } .cadd:hover { background: var(--accent-bg); color: var(--accent2); }
.cev { display: block; color: #fff; background: var(--c); border-radius: 3px; padding: 1px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; line-height: 1.5; }
.cev:hover { text-decoration: none; filter: brightness(1.08); }
.cev.cont { opacity: .7; border-radius: 0; }
.cev .ct { font-family: var(--mono); font-size: 10px; opacity: .9; margin-right: 3px; }
.cis { display: flex; align-items: center; gap: 4px; color: var(--text); background: #fff; border: 1px solid var(--line2); border-radius: 3px; padding: 0 4px; margin-bottom: 2px; font-size: 11px; line-height: 1.6; overflow: hidden; white-space: nowrap; }
.cis span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cis .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; padding: 0; }
.cis.done { opacity: .5; text-decoration: line-through; }
.cms { display: block; color: var(--accent2); font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evpop { position: absolute; z-index: 120; width: 340px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px rgba(16,26,48,.22); }
.evpop-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line2); }
.evpop-hd b { flex: 1; }
.evpop-hd .close { background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }
.evpop-bd { padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.evpop-ft { padding: 8px 12px; border-top: 1px solid var(--line2); display: flex; gap: 6px; flex-wrap: wrap; }
.upev { padding: 6px 0; border-bottom: 1px solid var(--line2); } .upev:last-child { border-bottom: 0; }
.upev a { color: var(--text); display: flex; align-items: center; gap: 6px; }
@media (max-width: 900px) { .cday { min-height: 64px; padding: 2px; } .cev, .cis { font-size: 10px; } .cadd { opacity: 1; } }
