/************************************************************
 * 全体2カラムレイアウト
 ************************************************************/
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  height: 100%;
}

.container {
  display: flex;
  /* 左右2カラム */
  height: 100vh;
  /* 画面全体の高さ */
}

.left,
.right {
  width: 50%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 左カラム：フォーム */
.left {
  background-color: #ffffff;
  /* Cleaner white background */
  border-right: 1px solid #e0e0e0;
  color: #333;
  position: relative;
  box-sizing: border-box;
  padding: 0 0 40px 0;
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #ccc #f0f0f0;
}

.left::-webkit-scrollbar {
  width: 8px;
}

.left::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.left::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
  border: 2px solid #f0f0f0;
}

.header-left {
  background-color: #fff;
  top: 0;
  text-align: center;
  border-bottom: 1px solid #eaeaea;
  padding: 0;
  margin-bottom: 30px;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.header-left h1 {
  padding-top: 25px;
  padding-bottom: 5px;
  margin: 0;
}

.header-left .smart {
  color: #333;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 32px;
}

.header-left .dash {
  font-family: sans-serif;
  font-size: 32px;
  margin: 0 5px;
  color: #ccc;
}

.header-left .cv {
  color: #2cddb4;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 32px;
}

.header-left h2 {
  font-size: 14px;
  color: #666;
  padding-top: 0;
  margin-bottom: 15px;
  font-weight: normal;
}

.header-left hr {
  display: none;
}

/* Choice Box */
.choice-box {
  border: none;
  margin: 0 auto;
  margin-top: 30px;
  text-align: center;
  font-size: 16px;
  color: #555;
  background-color: transparent;
  width: 90%;
  line-height: 1.6;
}

/* Step Boxes */
.first-box,
.second-box {
  border: none;
  margin: 20px auto;
  width: 90%;
  padding: 15px;
  text-align: center;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #00baa3;
  background-color: #e0fbf7;
  box-shadow: 0 2px 4px rgba(0, 186, 163, 0.1);
}

/* Upload Area */
.upload-wrapper {
  margin-bottom: 30px;
  margin-left: 0;
  padding: 0 40px;
  text-align: center;
}

.upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  text-align: center;
  padding: 30px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: auto;
  width: 100%;
  background-color: #f8fafc;
  box-sizing: border-box;
  margin: 0 auto;
}

.upload-text {
  color: #718096;
  font-size: 0.95rem;
  margin-top: 10px;
}

.upload-area:hover {
  border-color: #2cddb4;
  background-color: #f0fdfa;
}

/* Form Groups */
.form-group {
  margin-top: 30px;
  color: #333;
  font-size: 16px;
  border-radius: 0;
  width: 100%;
  margin-left: 0;
  padding: 0 40px;
  box-sizing: border-box;
}

#bulk-generate-btn {
  margin: 20px auto;
  display: block;
  background: linear-gradient(135deg, #2cddb4 0%, #20b2aa 100%);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(44, 221, 180, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-left: auto;
  margin-right: auto;
}

#bulk-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(44, 221, 180, 0.4);
}

/* Specific Groups Alignment */
.name-group,
.furigana-group,
.birthday-box,
.post-code-group,
.address-furigana-group,
.address-group,
.tell-group,
.mail-group,
.t-post-code-group,
.t-address-furigana-group,
.t-address-group,
.t-tell-group,
.t-mail-group {
  margin-left: 0;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

.name-group,
.furigana-group {
  margin-top: 30px;
}

.row-inline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  /* Allow wrapping on small screens */
  gap: 20px;
}

.name-group {
  flex: 1;
  padding-right: 10px;
}

.furigana-group {
  flex: 1;
  padding-left: 10px;
  margin-right: 0;
}

.birthday-box {
  margin-top: 30px;
  margin-bottom: 20px;
}

.birthday-box label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 16px;
}

