/************************************************************
 * 全体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: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  border-bottom: 1px solid #eaeaea;
  padding: 16px 24px;
  margin-bottom: 30px;
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-branding {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-home-link {
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.brand-home-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(44, 221, 180, 0.28);
}

.brand-home-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 130;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.brand-home-link:hover .brand-home-tooltip,
.brand-home-link:focus-visible .brand-home-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.header-left h1 {
  padding: 0;
  margin: 0;
  line-height: 1.1;
}

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

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

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

.header-left h2 {
  font-size: 13px;
  color: #64748b;
  padding: 0;
  margin: 0;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #9fe8d7;
  background: #effcf8;
  color: #0f766e;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.05);
}

.back-link:hover {
  background: #dcf9f1;
  border-color: #67d8bd;
  color: #0b5f58;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 118, 110, 0.1);
}

.save-status-banner {
  margin: 0;
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(4px);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #334155;
  transition: all 0.3s ease;
}

.save-status-banner:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.save-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  position: relative;
}

.save-status-label {
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.save-status-value {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.save-status-banner[data-state="saved"] .save-status-dot {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.save-status-banner[data-state="saving"] .save-status-dot {
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.save-status-banner[data-state="dirty"] .save-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.header-subtitle-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.access-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.access-state-badge:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.access-state-label {
  display: none;
}

.access-state-value {
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.access-state-badge[data-role="owner"] {
  background: rgba(44, 221, 180, 0.1);
  color: #0b8e73;
  border-color: rgba(44, 221, 180, 0.2);
}
.access-state-badge[data-role="owner"]::before {
  content: '👑';
  font-size: 11px;
}

.access-state-badge[data-role="editor"] {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.2);
}
.access-state-badge[data-role="editor"]::before {
  content: '✏️';
  font-size: 11px;
}

.access-state-badge[data-role="viewer"] {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border-color: rgba(100, 116, 139, 0.2);
}
.access-state-badge[data-role="viewer"]::before {
  content: '👁️';
  font-size: 11px;
}

.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;
}

/* 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: stretch;
  overflow-y: auto;
  overflow-x: auto;
  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;
  align-self: center;
}

.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;
  width: max-content;
  margin: 0;
}

.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;
}

/* 保存/再編集 */
.storage-controls {
  margin-top: 20px;
  padding: 0 40px 40px;
}

.storage-title-input {
  width: 100%;
  height: 40px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  background-color: #fff;
}

.storage-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.overwrite-target-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.overwrite-target-label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}

.overwrite-target-value {
  flex: 1;
  min-width: 180px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #f8fafc;
  color: #111827;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.35;
}

.overwrite-target-change-btn {
  min-width: 84px;
  height: 34px;
  font-size: 13px;
  font-weight: 600;
  padding: 0 12px;
}

.storage-btn {
  border: none;
  border-radius: 8px;
  height: 38px;
  min-width: 112px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.storage-btn-primary {
  background: #2cddb4;
  color: #fff;
}

.storage-btn-primary:hover {
  background: #20b2aa;
}

.storage-btn-secondary {
  background: #e8eef7;
  color: #2d3748;
}

.storage-btn-secondary:hover {
  background: #d8e3f2;
}

.storage-modal[hidden] {
  display: none;
}

.storage-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.storage-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.storage-modal-panel {
  position: relative;
  width: min(860px, 92vw);
  max-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.storage-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.storage-modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.storage-close-btn {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #4b5563;
}

.storage-list {
  padding: 14px 16px 16px;
  overflow: auto;
}

.storage-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
}

.storage-item + .storage-item {
  margin-top: 10px;
}

.storage-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.storage-item-meta {
  margin-top: 3px;
  font-size: 12px;
  color: #6b7280;
}

.share-link-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #30363d;
  border-radius: 10px;
  background: #161b22;
  padding: 4px;
}

.share-link-url {
  flex: 1;
  min-width: 0;
  color: #c9d1d9;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

.share-link-copy-btn {
  border: 1px solid #30363d;
  border-radius: 8px;
  height: 30px;
  padding: 0 12px;
  background: #0d1117;
  color: #f0f6fc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.share-link-copy-btn:hover {
  background: #1f2937;
}

.share-link-copy-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.storage-item-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.share-inline-control {
  display: inline-flex;
  align-items: center;
  height: 32px;
  min-width: 360px;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.share-inline-url {
  width: 340px;
  max-width: 52vw;
  border: none;
  outline: none;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 0 10px;
}

.share-inline-copy-btn {
  border: none;
  border-left: 1px solid #d1d5db;
  height: 100%;
  padding: 0 12px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.share-inline-copy-btn:hover {
  background: #f3f4f6;
}

.share-inline-copy-btn:disabled {
  color: #6b7280;
  cursor: default;
}

.share-manage-control {
  display: contents;
}

.share-manage-toggle-btn {
  align-self: flex-start;
}

.share-manage-panel {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-basis: 100%;
  width: 100%;
  order: 1000;
}

.share-manage-panel[hidden] {
  display: none;
}

.share-manage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.share-manage-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1f2937;
}

.share-manage-expiry {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
}

.share-manage-fixed-expiry {
  font-size: 12px;
  color: #334155;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px 10px;
}

.share-manage-status {
  font-size: 12px;
  color: #475569;
}

.storage-item-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 7px;
  height: 32px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.storage-item-btn:hover {
  background: #f3f4f6;
}

.storage-item-btn-danger {
  border-color: #f0b6b6;
  color: #b91c1c;
  background: #fff5f5;
}

.storage-item-btn-danger:hover {
  background: #ffe9e9;
}

.storage-empty {
  color: #6b7280;
  font-size: 14px;
}

@media (max-width: 900px) {
  .share-inline-control {
    min-width: 0;
    width: 100%;
  }

  .share-inline-url {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .left,
  .right {
    width: 100%;
    max-height: none;
  }

  .left {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    overflow-y: visible;
  }

  .right {
    padding: 20px 12px 28px;
    overflow-x: auto;
    overflow-y: auto;
  }

  .zoom-controls {
    top: 8px;
  }
}

@media (max-width: 768px) {
  .header-left {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px;
    gap: 12px;
  }

  .header-actions {
    justify-content: space-between;
  }

  .row-inline {
    flex-direction: column;
    gap: 0;
  }

  .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,
  .form-group,
  .upload-wrapper,
  .buttons-inline,
  .storage-controls {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-title,
  #char-counter {
    margin-left: 16px;
    margin-right: 16px;
  }

  .row-container {
    margin-left: 16px;
    margin-right: 16px;
  }

  .simple-textarea {
    width: calc(100% - 32px);
    margin-left: 16px;
    margin-right: 16px;
  }

  .storage-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .storage-btn {
    width: 100%;
  }
}
