:root {
  --resume-chrome: #0b111b;
  --resume-chrome-2: #101824;
  --resume-surface: #131c29;
  --resume-surface-hover: #182332;
  --resume-border: rgba(255, 255, 255, 0.11);
  --resume-border-strong: rgba(255, 255, 255, 0.18);
  --resume-muted: #94a3b8;
  --resume-paper-width: 794px;
  --resume-paper-height: 1123px;
}

html,
body.resume-builder-page {
  height: 100%;
}

body.resume-builder-page {
  overflow: hidden;
  background: #080b12;
}

.resume-builder-page .page-bg {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(6, 182, 212, 0.06), transparent 30%),
    #080b12;
}

.resume-builder-page .noise {
  opacity: 0.035;
}

.resume-builder-page .topbar {
  position: relative;
  z-index: 80;
}

.resume-builder-page button,
.resume-builder-page input,
.resume-builder-page select,
.resume-builder-page textarea {
  letter-spacing: 0;
}

.resume-app {
  position: relative;
  height: calc(100vh - 76px);
  min-height: 620px;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 34px;
  color: var(--text);
  background: rgba(7, 11, 18, 0.78);
}

.resume-app[aria-busy="true"] {
  visibility: hidden;
}

.resume-commandbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--resume-border);
  background: rgba(13, 20, 31, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.resume-command-left,
.resume-command-actions,
.resume-canvas-tools,
.resume-statusbar > div,
.resume-save-status {
  display: flex;
  align-items: center;
}

.resume-command-left,
.resume-command-actions {
  min-width: 0;
  gap: 8px;
}

.resume-command-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.resume-product-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #c4b5fd;
}

.resume-product-name {
  white-space: nowrap;
  font-size: 15px;
}

.command-separator,
.status-separator {
  width: 1px;
  height: 24px;
  display: block;
  margin: 0 3px;
  background: var(--resume-border-strong);
}

.resume-title-input,
.resume-document-select {
  height: 36px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: 0;
  color: var(--text);
  background: transparent;
  transition: 0.18s ease;
}

.resume-title-input {
  width: 150px;
  padding: 0 8px;
  font-weight: 800;
}

.resume-title-input:hover,
.resume-title-input:focus,
.resume-document-select:hover,
.resume-document-select:focus {
  border-color: var(--resume-border-strong);
  background: rgba(255, 255, 255, 0.055);
}

.resume-document-select {
  width: 136px;
  padding: 0 26px 0 9px;
  color: #cbd5e1;
  font-size: 12px;
}

.resume-document-select option,
.resume-builder-page select option {
  color: #0f172a;
  background: #fff;
}

.resume-save-status {
  gap: 7px;
  white-space: nowrap;
  color: var(--resume-muted);
  font-size: 12px;
}

.save-dot,
.online-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #22c55e;
}

.resume-save-status.is-saving .save-dot {
  background: #f59e0b;
  animation: resume-pulse 1s infinite;
}

.resume-save-status.is-error .save-dot {
  background: #fb7185;
}

@keyframes resume-pulse {
  50% { opacity: 0.35; }
}

.icon-button,
.command-button,
.segmented-control button,
.resume-floating-zoom button {
  height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: 0.16s ease;
}

.icon-button {
  width: 36px;
  padding: 0;
  flex: 0 0 auto;
}

.icon-button.compact {
  width: 30px;
  height: 30px;
}

.icon-button:hover,
.command-button:hover,
.segmented-control button:hover,
.resume-floating-zoom button:hover {
  color: #fff;
  border-color: var(--resume-border);
  background: rgba(255, 255, 255, 0.07);
}

.icon-button:focus-visible,
.command-button:focus-visible,
.segmented-control button:focus-visible,
.resume-panel-tabs button:focus-visible,
.resume-mobile-tabs button:focus-visible,
.resume-mobile-rail button:focus-visible {
  outline: 2px solid #8b7cf8;
  outline-offset: 2px;
}

.icon-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.command-button {
  padding: 0 13px;
  border-color: var(--resume-border);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.035);
}

.command-button.primary {
  color: #fff;
  border-color: rgba(139, 124, 248, 0.7);
  background: linear-gradient(135deg, #6d5efc, #786cf8);
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.22);
}

.command-button.primary:hover {
  background: linear-gradient(135deg, #7566ff, #8a7cff);
}

.segmented-control,
.resume-zoom {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--resume-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.segmented-control button {
  width: 38px;
  height: 30px;
}

.segmented-control button.active {
  color: #c4b5fd;
  border-color: #6d5efc;
  background: rgba(109, 94, 252, 0.15);
}

.resume-zoom {
  gap: 3px;
}

.resume-zoom span {
  width: 44px;
  text-align: center;
  color: #cbd5e1;
  font-size: 11px;
}

.resume-file-menu {
  position: absolute;
  top: 50px;
  right: 18px;
  z-index: 90;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--resume-border);
  border-radius: 8px;
  background: rgba(15, 23, 35, 0.98);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

.resume-file-menu button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  color: #cbd5e1;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.resume-file-menu button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.resume-file-menu button.danger {
  color: #fda4af;
}

.resume-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(310px, 25vw) minmax(480px, 1fr) minmax(310px, 24vw);
  overflow: hidden;
}

.resume-sidebar,
.resume-inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  background: rgba(10, 16, 25, 0.96);
}

.resume-sidebar {
  border-right: 1px solid var(--resume-border);
}

.resume-inspector {
  border-left: 1px solid var(--resume-border);
}

.resume-panel-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--resume-border);
  background: rgba(10, 16, 25, 0.96);
}