.birthday-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.year-month-select,
.day-age-select,
.gender-select {
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f7fafc;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
}

.year-month-select {
  width: 80px;
  height: 40px;
}

.year-month-input {
  text-align: left;
  padding-right: 24px;
  cursor: text;
  appearance: textfield;
}

.year-input-wrap {
  display: inline-flex;
  align-items: stretch;
}

.year-stepper {
  margin-left: -20px;
  display: flex;
  flex-direction: column;
}

.year-step-btn {
  width: 20px;
  border: 1px solid #e2e8f0;
  border-left: none;
  background-color: #f7fafc;
  color: #4a5568;
  font-size: 10px;
  line-height: 1;
  height: 20px;
  padding: 0;
  cursor: pointer;
}

.year-step-btn:first-child {
  border-top-right-radius: 7px;
}

.year-step-btn:last-child {
  border-bottom-right-radius: 7px;
  border-top: 0;
}

.year-step-btn:focus {
  outline: none;
  background-color: #edf2f7;
}

.year-month-input::-webkit-outer-spin-button,
.year-month-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.day-age-select {
  width: 70px;
  height: 40px;
}

.gender-select {
  width: 90px;
  height: 40px;
}

.gender-label {
  margin-left: 10px;
  margin-right: 4px;
}

.photo-upload-container {
  margin: 20px auto;
  width: 100%;
  padding: 0 40px;
  text-align: left;
  box-sizing: border-box;
}

