/* ===== 議事録メーカー 画面用スタイル ===== */
.gj-privacy-note {
  background-color: var(--accent-bg, #eef6ff);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 auto 20px;
  max-width: 1080px;
  font-size: 0.95rem;
  color: #333;
  text-align: center;
}

/* --- AI下書き取り込み --- */
.gj-import {
  max-width: 1080px;
  margin: 0 auto 24px;
  border: 1px solid var(--accent, #2a9d8f);
  border-radius: 10px;
  background: #f4fbf9;
  padding: 16px 18px;
  text-align: left;
}

.gj-import summary {
  font-size: 15px;
  font-weight: 700;
  color: #1e6f63;
  cursor: pointer;
  list-style: none;
}

.gj-import summary::-webkit-details-marker {
  display: none;
}

.gj-import summary::before {
  content: "▸ ";
  color: var(--accent, #2a9d8f);
}

.gj-import[open] summary::before {
  content: "▾ ";
}

.gj-import-body {
  margin-top: 12px;
}

.gj-import-lead {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 10px;
}

.gj-import textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 130px;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 10px 12px;
  border: 1px solid #bcd;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
}

.gj-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.gj-import-btn {
  background: var(--accent, #2a9d8f);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.gj-import-btn:hover {
  opacity: 0.88;
}

.gj-import-sub {
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #555;
  cursor: pointer;
}

.gj-import-note {
  font-size: 11.5px;
  color: #777;
  line-height: 1.6;
  margin: 8px 0 0;
}

.gj-import-status {
  font-size: 12.5px;
  color: var(--accent, #2a9d8f);
  font-weight: 600;
  min-height: 1.2em;
}

/* --- レイアウト --- */
.gj-layout {
  display: flex;
  gap: 28px;
  max-width: 1080px;
  margin: 24px auto 40px;
  padding: 0 4px;
  align-items: flex-start;
}

.gj-form {
  width: 420px;
  flex-shrink: 0;
  text-align: left;
}

.gj-form .fs-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin: 22px 0 8px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--accent, #2a9d8f);
}

.gj-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #555;
  margin: 10px 0 4px;
}

.gj-form input[type="text"],
.gj-form input[type="date"],
.gj-form input[type="datetime-local"],
.gj-form input[type="number"],
.gj-form select,
.gj-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 14px;
  color: #333;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
}

.gj-form textarea {
  resize: vertical;
  line-height: 1.6;
}

.gj-form .fg-row {
  display: flex;
  gap: 8px;
}

.gj-form .fg-row > div {
  flex: 1;
  min-width: 0;
}

.gj-form .radio-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 6px;
}

.gj-form .radio-line label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 13.5px;
  font-weight: normal;
  color: #333;
  cursor: pointer;
}

.gj-form .radio-line input {
  width: auto;
}

.gj-form .field-hint {
  font-size: 11.5px;
  color: #888;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* --- 議題・TODO の可変行 --- */
.gj-topic {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
  background: #fafcfc;
}

.gj-topic-head {
  display: flex;
  gap: 6px;
  align-items: center;
}

.gj-topic-head .topic-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #2a9d8f);
  flex-shrink: 0;
}

.gj-topic-head .topic-title {
  flex: 1;
  min-width: 0;
}

.gj-row-del {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #999;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.gj-row-del:hover {
  color: #c0392b;
  border-color: #c0392b;
}

.gj-topic label {
  margin-top: 8px;
}

.gj-todo-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.gj-todo-row .todo-task {
  flex: 1.6;
  min-width: 0;
}

.gj-todo-row .todo-owner {
  flex: 1;
  min-width: 0;
}

.gj-todo-row .todo-due {
  flex: 1;
  min-width: 0;
}

.gj-add {
  width: 100%;
  padding: 8px;
  border: 1px dashed #aaa;
  border-radius: 6px;
  background: #fafafa;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  margin-top: 2px;
}

.gj-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.gj-todo-head {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
  padding-right: 36px;
}

.gj-todo-head span:nth-child(1) { flex: 1.6; }
.gj-todo-head span:nth-child(2) { flex: 1; }
.gj-todo-head span:nth-child(3) { flex: 1; }

/* --- プレビュー側 --- */
.gj-preview {
  flex: 1;
  min-width: 0;
  position: sticky;
  top: 16px;
  align-self: flex-start;
  text-align: center;
}

