:root {
  --sheet-width: 420mm;
  --sheet-height: 297mm;
  --a4-page-width: 210mm;
  --a4-page-height: 297mm;
  --screen-page-gap: 0;
  --cell-row-height: 9mm;
  --cell-kana-height: 5.6mm;
  --cell-name-height: 26.8mm;
  --cell-heading-height: 7.6mm;
  --cell-text-heading-height: 7.4mm;
  --cell-address-height: 22.4mm;
  --cell-address-main-height: 16.8mm;
  --cell-address-postal-height: 5mm;
  --cell-address-body-height: calc(var(--cell-address-height) - var(--cell-kana-height) - var(--cell-address-postal-height));
  --box-motivation-height: 50.4mm;
  --box-motivation-total-height: calc(var(--cell-text-heading-height) + var(--box-motivation-height));
  --box-request-line-height: calc(var(--cell-row-height) * 0.918);
  --box-request-height: calc((var(--box-request-line-height) * 5) - 3.6mm);
  --box-request-total-height: calc(var(--cell-text-heading-height) + var(--box-request-height));
  --right-section-gap: 3.5mm;
  --right-grid-border-compensation: calc(var(--line-width) * 4);
  --resume-margin-top: 28mm;
  --resume-margin-bottom: 17mm;
  --resume-outer-margin: 21mm;
  --resume-inner-margin: 16.5mm;
  --resume-center-gap: calc(var(--resume-inner-margin) * 2);
  --resume-head-gap: 15.8mm;
  --resume-title-row-height: 9.5mm;
  --personal-history-gap: 3.8mm;
  --resume-block-height: calc(
    var(--resume-title-row-height)
    + var(--cell-kana-height)
    + var(--cell-name-height)
    + var(--cell-row-height)
    + (var(--cell-address-height) * 2)
    + var(--personal-history-gap)
    + var(--cell-heading-height)
    + (var(--cell-row-height) * 15)
  );
  --resume-note-left: var(--resume-outer-margin);
  --resume-note-top: calc(
    var(--resume-margin-top)
    + var(--resume-title-row-height)
    + var(--cell-kana-height)
    + var(--cell-name-height)
    + var(--cell-row-height)
    + (var(--cell-address-height) * 2)
    + var(--personal-history-gap)
    + var(--cell-heading-height)
    + (var(--cell-row-height) * 15)
    + 3mm
  );
  --resume-photo-width: 30.2mm;
  --resume-photo-height: 38.7mm;
  --resume-content-width: calc(var(--a4-page-width) - var(--resume-outer-margin) - var(--resume-inner-margin));
  --identity-cell-width: 115.5mm;
  --side-cell-width: calc(var(--resume-content-width) - var(--identity-cell-width));
  --address-phone-width: 35.6mm;
  --address-main-width: calc(var(--resume-content-width) - var(--address-phone-width));
  --address-adjust-width: calc(var(--address-main-width) - var(--identity-cell-width) - var(--resume-head-gap));
  --resume-photo-right-gap: calc(var(--resume-content-width) - var(--identity-cell-width) - var(--resume-head-gap) - var(--resume-photo-width));
  --left-main-width: calc(var(--identity-cell-width) - var(--entry-year-width) - var(--entry-month-width));
  --left-side-width: calc(var(--resume-content-width) - var(--identity-cell-width) - var(--address-phone-width));
  --name-grid-row-height: calc(var(--cell-name-height) / 3);
  --motivation-grid-row-height: calc(var(--box-motivation-height) / 4);
  --request-grid-row-height: calc((var(--box-request-height) + var(--right-grid-border-compensation)) / 4);
  --address-label-width: 21mm;
  --address-postal-width: 29mm;
  --gender-label-width: 12mm;
  --entry-year-width: 20mm;
  --entry-month-width: 10mm;
  --entry-main-width: calc(var(--resume-content-width) - var(--entry-year-width) - var(--entry-month-width));
  --history-row-optical-offset: 0.35mm;
  --font-title: calc(var(--cell-row-height) * 0.78);
  --font-standard: calc(var(--cell-row-height) * 0.43);
  --font-label: calc(var(--cell-row-height) * 0.39);
  --font-note: calc(var(--cell-row-height) * 0.35);
  --font-heading-note: var(--font-note);
  --font-small: calc(var(--cell-row-height) * 0.31);
  --line-width: calc(var(--cell-row-height) * 0.03);
  --thin-line-width: calc(var(--cell-row-height) * 0.018);
  --date-current-width: calc(var(--font-standard) * 2);
  --ink: #111;
  --muted: #555;
  --line: #111;
  --thin-line: #333;
  --paper: rgba(255, 255, 255, 0.52);
  --canvas: #f3f4f6;
  --accent: #2563eb;
  --resume-font: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "MS Mincho", serif;
  --ui-font: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-family: var(--resume-font);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background-color: #fff;
  background-image:
    radial-gradient(circle 720px at 82% 18%, rgba(56, 193, 182, 0.24), transparent 70%),
    radial-gradient(circle 720px at right bottom, rgba(173, 109, 244, 0.18), transparent 70%),
    radial-gradient(circle at 18% 82%, rgba(255, 160, 146, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 20% 20%, rgba(255, 244, 228, 0.24) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 160, 146, 0.1) 0%, transparent 50%),
    radial-gradient(circle 560px at 60% 40%, rgba(211, 240, 240, 0.72), transparent 68%),
    radial-gradient(circle 1000px at 0% 0%, rgb(from #3b82f6 r g b / 0.3), transparent 70%),
    radial-gradient(circle 460px at 50% 50%, rgba(139, 92, 246, 0.12), transparent 72%),
    linear-gradient(135deg, #fff 0%, #fef9f7 32%, #f7fbfb 58%, #eef8f8 100%);
  background-size: 100% 100%;
  background-attachment: fixed;
}

body {
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: calc(100% - 48px);
  max-width: var(--sheet-width);
  height: 52px;
  margin: 24px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-family: var(--ui-font);
}

.app-title {
  margin: 0;
  color: #000;
  font-size: 1.45em;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  min-height: 32px;
  border: .0625rem solid;
  border-color: #d1d9e0;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}

.app-header .button {
  border: 0;
  border-radius: 999px;
  padding: 6px 8px;
  background: transparent;
  color: #000;
  font-weight: 600;
  white-space: nowrap;
}

.button:hover {
  background: #f8fafc;
}

.app-header .button:hover {
  background: rgba(17, 17, 17, 0.06);
}

.button-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: var(--muted);
  margin-bottom: 2px;
}

.app-header .button-icon {
  fill: currentColor;
  opacity: 0.72;
}

.button-icon.line-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.github-link {
  width: auto;
  min-width: 0;
}

.menu-button,
.header-menu {
  display: none;
}

.menu-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.menu-button span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-button[aria-expanded="true"] {
  background: rgba(17, 17, 17, 0.08);
}

.header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 168px;
  padding: 6px;
  border: .0625rem solid;
  border-color: #d1d9e0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}

.header-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 9px 10px;
  background: transparent;
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.header-menu-item:hover {
  background: rgba(17, 17, 17, 0.06);
}

.app-layout {
  display: block;
  padding: 24px;
  overflow-x: auto;
}

.resume-document {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.editable-resume [contenteditable="true"] {
  cursor: text;
  outline: none;
  caret-color: var(--ink);
  overflow: hidden;
}

.editable-resume [contenteditable="true"]:hover {
  background: rgba(37, 99, 235, 0.04);
}

.editable-resume [contenteditable="true"]:focus {
  background: rgba(37, 99, 235, 0.06);
  outline: 2px solid rgba(37, 99, 235, 0.65);
}

.resume-standalone {
  padding: 20px;
}

.resume-sheet {
  position: relative;
  width: 100%;
  max-width: var(--sheet-width);
  background: var(--paper);
  border: .0625rem solid;
  border-color: #d1d9e0;
  border-radius: 10px;
  box-shadow: none;
  color: var(--ink);
  font-family: var(--resume-font);
  overflow: hidden;
}

.resume-source-note {
  width: 100%;
  max-width: var(--sheet-width);
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 10px;
  line-height: 1.2;
  text-align: right;
}

.resume-source-note a {
  color: inherit;
}

.reference-mark {
  position: absolute;
  top: 9mm;
  right: 14mm;
  font-family: var(--resume-font);
  font-size: var(--font-title);
  font-weight: 700;
}

.resume-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--screen-page-gap);
  align-items: start;
}

.resume-page {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.resume-column {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--a4-page-width);
  height: var(--a4-page-height);
  padding: var(--resume-margin-top) var(--resume-inner-margin) var(--resume-margin-bottom) var(--resume-outer-margin);
  min-width: 0;
  overflow: hidden;
  transform: scale(var(--page-scale, 1));
  transform-origin: top left;
}

.resume-column-right {
  padding-right: var(--resume-outer-margin);
  padding-left: var(--resume-inner-margin);
}

.title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10mm;
  height: 100%;
  margin-bottom: 0;
}

.resume-title {
  margin: 0;
  font-size: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.45em;
  white-space: nowrap;
  transform: translateY(-1.2mm);
}

.resume-date {
  min-width: 56mm;
  text-align: right;
  font-size: var(--font-standard);
  line-height: 1;
  white-space: nowrap;
  transform: translate(var(--date-current-width), -1.2mm);
}

.date-current {
  display: inline-block;
  width: var(--date-current-width);
  text-align: left;
  line-height: 1;
  vertical-align: baseline;
}

.resume-date .date-input {
  padding: 0;
  transform: translateY(0.5mm);
}

.resume-date .date-current {
  line-height: 1;
  vertical-align: baseline;
}

.date-input {
  display: inline-block;
  min-width: 8mm;
  max-height: 1em;
  padding: 0 0.8mm;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  vertical-align: baseline;
  white-space: pre;
}

.date-year {
  min-width: 14mm;
}

.date-age {
  min-width: 7mm;
}

.photo-box {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--resume-photo-width);
  height: var(--resume-photo-height);
  border: var(--line-width) dashed #999;
  padding: 3mm;
  text-align: center;
  font-size: calc(var(--font-small) * 0.86);
  line-height: 1.12;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
  overflow-wrap: anywhere;
}