.resume-panel-tabs button {
  position: relative;
  border: 0;
  color: var(--resume-muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.resume-panel-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  opacity: 0;
  background: #7c6cf5;
}

.resume-panel-tabs button.active {
  color: #a99cff;
}

.resume-panel-tabs button.active::after {
  opacity: 1;
}

.resume-panel-body {
  padding: 14px;
}

.panel-heading-row,
.inspector-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading-row {
  margin-bottom: 11px;
}

.panel-kicker,
.inspector-section h2 {
  color: #e5e7eb;
  font-size: 12px;
  font-weight: 900;
}

.panel-heading-row p,
.inspector-heading span {
  margin: 3px 0 0;
  color: #77869b;
  font-size: 10px;
  line-height: 1.45;
}

.resume-section-list,
.resume-order-list {
  display: grid;
  gap: 6px;
}

.section-nav-row,
.order-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 30px 24px;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--resume-border);
  border-radius: 6px;
  color: #b9c4d4;
  background: rgba(255, 255, 255, 0.032);
  transition: 0.15s ease;
}

.section-nav-row {
  padding: 0 6px;
}

.section-nav-row:hover,
.order-row:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.section-nav-row.is-selected {
  color: #fff;
  border-color: #6d5efc;
  background: rgba(109, 94, 252, 0.13);
}

.section-drag,
.order-drag {
  display: grid;
  place-items: center;
  color: #64748b;
  cursor: grab;
}

.section-drag:active,
.order-drag:active {
  cursor: grabbing;
}

.section-select-button {
  min-width: 0;
  height: 36px;
  border: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.section-nav-row:not([draggable="true"]) .section-drag {
  opacity: 0.32;
  cursor: default;
}

.section-visibility,
.section-delete,
.entry-icon-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #8fa0b4;
  background: transparent;
  cursor: pointer;
}

.section-visibility:hover,
.section-delete:hover,
.entry-icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.section-visibility.is-hidden {
  color: #58677a;
}

.section-delete:hover,
.entry-icon-button.danger:hover {
  color: #fda4af;
}

.panel-add-button,
.entry-add-button {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px dashed rgba(139, 124, 248, 0.75);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9f91ff;
  background: rgba(109, 94, 252, 0.06);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.panel-add-button:hover,
.entry-add-button:hover {
  color: #fff;
  background: rgba(109, 94, 252, 0.13);
}

.resume-section-editor {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--resume-border);
}

.editor-title-row,
.entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-title-row {
  margin-bottom: 12px;
}

.editor-title-row h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.editor-title-row span {
  color: var(--resume-muted);
  font-size: 10px;
}

.resume-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resume-form-grid .span-2 {
  grid-column: 1 / -1;
}

.resume-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.resume-field > span {
  color: #8fa0b4;
  font-size: 10px;
  font-weight: 800;
}

.resume-field input,
.resume-field textarea,
.resume-field select,
.control-field select,
.custom-color-field {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--resume-border);
  border-radius: 6px;
  outline: 0;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.045);
  transition: 0.16s ease;
}

.resume-field input,
.resume-field select,
.control-field select {
  height: 36px;
  padding: 0 10px;
  font-size: 11px;
}

.resume-field textarea {
  min-height: 78px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.55;
  font-size: 11px;
}

.resume-field input:focus,
.resume-field textarea:focus,
.resume-field select:focus,
.control-field select:focus {
  border-color: #7c6cf5;
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.12);
  background: rgba(255, 255, 255, 0.065);
}

.resume-entry-list {
  display: grid;
  gap: 10px;
}

.resume-entry-editor {
  padding: 10px;
  border: 1px solid var(--resume-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.entry-heading {
  margin-bottom: 10px;
}

.entry-heading strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #dbe4f0;
  font-size: 11px;
}

.entry-actions {
  display: flex;
  gap: 3px;
}

.bullet-list-editor {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.bullet-editor-row {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 5px;
}

.bullet-editor-row textarea {
  min-height: 54px;
}

.photo-editor {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--resume-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}

.photo-editor-preview {
  width: 56px;
  height: 68px;
  border-radius: 5px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #8090a5;
  background: rgba(255, 255, 255, 0.06);
}

.photo-editor-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-editor-actions {
  display: grid;
  gap: 6px;
}

.photo-editor-actions button {
  min-height: 30px;
  border: 1px solid var(--resume-border);
  border-radius: 5px;
  padding: 0 9px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 10px;
}

.photo-editor-actions button:hover {
  color: #fff;
  border-color: rgba(139, 124, 248, 0.7);
}

.resume-canvas-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #090f18;
  background-size: 28px 28px;
}

.resume-canvas-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--resume-border);
  color: #7f8ea2;
  background: rgba(10, 16, 25, 0.94);
  font-size: 10px;
}

.resume-canvas-tools {
  gap: 3px;
}

.resume-canvas-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.resume-paper-stage {
  position: relative;
  margin: 18px auto 34px;
}

.resume-paper {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--resume-paper-width);
  min-height: var(--resume-paper-height);
  overflow: visible;
  transform: scale(0.8);
  transform-origin: top left;
  color: #14171d;
  background: #fff;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.42);
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: var(--document-font-size, 13px);
  line-height: var(--document-line-height, 1.5);
  --document-accent: #6d5efc;
  --document-margin: 16mm;
  --document-section-gap: 12px;
}

.resume-paper * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.resume-document {
  min-height: var(--resume-paper-height);
  padding: var(--document-margin);
}

.resume-document-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 2px solid #1f2937;
}

.resume-person-name {
  margin: 0;
  color: #111827;
  font-size: 31px;
  line-height: 1.08;
  font-weight: 950;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.resume-person-role {
  margin: 6px 0 10px;
  color: #303747;
  font-size: 15px;
  font-weight: 800;
}

.resume-contact-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 15px;
  color: #4b5563;
  font-size: 10px;
}

.resume-contact-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.resume-photo {
  width: 76px;
  height: 94px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5e7eb;
}

