/* ===== 夏休み計画表メーカー ===== */

.nk-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: 1120px;
  font-size: 0.95rem;
  color: #333;
  text-align: center;
}

.nk-layout {
  display: flex;
  gap: 28px;
  max-width: 1120px;
  margin: 24px auto 40px;
  padding: 0 4px;
  align-items: flex-start;
}

/* --- フォーム --- */
.nk-form {
  width: 360px;
  flex-shrink: 0;
  text-align: left;
}

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

.nk-form .fs-title:first-child {
  margin-top: 0;
}

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

.nk-form input[type="text"],
.nk-form input[type="date"] {
  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;
}

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

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

.nk-form .check-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 6px;
}

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

.nk-form .check-line input {
  width: auto;
}

.nk-form .field-hint {
  font-size: 11.5px;
  color: #888;
  margin: 6px 0 0;
  line-height: 1.6;
}

.nk-range-info {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #2a9d8f);
  margin: 6px 0 0;
  min-height: 1.2em;
}

.nk-reset-btn {
  padding: 6px 14px;
  font-size: 12.5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  margin-top: 24px;
}

.nk-reset-btn:hover {
  color: #c0392b;
  border-color: #c0392b;
}

/* モード別のフォーム表示切替 */
.nk-layout.mode-circle .nk-cal-fields {
  display: none;
}

.nk-layout:not(.mode-circle) .nk-circle-fields {
  display: none;
}

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

.nk-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.nk-tab {
  flex: 1;
  padding: 11px 8px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.nk-tab.is-active {
  background: var(--accent, #2a9d8f);
  border-color: var(--accent, #2a9d8f);
  color: #fff;
}

.nk-print-btn {
  width: 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;
}

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

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

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

/* ===== A4シート（プレビュー兼 印刷対象） ===== */
.nk-sheet-box {
  overflow: hidden;
  border-radius: 4px;
}

.nk-sheet-box + .nk-sheet-box {
  margin-top: 16px;
}

.nk-sheet {
  width: 210mm;
  height: 297mm;
  background: #fff;
  box-sizing: border-box;
  position: relative;
  padding: 13mm 13mm 11mm;
  display: flex;
  flex-direction: column;
  transform-origin: top left;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  color: #1a1a1a;
  text-align: left;
}

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

/* --- シート共通ヘッダー --- */
.nk-head {
  flex-shrink: 0;
  border-bottom: 0.6mm solid #1a1a1a;
  padding-bottom: 3mm;
}

.nk-head-top {
  display: flex;
  align-items: flex-end;
  gap: 6mm;
}

.nk-head-title {
  flex: 1;
  min-width: 0;
  font-size: 19pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  overflow-wrap: anywhere;
}

.nk-head-name {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  gap: 2mm;
  min-width: 46mm;
}

.nk-head-label {
  font-size: 10pt;
  color: #333;
  white-space: nowrap;
  padding-bottom: 0.6mm;
}

.nk-head-line {
  border-bottom: 0.3mm solid #1a1a1a;
  min-width: 30mm;
  height: 8mm;
  padding: 0 1.5mm;
  font-size: 12pt;
  display: flex;
  align-items: flex-end;
}

.nk-head-name .nk-head-line {
  flex: 1;
}

.nk-head-goal {
  display: flex;
  align-items: flex-end;
  gap: 2mm;
  margin-top: 3mm;
}

.nk-head-goal .nk-head-line {
  flex: 1;
  height: 7mm;
}

/* --- カレンダー計画表 --- */
.nk-cal-body {
  flex: 1;
  min-height: 0;
  margin-top: 4mm;
  display: flex;
  flex-direction: column;
}

.nk-cal-table {
  width: 100%;
  height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.nk-cal-table th,
.nk-cal-table td {
  border: 0.3mm solid #94a3b8;
  padding: 0 2mm;
  vertical-align: middle;
  overflow: hidden;
}

.nk-cal-table thead th {
  background: #eef2f6;
  font-weight: 700;
  font-size: 10pt;
  height: 8mm;
  text-align: center;
  border-color: #1a1a1a;
}

.nk-cal-table td {
  font-size: 11pt;
}

.nk-col-date {
  width: 20mm;
  text-align: center;
  font-weight: 600;
}

.nk-col-wday {
  width: 12mm;
  text-align: center;
  font-weight: 600;
}

.nk-col-plan {
  /* よてい: 残り幅 */
}

.nk-col-check {
  width: 22mm;
  text-align: center;
}

.nk-check-box {
  display: inline-block;
  width: 5mm;
  height: 5mm;
  border: 0.4mm solid #1a1a1a;
  border-radius: 1mm;
  vertical-align: middle;
}

.nk-row-sat {
  background: #eaf3fb;
}

.nk-row-sat .nk-col-date,
.nk-row-sat .nk-col-wday {
  color: #1d5faa;
}

.nk-row-sun {
  background: #fbeaea;
}

.nk-row-sun .nk-col-date,
.nk-row-sun .nk-col-wday {
  color: #b3352c;
}

.nk-footer-note {
  flex-shrink: 0;
  text-align: center;
  font-size: 7pt;
  color: #999;
  margin-top: 2mm;
}

/* --- 1日の生活時間（円） --- */
.nk-circle-body {
  flex: 1;
  min-height: 0;
  margin-top: 4mm;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nk-circle-body svg {
  display: block;
  width: 172mm;
  height: 172mm;
  flex-shrink: 0;
}

.nk-circle-legend {
  margin-top: 5mm;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3mm 8mm;
  font-size: 10pt;
  color: #333;
}

.nk-legend-item {
  display: flex;
  align-items: center;
  gap: 2mm;
}

.nk-legend-swatch {
  width: 5mm;
  height: 5mm;
  border-radius: 1mm;
  border: 0.3mm solid rgba(0, 0, 0, 0.25);
}

.nk-circle-caption {
  margin-top: auto;
  font-size: 9pt;
  color: #555;
  text-align: center;
  line-height: 1.7;
}

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

  .nk-form {
    width: 100%;
  }

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

/* ===== 印刷用：アクティブなタブのシートだけを印刷 ===== */
@media print {
  @page {
    size: A4 portrait;
    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(.nk-layout) {
    display: none !important;
  }

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

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

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

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

  .nk-panel[hidden] {
    display: none !important;
  }

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

  .nk-sheet-box {
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    border-radius: 0 !important;
    break-after: page;
    page-break-after: always;
  }

  .nk-sheet-box:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .nk-sheet {
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 210mm !important;
    height: 296mm !important;
    overflow: hidden !important;
  }
}