.photo-upload {
  width: var(--resume-photo-width);
  cursor: pointer;
  appearance: none;
}

.photo-upload:hover {
  outline: 2px solid rgba(37, 99, 235, 0.35);
}

.photo-preview {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview[hidden] {
  display: none;
}

.photo-instruction {
  position: absolute;
  inset: 2.6mm;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.75mm;
  max-width: 100%;
  line-height: 1.18;
  pointer-events: none;
}

.photo-instruction > span {
  max-width: 100%;
}

.photo-instruction-title {
  text-align: center;
}

.photo-instruction .photo-instruction-gap,
.photo-instruction-lead,
.photo-instruction-list {
  width: 100%;
}

.photo-instruction .photo-instruction-gap {
  height: 1.4mm;
  line-height: 0;
}

.photo-instruction-lead {
  text-align: left;
}

.photo-instruction-list {
  margin: 0;
  padding-left: 3.5mm;
  list-style-position: outside;
  text-align: left;
}

.photo-instruction-list li {
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.photo-instruction-list li span {
  display: block;
}

.resume-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0 0 3.5mm;
}

.block-grid,
.history-right {
  margin-bottom: 0;
}

.resume-table th,
.resume-table td {
  border: var(--line-width) solid var(--line);
  padding: 0;
  vertical-align: top;
  font-size: var(--font-standard);
  font-weight: 400;
  line-height: 1.35;
}

.left-year-col,
.year-col {
  width: var(--entry-year-width);
}

.left-month-col,
.month-col {
  width: var(--entry-month-width);
}

.left-main-col {
  width: var(--left-main-width);
}

.left-side-col {
  width: var(--left-side-width);
}

.left-phone-col {
  width: var(--address-phone-width);
}

.entry-title-col {
  width: var(--entry-main-width);
}

.cell-label {
  display: block;
  padding: 1mm 2mm 0;
}

.left-grid .resume-head-identity-cell .cell-label,
.left-grid .address-cell .cell-label,
.left-grid .phone-cell .cell-label {
  line-height: 1;
}

.inline-field {
  display: grid;
  grid-template-columns: 21mm 1fr;
  align-items: start;
}

.inline-field .cell-label {
  display: flex;
  align-items: center;
  height: var(--cell-kana-height);
  font-size: var(--font-label);
  padding-top: 0;
  padding-right: 0;
}

.personal-identity-col {
  width: var(--identity-cell-width);
}

.personal-gap-col {
  width: var(--resume-head-gap);
}

.personal-adjust-col {
  width: var(--address-adjust-width);
}

.personal-phone-col {
  width: var(--address-phone-width);
}

.left-grid td {
  vertical-align: top;
}

.left-title-row {
  height: var(--resume-title-row-height);
}

.resume-head-top-cell,
.resume-head-gap-cell,
.resume-head-photo-cell {
  border: 0 !important;
}

.resume-head-photo-cell {
  width: calc(var(--resume-photo-width) + var(--resume-photo-right-gap));
}

.resume-head-photo-cell .photo-box {
  margin-left: var(--resume-head-gap);
}

.personal-history-gap-row {
  height: var(--personal-history-gap);
}

.grid-spacer-cell {
  border: 0 !important;
}

.left-kana-row {
  height: var(--cell-kana-height);
}

.left-name-row {
  height: var(--name-grid-row-height);
}

.resume-head-identity-cell {
  border: var(--line-width) solid var(--line) !important;
}

.kana-field {
  height: calc(var(--cell-kana-height) - 1.4mm);
  max-height: calc(var(--cell-kana-height) - 1.4mm);
  min-height: 0;
  padding-top: 0.4mm;
  text-align: center;
}

.field-value {
  min-height: 6mm;
  padding: 0 2mm 1mm;
  white-space: pre-wrap;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.default-value {
  color: #c02626;
}

.name-field {
  height: calc(var(--cell-name-height) - 5mm);
  max-height: calc(var(--cell-name-height) - 5mm);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2mm;
  text-align: center;
  font-size: var(--font-title);
}

.left-grid .birth-row td {
  height: var(--cell-row-height);
}

.left-grid .birth-row .field-value {
  min-height: 0;
  padding: 0;
  line-height: 1;
}

.birth-cell {
  width: var(--identity-cell-width);
}

.birth-cell .field-value {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--cell-row-height);
  max-height: var(--cell-row-height);
}

.gender-cell .cell-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  height: 3mm;
  padding-top: 0.8mm;
  line-height: 1;
}

