:root {
  color-scheme: light;
  --pine: #123d2e;
  --ink: #203a33;
  --muted: #4c6b61;
  --field: #b8dacf49;
  --focus: #3d846a;
  --paper-width: 1060px;
  --field-height: 38px;
  font: 14px/1.55 "Noto Sans SC","Source Han Sans SC","Microsoft YaHei UI",sans-serif;
  color: var(--ink);
  background: #d9eee4;
}

*,*::before,*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 91% 6%,#9acfaabd,transparent 37%),
    radial-gradient(ellipse at 16% 11%,#9dd5caa6,transparent 49%),
    radial-gradient(ellipse at 100% 78%,#b5ddd2a6,transparent 53%),
    linear-gradient(142deg,#c6e4dd,#ecf6ed 47%,#c8e8db);
}
button,input,textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1,h2,p { margin: 0; }

.glass {
  border: 1px solid #ffffffe0;
  background: linear-gradient(134deg,#fcfffbd9,#e9f6eed4);
  box-shadow: 0 9px 27px #47756925,inset 0 1px 0 #fff9;
  backdrop-filter: blur(21px) saturate(113%);
}

.toolbar {
  position: sticky;
  z-index: 3;
  top: 14px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: clamp(10px,2vw,19px);
  width: min(var(--paper-width),calc(100% - 34px));
  min-height: 62px;
  margin: 20px auto 0;
  padding: 9px 15px 9px 23px;
  border-radius: 19px;
  background: linear-gradient(120deg,#f3fbf4f2,#e3f4eafd);
  backdrop-filter: none;
  box-shadow: 0 12px 32px #386d5930,inset 0 1px 0 #fffc;
}
.toolbar h1 { display: flex; align-items: center; gap: 11px; color: var(--pine); font-size: 20px; line-height: 1.3; }
.document-icon {
  width: 16px;
  height: 21px;
  border: 1.5px solid var(--pine);
  border-radius: 4px;
  background: linear-gradient(145deg,#d3e8d8,#a8ceba);
  box-shadow: 0 0 0 6px #e3eee4a8;
}
.authorization { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.authorization span { white-space: nowrap; }
.authorization input {
  width: min(24vw,234px);
  min-width: 0;
  min-height: 37px;
  padding: 6px 10px;
  border: 1px solid #eafff176;
  border-radius: 10px;
  background: #f9fff9b0;
  font-weight: 400;
}
.button { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 630; }
.primary { min-height: 39px; border-radius: 99px; background: #164935; color: #fff; padding-inline: 19px; white-space: nowrap; }
.primary:hover { background: #0f392a; }
.text-button { color: #275f45; }
.text-button:hover:not(:disabled) { background: #e4f0e8; }

main { width: min(100% - 34px,var(--paper-width)); margin: 18px auto 0; padding-bottom: 34px; }
.instructions {
  margin: 0 0 clamp(20px,3vw,34px);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.resume {
  border: 1px solid #ffffffe8;
  border-radius: clamp(17px,2vw,25px);
  padding: clamp(22px,4vw,47px);
  background:
    radial-gradient(ellipse 42% 32% at 100% 3%,#d2efdd70,transparent),
    linear-gradient(139deg,#fbfefbcd,#f1f9f8bf 57%,#ecf8f2bc);
  box-shadow: 0 21px 52px #4b8e7430,inset 0 1px 0 #fff;
}
.identity { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: clamp(16px,3vw,36px); }
.resume input,.resume textarea { min-width: 0; width: 100%; }
.paper-input {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: var(--field-height);
  padding: 6px 10px;
  background: var(--field);
  text-align: start;
}
.paper-input::placeholder,.authorization input::placeholder { color: #506f64; opacity: 1; }
.paper-input:hover { border-color: #85b5a584; }
.paper-input:focus { background: #f3fcf7d9; border-color: #6da48e; outline: none; }
.personal-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(15px,3vw,38px); row-gap: 12px; }
.inline-field { display: flex; align-items: center; gap: 7px; min-width: 0; }
.inline-field > span { flex: none; white-space: nowrap; }
.personal-fields .identity-label { display: flex; justify-content: space-between; flex: 0 0 5em; }
.personal-fields .picker { flex: 1 1 0; }
.picker {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: var(--field-height);
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--field);
  color: #204735;
  line-height: 1.35;
  text-align: start;
}
.picker > span { overflow-wrap: anywhere; }
.picker::after {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid #48725d;
  border-bottom: 1.5px solid #48725d;
  transform: rotate(45deg);
}
.picker:hover,.picker[aria-expanded="true"] { background: #d4ebe0; border-color: #9bc2b0; }
.picker.empty { color: #526e5d; }
.photo { width: clamp(66px,8vw,114px); position: relative; }
.photo-button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 3/4;
  padding: 4px;
  border: 1px dashed #74a28d;
  border-radius: 13px;
  background: #edf9f24d;
  color: #39644f;
  font-size: 12px;
  overflow: hidden;
}
.photo-button:hover { background: #e4f2e8; }
.photo-button.has-image { display: block; padding: 0; }
.photo-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.camera-icon { display: grid; place-items: center; width: 25px; height: 19px; border: 1.5px solid currentColor; border-radius: 4px; position: relative; }
.camera-icon::before { content: ""; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; }
.camera-icon::after { content: ""; position: absolute; top: -4px; width: 9px; height: 3px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0; }
.photo-remove { display: block; margin: 3px auto 0; padding: 1px 6px; border: 0; background: none; color: var(--muted); font-size: 11px; }

#sections { margin-top: clamp(23px,3.4vw,38px); }
.resume-section { padding-top: clamp(13px,2vw,22px); border-top: 1px solid #7fae9b57; }
.resume-section + .resume-section { margin-top: clamp(18px,2.8vw,28px); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.section-heading h2 { display: flex; align-items: center; gap: 9px; color: var(--pine); font-size: clamp(16px,1.8vw,21px); line-height: 1.35; white-space: nowrap; }
.section-heading h2::before { content: ""; width: 4px; height: 1em; border-radius: 3px; background: linear-gradient(#78af92,#307353); }
.section-add { min-height: 32px; white-space: nowrap; padding: 3px 6px; font-size: 12px; }
.entries { display: grid; gap: 16px; }
.entry { position: relative; padding: 0 34px 0 0; border-radius: 8px; }
.entry:focus-within .entry-menu,.entry:hover .entry-menu { background: #e1f1e8; }
.entry.drop-before { box-shadow: 0 -2px #4f9272; }
.entry.drop-after { box-shadow: 0 2px #4f9272; }
.entry-row { display: grid; grid-template-columns: minmax(215px,1fr) minmax(0,1.15fr) minmax(0,.95fr); gap: 9px; align-items: stretch; }
.entry-row.education { grid-template-columns: minmax(215px,1.2fr) minmax(0,1.15fr) minmax(0,.95fr) minmax(75px,.65fr); }
.entry-row .picker { width: 100%; }
.date-range { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 2px; align-items: center; border-radius: 8px; padding: 0 4px; background: var(--field); color: #32604b; }
.date-range .picker { background: transparent; padding-inline: 6px; }
.date-range .picker:hover,.date-range .picker[aria-expanded="true"] { background: #d1e9df; }
.entry-row.awards .date-range { display: block; }
.entry-note { margin-top: 9px; }
.entry-note:first-child { margin-top: 0; }
.entry-note textarea { display: block; min-height: var(--field-height); overflow: hidden; resize: none; }
@supports (field-sizing: content) {
  .entry-note textarea { field-sizing: content; }
}
.education-extra { display: grid; gap: 8px; margin-top: 9px; }
.education-extra .inline-field > span { flex: 0 0 8em; }
.education-extra .picker { flex: 1 1 0; }
.entry-tools {
  position: absolute;
  top: 3px;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
}
.entry-menu,.drag-handle { padding: 4px 6px; border: 0; background: transparent; color: #396d59; line-height: 1.4; border-radius: 7px; font-size: 16px; }
.drag-handle { position: absolute; top: 6px; left: -23px; cursor: grab; padding: 2px 4px; opacity: .73; }
.drag-handle:active { cursor: grabbing; }
.entry-actions {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: flex;
  gap: 2px;
  white-space: nowrap;
  border-radius: 11px;
  padding: 4px;
}
.entry-actions .button { min-height: 34px; padding-inline: 8px; }
.text-button.remove { color: #8d3e33; }
.page-status { max-width: var(--paper-width); margin: 9px auto 0; color: #3f6553; font-size: 12px; }

dialog { color: var(--ink); padding: 0; }
dialog::backdrop { background: #173a2c2b; }
.picker-dialog {
  position: fixed;
  inset: auto;
  top: var(--picker-top,40px);
  left: var(--picker-left,16px);
  width: min(360px,calc(100vw - 24px));
  max-height: calc(100dvh - 16px);
  margin: 0;
  border-radius: 17px;
  padding: 10px 14px 8px;
  overflow: auto;
}
.picker-dialog.narrow { width: min(265px,calc(100vw - 24px)); }
.picker-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.picker-header h2 { color: var(--pine); font-size: 15px; text-align: center; }
.picker-header .button:first-child { justify-self: start; }
.picker-header .button:last-child { justify-self: end; }
.picker-header .confirm { font-weight: 720; }
.wheel-group { position: relative; isolation: isolate; display: flex; gap: 6px; margin: 5px 0 2px; }
.wheel-group::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 50% 0 auto;
  height: var(--wheel-row,40px);
  border-radius: 9px;
  background: #cdebd78c;
  transform: translateY(-50%);
  pointer-events: none;
}
.wheel {
  --wheel-row: 40px;
  flex: 1;
  min-width: 0;
  max-height: calc(5 * var(--wheel-row));
  overflow-y: auto;
  padding-block: calc(2 * var(--wheel-row));
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  mask-image: linear-gradient(transparent,#000 25%,#000 75%,transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel-option {
  display: grid;
  place-items: center;
  height: var(--wheel-row);
  padding: 0 5px;
  scroll-snap-align: center;
  color: #536b5f;
  font-size: 14px;
  line-height: 1.22;
  text-align: center;
  cursor: pointer;
}
.wheel-option[aria-selected="true"] { color: var(--pine); font-weight: 710; }
.sheet-handle { display: none; }
.picker-message { padding: 5px 7px 0; color: #8d3e33; font-size: 12px; text-align: center; }
.picker-clear { display: block; margin: 2px auto 0; font-size: 12px; }
.review-dialog { width: min(440px,calc(100vw - 30px)); border-radius: 21px; padding: 23px; }
.review-dialog h2 { font-size: 19px; color: var(--pine); }
.review-dialog p { margin-top: 8px; overflow-wrap: anywhere; }
.review-note { color: var(--muted); font-size: 13px; }
.review-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.review-dialog #review-error { padding-inline: 0; text-align: left; }

@media (max-width: 790px) {
  .entry-row,.entry-row.education { grid-template-columns: 1fr 1fr; }
  .entry-row.education { grid-template-columns: 1fr 1fr auto; }
  .entry-row .date-range { grid-column: 1/-1; }
}

@media (min-width: 791px) {
  .entry-row > .paper-input { text-align: center; }
  .entry-row > .paper-input:last-child { text-align: end; }
  .entry-row.education > .picker { justify-self: end; }
}

@media (max-width: 600px) {
  :root { --field-height: 40px; font-size: 16px; }
  .toolbar { top: 6px; margin-top: 8px; width: calc(100% - 16px); grid-template-columns: minmax(0,1fr) auto; row-gap: 8px; padding: 8px 11px; border-radius: 15px; }
  .toolbar h1 { font-size: 16px; gap: 9px; }
  .toolbar .document-icon { width: 13px; height: 17px; box-shadow: 0 0 0 3px #e3eee4a8; }
  .toolbar .submit { grid-row: 1; grid-column: 2; }
  .toolbar .authorization { grid-column: 1/-1; }
  .authorization input { width: 100%; min-height: 38px; font-size: 16px; }
  main { width: calc(100% - 16px); margin-top: 9px; }
  .instructions { margin-bottom: 16px; }
  .resume { padding: 17px 13px 24px; border-radius: 16px; }
  .identity { gap: 9px; }
  .personal-fields { grid-template-columns: minmax(0,1fr); row-gap: 8px; }
  .photo-button { font-size: 11px; }
  .section-heading { gap: 7px; margin-bottom: 10px; }
  .entry { padding-right: 30px; }
  .entry-menu { min-width: 27px; min-height: 34px; padding-inline: 3px; }
  .drag-handle { display: none; }
  .entry-row,.entry-row.education { gap: 7px; }
  .entry-row.education { grid-template-columns: minmax(0,1.12fr) minmax(0,1fr) minmax(65px,.8fr); }
  .entry-row .date-range .picker { padding-inline: 6px; }
  .education-extra .inline-field > span { font-size: 13px; flex-basis: 7.7em; }
  .picker-dialog,.picker-dialog.narrow {
    inset: auto 0 0;
    width: min(100%,560px);
    max-width: none;
    margin: 0 auto;
    border-radius: 21px 21px 0 0;
    padding: 8px 15px calc(12px + env(safe-area-inset-bottom));
  }
  .sheet-handle { display: block; width: 32px; height: 4px; margin: 0 auto 3px; border-radius: 9px; background: #baccc0; }
  .picker-header .button { min-height: 42px; }
  .picker-header h2,.wheel-option { font-size: 16px; }
}

@media (max-width: 350px) {
  .entry-row.education { grid-template-columns: minmax(0,1fr) minmax(75px,.8fr); }
  .entry-row.education .paper-input:first-of-type { grid-column: 1/-1; }
}
