/* Rirekisho template – classic grid layout, scoped to #resume.template-rirekisho */

#resume.template-rirekisho {
  box-sizing: border-box;
  width: 8.27in;
  min-height: 11.69in;
  margin: 0 auto;
  padding: 0.35in;
  background: #fff;
  font-family:
    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Arial, Helvetica, sans-serif;
  font-size: 10pt;
  line-height: 1.35;
  color: #000;
}

#resume.template-rirekisho p {
  margin: 0 0 0.35em;
}

#resume.template-rirekisho p:last-child {
  margin-bottom: 0;
}

#resume.template-rirekisho ul {
  margin: 0.2em 0 0;
  padding-left: 1.2em;
  list-style-type: disc;
}

#resume.template-rirekisho li {
  margin-bottom: 0.15em;
}

#resume.template-rirekisho a {
  color: #000;
  text-decoration: underline;
}

/* Stacked tables share borders like one continuous form */

#resume.template-rirekisho .rk-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
}

#resume.template-rirekisho .rk-grid-personal + .rk-grid-main {
  margin-top: 0.75rem;
}

#resume.template-rirekisho .rk-grid th,
#resume.template-rirekisho .rk-grid td {
  border: 1px solid #000;
  padding: 5px 7px;
  vertical-align: middle;
  word-break: break-word;
}

#resume.template-rirekisho .rk-col-label {
  width: 12%;
}

#resume.template-rirekisho .rk-col-value {
  width: auto;
}

#resume.template-rirekisho .rk-col-photo {
  width: 1.15in;
}

#resume.template-rirekisho .rk-label {
  font-size: 9pt;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: #fff;
}

#resume.template-rirekisho .rk-label-narrow {
  width: 10%;
}

#resume.template-rirekisho .rk-furigana {
  font-size: 8.5pt;
  letter-spacing: 0.08em;
}

#resume.template-rirekisho .rk-name-cell {
  vertical-align: middle;
}

#resume.template-rirekisho .rk-name-main {
  font-size: 14pt;
  font-weight: 700;
  letter-spacing: 0.12em;
}

#resume.template-rirekisho .rk-name-sub {
  margin-top: 2px;
  font-size: 9pt;
  font-weight: 600;
}

#resume.template-rirekisho .rk-photo-cell {
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

#resume.template-rirekisho .rk-photo {
  display: block;
  width: 100%;
  height: 1.35in;
  object-fit: cover;
}

#resume.template-rirekisho .rk-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 1.35in;
  color: #999;
}

#resume.template-rirekisho .rk-photo-placeholder svg {
  width: 40%;
  height: auto;
}

/* History table: 年 / 月 / 学歴・職歴 */

#resume.template-rirekisho .rk-col-year {
  width: 9%;
}

#resume.template-rirekisho .rk-col-month {
  width: 7%;
}

#resume.template-rirekisho .rk-col-history {
  width: auto;
}

#resume.template-rirekisho .rk-history-head th {
  font-size: 9pt;
  font-weight: 700;
  text-align: center;
  background: #fff;
}

#resume.template-rirekisho .rk-year,
#resume.template-rirekisho .rk-month {
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}

#resume.template-rirekisho .rk-history-content {
  text-align: left;
}

#resume.template-rirekisho .rk-banner-row td {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #fff;
}

#resume.template-rirekisho .rk-history-bullets {
  margin-top: 0.25em;
}

/* Additional section tables (summary, skills, languages) */

#resume.template-rirekisho .rk-section-head {
  font-size: 9pt;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.06em;
  background: #fff;
}

#resume.template-rirekisho .rk-section-body {
  text-align: left;
}

#resume.template-rirekisho .rk-skill-line {
  margin: 0 0 0.3em;
}

#resume.template-rirekisho .rk-skill-line:last-child {
  margin-bottom: 0;
}

#resume.template-rirekisho .rk-skill-category {
  font-weight: 700;
}

@media print {
  #resume.template-rirekisho {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0.3in;
    box-shadow: none;
  }

  #resume.template-rirekisho a,
  #resume.template-rirekisho a:visited {
    color: #000 !important;
    text-decoration: underline !important;
  }

  #resume.template-rirekisho .rk-photo-cell {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #resume.template-rirekisho .rk-history-row,
  #resume.template-rirekisho .rk-grid-personal tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  #resume.template-rirekisho .rk-history-bullets li {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