.photo-upload-container>label {
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.photo-placeholder {
  width: 120px;
  height: 160px;
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  color: #a0aec0;
  background-color: #f8fafc;
  transition: all 0.2s;
}

.photo-placeholder:hover {
  border-color: #2cddb4;
  color: #2cddb4;
  background-color: #f0fdfa;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #4a5568;
  font-size: 0.95rem;
}

input[type="text"],
textarea,
input[type="file"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  margin-bottom: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
  color: #2d3748;
  transition: all 0.2s;
  box-sizing: border-box;
}

input[type="text"]:focus,
textarea:focus,
input[type="file"]:focus {
  border-color: #2cddb4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44, 221, 180, 0.15);
  outline: none;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.section-title {
  margin-top: 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 2px solid #2cddb4;
  padding-bottom: 10px;
  margin-bottom: 20px;
  color: #2d3748;
  letter-spacing: 0.05em;
  margin-left: 40px;
  margin-right: 40px;
}

.form-inline {
  display: flex;
  gap: 15px;
}

.row-container {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  margin-bottom: 20px;
  margin-left: 40px;
  margin-right: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.edu-year,
.edu-month,
.license-year,
.license-month {
  width: 70px;
  height: 40px;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f7fafc;
  text-align: center;
}

.edu-work {
  width: 300px;
  height: 40px;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f7fafc;
}

.skill-history {
  width: 300px;
  height: 40px;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f7fafc;
  text-align: left;
}

.buttons-inline {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  padding: 0 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background-color: #3182ce;
}

.btn-primary:hover {
  background-color: #2b6cb0;
}

.btn-danger {
  background-color: #e53e3e;
}

.btn-danger:hover {
  background-color: #c53030;
}

.pdf-btn-wrapper {
  text-align: center;
  margin-top: 50px;
  padding-bottom: 50px;
}

.pdf-btn {
  background: linear-gradient(135deg, #2cddb4 0%, #20b2aa 100%);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 15px 40px;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 6px rgba(44, 221, 180, 0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  margin: 0 auto;
}

.pdf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(44, 221, 180, 0.4);
}

.pdf-btn:active {
  transform: translateY(0);
}


/************************************************************
 * 右カラム：履歴書プレビュー (複数ページ分割)
 ************************************************************/
.right {
  /* Modern Background */
  background-color: #f0f4f8;
  background-image:
    radial-gradient(at 10% 10%, hsla(210, 100%, 96%, 1) 0px, transparent 50%),
    radial-gradient(at 90% 90%, hsla(180, 100%, 96%, 1) 0px, transparent 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px;
  position: relative;
}

/* ズームコントロール */
.zoom-controls {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
  user-select: none;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #2cddb4;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  line-height: 1;
}

.zoom-btn:hover {
  background: #20b2aa;
  transform: scale(1.1);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-level {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  min-width: 45px;
  text-align: center;
}

.resume-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.resume-page {
  background-color: #fff;
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  padding: 10mm;
  margin: 0;
  position: relative;
  overflow: hidden;
  border: none;

  /* Modern Shadow for "Paper" effect */
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.11),
    0 2px 2px rgba(0, 0, 0, 0.11),
    0 4px 4px rgba(0, 0, 0, 0.11),
    0 8px 8px rgba(0, 0, 0, 0.11),
    0 16px 16px rgba(0, 0, 0, 0.11),
    0 32px 32px rgba(0, 0, 0, 0.11);
  transition: transform 0.3s ease;
}

.resume-page:hover {
  transform: translateY(-2px);
}

.resume-content {
  margin: 0;
  padding: 0;
}

@media print {
  .right {
    background: none;
    padding: 0;
  }

  .resume-page {
    margin: 0;
    box-shadow: none;
    width: 100%;
    height: auto;
    page-break-after: always;
  }

  .resume-page:last-child {
    page-break-after: auto;
  }
}

.resume-preview {
  color: #000;
}

.resume-content .title {
  font-size: 16pt;
  font-weight: bold;
  margin-bottom: 0;
}

.resume-content .date-right {
  text-align: right;
  font-size: 11pt;
  font-weight: normal;
  margin-right: 5mm;
}

.top-section {
  display: flex;
  align-items: end;
  gap: 10px;
}

.name-furigana-table {
  width: 80%;
  border: 2px solid #000;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  margin-bottom: 0;
}

tr.furigana-box td.furigana-label {
  width: 20px;
  height: 10px;
  padding: 5px;
  border-right: 1px solid #000;
  text-align: center;
  font-size: 10px;
  border-bottom: 1px dotted #000;
}

tr.furigana-box td.furigana-value {
  width: 60px;
  padding: 5px;
  text-align: center;
  font-size: 10px;
  border-bottom: 1px dotted #000;
}

tr.name-table td.name-label {
  width: 20px;
  height: 80px;
  padding: 5px;
  border-right: 1px solid #000;
  text-align: center;
}

tr.name-table td.name-value-left {
  width: 20px;
  height: 80px;
  padding: 5px;
  text-align: center;
  font-size: 20px;
}

.birthday-gender-table {
  width: 100%;
  border: 2px solid #000;
  border-collapse: separate;
  margin-top: 3%;
  table-layout: fixed;
}

td.birthday-label {
  width: 19.5%;
  height: 40px;
  border-right: 1px solid #000;
  text-align: center;
  font-size: 10px;
}

.birthday-value {
  width: 200px;
  border-right: 1px solid #000;
  text-align: center;
  font-size: 13px;
}

.gender-value {
  text-align: center;
  width: 10%;
}

.photo-box {
  width: 96px;
  height: 125px;
  overflow: hidden;
  text-align: center;
}

.photo-box img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.contact-info-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
  border-collapse: separate;
  border-spacing: 0;
}

.contact-info {
  height: 20px;
  text-align: center;
}

th.address-furigana-label {
  border-bottom: 1px dotted #000;
  border-right: 1px solid #000;
  width: 19.5%;
  font-size: 10px;
}

td.address-furigana-value {
  border-bottom: 1px dotted #000;
  border-right: 1px solid #000;
  width: 50%;
  font-size: 10px;
}

th.tel-label {
  width: 10%;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 10px;
}

td.tel-value {
  border-bottom: 1px solid #000;
  width: 120%;
  font-size: 10px;
}

th.address-label {
  border-right: 1px solid #000;
  height: 40px;
  font-size: 10px;
}

td.address-value {
  border-right: 1px solid #000;
  text-align: left;
  font-size: 15px;
}

th.email-label {
  border-right: 1px solid #000;
  font-size: 10px;
}

td.email-value {
  font-size: 10px;
  text-align: center;
}

.alt-contact-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
  border-spacing: 0;
}

.alt-contact-info {
  height: 20px;
  text-align: center;
}

th.alt-address-furigana-label {
  border-bottom: 1px dotted #000;
  border-right: 1px solid #000;
  width: 19.5%;
  font-size: 10px;
}

td.alt-address-furigana-value {
  border-bottom: 1px dotted #000;
  border-right: 1px solid #000;
  width: 50%;
  font-size: 10px;
}

th.alt-tel-label {
  width: 10%;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 10px;
}

td.alt-tel-value {
  border-bottom: 1px solid #000;
  width: 120%;
  font-size: 10px;
}

th.alt-address-label {
  border-right: 1px solid #000;
  height: 40px;
  font-size: 10px;
}

td.alt-address-value {
  border-right: 1px solid #000;
  text-align: left;
  font-size: 15px;
}

th.alt-email-label {
  border-right: 1px solid #000;
  font-size: 10px;
}

.education-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
  border-spacing: 0;
  text-align: center;
}

.education-info {
  height: 30px;
  text-align: center;
}

th.education-year {
  width: 15mm;
  height: 7mm;
  border-right: 1px dotted #000;
  font-size: 10px;
}

th.education-container-month {
  width: 15mm;
  height: 7mm;
  border-right: 1px dotted #000;
  font-size: 10px;
}

th.education-history {
  width: 80%;
  height: 7mm;
  font-size: 10px;
}

td.education-year-value {
  border-right: 1px dotted #000;
  border-top: 1px dotted #000;
  height: 40px;
}

td.education-container-month-value {
  border-right: 1px dotted #000;
  border-top: 1px dotted #000;
  height: 40px;
}

td.education-history-value {
  border-top: 1px dotted #000;
  height: 40px;
}

.skill-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
  border-spacing: 0;
  text-align: center;
}