.resume-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.resume-photo-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(145deg, #e5e7eb, #cbd5e1);
}

.resume-sections {
  padding-top: 12px;
}

.resume-preview-section {
  position: relative;
  margin-top: var(--document-section-gap);
  break-inside: avoid;
  cursor: pointer;
}

.resume-preview-section:first-child {
  margin-top: 0;
}

.resume-preview-section.is-selected::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -5px;
  border: 2px dashed var(--document-accent);
  border-radius: 2px;
  pointer-events: none;
}

.resume-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}

.resume-section-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #4b5563;
}

.resume-plain-text {
  margin: 0;
  color: #374151;
  white-space: pre-wrap;
}

.resume-entry {
  padding: 7px 0;
  border-bottom: 1px solid #d9dde4;
  break-inside: avoid;
}

.resume-entry:last-child {
  border-bottom: 0;
}

.resume-entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: baseline;
}

.resume-entry-head strong {
  color: #171b23;
  font-size: 12px;
}

.resume-entry-head span {
  color: #252b36;
  font-size: 11px;
  font-weight: 800;
}

.resume-entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 5px;
  color: #5b6472;
  font-size: 9.5px;
}

.resume-bullets {
  margin: 4px 0 0;
  padding-left: 17px;
  color: #374151;
}

.resume-bullets li {
  margin: 2px 0;
}

.resume-skill-list,
.resume-certificate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: #374151;
}

.resume-skill-list span {
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #f8fafc;
}

.resume-empty-section {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 10px;
}

.template-modern .resume-section-heading {
  color: var(--document-accent);
}

.template-modern .resume-section-heading::after {
  background: color-mix(in srgb, var(--document-accent) 58%, #9ca3af);
}

.template-modern .resume-document-header {
  border-bottom-color: var(--document-accent);
}

.template-academic {
  font-family: "Songti SC", SimSun, serif;
}

.template-academic .resume-document {
  padding-right: calc(var(--document-margin) + 4mm);
  padding-left: calc(var(--document-margin) + 4mm);
}

.template-academic .resume-document-header {
  display: block;
  padding-bottom: 12px;
  text-align: center;
  border-bottom: 1px solid #111827;
}

.template-academic .resume-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 78px;
}

.template-academic .resume-contact-row {
  justify-content: center;
}

.template-academic .resume-person-name {
  letter-spacing: 0.08em;
}

.template-academic .resume-section-heading {
  justify-content: center;
  padding-bottom: 3px;
  border-bottom: 1px solid #111827;
  font-family: "Songti SC", SimSun, serif;
  font-size: 14px;
}

.template-academic .resume-section-heading::after {
  display: none;
}

.template-academic .resume-entry {
  border-bottom-style: dotted;
}

.template-creative {
  --creative-sidebar-width: 225px;
}

.template-creative .resume-document {
  min-height: var(--resume-paper-height);
  padding: 0;
  display: grid;
  grid-template-columns: var(--creative-sidebar-width) minmax(0, 1fr);
}

.creative-sidebar {
  min-height: var(--resume-paper-height);
  padding: var(--document-margin) 17px;
  color: #fff;
  background: var(--document-accent);
}

.creative-main {
  padding: var(--document-margin);
}

.creative-sidebar .resume-photo {
  width: 92px;
  height: 112px;
  margin: 0 auto 16px;
  border: 3px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}

.creative-sidebar .resume-person-name,
.creative-sidebar .resume-person-role,
.creative-sidebar .resume-contact-row,
.creative-sidebar .resume-section-heading,
.creative-sidebar .resume-plain-text,
.creative-sidebar .resume-skill-list,
.creative-sidebar .resume-certificate-list {
  color: #fff;
}

.creative-sidebar .resume-person-name,
.creative-sidebar .resume-person-role {
  text-align: center;
}

.creative-sidebar .resume-person-name {
  max-width: 100%;
  font-size: 25px;
  line-height: 1.12;
}

.creative-sidebar .resume-contact-row {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.creative-sidebar .resume-contact-row span {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  word-break: break-all;
}

.creative-sidebar .resume-preview-section {
  margin-top: 18px;
}

.creative-sidebar .resume-section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  font-size: 13px;
}

.creative-sidebar .resume-section-heading::after {
  display: none;
}

.creative-sidebar .resume-skill-list {
  display: grid;
  gap: 5px;
}