.left-grid .gender-cell .field-value {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--cell-row-height);
  max-height: var(--cell-row-height);
  width: calc(100% - (var(--gender-label-width) * 2));
  margin: 0 var(--gender-label-width);
  padding: 0;
  text-align: center;
}

.birth-cell .field-value {
  min-width: 90mm;
  text-align: left;
}

.birth-date-field {
  align-items: center !important;
  line-height: 1;
  white-space: nowrap;
}

.birth-date-field .date-input {
  padding: 0;
}

.birth-date-field .date-label,
.birth-date-field .birth-gap {
  line-height: 1;
  vertical-align: baseline;
}

.birth-date-field .date-year {
  min-width: 36.5mm;
}

.birth-date-field .date-month,
.birth-date-field .date-day {
  min-width: 11.7mm;
}

.birth-date-field .date-age,
.birth-gap {
  display: inline-block;
  min-width: 7.8mm;
}

.gender-cell {
  position: relative;
  width: calc(var(--side-cell-width) - var(--line-width));
}

.gender-hidden .gender-cell,
.gender-hidden .resume-note {
  display: none !important;
}

.left-grid .address-cell {
  width: var(--address-main-width);
  height: var(--cell-address-height);
  overflow: hidden;
  vertical-align: top;
}

.left-grid .phone-cell {
  width: var(--address-phone-width);
  overflow: hidden;
  vertical-align: top;
}