.skill-info {
  height: 30px;
  text-align: center;
}

th.skill-year {
  width: 15mm;
  height: 7mm;
  border-right: 1px dotted #000;
  font-size: 10px;
}

th.skill-container-month {
  width: 15mm;
  height: 7mm;
  border-right: 1px dotted #000;
  font-size: 10px;
}

th.skill-history {
  width: 80%;
  height: 7mm;
  font-size: 10px;
  text-align: center;
}

td.skill-year-value {
  border-right: 1px dotted #000;
  border-top: 1px dotted #000;
  height: 40px;
}

td.skill-container-month-value {
  border-right: 1px dotted #000;
  border-top: 1px dotted #000;
  height: 40px;
}

td.skill-history-value {
  border-top: 1px dotted #000;
  height: 40px;
}

.motivation-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
}

th.motivation-label {
  height: 5mm;
  text-align: left;
  vertical-align: top;
  font-size: 10px;
}

td.motivation-value {
  height: 170px;
  text-align: left;
  vertical-align: top;
}

.pr-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
}

th.pr-label {
  height: 5mm;
  text-align: left;
  vertical-align: top;
  font-size: 10px;
}

td.pr-value {
  height: 170px;
  text-align: left;
  vertical-align: top;
}

.request-table {
  width: 100%;
  border: 2px solid #000;
  margin-top: 3%;
}

th.request-label {
  height: 5mm;
  text-align: left;
  vertical-align: top;
  font-size: 10px;
}

td.request-value {
  height: 170px;
  text-align: left;
  vertical-align: top;
}

table,
tr,
td,
th {
  page-break-inside: avoid;
}

.block {
  margin-bottom: 20px;
}