.creative-sidebar .resume-skill-list span {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.creative-main .resume-section-heading {
  color: var(--document-accent);
}

.creative-main .resume-section-heading::after {
  background: var(--document-accent);
}

.template-blueprint,
.template-oriental,
.template-verdant {
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

.template-blueprint {
  background-image: url("/assets/resume-bg-blueprint.webp");
}

.template-blueprint .resume-document {
  padding: var(--document-margin) calc(var(--document-margin) + 3mm);
}

.template-blueprint .resume-document-header {
  min-height: 96px;
  padding: 8px 14px 5px 110px;
  border: 1px solid color-mix(in srgb, var(--document-accent) 52%, #bfdbfe);
  border-bottom-width: 3px;
  background: rgba(255, 255, 255, 0.9);
}

.template-blueprint .resume-person-name,
.template-blueprint .resume-section-heading {
  color: color-mix(in srgb, var(--document-accent) 76%, #0f172a);
}

.template-blueprint .resume-section-heading {
  gap: 7px;
  padding: 4px 8px;
  border-left: 4px solid var(--document-accent);
  background: rgba(255, 255, 255, 0.82);
}

.template-blueprint .resume-section-heading::after {
  background: color-mix(in srgb, var(--document-accent) 38%, #cbd5e1);
}

.template-blueprint .resume-photo {
  width: 68px;
  height: 82px;
  border: 2px solid color-mix(in srgb, var(--document-accent) 55%, #fff);
  background: #fff;
}

.template-oriental {
  background-image: url("/assets/resume-bg-oriental.webp");
}

.template-oriental .resume-document {
  padding: var(--document-margin) calc(var(--document-margin) + 7mm);
}

.template-oriental .resume-document-header {
  padding: 8px 16px 10px;
  border: 0;
  border-left: 4px solid color-mix(in srgb, var(--document-accent) 74%, #b42318);
  background: rgba(255, 255, 255, 0.89);
}

.template-oriental .resume-person-name {
  font-family: "Songti SC", SimSun, serif;
  font-weight: 800;
}

.template-oriental .resume-section-heading {
  gap: 9px;
  padding-bottom: 4px;
  color: #292524;
  border-bottom: 1px solid #a8a29e;
  font-family: "Songti SC", SimSun, serif;
}

.template-oriental .resume-section-heading::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: color-mix(in srgb, var(--document-accent) 68%, #c2410c);
}

.template-oriental .resume-section-heading::after {
  display: none;
}

.template-oriental .resume-entry {
  border-bottom-color: rgba(87, 83, 78, 0.32);
}

.template-oriental .resume-photo {
  border: 1px solid #78716c;
  filter: saturate(0.72);
}

.template-verdant {
  background-image: url("/assets/resume-bg-verdant.webp");
}

.template-verdant .resume-document {
  padding: var(--document-margin) calc(var(--document-margin) + 7mm);
}

.template-verdant .resume-document-header {
  padding: 8px 16px 10px;
  border: 1px solid rgba(22, 101, 52, 0.25);
  border-bottom: 3px solid color-mix(in srgb, var(--document-accent) 62%, #166534);
  background: rgba(255, 255, 255, 0.9);
}

.template-verdant .resume-person-name {
  color: color-mix(in srgb, var(--document-accent) 48%, #14532d);
}

.template-verdant .resume-photo {
  border: 3px solid rgba(22, 101, 52, 0.3);
  border-radius: 50%;
  background: #fff;
}

.template-verdant .resume-section-heading {
  color: color-mix(in srgb, var(--document-accent) 44%, #166534);
}

.template-verdant .resume-section-heading::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--document-accent) 55%, #166534), transparent);
}

.template-verdant .resume-skill-list span {
  border-color: rgba(22, 101, 52, 0.26);
  background: rgba(240, 253, 244, 0.82);
}

.template-executive .resume-document {
  padding: 0 var(--document-margin) var(--document-margin);
}

.template-executive .resume-document-header {
  margin-right: calc(0px - var(--document-margin));
  margin-left: calc(0px - var(--document-margin));
  padding: 24px var(--document-margin) 18px;
  border: 0;
  border-bottom: 7px solid color-mix(in srgb, var(--document-accent) 42%, #c59b45);
  color: #fff;
  background: #111827;
}

.template-executive .resume-person-name,
.template-executive .resume-person-role,
.template-executive .resume-contact-row {
  color: #fff;
}

.template-executive .resume-person-role {
  color: #d1d5db;
}

.template-executive .resume-photo {
  border: 2px solid color-mix(in srgb, var(--document-accent) 42%, #d4af63);
  background: #fff;
}

.template-executive .resume-sections {
  padding-top: 14px;
}

.template-executive .resume-section-heading {
  color: #111827;
  border-left: 5px solid color-mix(in srgb, var(--document-accent) 42%, #c59b45);
  padding-left: 9px;
}

.template-executive .resume-section-heading::after {
  background: color-mix(in srgb, var(--document-accent) 34%, #c59b45);
}

.template-executive .resume-entry {
  padding: 5px 0;
}

.template-consulting {
  background: linear-gradient(90deg, #12304a 0 13px, #fff 13px);
}

.template-consulting .resume-document {
  padding: var(--document-margin) var(--document-margin) var(--document-margin) calc(var(--document-margin) + 5mm);
}

.template-consulting .resume-document-header {
  padding: 0 0 12px;
  border-bottom: 3px solid color-mix(in srgb, var(--document-accent) 48%, #0f766e);
}

.template-consulting .resume-person-name {
  color: #12304a;
}

.template-consulting .resume-person-role {
  color: color-mix(in srgb, var(--document-accent) 48%, #0f766e);
}

.template-consulting .resume-sections {
  counter-reset: consulting-section;
}

.template-consulting .resume-preview-section {
  counter-increment: consulting-section;
}

.template-consulting .resume-section-heading::before {
  content: counter(consulting-section, decimal-leading-zero);
  width: 27px;
  height: 22px;
  display: grid;
  flex: 0 0 27px;
  place-items: center;
  color: #fff;
  background: #12304a;
  font-size: 9px;
}

.template-consulting .resume-section-heading {
  color: #12304a;
}

.template-consulting .resume-section-heading::after {
  background: color-mix(in srgb, var(--document-accent) 44%, #0f766e);
}

.template-consulting .resume-entry {
  padding: 5px 0;
}

.template-consulting .resume-skill-list span {
  border: 0;
  border-bottom: 2px solid color-mix(in srgb, var(--document-accent) 48%, #0f766e);
  background: #f8fafc;
}

.template-government {
  background: #fffdfa;
}

.template-government .resume-document {
  padding: 14mm calc(var(--document-margin) + 4mm);
}

.template-government .resume-document-header {
  display: block;
  padding: 15px 76px 12px;
  text-align: center;
  border-top: 5px solid #7f1d1d;
  border-bottom: 3px double #7f1d1d;
}

.template-government .resume-person-name,
.template-government .resume-section-heading {
  color: #7f1d1d;
  font-family: "Songti SC", SimSun, serif;
}

.template-government .resume-person-role {
  color: #57534e;
}

.template-government .resume-contact-row {
  justify-content: center;
}

.template-government .resume-photo {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 62px;
  height: 76px;
  border: 1px solid #7f1d1d;
  border-radius: 0;
}

.template-government .resume-section-heading {
  padding-bottom: 4px;
  border-bottom: 1px solid #a8a29e;
  font-size: 14px;
}

.template-government .resume-section-heading::after {
  display: none;
}

.template-government .resume-entry {
  padding: 5px 0;
  border-bottom-style: dotted;
}

.template-minimal .resume-document {
  padding: 15mm calc(var(--document-margin) + 5mm);
}

.template-minimal .resume-document-header {
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 30px;
  padding-bottom: 18px;
  border: 0;
  border-bottom: 1px solid #d1d5db;
}

.template-minimal .resume-person-name {
  max-width: 520px;
  font-size: 38px;
  font-weight: 650;
}

.template-minimal .resume-person-role {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.template-minimal .resume-contact-row {
  color: #6b7280;
}

.template-minimal .resume-photo {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  filter: grayscale(1);
}

.template-minimal .resume-section-heading {
  color: #6b7280;
  font-size: 11px;
  font-weight: 750;
}

.template-minimal .resume-section-heading::after {
  background: #e5e7eb;
}

.template-minimal .resume-entry {
  padding: 5px 0;
  border-bottom: 0;
}

.template-minimal .resume-skill-list span {
  border: 0;
  padding: 1px 0;
  color: #4b5563;
  background: transparent;
}

.template-timeline .resume-document {
  padding: 14mm calc(var(--document-margin) + 4mm);
}

.template-timeline .resume-document-header {
  padding: 10px 14px;
  border: 0;
  border-left: 6px solid var(--document-accent);
  background: #f8fafc;
}

.template-timeline .resume-person-name,
.template-timeline .resume-section-heading {
  color: color-mix(in srgb, var(--document-accent) 62%, #1e293b);
}

.template-timeline .resume-section-heading::after {
  background: color-mix(in srgb, var(--document-accent) 42%, #cbd5e1);
}

.template-timeline [data-preview-section="work"] .resume-entry,
.template-timeline [data-preview-section="education"] .resume-entry,
.template-timeline [data-preview-section="projects"] .resume-entry {
  position: relative;
  margin-left: 6px;
  padding: 5px 0 5px 22px;
  border-bottom: 0;
}

.template-timeline [data-preview-section="work"] .resume-entry::before,
.template-timeline [data-preview-section="education"] .resume-entry::before,
.template-timeline [data-preview-section="projects"] .resume-entry::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--document-accent);
  box-shadow: 0 0 0 1px var(--document-accent);
}

.template-timeline [data-preview-section="work"] .resume-entry::after,
.template-timeline [data-preview-section="education"] .resume-entry::after,
.template-timeline [data-preview-section="projects"] .resume-entry::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -8px;
  left: 5px;
  width: 1px;
  background: color-mix(in srgb, var(--document-accent) 45%, #cbd5e1);
}

.template-timeline [data-preview-section] .resume-entry:last-child::after {
  display: none;
}

.template-monochrome .resume-document {
  padding: 12mm calc(var(--document-margin) + 2mm);
}

.template-monochrome .resume-document-header {
  padding: 13px 16px;
  border: 0;
  color: #fff;
  background: #111;
}

.template-monochrome .resume-person-name,
.template-monochrome .resume-person-role,
.template-monochrome .resume-contact-row {
  color: #fff;
}

.template-monochrome .resume-photo {
  border: 2px solid #fff;
  border-radius: 0;
  filter: grayscale(1) contrast(1.08);
}

.template-monochrome .resume-section-heading {
  width: max-content;
  max-width: 100%;
  padding: 3px 9px;
  color: #fff;
  background: #111;
}

.template-monochrome .resume-section-heading::after {
  display: none;
}

.template-monochrome .resume-entry {
  padding: 5px 0;
  border-bottom: 2px solid #111;
}

.template-monochrome .resume-skill-list span {
  border-color: #111;
  color: #fff;
  background: #111;
}

.template-editorial,
.template-oceanic,
.template-analyst,
.template-heritage {
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

.template-editorial {
  background-image: url("/assets/resume-bg-editorial.webp");
}

.template-editorial .resume-document {
  padding: 14mm calc(var(--document-margin) + 5mm);
}

.template-editorial .resume-document-header {
  padding: 11px 14px 12px;
  border: 0;
  border-bottom: 4px solid #f15b4f;
  background: rgba(255, 255, 255, 0.91);
}

.template-editorial .resume-person-name {
  color: #171717;
  font-size: 34px;
}

.template-editorial .resume-person-role,
.template-editorial .resume-section-heading {
  color: color-mix(in srgb, var(--document-accent) 30%, #e24b40);
}

.template-editorial .resume-photo {
  border: 3px solid #f15b4f;
  border-radius: 0;
}

.template-editorial .resume-section-heading::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  background: #f15b4f;
}

.template-editorial .resume-section-heading::after {
  background: #171717;
}

.template-editorial .resume-entry {
  padding: 5px 0;
}

.template-oceanic {
  background-image: url("/assets/resume-bg-oceanic.webp");
}

.template-oceanic .resume-document {
  padding: 14mm calc(var(--document-margin) + 6mm);
}

.template-oceanic .resume-document-header {
  display: block;
  padding: 12px 70px;
  text-align: center;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-bottom: 3px solid #0f8097;
  background: rgba(255, 255, 255, 0.9);
}

.template-oceanic .resume-person-name {
  color: #12304a;
}

.template-oceanic .resume-person-role,
.template-oceanic .resume-section-heading {
  color: color-mix(in srgb, var(--document-accent) 34%, #0f8097);
}

.template-oceanic .resume-contact-row {
  justify-content: center;
}

.template-oceanic .resume-photo {
  position: absolute;
  top: 10px;
  right: 8px;
  width: 62px;
  height: 76px;
  border: 2px solid #0f8097;
  border-radius: 50%;
}

.template-oceanic .resume-section-heading::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 2px solid #0f8097;
  border-radius: 50%;
}

.template-oceanic .resume-section-heading::after {
  background: linear-gradient(90deg, #0f8097, transparent);
}

.template-oceanic .resume-entry {
  padding: 5px 0;
}

.template-analyst {
  background-image: url("/assets/resume-bg-analyst.webp");
}

.template-analyst .resume-document {
  padding: 14mm calc(var(--document-margin) + 5mm);
}

.template-analyst .resume-document-header {
  padding: 9px 14px;
  border: 0;
  border-left: 6px solid #0f9f75;
  background: rgba(255, 255, 255, 0.91);
}

.template-analyst .resume-person-name {
  color: #102a43;
}

.template-analyst .resume-person-role {
  color: #0f8063;
}

.template-analyst .resume-section-heading {
  padding: 3px 7px;
  color: #102a43;
  border-bottom: 1px solid rgba(15, 128, 99, 0.34);
  background: rgba(236, 253, 245, 0.78);
}

.template-analyst .resume-section-heading::after {
  display: none;
}

.template-analyst .resume-entry {
  padding: 5px 0;
}

.template-analyst .resume-entry-head span {
  color: #0f8063;
}

.template-analyst .resume-skill-list span {
  border-color: rgba(15, 128, 99, 0.28);
  color: #102a43;
  background: rgba(236, 253, 245, 0.85);
}

.template-heritage {
  background-image: url("/assets/resume-bg-heritage.webp");
}

.template-heritage .resume-document {
  padding: 15mm calc(var(--document-margin) + 6mm);
}

.template-heritage .resume-document-header {
  padding: 9px 14px;
  border: 3px double #7f1734;
  background: rgba(255, 253, 248, 0.91);
}

.template-heritage .resume-person-name,
.template-heritage .resume-section-heading {
  color: #7f1734;
  font-family: "Songti SC", SimSun, serif;
}

.template-heritage .resume-person-role {
  color: #8a6a26;
}

.template-heritage .resume-photo {
  border: 2px solid #b38a34;
  border-radius: 0;
  filter: sepia(0.16) saturate(0.82);
}

.template-heritage .resume-section-heading {
  justify-content: center;
  color: #7f1734;
}

.template-heritage .resume-section-heading::before,
.template-heritage .resume-section-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #b38a34;
}

.template-heritage .resume-entry {
  padding: 5px 0;
  border-bottom-color: rgba(127, 23, 52, 0.25);
}

.inspector-section {
  padding: 16px;
  border-bottom: 1px solid var(--resume-border);
}

.inspector-section h2 {
  margin: 0 0 10px;
  letter-spacing: 0;
}

.inspector-heading h2 {
  margin-bottom: 0;
}

.resume-template-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.resume-template-button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px;
  color: #91a0b4;
  text-align: center;
  background: transparent;
  cursor: pointer;
}

.resume-template-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.resume-template-button.active {
  color: #a99cff;
  border-color: #7c6cf5;
  background: rgba(109, 94, 252, 0.08);
}

.resume-template-thumb {
  position: relative;
  display: block;
  width: 52px;
  max-width: 100%;
  aspect-ratio: 0.707 / 1;
  margin: 0 auto;
  flex: none;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  background: #fff;
}

.resume-template-thumb::before,
.resume-template-thumb::after {
  content: "";
  position: absolute;
  background: #d7dce4;
}

.resume-template-thumb::before {
  top: 10%;
  right: 9%;
  left: 9%;
  height: 7%;
  border-bottom: 2px solid var(--thumb-accent, #6d5efc);
}

.resume-template-thumb::after {
  top: 24%;
  right: 9%;
  bottom: 9%;
  left: 9%;
  background: repeating-linear-gradient(to bottom, #cbd5e1 0 2px, transparent 2px 8px);
}

.resume-template-thumb.academic::before {
  right: 17%;
  left: 17%;
  border-bottom-color: #334155;
}

.resume-template-thumb.creative {
  background: linear-gradient(90deg, var(--thumb-accent, #6d5efc) 0 31%, #fff 31%);
}

.resume-template-thumb.creative::before {
  left: 38%;
}

.resume-template-thumb.creative::after {
  left: 38%;
}

.resume-template-thumb.blueprint,
.resume-template-thumb.oriental,
.resume-template-thumb.verdant,
.resume-template-thumb.editorial,
.resume-template-thumb.oceanic,
.resume-template-thumb.analyst,
.resume-template-thumb.heritage {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.resume-template-thumb.blueprint {
  background-image: url("/assets/resume-bg-blueprint.webp");
}

.resume-template-thumb.oriental {
  background-image: url("/assets/resume-bg-oriental.webp");
}

.resume-template-thumb.verdant {
  background-image: url("/assets/resume-bg-verdant.webp");
}

.resume-template-thumb.executive {
  background: linear-gradient(#111827 0 24%, #c59b45 24% 27%, #fff 27%);
}

.resume-template-thumb.consulting {
  background: linear-gradient(90deg, #12304a 0 10%, #fff 10%);
}

.resume-template-thumb.government {
  border-top: 4px solid #7f1d1d;
  background: #fffdfa;
}

.resume-template-thumb.minimal::before {
  right: 24%;
  left: 11%;
  height: 4%;
  border-bottom-color: #9ca3af;
}

.resume-template-thumb.minimal::after {
  top: 31%;
  right: 20%;
  left: 20%;
  opacity: 0.55;
}

.resume-template-thumb.timeline {
  background: linear-gradient(90deg, #fff 0 17%, var(--thumb-accent, #6d5efc) 17% 19%, #fff 19%);
}

.resume-template-thumb.monochrome {
  background: linear-gradient(#111 0 26%, #fff 26% 72%, #111 72% 78%, #fff 78%);
}

.resume-template-thumb.editorial {
  background-image: url("/assets/resume-bg-editorial.webp");
}

.resume-template-thumb.oceanic {
  background-image: url("/assets/resume-bg-oceanic.webp");
}

.resume-template-thumb.analyst {
  background-image: url("/assets/resume-bg-analyst.webp");
}

.resume-template-thumb.heritage {
  background-image: url("/assets/resume-bg-heritage.webp");
}

.resume-template-thumb.blueprint::before,
.resume-template-thumb.oriental::before,
.resume-template-thumb.verdant::before,
.resume-template-thumb.editorial::before,
.resume-template-thumb.oceanic::before,
.resume-template-thumb.analyst::before,
.resume-template-thumb.heritage::before {
  background: rgba(255, 255, 255, 0.86);
}

.resume-template-thumb.blueprint::after,
.resume-template-thumb.oriental::after,
.resume-template-thumb.verdant::after,
.resume-template-thumb.editorial::after,
.resume-template-thumb.oceanic::after,
.resume-template-thumb.analyst::after,
.resume-template-thumb.heritage::after {
  opacity: 0.68;
}

.resume-template-button strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

@media (min-width: 981px) {
  .resume-template-list {
    max-height: 382px;
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  }
}

.resume-color-swatches {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 7px;
}

.color-swatch {
  position: relative;
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 0;
  background: var(--swatch);
  cursor: pointer;
}

.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #6d5efc;
}

.color-swatch.active::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 9px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.custom-color-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 0 8px 0 10px;
  color: #93a2b6;
  font-size: 10px;
}

.custom-color-field input {
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.control-stack {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

.control-field {
  display: grid;
  gap: 7px;
}

.control-field > span {
  display: flex;
  justify-content: space-between;
  color: #b7c2d1;
  font-size: 10px;
  font-weight: 800;
}

.control-field output {
  color: #9f91ff;
}

.control-field input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: #6d5efc;
  cursor: pointer;
}

.order-row {
  grid-template-columns: 22px minmax(0, 1fr) 30px;
  padding: 0 6px;
  font-size: 10px;
}

.order-row.is-dragging,
.section-nav-row.is-dragging {
  opacity: 0.42;
}

.order-row.is-drop-target,
.section-nav-row.is-drop-target {
  border-color: #6d5efc;
  box-shadow: 0 -2px 0 #6d5efc;
}

.mobile-sheet-head,
.mobile-sheet-handle,
.resume-mobile-tabs,
.resume-mobile-rail,
.resume-floating-zoom {
  display: none;
}

.resume-statusbar {
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-top: 1px solid var(--resume-border);
  color: #8796aa;
  background: rgba(10, 16, 25, 0.98);
  font-size: 10px;
}

.resume-statusbar > div {
  gap: 12px;
}

.status-separator {
  height: 14px;
}

.online-dot {
  margin-right: 6px;
}

.resume-shortcuts span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

kbd {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--resume-border-strong);
  border-bottom-color: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  padding: 0 4px;
  color: #b7c2d1;
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
}

.resume-toast {
  position: fixed;
  z-index: 180;
  right: 22px;
  bottom: 48px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid var(--resume-border-strong);
  border-radius: 7px;
  opacity: 0;
  color: #e5e7eb;
  background: rgba(15, 23, 35, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
  font-size: 12px;
}

.resume-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.resume-toast.error {
  border-color: rgba(251, 113, 133, 0.48);
}

.resume-loading {
  position: fixed;
  z-index: 170;
  inset: 76px 0 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #cbd5e1;
  background: #080d15;
}

.resume-loading[hidden] {
  display: none;
}

.resume-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-top-color: #7c6cf5;
  border-radius: 50%;
  animation: resume-spin 0.8s linear infinite;
}

@keyframes resume-spin {
  to { transform: rotate(360deg); }
}

.resume-icon {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.resume-icon.icon-fill {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 1280px) {
  .resume-workspace {
    grid-template-columns: 300px minmax(430px, 1fr) 300px;
  }

  .resume-product-name,
  .resume-document-select,
  .command-button:not(.primary) span:last-child,
  .resume-shortcuts {
    display: none;
  }

  .resume-title-input {
    width: 120px;
  }

  .resume-color-swatches {
    grid-template-columns: repeat(6, 30px);
  }
}

@media (max-width: 980px) {
  body.resume-builder-page {
    overflow: hidden;
  }

  .resume-builder-page .topbar {
    height: 64px;
  }

  .resume-builder-page .navwrap {
    height: 64px;
  }

  .resume-builder-page .brand span:last-child {
    display: none;
  }

  .resume-app {
    height: calc(100dvh - 64px);
    min-height: 0;
    grid-template-rows: 58px 50px minmax(0, 1fr) 58px;
  }

  .resume-commandbar {
    padding: 0 10px;
  }

  .resume-product-icon,
  .resume-product-name,
  .resume-document-select,
  .resume-commandbar .resume-save-status,
  .resume-commandbar .command-separator,
  .preview-device-control,
  .resume-zoom,
  .command-button:not(.primary),
  .resume-command-actions > .icon-button[data-action="toggle-file-menu"] {
    display: none;
  }

  .resume-command-left {
    gap: 5px;
  }

  .resume-back {
    display: inline-flex;
  }

  .resume-title-input {
    width: min(34vw, 150px);
    font-size: 14px;
  }

  .resume-command-actions {
    gap: 2px;
  }

  .resume-command-actions .icon-button {
    display: inline-flex;
  }

  .resume-command-actions .command-button.primary {
    display: inline-flex;
    width: auto;
    padding: 0 9px;
    border-color: transparent;
    color: #a99cff;
    background: transparent;
    box-shadow: none;
  }

  .resume-command-actions .command-button.primary:hover {
    border-color: var(--resume-border);
    background: rgba(255, 255, 255, 0.06);
  }

  .resume-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--resume-border);
    background: rgba(10, 16, 25, 0.98);
  }

  .resume-mobile-tabs button {
    position: relative;
    border: 0;
    color: #9aa7b8;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
  }

  .resume-mobile-tabs button::after {
    content: "";
    position: absolute;
    right: 22%;
    bottom: 0;
    left: 22%;
    height: 3px;
    opacity: 0;
    background: #7c6cf5;
  }

  .resume-mobile-tabs button.active {
    color: #a99cff;
  }

  .resume-mobile-tabs button.active::after {
    opacity: 1;
  }

  .resume-workspace {
    display: block;
    position: relative;
    min-height: 0;
    overflow: hidden;
  }

  .resume-sidebar,
  .resume-canvas-panel {
    position: absolute;
    inset: 0;
    border: 0;
  }

  .resume-sidebar {
    display: none;
    padding-bottom: 24px;
  }

  .resume-canvas-panel {
    grid-template-rows: minmax(0, 1fr);
  }

  .resume-canvas-toolbar {
    display: none;
  }

  .resume-canvas-scroll {
    padding: 0;
  }

  .resume-paper-stage {
    margin-top: 14px;
  }

  .resume-paper {
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.48);
  }

  .resume-inspector {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 58px;
    left: 0;
    max-height: min(68dvh, 660px);
    display: none;
    border: 1px solid var(--resume-border-strong);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(13, 20, 31, 0.99);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.5);
  }

  .resume-inspector.mobile-open {
    display: block;
  }

  .mobile-sheet-handle {
    width: 44px;
    height: 5px;
    display: block;
    margin: 9px auto 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
  }

  .mobile-sheet-head {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border-bottom: 1px solid var(--resume-border);
    background: rgba(13, 20, 31, 0.98);
  }

  .mobile-sheet-head strong {
    font-size: 14px;
  }

  .resume-template-list {
    gap: 14px;
  }

  .resume-template-button strong {
    font-size: 11px;
  }

  .resume-floating-zoom {
    position: absolute;
    z-index: 8;
    right: 12px;
    bottom: 14px;
    width: 46px;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--resume-border-strong);
    border-radius: 8px;
    color: #fff;
    background: rgba(13, 20, 31, 0.94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }

  .resume-floating-zoom button {
    width: 44px;
    height: 38px;
    border: 0;
  }

  .resume-floating-zoom span {
    display: grid;
    place-items: center;
    height: 32px;
    border-top: 1px solid var(--resume-border);
    border-bottom: 1px solid var(--resume-border);
    color: #cbd5e1;
    font-size: 10px;
  }

  .resume-statusbar {
    display: none;
  }

  .resume-mobile-rail {
    position: relative;
    z-index: 130;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--resume-border);
    background: rgba(10, 16, 25, 0.99);
  }

  .resume-mobile-rail button {
    min-width: 0;
    border: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #9aa7b8;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
  }

  .resume-mobile-rail button:hover,
  .resume-mobile-rail button.active {
    color: #a99cff;
  }

  .resume-mobile-rail .resume-icon {
    width: 20px;
    height: 20px;
  }

  .resume-app[data-mobile-mode="edit"] .resume-sidebar {
    display: block;
  }

  .resume-app[data-mobile-mode="edit"] .resume-canvas-panel,
  .resume-app[data-mobile-mode="design"] .resume-canvas-panel {
    visibility: hidden;
  }

  .resume-app[data-mobile-mode="design"] .resume-inspector {
    display: block;
    position: absolute;
    inset: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .resume-app[data-mobile-mode="design"] .mobile-sheet-handle,
  .resume-app[data-mobile-mode="design"] .mobile-sheet-head {
    display: none;
  }

  .resume-app[data-mobile-mode="design"] .resume-mobile-rail {
    display: grid;
  }

  .resume-app[data-mobile-mode="preview"] .resume-canvas-panel {
    visibility: visible;
  }

  .resume-toast {
    right: 12px;
    bottom: 70px;
  }

  .resume-loading {
    inset: 64px 0 0;
  }
}

@media (max-width: 560px) {
  .resume-form-grid {
    grid-template-columns: 1fr;
  }

  .resume-form-grid .span-2 {
    grid-column: auto;
  }

  .resume-color-swatches {
    grid-template-columns: repeat(7, 30px);
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body.resume-builder-page {
    width: 210mm;
    height: auto;
    overflow: visible;
    color: #000;
    background: #fff;
  }

  .resume-builder-page .topbar,
  .resume-commandbar,
  .resume-mobile-tabs,
  .resume-sidebar,
  .resume-inspector,
  .resume-canvas-toolbar,
  .resume-statusbar,
  .resume-mobile-rail,
  .resume-floating-zoom,
  .resume-toast,
  .resume-loading {
    display: none !important;
  }

  .resume-app,
  .resume-workspace,
  .resume-canvas-panel,
  .resume-canvas-scroll,
  .resume-paper-stage {
    display: block;
    width: 210mm;
    height: auto;
    min-height: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  .resume-paper-stage {
    width: 210mm !important;
    height: auto !important;
  }

  .resume-paper {
    position: relative;
    width: 210mm;
    min-height: 297mm;
    transform: none !important;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .resume-preview-section.is-selected::after {
    display: none;
  }

  .resume-entry,
  .resume-preview-section {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: reduce) {
  .resume-builder-page *,
  .resume-builder-page *::before,
  .resume-builder-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