.left-grid .phone-cell .cell-label {
  display: flex;
  align-items: flex-start;
  height: 3mm;
  padding: 0.8mm 2mm 0;
  font-size: var(--font-label);
}

.left-grid .address-cell .field-value {
  height: calc(var(--cell-address-main-height) - 3mm);
  max-height: calc(var(--cell-address-main-height) - 3mm);
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.15;
}

.address-kana-line,
.address-postal-line {
  display: grid;
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.address-kana-line {
  grid-template-columns: var(--address-label-width) minmax(0, 1fr);
  height: var(--cell-kana-height);
  border-bottom: var(--line-width) solid var(--line);
}

.address-postal-line {
  grid-template-columns: auto var(--address-postal-width) 1fr;
  height: var(--cell-address-postal-height);
}

.address-kana-line .cell-label,
.address-postal-line .cell-label {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: var(--font-label);
  padding: 0 1.5mm 0 2mm;
  white-space: nowrap;
}

.left-grid .address-kana-field.field-value,
.left-grid .postal-field.field-value {
  display: flex;
  align-items: center;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: 0 2mm 0 0;
}

.left-grid .address-kana-field.field-value {
  grid-column: 2;
}

.left-grid .address-main-field.field-value {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--cell-address-body-height);
  max-height: var(--cell-address-body-height);
  min-height: 0;
  padding: 0 2mm;
  line-height: 1.15;
  text-align: left;
}

