/* =============================================================================
   public/css/app.css — 画面の見た目（色・文字・余白・部品の形）
   色・文字の大きさなどは、デジタル庁デザインシステムのデザイントークンの値（--key など）を使う。
   キーカラーを LEDGER_KEY_COLOR で変えた時は、サーバが <style id="key-color"> を後から足して上書きする。
   ============================================================================= */
/* 色・文字・角丸・影はデジタル庁デザインシステム（DADS）のデザイントークン @digital-go-jp/design-tokens 2.0.1（MIT）の値。
   キーカラーは Green 900。LEDGER_KEY_COLOR を設定するとサーバが --key 系を差し替える（serveIndex） */
:root {
  --key: #115a36; --key-hover: #0c472a; --key-active: #032213; --key-50: #e6f5ec; --key-100: #c2e5d1; --key-200: #9bd4b5; --key-600: #259d63;
  --gray-50: #f2f2f2; --gray-100: #e6e6e6; --gray-200: #cccccc; --gray-300: #b3b3b3; --gray-420: #949494; --gray-536: #767676; --gray-600: #666666; --gray-700: #4d4d4d; --gray-800: #333333; --gray-900: #1a1a1a;
  --link: #00118f; --link-visited: #8b008b; --focus: #ffd43d;
  --error: #ce0000; --error-border: #ec0000; --error-bg: #fdeeee; --success: #197a4b; --warn: #c74700; --warn-bg: #fbf5e0; --warn-border: #b78f00;
  --elev-1: 0 2px 8px 1px rgba(0,0,0,0.1), 0 1px 5px 0 rgba(0,0,0,0.3); --elev-2: 0 2px 12px 2px rgba(0,0,0,0.1), 0 1px 6px 0 rgba(0,0,0,0.3);
  /* 旧来の名前（画面の各所で使っている）は DADS の値へ寄せる */
  --navy: var(--key-hover); --accent: var(--key); --bg: var(--gray-50); --paper: #ffffff; --ink: var(--gray-900); --muted: var(--gray-600);
  --line: var(--gray-200); --field: var(--gray-600); --danger: var(--error); --ok: var(--success); --radius: 8px;
  /* グラフの系列色（検証済みの既定パレット。順番が色覚多様性への配慮なので入れ替えない） */
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --chart-grid: #e1e0d9; --chart-axis: #c3c2b7; --chart-muted: #898781;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", Meiryo, sans-serif; font-size: 16px; line-height: 1.7; letter-spacing: 0.02em; }
/* キーボード操作の現在地: DADS のフォーカス表示（黒の枠 + 黄色の縁） */
:focus-visible { outline: 4px solid #000; outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus); }
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
a[href^="http"]:visited { color: var(--link-visited); }
header { background: #fff; color: var(--ink); display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 0 24px; min-height: 60px; border-top: 4px solid var(--key); border-bottom: 1px solid var(--line); }
header .brand { font-weight: 700; font-size: 20px !important; color: var(--key); text-decoration: none; margin-right: 4px; letter-spacing: 0.04em; }
header .spacer { flex: 1; }
body.logged-out header > :not(.brand) { display: none; }
#adminNav { display: contents; }
header a { color: var(--ink); font-size: 15px; text-decoration: none; padding: 16px 2px 13px; border-bottom: 3px solid transparent; }
header a:hover { color: var(--key); border-bottom-color: var(--key-200); }
header a[aria-current="page"] { color: var(--key); font-weight: 700; border-bottom-color: var(--key); }
header .brand[aria-current="page"] { border-bottom-color: transparent; }
header .who { font-size: 14px; color: var(--gray-700); }
header .who.demo { display: inline-flex !important; align-items: center; gap: 6px; } header .who .demo-as { font-size: 14px; min-height: 32px; padding: 2px 6px; max-width: 220px; } header .who.demo .muted { font-size: 12px; }
header details.navmenu { position: relative; }
header details.navmenu > summary { list-style: none; cursor: pointer; font-size: 15px; padding: 16px 2px 13px; border-bottom: 3px solid transparent; }
header details.navmenu > summary::-webkit-details-marker { display: none; }
header details.navmenu > summary::after { content: ' ▾'; font-size: 12px; }
header details.navmenu > summary:hover { color: var(--key); border-bottom-color: var(--key-200); }
header details.navmenu > summary.on { color: var(--key); font-weight: 700; border-bottom-color: var(--key); }
header .menu { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: var(--elev-2); display: flex; flex-direction: column; padding: 4px 0; }
header .menu a { padding: 10px 16px; border-bottom: 0; border-left: 3px solid transparent; white-space: nowrap; }
header .menu a:hover { background: var(--key-50); border-bottom: 0; }
header .menu a[aria-current="page"] { background: var(--key-50); border-left-color: var(--key); border-bottom: 0; }

/* 画面の中のメニュー（「その他の操作」など）。ボタンの見た目で開き、項目を縦に並べる */
details.dropmenu { position: relative; display: inline-block; }
details.dropmenu > summary { list-style: none; cursor: pointer; font-size: 16px; min-height: 36px; padding: 6px 16px; border: 1px solid var(--key); border-radius: 8px; background: #fff; color: var(--key); display: inline-flex; align-items: center; }
details.dropmenu > summary::-webkit-details-marker { display: none; }
details.dropmenu > summary::after { content: ' ▾'; font-size: 12px; margin-left: 4px; }
details.dropmenu > summary:hover { background: var(--key-50); }
details.dropmenu .menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--elev-2); display: flex; flex-direction: column; padding: 4px 0; }
details.dropmenu .menu a, details.dropmenu .menu button { justify-content: flex-start; text-align: left; border: 0; border-radius: 0; background: none; color: var(--ink); padding: 10px 16px; min-height: 0; text-decoration: none; white-space: nowrap; }
details.dropmenu .menu a:hover, details.dropmenu .menu button:hover { background: var(--key-50); }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 26px; line-height: 1.5; margin: 0 0 16px; }
h2 { font-size: 20px; line-height: 1.5; margin: 24px 0 8px; }
h3 { font-size: 17px; line-height: 1.5; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.app-card { display: block; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--key); border-radius: var(--radius); padding: 16px 20px; color: var(--ink); text-decoration: none; }
.app-card:hover { box-shadow: var(--elev-1); }
.app-card:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.app-card .name { font-weight: 700; font-size: 18px; color: var(--key); }
.app-card .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
/* ボタン: 既定は DADS の「枠線ボタン」（小 36px・角丸 6px）。.primary は「塗りボタン」、.small は最小（28px） */
button, .btn { font: inherit; font-size: 16px; line-height: 1.2; letter-spacing: 0.02em; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; padding: 6px 16px; border: 1px solid var(--key); background: #fff; color: var(--key); border-radius: 6px; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--key-50); text-decoration: underline; text-underline-offset: 3px; }
button:active, .btn:active { background: var(--key-100); }
button.primary, .btn.primary { background: var(--key); border-color: var(--key); color: #fff; font-weight: 700; }
button.primary:hover, .btn.primary:hover { background: var(--key-hover); border-color: var(--key-hover); }
button.primary:active, .btn.primary:active { background: var(--key-active); }
button.danger { color: var(--error); border-color: var(--error); }
button.danger:hover { background: var(--error-bg); }
button.small, .btn.small { min-height: 28px; padding: 2px 10px; font-size: 14px; border-radius: 4px; }
button:disabled, button:disabled:hover { background: #fff; color: var(--gray-420); border-color: var(--gray-420); text-decoration: none; cursor: not-allowed; }
button.primary:disabled { background: var(--gray-300); border-color: var(--gray-300); color: #fff; }
.login .btn.primary { min-height: 48px; padding: 8px 24px; border-radius: 8px; }
/* 入力欄: DADS の入力（枠 Gray 600・角丸 8px・高さ 40px） */
input, select, textarea { font: inherit; font-size: 16px; line-height: 1.5; border: 1px solid var(--field); border-radius: 8px; padding: 7px 12px; background: #fff; color: var(--ink); min-height: 40px; }
input:hover, select:hover, textarea:hover { border-color: #000; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 4px solid #000; outline-offset: 2px; box-shadow: 0 0 0 2px var(--focus); }
input:disabled, select:disabled, textarea:disabled { background: var(--gray-50); border-color: var(--gray-420); color: var(--gray-700); }
input[type=checkbox], input[type=radio] { min-height: 0; width: 20px; height: 20px; accent-color: var(--key); vertical-align: -4px; }
input[type=file] { border: 0; padding: 0; min-height: 0; }
textarea { min-height: 96px; width: 100%; }
input[type=text], input[type=password], input[type=number], input[type=date] { width: 100%; max-width: 480px; }
input.narrow { max-width: 220px; }
label.f, div.f { display: block; margin-bottom: 20px; }
label.f > span.lab, div.f > span.lab { display: block; font-weight: 700; margin-bottom: 6px; }
label.f > span.lab .req, div.f > span.lab .req { display: inline-block; color: var(--error); margin-left: 8px; font-weight: 400; font-size: 14px; }
.err { color: var(--error); font-size: 14px; margin-top: 4px; }
.err:empty { display: none; }
/* お知らせ帯・メンテナンスの帯（ヘッダーのすぐ下、全員の画面とログイン画面） */
#sysNotice:empty { display: none; }
.sysnotice { padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 15px; }
.sysnotice.info { background: var(--key-50); color: var(--ink); }
.sysnotice.warn { background: var(--warn-bg); color: var(--ink); border-bottom-color: var(--warn-border); }
.notice { background: var(--warn-bg); border: 1px solid var(--warn-border); border-left-width: 6px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert { background: var(--error-bg); border: 1px solid var(--error-border); border-left-width: 6px; color: var(--error); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.alert.warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--ink); } .alert.warn li { margin: 4px 0; }
dialog.pp { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--elev-2); display: flex; flex-direction: column; }
dialog.pp::backdrop { background: rgba(0,0,0,.35); }
dialog.pp input[type=search] { flex: 1; min-width: 160px; }
.pp-list { overflow-y: auto; min-height: 120px; max-height: 55vh; border: 1px solid var(--line); border-radius: 6px; }
.pp-row { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--gray-100); background: #fff; text-align: left; justify-content: flex-start; border-radius: 0; min-height: 0; color: var(--ink); font-size: 15px; cursor: pointer; }
.pp-row:hover { background: var(--key-50); text-decoration: none; } .pp-row.on { background: var(--key-100); } .pp-row .nm { font-weight: 700; min-width: 7em; }
.pf { display: inline-flex; align-items: center; gap: 8px; } .pf-name { min-width: 6em; }
.toast { position: fixed; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; max-width: min(480px, calc(100vw - 32px)); background: var(--gray-900); color: #fff; padding: 12px 20px; border-radius: var(--radius); box-shadow: var(--elev-2); z-index: 10; animation: toast-in .18s ease-out; transition: opacity .3s; }
.toast .ic { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 14px; }
.toast.ok .ic { background: #2e9e5b; color: #fff; } .toast.err { background: #b3261e; } .toast.err .ic { background: #fff; color: #b3261e; }
.toast.busy .ic { border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: toast-spin .8s linear infinite; width: 16px; height: 16px; }
.toast.out { opacity: 0; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) { .toast { right: 16px; left: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.busy .ic { animation: none; } }
/* 一覧の表は 1 画面の行数を確保するため 14px */
table.list { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14px; line-height: 1.5; border: 1px solid var(--line); }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; white-space: pre-wrap; }
table.list th { background: var(--gray-50); color: var(--ink); font-weight: 700; cursor: pointer; user-select: none; white-space: nowrap; border-bottom: 2px solid var(--gray-600); }
table.list th:hover { background: var(--gray-100); }
table.list th.nosort, table.list th.nosort:hover { cursor: default; background: var(--gray-50); }
table.list tr.rec:hover td { background: var(--key-50); cursor: pointer; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td.nowrap, .status { white-space: nowrap; } /* 日付・状態は途中で折り返さない */
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gray-50); border: 1px solid var(--gray-420); border-radius: 999px; padding: 2px 12px; font-size: 14px; }
.rich h3 { font-size: 18px; margin: 8px 0 4px; } .rich h4 { font-size: 16px; margin: 6px 0 4px; } .rich p { margin: 4px 0; } .rich ul { margin: 4px 0; padding-left: 20px; }
.rich-prev { border: 1px dashed var(--gray-420); border-radius: 8px; padding: 4px 10px; margin-top: 4px; min-height: 24px; }
.thumb { max-width: 160px; max-height: 120px; display: block; margin: 4px 0; border: 1px solid var(--line); border-radius: 4px; }
.qr { width: 132px; height: 132px; }
.cal .ev[draggable="true"], .gantt .bar[draggable="true"] { cursor: grab; }
.cal .day.drop { outline: 3px dashed var(--key); outline-offset: -2px; }
.lay { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 16px; }
.lay > * { grid-column: span 4; min-width: 0; } .lay > .sp1 { grid-column: span 1; } .lay > .sp2 { grid-column: span 2; } .lay > .sp3 { grid-column: span 3; }
.lay > .lay-break { height: 0; } .lay-label { font-weight: 700; font-size: 17px; border-bottom: 2px solid var(--key-200); padding: 4px 0; margin: 10px 0 6px; }
.lay-group { border: 1px solid var(--line); border-radius: 8px; padding: 4px 16px; margin: 8px 0; } .lay-group > summary { cursor: pointer; font-weight: 700; padding: 8px 0; color: var(--key-hover); }
@media (max-width: 700px) { .lay > .sp1, .lay > .sp2, .lay > .sp3 { grid-column: span 4; } }
.help { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 16px; }
.help-toc { position: sticky; top: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 8px; font-size: 14px; line-height: 1.5; }
.help-toc .help-part { font-weight: 700; padding: 8px 8px 4px; color: var(--key-hover); }
.help-toc ul { list-style: none; margin: 0 0 8px; padding: 0; }
.help-toc a { display: block; padding: 5px 8px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.help-toc a:hover { background: var(--key-50); text-decoration: underline; }
.help-toc a[aria-current="page"] { background: var(--key-50); color: var(--key-hover); font-weight: 700; box-shadow: inset 4px 0 0 var(--key); }
.help-body { max-width: 860px; } .help-body h3 { color: var(--key-hover); margin: 24px 0 8px; } .help-body p, .help-body li { max-width: 46em; }
.help-body ol.steps { padding-left: 1.6em; } .help-body ol.steps li { margin: 6px 0; } .help-body ul li { margin: 4px 0; } .help-body table.list { margin: 8px 0 16px; }
.help-note, .help-warn { border-left: 6px solid var(--key); background: var(--key-50); padding: 12px 16px; border-radius: 4px; margin: 12px 0; max-width: 46em; }
.help-warn { border-left-color: var(--error); background: var(--error-bg); }
@media (max-width: 800px) { .help { grid-template-columns: 1fr; } .help-toc { position: static; } }
.like { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.like-btn.on { background: var(--key-50); font-weight: 700; }
.like-users { font-size: 13px; }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk .dayh { font-weight: 700; text-align: center; padding: 4px; font-size: 14px; }
.wk .dayh.sat { color: #00118f; } .wk .dayh.sun { color: var(--error); } .wk .dayh.today { background: var(--key); color: #fff; border-radius: 6px; }
.wk .daycol { background: #fff; border: 1px solid var(--line); border-radius: 6px; min-height: 260px; padding: 6px; cursor: copy; }
.evt { display: block; width: 100%; text-align: left; background: var(--key-50); border: 0; border-left: 4px solid var(--key); border-radius: 4px; padding: 4px 6px; margin: 0 0 6px; font-size: 13px; line-height: 1.4; color: var(--ink); cursor: pointer; min-height: 0; }
.evt:hover { background: var(--key-100); text-decoration: none; }
.evt .t { font-weight: 700; display: block; } .evt.busy { background: var(--gray-100); border-left-color: var(--gray-536); color: var(--gray-700); }
.series-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; } .series-list .cur { font-weight: 700; }
.evt.booking { border-left-color: #e25100; } .evt.pending { background: var(--warn-bg); }
.evt.sm { padding: 1px 4px; margin: 0 0 3px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; justify-content: flex-start; gap: 4px; } .evt.sm > span:first-child { flex: none; } .evt.sm .t { display: inline; overflow: hidden; text-overflow: ellipsis; }
button.link { background: none; border: 0; padding: 0 2px; color: var(--link); min-height: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; } button.link:hover { background: none; }
.seg { display: inline-flex; } .seg button { border-radius: 0; margin: 0; } .seg button:first-child { border-radius: 6px 0 0 6px; } .seg button:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.seg button[aria-pressed="true"] { background: var(--key); color: #fff; border-color: var(--key); }
.mon { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mon .dayh { font-weight: 700; text-align: center; padding: 4px; font-size: 14px; } .mon .dayh.sat { color: #00118f; } .mon .dayh.sun { color: var(--error); }
.mcell { background: #fff; border: 1px solid var(--line); border-radius: 4px; min-height: 112px; padding: 4px; cursor: copy; min-width: 0; }
.mcell.other { background: #f6f6f8; } .mcell.other .dnum { color: var(--muted); }
.mcell.sat .dnum { color: #00118f; } .mcell.sun .dnum { color: var(--error); }
.mcell.today { border: 2px solid var(--key); } .mcell.today .dnum { background: var(--key); color: #fff; border-radius: 10px; padding: 0 6px; }
button.dnum { font-weight: 700; font-size: 13px; padding: 0 2px; margin-bottom: 2px; text-decoration: none; color: var(--ink); }
button.link.more { font-size: 12px; }
.grp-scroll { overflow-x: auto; } table.grp.grp-month { table-layout: auto; width: max-content; min-width: 100%; } table.grp.grp-month td.name { width: auto; } .grp-month th { min-width: 76px; font-size: 13px; text-align: center; } .grp-month th.name, .grp-month td.name { min-width: 130px; position: sticky; left: 0; background: #fff; z-index: 1; }
.grp-week th, .grp-week td.cell { min-width: 150px; } .grp-week td.cell .evt.sm { white-space: normal; display: block; } .grp-week td.cell .evt.sm .t { display: block; }
.grp-month td.cell { cursor: copy; vertical-align: top; padding: 3px; }
.grp-month th .wd { font-weight: 400; font-size: 12px; } .grp-month th.sat button, .grp-month th.sat { color: #00118f; } .grp-month th.sun button, .grp-month th.sun { color: var(--error); } .grp-month th.today { background: var(--key-50); }
@media (max-width: 640px) { .mcell { min-height: 64px; padding: 2px; } .mcell .evt.sm > span:first-child { display: none; } .mcell .evt.sm { font-size: 11px; padding: 1px 2px; } }
table.grp { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; font-size: 13px; }
table.grp th, table.grp td { border: 1px solid var(--line); padding: 4px; vertical-align: top; }
table.grp th { background: var(--gray-50); font-size: 14px; } table.grp td.name { font-weight: 700; width: 120px; background: var(--gray-50); }
table.grp td.cell { cursor: copy; height: 56px; } table.grp td.cell:hover { background: var(--key-50); }
table.slots { border-collapse: collapse; background: #fff; font-size: 12px; table-layout: fixed; }
table.slots th, table.slots td { border: 1px solid var(--line); padding: 0; height: 40px; }
table.slots th { background: var(--gray-50); font-weight: 400; width: 34px; } table.slots th.fac { width: 180px; text-align: left; padding: 4px 8px; font-weight: 700; font-size: 14px; }
table.slots td.free { cursor: copy; } table.slots td.free:hover { background: var(--key-100); }
table.slots td.hourstart { border-left: 2px solid var(--gray-420); }
table.slots td.bk { background: var(--key-600); color: #fff; padding: 2px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
table.slots td.bk.pending { background: repeating-linear-gradient(45deg, #ffc700, #ffc700 6px, #ffd43d 6px, #ffd43d 12px); color: var(--ink); }
table.slots td.bk.mine { box-shadow: inset 0 0 0 2px var(--key-active); }
table.slots td.bk.busy { background: var(--gray-536, #767676); }
table.slots tr.free-row th { font-size: 13px; } table.slots td.allfree { background: #d4f2d6; cursor: copy; } table.slots td.allfree:hover { background: var(--key-200); } table.slots td.busyn { background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 4px, #e2e2e2 4px, #e2e2e2 8px); }
table.slots.tl th.fac { width: 140px; }
table.slots th.fac { position: sticky; left: 0; z-index: 1; background: var(--gray-50); box-shadow: 1px 0 0 var(--line); }
table.slots thead th { position: sticky; top: 0; z-index: 2; } table.slots thead th.fac { z-index: 3; } /* 下へスクロールしても時刻の見出しが見える */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 8px 0 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a[aria-current="page"] { color: var(--key); border-bottom-color: var(--key); font-weight: 700; }
table.poll { border-collapse: collapse; background: #fff; font-size: 14px; }
table.poll th, table.poll td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; }
table.poll th.opt { min-width: 120px; } table.poll td.nm { text-align: left; font-weight: 700; white-space: nowrap; }
table.poll .a-o { color: var(--key); font-weight: 700; font-size: 18px; } table.poll .a-t { color: #c74700; font-size: 18px; } table.poll .a-x { color: var(--gray-536); font-size: 18px; }
table.poll tr.tot td { background: var(--gray-50); font-weight: 700; } table.poll th.best { background: var(--key-50); } table.poll th.decided { background: var(--key); color: #fff; }
.ans { display: inline-flex; gap: 2px; } .ans button { min-height: 32px; padding: 2px 10px; font-size: 16px; } .ans button[aria-pressed="true"] { background: var(--key); color: #fff; }
.star { border: 0; background: transparent; min-height: 0; padding: 0 4px; font-size: 20px; line-height: 1; color: var(--gray-536); }
.star[aria-pressed="true"] { color: #d2a400; } .star:hover { background: transparent; color: #d2a400; text-decoration: none; }
.app-card .cat, .cat { display: inline-block; font-size: 12px; background: var(--key-50); color: var(--key-hover); border-radius: 999px; padding: 0 10px; margin-top: 4px; }
h2.cat-h { font-size: 18px; margin: 20px 0 8px; } button[aria-pressed="true"].small { background: var(--key); color: #fff; }
.top-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.top-head .hello { font-size: 24px; font-weight: 700; } .top-head .date { color: var(--gray-700); }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.dash2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.panel2 { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.panel2 h2 { font-size: 17px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel2 h2 a { font-size: 14px; font-weight: 400; }
.dash2 > .wide { grid-column: 1 / -1; }
.file-link .path { font-size: 12px; word-break: break-all; margin-top: 2px; }
.ann.done { opacity: .75; } .ann-files { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 14px; } .ann-reads { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; } .ann-names { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; }
.panel2.editing { outline: 2px dashed var(--key-200); outline-offset: -2px; cursor: grab; } .panel2.editing.dragging { opacity: .4; } .panel2.off { opacity: .55; }
.panel-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: -6px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--gray-100); cursor: default; }
.panel-tools .grip { font-size: 18px; color: var(--muted); cursor: grab; padding: 0 4px; }
.layout-edit { border-top: 4px solid var(--key); margin-bottom: 12px; }
.panel2 ul { list-style: none; margin: 0; padding: 0; } .panel2 li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); } .panel2 li:last-child { border-bottom: 0; }
.panel2 .when { color: var(--gray-700); font-size: 14px; display: inline-block; min-width: 110px; }
.panel2 .empty { color: var(--muted); font-size: 14px; }
.count { display: inline-block; min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--key); color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.count.zero { background: var(--gray-200); color: var(--gray-700); }
.ann { border-left: 6px solid var(--key); background: #fff; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ann.important { border-left-color: var(--error); background: var(--error-bg); }
.ann .t { font-weight: 700; } .ann .b { white-space: pre-wrap; margin-top: 4px; }
/* たたんだお知らせ（見出しの 1 行）。押すと本文を開く */
.ann.compact { padding: 6px 16px; margin-bottom: 6px; }
.ann.compact > summary { cursor: pointer; list-style-position: inside; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann.compact[open] { padding-bottom: 12px; } .ann.compact[open] > summary { white-space: normal; margin-bottom: 4px; }
.ann-list { margin-bottom: 12px; } .ann-more > summary { cursor: pointer; color: var(--link, #0017c1); margin: 4px 0 6px; }
.mini-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.mini-apps a { display: block; padding: 10px 12px; border: 1px solid var(--line); border-top: 3px solid var(--key); border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.mini-apps a:hover { background: var(--key-50); }
.kb-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.kb-side h2 { font-size: 15px; margin: 12px 0 6px; } .kb-side h2:first-child { margin-top: 0; }
.kb-side ul { list-style: none; margin: 0; padding: 0; } .kb-side li a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.kb-side li a:hover { background: var(--key-50); } .kb-side li a[aria-current="page"] { background: var(--key-50); color: var(--key); font-weight: 700; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; } .kb-tags a.chip { text-decoration: none; color: var(--ink); } .kb-tags a.chip.on { background: var(--key); border-color: var(--key); color: #fff; } .kb-tags a.chip.on .muted { color: #fff; }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--ink); text-decoration: none; }
.kb-item:hover { background: var(--key-50); } .kb-item:hover .kb-title { text-decoration: underline; }
.kb-title { font-weight: 700; font-size: 17px; color: var(--key); } .kb-ex { margin: 4px 0; color: var(--gray-700); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.kb-foot { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.kb-body { margin-top: 16px; line-height: 1.8; } .kb-files { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.kb-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; } .kb-editor textarea { width: 100%; max-width: none; }
@media (max-width: 760px) { .kb-wrap, .kb-editor { grid-template-columns: 1fr; } }
.feature-list label { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 16px; } .feature-list label:last-child { border-bottom: 0; }
.hr-steps { display: flex; gap: 0; list-style: none; padding: 0; margin: 12px 0; flex-wrap: wrap; }
.hr-steps li { padding: 6px 16px; border: 1px solid var(--gray-420); background: #fff; color: var(--gray-700); margin-right: -1px; font-size: 14px; }
.hr-steps li.past { background: var(--key-50); color: var(--key-hover); } .hr-steps li.cur { background: var(--key); color: #fff; font-weight: 700; border-color: var(--key); }
.hr-table td { vertical-align: top; } .hr-table textarea { width: 100%; max-width: none; min-height: 56px; } .hr-table .w-num { width: 72px; min-width: 0; }
select.score { min-width: 64px; } .score-v { font-weight: 700; font-size: 18px; }
.hr-comment { margin-bottom: 12px; } .hr-comment .lab { font-weight: 700; margin-bottom: 4px; } .hr-comment textarea { width: 100%; max-width: none; min-height: 80px; } .hr-comment .body { white-space: pre-wrap; }
.hr-final .grade { font-size: 40px; font-weight: 700; color: var(--key); line-height: 1.1; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; } .grid2 label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 14px; } .grid2 textarea, .grid2 input, .grid2 select { max-width: none; width: 100%; font-weight: 400; }
dl.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; } dl.kv dt { color: var(--gray-700); } dl.kv dd { margin: 0; }
@media (max-width: 700px) { .hr-table thead { display: none; } .hr-table tr { display: block; border-bottom: 1px solid var(--line); } .hr-table td { display: block; border: 0; } dl.kv { grid-template-columns: 1fr; } }
.dir-table { table-layout: fixed; width: 100%; } .dir-table th:nth-child(1) { width: 20%; } .dir-table th:nth-child(2) { width: 15%; } .dir-table th:nth-child(3) { width: 12%; } .dir-table th:nth-child(4) { width: 9%; } .dir-table th:nth-child(6) { width: 120px; }
@media (max-width: 700px) { .dir-table { table-layout: auto; } .dir-table thead { display: none; } .dir-table tr { display: block; border-bottom: 1px solid var(--line); padding: 6px 0; } table.list.dir-table td { display: inline-block; border: 0; padding: 2px 8px; } }
.dir-dept { font-size: 18px; margin: 20px 0 6px; padding: 4px 0 4px 8px; border-left: 4px solid var(--key); position: sticky; top: 0; z-index: 3; background: var(--bg); } /* スクロールしても、どの所属の人かが分かるように */ .dir-table td.ext { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media print { header, .noprint, .toast { display: none !important; } body { background: #fff; } .dir-table { font-size: 11pt; } }
/* 印刷レイアウト（紙面は mm・pt で組む。画面では白い紙に影、印刷では紙そのもの） */
.ps-page { background: #fff; color: #000; box-shadow: var(--elev-1); margin: 0 auto 16px; line-height: 1.5; font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; overflow: hidden; position: relative; }
.ps-free .ps-item { position: absolute; overflow: hidden; white-space: pre-wrap; word-break: break-all; padding: 0 0.8mm; }
.ps-free .ps-item.ps-border { border: 0.3mm solid #000; } .ps-free .ps-rect, .ps-free .ps-hline, .ps-free .ps-vline { padding: 0; }
.ps-lab { color: #333; font-weight: 400; }
.ps-title { font-size: 1.6em; font-weight: 700; text-align: center; margin-bottom: 4mm; }
.ps-text { white-space: pre-wrap; margin: 1mm 0; } .ps-sub { font-weight: 700; margin: 3mm 0 1mm; } .ps-block { margin: 2mm 0; }
.ps-break { break-after: page; height: 0; }
.ps-fields, .ps-table { width: 100%; border-collapse: collapse; } .ps-fields th, .ps-fields td, .ps-table th, .ps-table td { border: 0.3mm solid #000; padding: 1mm 1.5mm; vertical-align: top; text-align: left; white-space: pre-wrap; word-break: break-all; }
.ps-fields th { background: #eee; width: 28mm; font-weight: 400; } .ps-table th { background: #eee; font-weight: 400; } .ps-table td.num, .ps-table tfoot td.num { text-align: right; } .ps-table tfoot td { font-weight: 700; } .ps-empty { text-align: center !important; color: #555; }
.ps-table thead { display: table-header-group; } .ps-table tr { break-inside: avoid; }
.ps-stamps { border-collapse: collapse; } .ps-stamps th, .ps-stamps td { border: 0.3mm solid #000; text-align: center; font-weight: 400; padding: 0.5mm; } .ps-stamps td { height: 16mm; vertical-align: middle; } .ps-stamp-name { font-weight: 700; } .ps-stamp-date { font-size: 0.85em; }
.ps-img { display: inline-block; max-width: 100%; } .ps-free .ps-image { padding: 0; }
.ps-free .ps-stamps { width: 100%; height: 100%; background: #fff; } .ps-free .ps-stamps th { height: 5mm; } .ps-free .ps-stamps td { height: auto; }
.sheet-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; } .sheet-wrap { overflow-x: auto; padding-bottom: 8px; }
.le-wrap { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; } .le-side { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 140px); overflow-y: auto; position: sticky; top: 8px; }
.le-preview, .le-canvas { overflow: auto; background: var(--gray-100); padding: 12px; border-radius: var(--radius); max-height: calc(100vh - 140px); }
.le-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; } .le-block textarea, .le-block input[type=text] { max-width: none; width: 100%; }
.le-bhead { gap: 6px; } .le-bhead strong { margin-right: auto; } .le-codes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } input.tiny { width: 72px; } .le-page label { white-space: nowrap; }
.le-page-free { margin: 0; } .le-item { cursor: move; outline: 1px dashed rgba(0,0,0,0.25); touch-action: none; } .le-item.le-sel { outline: 2px solid var(--key-600); z-index: 5; }
.le-item img { pointer-events: none; -webkit-user-drag: none; }
.le-handle { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: var(--key-600); cursor: nwse-resize; display: none; } .le-sel .le-handle { display: block; }
@media (max-width: 900px) { .le-wrap { grid-template-columns: 1fr; } .le-side { position: static; max-height: none; } }
@media print { body.sheet-mode main { padding: 0; max-width: none; } body.sheet-mode .sheet-wrap { overflow: visible; padding: 0; } .ps-page { box-shadow: none; margin: 0; } .ps-free { break-after: page; } }
.todo-list { list-style: none; padding: 4px 20px; margin: 12px 0 0; } .todo { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray-100); } .todo:last-child { border-bottom: 0; }
.todo input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; } .todo-body { flex: 1; min-width: 0; } .todo-title { font-weight: 700; } .todo-title.done { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.due { font-size: 13px; color: var(--gray-700); } .due.today { color: #a35b00; font-weight: 700; } .due.over { color: var(--error); font-weight: 700; }
.status.warn { background: #fff4e5; border-color: #f2b45a; color: #8a4b00; }
.status.mid { background: #eef4ff; border-color: #9db7f0; color: #0031d8; } .status.done { background: var(--gray-50); border-color: var(--line); color: var(--muted); } .status.bad { background: var(--error-bg); border-color: var(--error-border); color: var(--error); }
.inq-prog { display: flex; align-items: center; gap: 8px; } .inq-prog .inq-bar { flex: 1; } .inq-prog-t { font-size: 13px; font-weight: 700; white-space: nowrap; } .inq-prog.big .inq-bar { height: 20px; } .inq-prog.big .inq-prog-t { font-size: 15px; }
.inq-bar { position: relative; height: 12px; background: var(--gray-200); border-radius: 999px; overflow: hidden; min-width: 80px; } .inq-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--key); } .inq-bar.wide { min-width: 60px; width: 200px; max-width: 40vw; } .inq-chart { width: 100%; max-width: 480px; } .inq-chart td:first-child { min-width: 0 !important; word-break: break-all; }
.inq-q { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--gray-50); }
.inq-sum { margin-bottom: 16px; } .inq-chart td { padding: 3px 8px; border: 0; } .inq-chart td:first-child { min-width: 120px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; } .tpl-card { display: flex; flex-direction: column; gap: 8px; margin: 0; } .tpl-card p { margin: 0; } .tpl-hl { margin: 0; padding-left: 20px; font-size: 14px; } .tpl-make { border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 420px) { .tpl-grid { grid-template-columns: 1fr; } }
.ai-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.ai-side ul { list-style: none; padding: 0; margin: 12px 0 0; } .ai-side li a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ai-side li a[aria-current="page"] { background: var(--key-50); color: var(--key); font-weight: 700; } .ai-side li .muted { font-size: 12px; padding-left: 8px; }
.ai-log { display: flex; flex-direction: column; gap: 12px; min-height: 240px; margin-bottom: 12px; }
.ai-msg { max-width: 860px; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; } .ai-msg.user { align-self: flex-end; background: var(--key-50); border-color: var(--key-200); } .ai-msg .who { font-size: 12px; font-weight: 700; color: var(--gray-700); margin-bottom: 4px; }
.ai-text { white-space: pre-wrap; line-height: 1.8; } .ai-cite { font-size: 12px; vertical-align: super; } .ai-src { margin-top: 8px; font-size: 14px; } .ai-src ol { margin: 4px 0 0; padding-left: 24px; }
.ai-input textarea { width: 100%; max-width: none; } .ai-hello { padding: 16px; border: 1px dashed var(--gray-420); border-radius: 8px; }
@media (max-width: 760px) { .ai-wrap { grid-template-columns: 1fr; } }
.live-info { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; } .live-code { font-size: 40px; font-weight: 700; letter-spacing: 0.15em; color: var(--key); font-variant-numeric: tabular-nums; }
.live-poll.draft { border-style: dashed; } .live-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; } .live-bar { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 6.5em; gap: 8px; align-items: center; } .live-bar .track { height: 16px; background: var(--gray-100); border-radius: 999px; overflow: hidden; } .live-bar .track span { display: block; height: 100%; background: var(--key); transition: width .4s; } .live-bar .num { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.live-bars.big .live-bar { grid-template-columns: minmax(120px, 30%) 1fr 7.5em; font-size: 28px; } .live-bars.big .track { height: 36px; } .live-bars.big .num { font-size: 24px; }
.live-texts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; } .live-tx { background: var(--key-50); border: 1px solid var(--key-200); border-radius: 8px; padding: 6px 10px; } .live-texts.big .live-tx { font-size: 24px; padding: 10px 16px; }
.live-q { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray-100); } .live-q:last-child { border-bottom: 0; } .live-q .likes { font-weight: 700; color: var(--key); min-width: 48px; } .live-q.answered { opacity: .6; } .live-q.hidden { opacity: .4; text-decoration: line-through; } .live-q.big { font-size: 26px; }
.live-choices { display: flex; flex-direction: column; gap: 8px; } .live-choices button { min-height: 52px; font-size: 18px; justify-content: flex-start; } .live-choices.rating { flex-direction: row; } .live-choices.rating button { flex: 1; justify-content: center; font-size: 22px; }
.live-part { max-width: 720px; margin: 0 auto; }
.live-stage { min-height: calc(100vh - 140px); display: flex; flex-direction: column; gap: 24px; background: #fff; border-radius: var(--radius); padding: 32px 40px; } .live-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; } .live-title { font-size: 22px; color: var(--gray-700); } .live-join { font-size: 28px; } .live-join b { color: var(--key); font-size: 48px; letter-spacing: .12em; } .live-question { font-size: 40px; margin: 0 0 16px; } .live-ctl { margin-top: auto; opacity: .6; } .live-ctl:hover { opacity: 1; }
:fullscreen .live-stage { min-height: 100vh; border-radius: 0; }
@media (max-width: 700px) { .live-stage { padding: 16px; } .live-question { font-size: 24px; } .live-bars.big .live-bar { font-size: 16px; } .live-join b { font-size: 32px; } }
.bd-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; padding: 6px 8px; margin-top: 8px; }
.bd-colors { display: inline-flex; gap: 3px; margin: 0 6px; } .bd-color { width: 22px; height: 22px; min-height: 0; padding: 0; border: 2px solid; border-radius: 50%; }
.bd-stage { position: relative; height: calc(100vh - 230px); min-height: 360px; border: 1px solid var(--line); border-top: 0; overflow: hidden; background-color: #fafafa; background-image: radial-gradient(#d6d6d6 1px, transparent 1px); background-size: 24px 24px; touch-action: none; }
.bd-svg { width: 100%; height: 100%; display: block; outline: none; user-select: none; } .bd-svg:focus-visible { outline: 3px solid var(--key); outline-offset: -3px; }
.bd-item { cursor: move; } .bd-edit { position: absolute; z-index: 5; resize: none; border: 2px solid #1a73e8; background: rgba(255,255,255,.95); font-family: inherit; line-height: 1.35; padding: 8px; box-sizing: border-box; max-width: none; }
.bd-cursors { position: absolute; inset: 0; pointer-events: none; overflow: hidden; } .bd-cursor { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: transform .12s linear; } .bd-cursor::before { content: ''; position: absolute; left: -1px; top: -1px; border-left: 10px solid #e8710a; border-bottom: 10px solid transparent; } .bd-cursor span { position: absolute; left: 10px; top: 10px; background: #e8710a; color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.bd-zoom { min-width: 3.5em; text-align: center; }
.warnbox { border-left: 6px solid var(--error); background: var(--error-bg); }
.chip button { border: 0; min-height: 0; padding: 0 4px; background: transparent; color: var(--gray-700); font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; }
.login { max-width: 360px; margin: 80px auto; }
.fields-editor .frow { display: grid; grid-template-columns: 32px 1.2fr 1fr 130px 60px 60px 1.4fr 90px; gap: 6px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.fields-editor .frow input, .fields-editor .frow select, .fields-editor .frow textarea { width: 100%; max-width: none; min-height: 0; }
.fields-editor .frow textarea { height: 56px; }
.fields-editor .head { font-size: 14px; color: var(--muted); font-weight: bold; }
.fields-editor .frow .ctl { display: flex; gap: 2px; }
.center { text-align: center; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; }
.checks label { display: inline-block; margin-right: 12px; }
.badge { display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--error); color: #fff; font-size: 13px; line-height: 22px; font-weight: 700; text-align: center; margin-left: 4px; }
.status { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--key-50); border: 1px solid var(--key-200); color: var(--key-hover); font-weight: 700; font-size: 14px; }
.proc { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lookup-box { position: relative; max-width: 480px; }
.lookup-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--paper); border: 1px solid var(--gray-420); border-radius: var(--radius); box-shadow: var(--elev-2); max-height: 240px; overflow: auto; }
.lookup-list div { padding: 8px 12px; cursor: pointer; }
.lookup-list div:hover { background: var(--key-50); }
.files li { margin: 2px 0; }
.refval { color: var(--muted); font-size: 14px; }
.tilemap { position: relative; overflow: hidden; background: var(--gray-100); border: 1px solid var(--line); border-radius: var(--radius); user-select: none; touch-action: none; cursor: grab; }
.tilemap.dragging { cursor: grabbing; }
.tilemap .layer { position: absolute; left: 0; top: 0; }
.tilemap img.tile { position: absolute; width: 256px; height: 256px; pointer-events: none; image-rendering: auto; }
.tilemap .pin { position: absolute; width: 18px; height: 18px; margin: -18px 0 0 -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--key); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); cursor: pointer; }
.tilemap .pin.sel { background: #e25100; }
.tilemap .pin:hover { filter: brightness(1.15); }
.tilemap .ctl { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 3; }
.tilemap .ctl button { width: 36px; height: 36px; min-height: 0; padding: 0; font-size: 20px; line-height: 1; }
.tilemap .attr { position: absolute; right: 4px; bottom: 2px; font-size: 12px; color: #333; background: rgba(255,255,255,.8); padding: 0 4px; z-index: 3; }
.tilemap .popup { position: absolute; z-index: 4; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--elev-2); padding: 8px 12px; font-size: 14px; width: max-content; min-width: 140px; max-width: 280px; transform: translate(-50%, calc(-100% - 22px)); }
.tilemap .notile { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--muted); font-size: 14px; text-align: center; z-index: 1; pointer-events: none; }
.locwrap { max-width: 640px; }
.cfg { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; padding: 2px 0 6px 32px; }
.cfg input, .cfg select { width: auto; max-width: 320px; }
.cfg textarea { width: 420px; min-height: 36px; height: 36px; }
.colrow { display: grid; grid-template-columns: 1fr 1fr 110px 60px 1.4fr 30px; gap: 4px; margin: 2px 0; }
.colrow input, .colrow select { width: 100%; max-width: none; }
table.sub { border-collapse: collapse; margin: 4px 0; }
table.sub th, table.sub td { border: 1px solid var(--gray-420); padding: 4px 6px; }
table.sub th { background: var(--gray-50); font-weight: 700; font-size: 14px; }
table.sub input, table.sub select { width: 100%; max-width: none; min-width: 80px; padding: 3px 8px; min-height: 36px; border-radius: 4px; font-size: 14px; }
table.sub td.calc { text-align: right; color: var(--muted); }
.calcval { font-weight: bold; padding: 6px 0; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .dow { text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal .day { background: var(--paper); border: 1px solid var(--line); min-height: 100px; padding: 4px 6px; font-size: 13px; line-height: 1.5; }
.cal .day.other { background: var(--gray-50); color: var(--muted); }
.cal .day .n { font-weight: bold; margin-bottom: 2px; }
.cal .day.today { border: 2px solid var(--key); } .cal .day.today .n { color: var(--key); }
.cal .ev { display: block; background: var(--key-50); border-left: 4px solid var(--key); text-decoration: none; padding: 1px 4px; margin: 2px 0; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev:hover { background: var(--key-100); text-decoration: underline; }
.comment { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment .who { font-weight: bold; }
.comment .body { white-space: pre-wrap; margin-top: 2px; }
.hist { font-size: 14px; }
.hist .h { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hist .d { color: var(--muted); margin-left: 12px; }
.selcol { width: 24px; }
.fmt-red { background: #fdeeee; color: #a90000; } .fmt-orange { background: #ffeee2; color: #8b3200; } .fmt-yellow { background: #fbf5e0; color: #6e5600; }
.fmt-green { background: #e6f5ec; color: #0c472a; } .fmt-blue { background: #e8f1fe; color: #00118f; } .fmt-gray { background: #f2f2f2; color: #333333; }
.fmt-bold { font-weight: bold; }
tr.rec td.fmt-red, tr.rec td.fmt-orange, tr.rec td.fmt-yellow, tr.rec td.fmt-green, tr.rec td.fmt-blue, tr.rec td.fmt-gray { background-clip: padding-box; }
table.sheet td.editable { cursor: cell; }
table.sheet td.editable:hover { outline: 2px dashed var(--key); outline-offset: -2px; }
table.sheet td.editing { padding: 0; }
table.sheet td.editing input, table.sheet td.editing select { width: 100%; max-width: none; border-radius: 0; border: 2px solid var(--accent); }
table.sheet td.saved { animation: flashok 1s; }
@keyframes flashok { from { background: var(--key-100); } to { background: transparent; } }
.gantt { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.gantt table { border-collapse: collapse; font-size: 13px; }
.gantt th, .gantt td { border-right: 1px solid var(--gray-100); padding: 0; height: 26px; }
.gantt th { background: var(--gray-50); color: var(--ink); font-weight: normal; min-width: 22px; text-align: center; position: sticky; top: 0; }
.gantt th.wk, .gantt td.wk { background: var(--gray-50); }
.gantt th.today, .gantt td.today { background: var(--warn-bg); }
.gantt td.name { position: sticky; left: 0; background: var(--paper); min-width: 220px; max-width: 260px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid var(--line); z-index: 1; }
.gantt .bar { display: block; height: 16px; margin: 5px 0; background: var(--key-600); border-radius: 3px; }
.gantt .bar.done { background: var(--gray-420); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--line); }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 120px; position: relative; }
.dash .panel.full { grid-column: 1 / -1; }
.dash .panel h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); }
.dash .panel .tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.dash .stat { font-size: 36px; font-weight: 700; color: var(--key); margin: 8px 0 2px; }
.dash .stat small { font-size: 14px; color: var(--muted); font-weight: normal; margin-left: 6px; }
.dash .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; margin-top: 6px; }
.dash .legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--sw); margin-right: 5px; vertical-align: -1px; }
.dash svg text { font-family: inherit; }
.dash .pivot td.heat { text-align: right; }
.dash .tbl-wrap { overflow-x: auto; }
.chart-tip { position: fixed; z-index: 20; background: #fff; border: 1px solid var(--gray-420); border-radius: var(--radius); box-shadow: var(--elev-2); padding: 6px 10px; font-size: 14px; pointer-events: none; }
.panel-editor { background: var(--gray-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
.panel-editor .row > * { margin-bottom: 4px; }
@media (max-width: 800px) { .dash { grid-template-columns: 1fr; } }
.related h3 { font-size: 16px; margin: 12px 0 4px; }
.sub { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }
.lk-cfg { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 14px; padding: 2px 0 4px 32px; }
.lk-cfg select, .lk-cfg input { width: auto; max-width: 260px; }
.arow { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr 40px; gap: 6px; padding: 4px 0; }
.arow select, .arow input { width: 100%; max-width: none; }
.arow .cfg { padding: 0 0 8px 0; border-bottom: 1px dashed var(--line); }
.arow .cfg select, .arow .cfg input { width: auto; max-width: 240px; }
.arow .cfg select[multiple] { min-width: 140px; }
.chart-bar { fill: var(--key-600); }
.chart-bar:hover { fill: var(--key); }
.chart-label { font-size: 13px; fill: var(--ink); }
.chart-val { font-size: 13px; fill: var(--muted); }
.notif { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: baseline; }
.notif.unread { font-weight: bold; background: var(--key-50); border-left: 4px solid var(--key); padding-left: 10px; margin-left: -14px; } /* 未読は太字だけでなく、色と左の線でも分かるように */
.notif .when { color: var(--muted); font-size: 14px; white-space: nowrap; font-weight: normal; }
tr.unread-row td { font-weight: bold; }
dl.meta { display: grid; grid-template-columns: 100px 1fr; gap: 4px 12px; font-size: 14px; color: var(--muted); margin: 0; }
dl.meta dd { margin: 0; }
@media (max-width: 800px) { .fields-editor .frow { grid-template-columns: 1fr 1fr; } header .who { display: none; } }
/* 登録・更新のボタンの行は、入力欄の直後に置き、長い入力画面でも画面の下に出し続ける */
.form-actions { position: sticky; bottom: 0; z-index: 5; background: var(--bg); padding: 10px 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
/* 幅の狭い画面（タブレット縦など）では、ヘッダーの項目の間を詰めて折り返しを減らす */
@media (max-width: 1100px) { header { gap: 2px 10px; padding: 0 12px; } header a, header details.navmenu > summary { font-size: 14px; } header .who { display: none; } }
