* { box-sizing: border-box; }
body { margin: 0; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; background: #f4f6f8; color: #222; font-size: 14px; }
header { background: #1f4e79; color: #fff; padding: 8px 12px; position: sticky; top: 0; z-index: 50; }
.app-title { font-size: 17px; font-weight: bold; display: inline-block; margin-right: 14px; }
nav#mainnav { display: inline; }
nav#mainnav a { color: #dbe9f5; text-decoration: none; padding: 4px 7px; border-radius: 4px; white-space: nowrap; }
nav#mainnav a.active { background: #fff; color: #1f4e79; font-weight: bold; }
.nav-group { color: #9fc1dd; font-size: 11px; margin-left: 8px; }
.save-status { float: right; font-size: 12px; color: #cfe3f2; padding-top: 4px; }
main { padding: 14px; max-width: 1280px; margin: 0 auto; }
h2 { font-size: 18px; margin: 4px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 6px; border-left: 4px solid #1f4e79; padding-left: 6px; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { border: 1px solid #ccd4dc; padding: 5px 6px; vertical-align: top; }
th { background: #e8eef4; text-align: left; font-weight: bold; white-space: nowrap; }
tr.clickable:hover { background: #f0f6fb; cursor: pointer; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
input, select, textarea { font: inherit; padding: 4px 6px; border: 1px solid #b9c4cf; border-radius: 4px; background: #fff; }
input[type="number"] { text-align: right; }
textarea { width: 100%; }
button, .btn { font: inherit; padding: 5px 12px; border: 1px solid #1f4e79; background: #1f4e79; color: #fff; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
button.sub, .btn.sub { background: #fff; color: #1f4e79; }
button.danger { background: #b03a2e; border-color: #b03a2e; }
button.small, .btn.small { padding: 2px 8px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
.card { background: #fff; border: 1px solid #d5dde4; border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.warn { background: #fdecea; border: 1px solid #e0a49e; border-radius: 6px; padding: 10px; margin-bottom: 12px; }
.ok-badge { background: #1e8449; color: #fff; border-radius: 3px; padding: 1px 7px; font-size: 12px; }
.warn-badge { background: #d4ac0d; color: #fff; border-radius: 3px; padding: 1px 7px; font-size: 12px; }
.ng-badge { background: #b03a2e; color: #fff; border-radius: 3px; padding: 1px 7px; font-size: 12px; }
.tag { background: #e8eef4; border-radius: 3px; padding: 1px 6px; font-size: 12px; white-space: nowrap; }
input.yellow, select.yellow, textarea.yellow { background: #fffbe0; }
.auto-cell { background: #f0f0f0; }
.toolbar { margin: 8px 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
label.f { display: block; margin: 6px 0; }
label.f > span { display: block; font-size: 12px; color: #555; margin-bottom: 2px; }
label.f input, label.f select, label.f textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; padding: 16px; margin: 24px 8px; width: min(860px, 96vw); }
.loading { color: #666; }
.small { font-size: 12px; color: #555; }
canvas.draw { border: 1px solid #999; touch-action: none; max-width: 100%; background: #fff; }
.drawing-img { max-width: 320px; border: 1px solid #ccc; display: block; }
.kpi { font-size: 20px; font-weight: bold; }
a { color: #1f4e79; }
.flex { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.board-form textarea { margin-top: 6px; }
.board-post { border-top: 1px solid #e2e8ee; padding: 8px 6px; }
.board-post.pinned { background: #fffbe0; border: 1px solid #e6d98a; border-radius: 6px; margin-top: 8px; }
.board-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.board-actions { margin-left: auto; white-space: nowrap; }
.board-body { white-space: pre-wrap; margin-top: 4px; }
.mt { margin-top: 10px; }
.changelog-entry { border-top: 1px solid #e2e8ee; padding: 8px 2px; }
.changelog-entry p { margin: 2px 0; }
tr.diff-row td { background: #fff3cd; }
.right { text-align: right; }
.home-hero { border-radius: 8px; overflow: hidden; margin-bottom: 12px; background-size: cover; background-position: center; border: 1px solid #d5dde4; }
.home-hero-inner { background: rgba(255,255,255,0.80); padding: 16px 18px; }
.home-hero-inner h2 { margin: 0 0 4px; text-shadow: 0 1px 2px rgba(255,255,255,0.9); }
.home-hero-inner p { margin: 2px 0 8px; }
input.colorpick { width: 36px; height: 26px; padding: 1px; vertical-align: middle; }
.birthday-today { background: #fff3cd; border: 1px solid #e6c860; border-radius: 6px; padding: 10px 12px; font-size: 16px; font-weight: bold; }
.member-highlight { outline: 3px solid #e6a700; outline-offset: 2px; }
.philosophy { margin-top: 12px; border-top: 1px solid rgba(31,78,121,.3); padding-top: 10px; }
.philosophy-title { font-size: 20px; font-weight: bold; color: #1f4e79; letter-spacing: .02em; }
.philosophy p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.7; }
.tag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 16px; }
.tag-cell { border: 1.5px solid #333; border-radius: 4px; min-height: 46px; padding: 6px 8px; display: flex; align-items: center; font-size: 12.5px; word-break: break-all; }
.strip-print th, .strip-print td { text-align: center; }
.cust-table { font-size: 12.5px; }
.cust-table td { line-height: 1.45; }
.cust-table .breakall { word-break: break-all; }
.print-only { display: none; }
@page cust-list { size: A4 landscape; margin: 10mm; }
@media print {
  header { display: none !important; }
  body { background: #fff; }
  body * { visibility: hidden; }
  #tagdoc-print, #tagdoc-print *, #cust-print, #cust-print * { visibility: visible; }
  #tagdoc-print { position: absolute; left: 0; top: 0; width: 100%; border: none; }
  #cust-print { position: absolute; left: 0; top: 0; width: 100%; border: none; page: cust-list; }
  #cust-print .print-only { display: block; }
  #cust-print table { font-size: 10.5px; }
  #cust-print th, #cust-print td { border-color: #888; padding: 3px 4px; }
  #cust-print thead { display: table-header-group; }
  #cust-print tr { page-break-inside: avoid; }
  #cust-print tr.clickable:hover { background: none; }
  .tag-cell { border-color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .strip-print th, .strip-print td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