.gj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.gj-print-btn {
  flex: 1 1 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.gj-print-btn:hover {
  opacity: 0.85;
}

.gj-copy-btn {
  flex: 1;
  min-width: 0;
  background: #fff;
  color: #333;
  border: 1px solid var(--accent, #2a9d8f);
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gj-copy-btn:hover {
  background: #f0faf8;
}

.gj-copy-btn.copied {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}

.gj-print-note {
  font-size: 12px;
  color: #888;
  margin: 4px 0 12px;
  line-height: 1.5;
}

.gj-sheet-wrap {
  overflow: hidden;
  border-radius: 4px;
}

.gj-preview-caption {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

/* ===== A4シート（プレビュー兼 印刷対象） ===== */
.gj-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #fff;
  padding: 16mm 18mm;
  box-sizing: border-box;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  font-size: 10.5pt;
  color: #000;
  line-height: 1.7;
  text-align: left;
  transform-origin: top left;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

/* common.cssのレガシーグローバル（* { font-size:14px; color:#313838 } 等）対策 */
.gj-sheet * {
  font-size: inherit;
  color: #000;
  font-family: inherit;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gj-doc-title {
  text-align: center;
  font-size: 17pt;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding-bottom: 3mm;
  border-bottom: 0.6mm solid #000;
  margin-bottom: 5mm;
}

.gj-meta {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 6mm;
  table-layout: fixed;
}

.gj-meta th,
.gj-meta td {
  border: 0.25mm solid #999;
  padding: 1.6mm 3mm;
  font-size: 9.5pt;
  vertical-align: top;
  text-align: left;
  word-break: break-word;
}

.gj-meta th {
  width: 22mm;
  background: #f2f5f4;
  font-weight: 600;
  white-space: nowrap;
}

.gj-sec-title {
  font-size: 12pt;
  font-weight: 700;
  border-left: 1.4mm solid var(--accent, #2a9d8f);
  padding-left: 2.5mm;
  margin: 6mm 0 3mm;
}

.gj-topic-block {
  margin-bottom: 4mm;
}

.gj-topic-name {
  font-size: 10.5pt;
  font-weight: 700;
  margin-bottom: 1mm;
}

.gj-topic-sub {
  margin: 0.5mm 0 1.5mm 4mm;
}

.gj-topic-sub .lbl {
  font-size: 8.5pt;
  font-weight: 600;
  color: #333 !important;
}

.gj-topic-sub .val {
  white-space: pre-wrap;
  font-size: 9.5pt;
}

.gj-list {
  margin: 0 0 2mm 0;
}

.gj-list li {
  position: relative;
  padding-left: 4.5mm;
  margin-bottom: 0.8mm;
  font-size: 9.5pt;
}

.gj-list li::before {
  content: "・";
  position: absolute;
  left: 0;
}

.gj-freetext {
  white-space: pre-wrap;
  font-size: 9.5pt;
  margin-bottom: 2mm;
}

.gj-todo-table {
  width: 100%;
  border-collapse: collapse;
}

.gj-todo-table th,
.gj-todo-table td {
  border: 0.25mm solid #999;
  padding: 1.4mm 2.5mm;
  font-size: 9.5pt;
  text-align: left;
  vertical-align: top;
}

.gj-todo-table th {
  background: #f2f5f4;
  font-weight: 600;
  white-space: nowrap;
}

.gj-todo-table .c-owner {
  width: 30mm;
}

.gj-todo-table .c-due {
  width: 28mm;
}

/* ===== レスポンシブ ===== */
@media (max-width: 940px) {
  .gj-layout {
    flex-direction: column;
  }

  .gj-form {
    width: 100%;
  }

  .gj-preview {
    position: static;
    width: 100%;
  }
}

/* ===== 印刷用：プレビューのシートだけをA4いっぱいに ===== */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    height: auto !important;
  }

  body > *:not(.container) {
    display: none !important;
  }

  .container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: auto !important;
  }

  .container > *:not(.gj-layout) {
    display: none !important;
  }

  .gj-layout {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  .gj-layout > *:not(.gj-preview) {
    display: none !important;
  }

  .gj-preview {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
  }

  .gj-preview > *:not(.gj-sheet-wrap) {
    display: none !important;
  }

  .gj-sheet-wrap {
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
  }

  .gj-sheet {
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 210mm !important;
    min-height: 0 !important;
    padding: 15mm 18mm !important;
  }
}