.contact-postal-line .inline-note {
  float: none;
  justify-self: end;
  padding-right: 2mm;
  font-size: var(--font-note);
  white-space: nowrap;
}

.left-grid .phone-cell .field-value {
  display: grid;
  align-content: center;
  justify-content: center;
  justify-items: center;
  height: calc(var(--cell-address-height) - 3mm);
  max-height: calc(var(--cell-address-height) - 3mm);
  min-height: 0;
  padding: 0 4px;
  font-size: calc(var(--font-label) * var(--phone-font-scale, 1));
  line-height: 1.25;
  text-align: center;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.phone-main-field {
  min-height: 0;
}

.inline-note {
  float: right;
  padding-right: 2mm;
  font-size: var(--font-note);
}

.year-col {
  width: var(--entry-year-width);
}

.month-col {
  width: var(--entry-month-width);
}

.entry-title {
  width: var(--entry-main-width);
  text-align: center;
  white-space: nowrap;
}

.entry-title-main {
  letter-spacing: 0;
}

.entry-title-note {
  display: inline-block;
  margin-left: 0.8mm;
  font-size: calc(var(--font-standard) * 0.92);
  letter-spacing: 0;
}

.entry-title.compact {
  letter-spacing: 0;
}

.history-row,
.license-row {
  height: var(--cell-row-height);
}

.history-row td,
.license-row td {
  height: var(--cell-row-height);
  position: relative;
}

.history-row td:nth-child(3) {
  position: relative;
}

.history-delete-button,
.history-insert-button {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 5mm;
  height: 5mm;
  border: var(--thin-line-width) solid #b91c1c;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #b91c1c;
  font-family: var(--resume-font);
  font-size: calc(var(--font-label) * 0.9);
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.history-delete-button {
  top: 50%;
  right: -5mm;
  transform: translateY(-50%);
}

.history-insert-button {
  right: 0;
  bottom: 0;
  transform: translateY(50%);
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.history-row:hover .history-delete-button,
.history-row:focus-within .history-delete-button,
.history-row:hover .history-insert-button,
.history-row:focus-within .history-insert-button {
  opacity: 1;
  pointer-events: auto;
}

.history-delete-button:hover,
.history-delete-button:focus {
  background: #fee2e2;
  outline: none;
}

.history-insert-button:hover,
.history-insert-button:focus {
  background: #dbeafe;
  outline: none;
}

.entry-heading-row {
  height: var(--cell-heading-height);
}

.entry-heading-row th {
  height: var(--cell-heading-height);
  vertical-align: middle;
  line-height: 1.2;
}

.license-row .field-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: center;
  height: auto;
  min-height: 0;
  padding: 0.6mm 1.5mm 0.4mm;
}

.license-row td:first-child .field-value,
.license-row td:nth-child(2) .field-value {
  justify-content: center;
  text-align: center;
}

.history-row .field-value {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-content: stretch;
  justify-items: start;
  height: auto;
  min-height: 0;
  padding: calc(0.6mm + var(--history-row-optical-offset)) 4px calc(0.4mm - var(--history-row-optical-offset));
  text-align: left;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.history-row td:first-child .field-value,
.history-row td:nth-child(2) .field-value {
  justify-items: center;
  text-align: center;
}

.row-field {
  font-size: calc(var(--font-label) * var(--row-font-scale, 1));
  line-height: 1.25;
}

.year-col .row-field,
.month-col .row-field,
.block-grid td:first-child .row-field,
.block-grid td:nth-child(2) .row-field {
  text-align: center;
}

.entry-marker {
  justify-content: center;
  justify-items: center;
  text-align: center;
  font-weight: 700;
}

.history-row .entry-marker {
  justify-content: center;
  justify-items: center;
  text-align: center;
}

.entry-end {
  justify-content: end;
  justify-items: end;
  text-align: right;
}

.history-row .entry-end {
  justify-content: end;
  justify-items: end;
  text-align: right;
}

.text-heading-row {
  height: var(--cell-text-heading-height);
}

.text-heading-cell {
  position: relative;
  height: var(--cell-text-heading-height);
  border: var(--line-width) solid var(--line) !important;
  padding: 0;
  overflow: hidden;
}

.right-section-gap-row {
  height: var(--right-section-gap);
}

.text-heading-label {
  position: absolute;
  top: 0;
  right: 2mm;
  bottom: 0;
  left: 2mm;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  font-size: var(--font-label);
  font-weight: 400;
  line-height: 1.15;
}

.text-heading-title {
  flex: 0 0 auto;
}

.text-heading-note {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0.4mm;
  overflow: hidden;
  text-overflow: clip;
  font-size: var(--font-heading-note);
}

.motivation-body-row {
  height: var(--motivation-grid-row-height);
}

.request-body-row {
  height: var(--request-grid-row-height);
}

.motivation-cell {
  height: var(--box-motivation-height);
}

.request-cell {
  height: var(--request-grid-row-height);
}

.motivation-table .text-heading-cell,
.motivation-table .motivation-cell,
.request-table .text-heading-cell,
.request-table .request-cell {
  border-color: var(--line) !important;
  border-style: solid !important;
  border-width: var(--line-width) !important;
}

.motivation-cell.field-value {
  min-height: calc(var(--box-motivation-height) - 1mm);
  padding: 1.5mm 2mm 1mm;
}

.text-box .text-heading-cell {
  height: var(--cell-text-heading-height);
  padding: 0.6mm 2mm 0;
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
  font-size: var(--font-label);
  line-height: 1;
}

.text-box {
  height: var(--box-total-height);
}

.motivation-table {
  --box-height: var(--box-motivation-height);
  --box-total-height: var(--box-motivation-total-height);
}

.request-table {
  --box-height: var(--box-request-height);
  --box-total-height: var(--box-request-total-height);
}

.text-box .field-value {
  max-height: var(--box-height);
  min-height: 0;
  overflow: hidden;
  padding-top: 1.5mm;
}

.history-right .request-line.field-value {
  min-height: 0;
  height: var(--request-grid-row-height);
  padding: 0.6mm 2mm 0.4mm;
  vertical-align: middle;
  text-align: left;
}

.resume-note {
  position: absolute;
  top: var(--resume-note-top);
  left: var(--resume-note-left);
  margin: 0;
  margin-top: 0.5em;
  font-size: var(--font-small);
  line-height: 1;
}

@media (max-width: 980px) {
  .app-header {
    align-items: center;
    flex-direction: row;
  }
}

@media screen and (max-width: 760px) {
  .app-header {
    position: relative;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    height: 52px;
    width: calc(100% - 24px);
    margin: 12px auto 0;
    padding: 0;
  }

  .app-title {
    padding-right: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-actions {
    position: absolute;
    top: 50%;
    right: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    transform: translateY(-50%);
  }

  .app-actions > .button:not(#printA3Button):not(.menu-button) {
    display: none;
  }

  #printA3Button,
  .menu-button {
    display: inline-flex;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }

  #printA3Button span {
    display: none;
  }

  #printA3Button .button-icon {
    width: 18px;
    height: 18px;
  }

  .menu-button {
    flex-direction: column;
    gap: 4px;
  }

  .header-menu:not([hidden]) {
    display: flex;
    flex-direction: column;
  }

  .app-layout,
  .resume-standalone {
    padding: 12px;
    overflow-x: hidden;
  }

  .resume-document {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    overflow-x: visible;
    padding-bottom: 12px;
  }

  .resume-source-note {
    width: 100%;
  }

  .resume-sheet {
    width: 100%;
    max-width: calc(100vw - 24px);
    border: 0;
    background: transparent;
  }

  .resume-columns {
    grid-template-columns: 1fr;
    row-gap: 16px;
    column-gap: 0;
  }

  .resume-page {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 210 / 297;
    border: .0625rem solid;
    border-color: #d1d9e0;
    border-radius: 10px;
    background: var(--paper);
  }
}

@page {
  size: A3 landscape;
  margin: 0;
}

@page a4resume {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html,
  body {
    width: var(--sheet-width);
    height: var(--sheet-height);
    min-height: 0;
    overflow: hidden;
    background: #fff;
    background-image: none;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-header {
    display: none !important;
  }

  .resume-source-note {
    display: none !important;
  }

  .app-layout,
  .resume-standalone {
    display: block;
    padding: 0;
    overflow: visible;
  }

  .resume-document {
    display: block;
  }

  .resume-sheet {
    width: var(--sheet-width);
    min-height: 0;
    height: var(--sheet-height);
    margin: 0;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .resume-columns {
    grid-template-columns: var(--a4-page-width) var(--a4-page-width);
    gap: 0;
  }

  .resume-page {
    width: var(--a4-page-width);
    height: var(--a4-page-height);
    aspect-ratio: auto;
    box-shadow: none;
    overflow: hidden;
  }

  .resume-column {
    transform: none !important;
  }

  .editable-resume [contenteditable="true"] {
    outline: none;
  }

  .default-value {
    color: var(--ink) !important;
  }

  .history-delete-button,
  .history-insert-button {
    display: none !important;
  }

  html.print-a4-pages,
  html.print-a4-pages body,
  body.print-a4-pages {
    page: a4resume;
    width: 210mm;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.print-a4-pages .resume-sheet {
    width: 210mm;
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
    page: a4resume;
  }

  body.print-a4-pages .reference-mark {
    display: none;
  }

  body.print-a4-pages .resume-columns {
    display: block;
  }

  body.print-a4-pages .resume-page {
    width: 100%;
    height: 297mm;
    page: a4resume;
    break-after: page;
    page-break-after: always;
  }

  body.print-a4-pages .resume-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.print-a4-pages .history-left {
    --entry-height: auto;
  }

  body.print-a4-pages .history-right {
    --entry-height: auto;
  }

  body.print-a4-pages .license-table {
    --entry-height: auto;
  }

}
