/* 住民票コラム固有スタイル（/column/resident-record/）。
   guide-toc / guide-callout / guide-cta / guide-note / guide-official-source /
   guide-table-scroll / related-link-cards などの共通部品は guide-common.css を利用し、
   ここでは resident-record ページ内の部品だけを定義する。
   （column-belongings.css と同じ方針）
   色だけで優先度・分類を表現せず、必ずラベル文言でも区別する。 */

/* 冒頭の結論カード */
.rr-conclusion-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(45, 52, 54, .05);
}

.rr-conclusion-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rr-conclusion-card li {
  position: relative;
  padding: 2px 2px 2px 26px;
  color: var(--guide-ink);
  line-height: 1.8;
}

.rr-conclusion-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 9px;
  height: 5px;
  border-left: 3px solid var(--guide-gold-dark);
  border-bottom: 3px solid var(--guide-gold-dark);
  transform: rotate(-45deg);
}

/* 確認リスト（1項目1行のチェック型リスト） */
.rr-check-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rr-check-list li {
  position: relative;
  padding: 12px 14px 12px 40px;
  border-radius: 12px;
  background: var(--guide-soft);
  color: var(--guide-ink);
  line-height: 1.7;
}

.rr-check-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 22px;
  width: 10px;
  height: 6px;
  border-left: 3px solid var(--guide-gold-dark);
  border-bottom: 3px solid var(--guide-gold-dark);
  transform: rotate(-45deg);
}

/* タグ型リスト（例示・候補の並列表示） */
.rr-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rr-tag-list li {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 999px;
  color: var(--guide-ink);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 分類バッジ（色だけに頼らずラベル文言で必須／要確認を区別する） */
.rr-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--guide-border);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.rr-badge--check {
  background: var(--guide-soft);
  color: var(--guide-gold-dark);
}

.rr-badge--caution {
  background: #fff;
  color: var(--guide-red);
  border-color: var(--guide-red);
}

/* 汎用カードグリッド（必要になる場合・取得方法・外国籍の確認事項など） */
.rr-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.rr-card-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rr-card {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(45, 52, 54, .05);
}

.rr-card h3 {
  margin: 0 0 10px;
  color: var(--guide-ink);
  font-size: 1.05rem;
  line-height: 1.45;
}

.rr-card p {
  margin: 0;
  color: var(--guide-muted);
  font-size: 0.92rem;
  line-height: 1.8;
}

.rr-card ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rr-card li {
  position: relative;
  padding: 1px 1px 1px 20px;
  color: var(--guide-ink);
  font-size: 0.9rem;
  line-height: 1.7;
}

.rr-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--guide-gold-dark);
  border-bottom: 2px solid var(--guide-gold-dark);
  transform: rotate(-45deg);
}

.rr-card__note {
  margin: 12px 0 0 !important;
  color: var(--guide-muted);
  font-size: 0.84rem;
  line-height: 1.75;
}

/* 「〜と断定しない」注意ブロック（過度な警告色・点滅は使わない） */
.rr-caution {
  margin-top: 24px;
  border-left: 4px solid var(--guide-red);
}

.rr-caution ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0 0 0 20px;
}

.rr-caution li {
  color: var(--guide-ink);
  line-height: 1.7;
}

/* 縦型STEP（忘れた場合の行動手順） */
.rr-step-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rr-step-card {
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(45, 52, 54, .05);
}

.rr-step-card__label {
  margin: 0 0 6px;
  color: var(--guide-gold-dark);
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.rr-step-card p:last-child {
  margin: 0;
  color: var(--guide-ink);
  line-height: 1.8;
}

/* チェック形式の記載内容確認（実操作できるが状態は保存・送信しない） */
.rr-checkform {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rr-checkform li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--guide-border);
  border-radius: 10px;
}

.rr-checkform input[type="checkbox"] {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--guide-gold-dark);
  cursor: pointer;
}

.rr-checkform label {
  color: var(--guide-ink);
  line-height: 1.65;
  cursor: pointer;
}

.rr-checkform input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(217, 169, 0, .4);
  outline-offset: 2px;
}

/* 公式情報の長いURLが狭い画面からはみ出さないようにする */
.column-resident-record-guide .guide-official-source a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  .rr-card-grid,
  .rr-card-grid--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .rr-conclusion-card {
    padding: 18px;
  }

  .rr-card-grid,
  .rr-card-grid--three {
    grid-template-columns: 1fr;
  }

  /* チェックボックスのタップ領域とラベル行の高さを広げる */
  .rr-checkform li {
    padding: 13px 14px;
  }

  .rr-checkform input[type="checkbox"] {
    width: 26px;
    height: 26px;
  }
}

/* 印刷時：チェックリストが読め、固定フッターCTAが本文へ重ならないようにする */
@media print {
  .desktop-world,
  .site-header,
  .site-footer,
  .fixed-actions,
  .luna-bubble,
  .guide-cta,
  .related-link-cards,
  .guide-toc {
    display: none !important;
  }

  .car-guide {
    width: 100%;
    margin: 0;
  }

  .guide-section {
    padding: 18px 0;
    page-break-inside: avoid;
    border-bottom: 1px solid #ccc;
  }

  .rr-card,
  .rr-step-card,
  .rr-checkform li {
    box-shadow: none;
    break-inside: avoid;
  }

  .rr-checkform input[type="checkbox"] {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    padding-bottom: 0 !important;
  }
}
