.resume-app {
  --ra-bg-1: hsl(215 18% 84%);
  --ra-bg-2: hsl(215 18% 74%);
  --ra-bg-3: hsl(215 18% 66%);
  --ra-glow-1: hsla(215, 91%, 88%, .34);
  --ra-glow-2: hsla(185, 72%, 84%, .22);
  --ra-panel-rgb: 244, 250, 255;
  --ra-panel-alpha: .86;
  --ra-panel-alpha-high: .88;
  --ra-panel-alpha-low: .74;
  --ra-topbar-alpha: .86;
  --ra-brand-1: rgba(23, 92, 211, .92);
  --ra-brand-2: rgba(15, 118, 110, .72);
  --ra-shadow-alpha: .08;
  --ra-accent: hsl(215 84% 42%);
  --ra-accent-strong: hsl(215 76% 34%);
  --ra-active-bg: hsla(215, 86%, 82%, .68);
  --ra-text: #18324a;
  --ra-title: #12345a;
  --ra-muted: #55708a;
  --ra-placeholder: #64748b;
  --ra-border: rgba(148, 163, 184, .24);
  --ra-input-bg: rgba(3, 7, 18, .34);
  --ra-input-focus-bg: rgba(3, 7, 18, .52);
  --ra-button-bg: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .96));
  --ra-drop-bg:
    linear-gradient(135deg, rgba(8, 18, 33, .72), rgba(15, 23, 42, .58)),
    repeating-linear-gradient(135deg, rgba(34, 211, 238, .08), rgba(34, 211, 238, .08) 1px, transparent 1px, transparent 18px);
  color: var(--ra-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .12), transparent 30%),
    radial-gradient(circle at 96% 8%, rgba(15, 118, 110, .12), transparent 34%),
    linear-gradient(180deg, #eef4ff 0, #f6f8fb 360px, #edf1f6 100%);
}
.resume-app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(23, 92, 211, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, .045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.86), transparent 82%);
}
.resume-app .topbar {
  background: rgba(var(--ra-panel-rgb), var(--ra-topbar-alpha));
  border-bottom-color: var(--ra-border);
  box-shadow: 0 14px 40px rgba(24, 50, 74, var(--ra-shadow-alpha));
}
.resume-app .brand,
.resume-app .nav a {
  color: var(--ra-title);
}
.resume-app .brand small,
.resume-app .nav a:not(.active) {
  color: var(--ra-muted);
}
.resume-app .nav a:hover,
.resume-app .nav a.active {
  color: var(--ra-accent);
  background: var(--ra-active-bg);
}
.resume-page {
  display: grid;
  grid-template-columns: minmax(520px, 680px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  position: relative;
}
.resume-page::before {
  content: "";
  position: fixed;
  inset: 66px 0 auto;
  height: 260px;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .34), rgba(45, 212, 191, .18) 48%, transparent 72%);
  z-index: -1;
}
.resume-brand-panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, .22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, var(--ra-brand-1), var(--ra-brand-2)),
    linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(94, 234, 212, .16));
  box-shadow: 0 24px 60px rgba(23, 92, 211, calc(var(--ra-shadow-alpha) + .04));
}
.resume-brand-panel::after {
  content: none;
}
.brand-avatar {
  width: 74px;
  height: 74px;
  padding: 3px;
  border: 1px solid rgba(103, 232, 249, .42);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .5), rgba(202, 138, 4, .34));
  box-shadow: 0 18px 42px rgba(14, 165, 233, .22);
}
.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}
.resume-brand-panel .eyebrow {
  color: #67e8f9;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.resume-brand-panel h1 {
  margin: 7px 0 0;
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: 0;
}
.resume-editor { display: grid; gap: 14px; min-width: 0; }
.resume-preview {
  position: sticky;
  top: 82px;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: calc(100vh - 110px);
  overflow: auto;
  padding: 10px 0 28px;
}
.preview-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(100%, 840px);
  padding: 8px;
  color: #93a4bb;
  font-size: 12px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .86));
  box-shadow: 0 14px 36px rgba(24, 50, 74, .14);
  backdrop-filter: blur(14px);
}
.preview-tools button,
.preview-tools span {
  white-space: nowrap;
}
.preview-label {
  justify-self: center;
  padding: 0 10px;
  color: #12345a;
  font-size: 15px;
  font-weight: 900;
}
.preview-adjust-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 8px;
  color: #175cd3;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(23, 92, 211, .1);
}
.preview-adjust-toggle.active {
  color: #0f766e;
  border-color: rgba(15, 118, 110, .34);
  background: linear-gradient(180deg, #ecfdf3, #dff9ee);
}
.preview-chevron {
  width: 15px;
  height: 15px;
  transition: transform .16s ease;
}
.preview-chevron.open {
  transform: rotate(180deg);
}
.preview-export-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-self: end;
}
.preview-main-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}
.preview-main-action.check-action {
  color: #05603a;
  border-color: #86efac;
  background: linear-gradient(180deg, #ecfdf3, #dcfae6);
  box-shadow: 0 10px 22px rgba(6, 118, 71, .12);
}
.preview-main-action.export-action {
  color: #fff;
  border-color: #0f766e;
  background: linear-gradient(180deg, #0f9f8f, #0f766e);
  box-shadow: 0 12px 24px rgba(15, 118, 110, .22);
}
.preview-main-action:hover {
  transform: translateY(-1px);
}
.preview-settings-panel {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 36px rgba(24, 50, 74, .14);
}
.preview-settings-panel[hidden] { display: none !important; }
.tool-divider {
  width: 1px;
  height: 24px;
  margin: 0 3px;
  background: rgba(148, 163, 184, .32);
}
#zoom-value, #font-value, #margin-value {
  min-width: 46px;
  padding: 4px 6px;
  text-align: center;
  border-radius: 6px;
  background: rgba(37, 99, 235, .1);
  color: #12345a;
  font-weight: 850;
}
.resume-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.resume-action-grid .primary {
  min-height: 42px;
  font-size: 14px;
  background: linear-gradient(180deg, #1d4ed8, #175cd3);
}
.project-file-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(103, 232, 249, .14);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(8, 18, 33, .88), rgba(15, 23, 42, .72));
}
.project-file-bar strong {
  display: block;
  font-size: 13px;
  color: #f8fafc;
}
.project-file-bar span {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.donation-modal[hidden] { display: none !important; }
.ocr-payment-modal[hidden] { display: none !important; }
.donation-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.donation-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(10px);
}
.donation-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(15, 23, 42, .38);
}
.donation-card img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 44px);
  object-fit: contain;
  background: #fff;
}
.donation-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.ocr-payment-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}
.ocr-payment-card {
  position: relative;
  z-index: 1;
  width: min(440px, 92vw);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
}
.ocr-payment-card h2 {
  margin: 2px 0 0;
  color: #101828;
}
.ocr-payment-card p {
  margin: 6px 0 0;
  color: #526071;
  line-height: 1.6;
}
.ocr-payment-card img {
  width: min(260px, 70vw);
  justify-self: center;
  border-radius: 10px;
  background: #f8fafc;
}
.ocr-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ocr-plan-grid button {
  min-height: 44px;
}
.asset-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 9px;
}
.asset-filter input {
  height: 38px;
  background: rgba(3, 7, 18, .36);
}
.template-scroll, .palette-scroll {
  max-height: none;
  overflow: visible;
  padding: 2px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: rgba(3, 7, 18, .24);
}
.palette-scroll {
  max-height: none;
}
.template-row, .palette-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.template-choice {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  color: #e5edf7;
  background: rgba(15, 23, 42, .76);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.template-choice:hover, .palette-choice:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16, 24, 40, .08); }
.template-choice.active {
  border-color: #22d3ee;
  background: linear-gradient(180deg, rgba(14, 165, 233, .2), rgba(15, 23, 42, .9));
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12), 0 10px 22px rgba(14, 165, 233, .14);
}
.palette-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.palette-choice { position: relative; min-height: 34px; padding: 5px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 8px; color: #e5edf7; background: rgba(15, 23, 42, .76); cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.palette-choice.active { border-color: #22d3ee; background: rgba(14, 165, 233, .14); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.palette-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; height: 24px; overflow: hidden; border-radius: 6px; margin-bottom: 0; }
.palette-badge {
  position: absolute;
  inset: auto 6px 5px 6px;
  display: grid;
  place-items: center;
  min-height: 16px;
  color: #fff;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  font-size: 10px;
  font-weight: 950;
  pointer-events: none;
}
.palette-choice:has(.palette-badge) {
  min-height: 42px;
}
.palette-choice:has(.palette-badge) .palette-strip {
  height: 30px;
}
.custom-palette-choice {
  overflow: hidden;
}
.palette-choice-core {
  display: block;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.palette-custom-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  opacity: 0;
  background: transparent;
  cursor: pointer;
}
.small-file { margin: 0; }
.active-soft {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
  background: #eef4ff !important;
}
.warn-soft {
  color: #b42318 !important;
  border-color: rgba(248, 113, 113, .45) !important;
  background: rgba(254, 226, 226, .86) !important;
}
.resume-editor .card {
  border-color: rgba(103, 232, 249, .14);
  background: rgba(15, 23, 42, .72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
}
.resume-editor .card-head {
  position: relative;
  min-height: 46px;
  padding: 9px 14px 9px 18px;
  border-bottom-color: rgba(148, 163, 184, .18);
  background: linear-gradient(180deg, rgba(15, 23, 42, .86), rgba(15, 23, 42, .66));
}
.resume-editor .card-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #22d3ee, #ca8a04);
}
.resume-editor .card-title {
  font-size: 15px;
  letter-spacing: 0;
  color: #f8fafc;
}
.basic-card-head {
  gap: 10px;
}
.basic-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}
.basic-default-clear {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--ra-accent);
  border-color: rgba(37, 99, 235, .22);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(232, 243, 251, .92));
}
.resume-editor .card-sub,
.resume-editor label {
  color: #9fb0c7;
}
.resume-editor .card-body {
  background: linear-gradient(180deg, rgba(15, 23, 42, .66), rgba(8, 18, 33, .58));
}
.resume-editor input,
.resume-editor textarea,
.resume-editor select {
  color: #e5edf7;
  border-color: rgba(148, 163, 184, .28);
  background: rgba(3, 7, 18, .36);
}
.resume-editor input::placeholder,
.resume-editor textarea::placeholder {
  color: #64748b;
}
.resume-editor input:focus,
.resume-editor textarea:focus,
.resume-editor select:focus {
  border-color: #22d3ee;
  background: rgba(3, 7, 18, .52);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .14);
}
.resume-editor button {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, .28);
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .96));
  box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}
.resume-editor button:hover {
  color: #67e8f9;
  border-color: #22d3ee;
}
.resume-editor button.primary {
  color: #04111f;
  border-color: #22d3ee;
  background: linear-gradient(180deg, #67e8f9, #22d3ee);
  box-shadow: 0 12px 28px rgba(34, 211, 238, .22);
}
.resume-editor .palette-choice-core {
  min-height: 24px;
  color: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.resume-editor .muted,
.resume-editor .card-sub {
  color: #94a3b8;
}
.resume-import-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.import-button-row {
  justify-content: center;
  margin-top: 10px;
}
.target-job-dropzone {
  min-width: 0;
  overflow: hidden;
  border-color: rgba(245, 158, 11, .72);
  background: linear-gradient(135deg, rgba(120, 53, 15, .34), rgba(15, 23, 42, .74));
}
.target-job-dropzone > div {
  min-width: 0;
  width: 100%;
}
.target-job-dropzone:hover,
.target-job-dropzone.drag-over,
.target-job-dropzone.has-file {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
}
.target-job-dropzone i {
  color: #fbbf24;
}
.target-job-dropzone strong,
.target-job-dropzone span,
.target-job-dropzone .resume-status {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.target-job-dropzone .import-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}
.target-job-dropzone button {
  min-width: 0;
  width: 100%;
  padding-inline: 8px;
  white-space: normal;
  line-height: 1.2;
}
.resume-editor .target-optimize-button {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  box-shadow: 0 12px 28px rgba(245, 158, 11, .24);
}
.resume-editor .target-optimize-button:hover {
  color: #111827;
  border-color: #fcd34d;
}

.resume-file-name {
  display: block;
  min-height: 0;
  margin-top: 4px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-resume-box {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  grid-column: 1 / -1;
}
.manual-resume-title {
  margin: 0;
  font-size: 16px;
  font-weight: 950;
}
.raw-resume-text {
  min-height: 112px;
  resize: vertical;
  line-height: 1.6;
  background: rgba(3, 7, 18, .36);
}
.avatar-field {
  grid-column: 1 / -1;
}

.resume-import-note {
  min-height: 100%;
  display: grid;
  align-content: center;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.avatar-uploader {
  display: grid;
  grid-template-columns: 82px 92px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .72), rgba(8, 18, 33, .64));
}
.avatar-actions-column {
  display: grid;
  gap: 6px;
}
.avatar-actions-column button {
  width: 100%;
  min-height: 30px;
  padding: 0 8px;
}
.avatar-preview {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 auto;
}
.avatar-preview.square { border-radius: 8px; }
.avatar-preview.circle { border-radius: 999px; }
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.identity-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  min-width: 0;
}
.identity-fields-grid .basic-field-row label {
  margin-bottom: 4px;
}
.custom-basic-block {
  display: grid;
  gap: 9px;
}
.custom-basic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.custom-basic-list {
  display: grid;
  gap: 8px;
}
.custom-basic-row {
  display: grid;
  grid-template-columns: minmax(110px, .72fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.basic-field-row {
  min-width: 0;
}
.basic-field-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}
.basic-clear {
  min-height: 34px;
  padding: 0 9px;
}
.custom-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.custom-color-row:empty { display: none; }
.custom-color-row label {
  margin: 0;
}
.custom-color-row input[type="color"] {
  width: 44px;
  height: 32px;
  min-height: 32px;
  padding: 2px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  background: rgba(15, 23, 42, .72);
  cursor: pointer;
}
.resume-modules-card {
  display: flex;
  flex-direction: column;
  min-height: min(760px, calc(100vh - 110px));
  max-height: calc(100vh - 96px);
}
.resume-modules-card .project-file-bar,
.resume-modules-card .card-head {
  flex: 0 0 auto;
}
.resume-modules-card .card-body {
  flex: 1 1 auto;
  min-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
}
.resume-modules-card .card-body::-webkit-scrollbar,
.resume-note-scroll::-webkit-scrollbar {
  width: 9px;
}
.resume-modules-card .card-body::-webkit-scrollbar-thumb,
.resume-note-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(37, 99, 235, .32);
}
.resume-modules { display: grid; gap: 10px; }
.resume-module { border: 1px solid rgba(148, 163, 184, .18); border-radius: 8px; background: rgba(8, 18, 33, .55); overflow: hidden; box-shadow: 0 1px 0 rgba(16, 24, 40, .02); }
.resume-module-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 11px 12px; background: linear-gradient(180deg, rgba(15, 23, 42, .88), rgba(15, 23, 42, .66)); border-bottom: 1px solid rgba(148, 163, 184, .16); }
.resume-module-head .row button {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .24);
  background: rgba(15, 23, 42, .8);
}
.resume-module-head .row button:hover {
  color: #67e8f9;
  border-color: #22d3ee;
}
.resume-module-body { padding: 12px; }
.resume-pages {
  display: grid;
  gap: 22px;
  transform-origin: top center;
}
.resume-sheet {
  width: 210mm;
  height: 297mm;
  overflow: hidden;
  background: #fff;
  color: #111827;
  box-shadow:
    0 28px 76px rgba(16, 24, 40, .24),
    0 0 0 1px rgba(16, 24, 40, .06);
  page-break-after: always;
}
.resume-inner {
  height: 100%;
  padding: var(--resume-margin, 12mm) var(--resume-margin, 12mm) 8mm;
  display: flex;
  flex-direction: column;
}
.resume-sheet.continued-page .resume-inner {
  padding-top: 8mm;
}
.r-header { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding-bottom: 5px; border-bottom: 2px solid var(--resume-accent, #175cd3); }
.r-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 7mm;
  padding-bottom: 3px;
  border-bottom: 1px solid #e5e7eb;
  color: #667085;
  font-size: 10.5px;
  font-weight: 800;
}
.r-name { font-size: var(--resume-name-font, 31px); line-height: 1.05; font-weight: 950; }
.r-title { margin-top: 5px; color: #475467; font-size: calc(var(--resume-font, 12.1px) * 1.16); font-weight: 800; }
.r-contact { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 8px; color: #667085; font-size: var(--resume-contact-font, 11.5px); }
.r-avatar {
  width: 26mm;
  height: 26mm;
  min-width: 26mm;
  min-height: 26mm;
  aspect-ratio: 1 / 1;
  display: block;
  max-width: 26mm;
  max-height: 26mm;
  flex: 0 0 26mm;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  align-self: start;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.r-avatar.square { border-radius: 4px; }
.r-avatar.circle { border-radius: 50%; }
.r-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  padding-top: 3px;
  margin-left: 0;
  margin-right: 0;
  align-content: start;
}
.resume-sheet.continued-page .r-grid {
  padding-top: 3px;
}
.r-section.full { grid-column: 1 / -1; }
.r-section-title { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid #e5e7eb; color: var(--resume-accent, #175cd3); font-size: var(--resume-section-font, 12px); font-weight: 950; }
.r-content { color: #1f2937; font-size: var(--resume-font, 12.1px); line-height: var(--resume-line, 1.56); }
.r-content p { margin: 0 0 5px; }
.r-content ul { margin: 4px 0 0 17px; padding: 0; }
.r-content li { margin: 2px 0; }
.r-item-head {
  display: grid;
  grid-template-columns: minmax(22mm, .86fr) minmax(0, 1.34fr) max-content;
  gap: 6px;
  align-items: baseline;
  margin: 6px 0 3px;
  color: #111827;
  font-size: var(--resume-font, 12.1px);
}
.r-item-head.one-line {
  grid-template-columns: minmax(0, 1fr) auto;
}
.r-item-head.no-date {
  grid-template-columns: minmax(22mm, .86fr) minmax(0, 1.34fr);
}
.r-item-head.compact-head {
  font-size: clamp(10.8px, calc(var(--resume-font, 12.1px) * .92), 13px);
  gap: 5px;
}
.r-item-head:first-child { margin-top: 0; }
.r-item-main, .r-item-meta, .r-item-date {
  min-width: 0;
  overflow-wrap: normal;
  word-break: keep-all;
}
.r-item-main { font-weight: 900; }
.r-item-head.compact-head .r-item-main,
.r-item-head.compact-head .r-item-meta {
  overflow-wrap: anywhere;
  word-break: normal;
}
.r-item-meta {
  color: #374151;
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: normal;
}
.r-item-date {
  color: #667085;
  font-size: calc(var(--resume-font, 12.1px) * .91);
  text-align: right;
  white-space: nowrap;
}
.r-tag { display: inline-flex; margin: 0 4px 5px 0; padding: 2px 7px; border: 1px solid #d0d5dd; border-radius: 999px; background: #f9fafb; font-size: var(--resume-tag-font, 11px); }
.resume-note-sheet {
  width: 210mm;
  height: min(62vh, 170mm);
  min-height: 96mm;
  overflow: hidden;
  color: #111827;
  background: #fff;
  box-shadow:
    0 18px 50px rgba(16, 24, 40, .18),
    0 0 0 1px rgba(16, 24, 40, .08);
}
.resume-note-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4mm 5mm;
}
.resume-note-title {
  margin: 0 0 4px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}
.resume-note-summary {
  margin: 0 0 5px;
  color: #475467;
  font-size: 13px;
  line-height: 1.6;
}
.resume-note-section {
  margin-top: 6px;
}
.resume-note-section h3 {
  margin: 0 0 3px;
  color: var(--resume-accent, #175cd3);
  font-size: 14px;
}
.resume-note-list {
  margin: 0;
  padding-left: 16px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.58;
}
.resume-note-list li {
  margin: 0 0 5px;
}
.resume-note-before,
.resume-note-after {
  display: block;
  margin-top: 1px;
}
.resume-note-before { color: #7f1d1d; }
.resume-note-after { color: #065f46; }

.tpl-ats .r-grid { display: block; }
.tpl-ats .r-section { margin-bottom: 10px; }
.tpl-product .r-header { margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 3.5mm; padding: 10mm var(--resume-margin, 12mm); border: 0; border-left: 6px solid var(--resume-accent, #175cd3); background: #eef4ff; }
.tpl-engineering { font-family: Consolas, "SFMono-Regular", monospace; }
.tpl-engineering .r-header { margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 3.5mm; padding: 10mm var(--resume-margin, 12mm); border: 0; color: #fff; background: #111827; }
.tpl-engineering .r-title, .tpl-engineering .r-contact { color: #d1d5db; }
.tpl-compact .resume-inner { padding: 14mm; }
.tpl-compact .r-name { font-size: calc(var(--resume-name-font, 31px) * .9); }
.tpl-compact .r-content { font-size: calc(var(--resume-font, 12.1px) * .95); line-height: calc(var(--resume-line, 1.56) - .08); }
.tpl-sidebar .resume-inner { display: grid; grid-template-columns: 58mm 1fr; padding: 0; }
.tpl-sidebar .r-header { display: block; padding: 18mm 10mm; border: 0; color: #fff; background: #111827; }
.tpl-sidebar .r-title, .tpl-sidebar .r-contact { color: #d0d5dd; }
.tpl-sidebar .r-avatar { margin-top: 12px; border-color: rgba(255,255,255,.35); }
.tpl-sidebar .r-grid { display: block; padding: 16mm 14mm; }
.tpl-sidebar .r-section { margin-bottom: 11px; }
.tpl-academic { font-family: Georgia, "Times New Roman", serif; }
.tpl-academic .r-header { display: block; text-align: center; }
.tpl-academic .r-contact { justify-content: center; }
.tpl-minimal .resume-inner { padding: 20mm; }
.tpl-minimal .r-name { font-size: 33px; font-weight: 500; }
.tpl-minimal .r-section-title { color: #667085; border-bottom: 0; }
.tpl-bilingual .r-header { border-bottom: 0; border-left: 5px solid var(--resume-accent, #175cd3); padding-left: 10px; }
.tpl-bilingual .r-section-title { display: flex; align-items: center; gap: 7px; }
.tpl-bilingual .r-section-title::after { content: ""; height: 1px; background: #d0d5dd; flex: 1; }
.tpl-elegant .r-header { display: block; border-bottom: 1px solid #d6d3d1; }
.tpl-elegant .r-name { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.tpl-elegant .r-section-title { color: #7c2d12; border-bottom-color: #e7e5e4; }
.tpl-product .r-header { background: var(--resume-soft, #eef4ff); }
.tpl-sidebar .r-header { background: var(--resume-dark, #111827); }
.tpl-elegant .r-tag { background: #fff7ed; border-color: #fed7aa; }
.tpl-cn-clean .r-section-title {
  color: #111827;
  border-bottom: 2px solid #111827;
  letter-spacing: 0;
}
.tpl-cn-clean .r-header {
  display: block;
  text-align: center;
  border-bottom-color: #111827;
}
.tpl-cn-clean .r-contact { justify-content: center; }
.tpl-research .resume-inner { padding: 17mm 18mm; }
.tpl-research .r-header { border-bottom: 1px solid #94a3b8; }
.tpl-research .r-name { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.tpl-research .r-section-title { color: #334155; border-bottom-style: double; }
.tpl-finance .r-header {
  margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 3.5mm;
  padding: 8mm var(--resume-margin, 12mm);
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #111827, #334155);
}
.tpl-finance .r-page-header, .tpl-algorithm .r-page-header { color: #cbd5e1; background: #020617; margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 8mm; padding: 7mm var(--resume-margin, 12mm) 4mm; border: 0; }
.tpl-finance .r-title, .tpl-finance .r-contact { color: #e5e7eb; }
.tpl-finance .r-section-title { color: #111827; border-bottom-color: #94a3b8; }
.tpl-consulting .r-header { border-bottom: 0; border-top: 5px solid var(--resume-accent, #175cd3); padding-top: 8px; }
.tpl-consulting .r-section-title { text-transform: uppercase; color: #111827; }
.tpl-designer .r-header {
  margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 3mm;
  border: 0;
  padding: 8mm;
  background: var(--resume-soft, #eef4ff);
}
.tpl-designer .r-section-title { border-bottom: 0; color: var(--resume-dark, #1249a8); }
.tpl-data { font-family: "Inter", "Segoe UI", Arial, sans-serif; }
.tpl-data .r-section-title::before { content: "# "; color: var(--resume-accent, #175cd3); }
.tpl-data .r-tag { border-radius: 5px; background: #eff6ff; }
.tpl-algorithm { font-family: Consolas, "SFMono-Regular", monospace; }
.tpl-algorithm .r-header {
  margin: calc(0mm - var(--resume-margin, 12mm)) calc(0mm - var(--resume-margin, 12mm)) 3.5mm;
  padding: 8mm var(--resume-margin, 12mm);
  border: 0;
  color: #e5e7eb;
  background: #020617;
}
.tpl-algorithm .r-title, .tpl-algorithm .r-contact { color: #cbd5e1; }
.tpl-algorithm .r-section-title { color: #0369a1; }
.tpl-pm .r-header { border-bottom: 0; border-left: 7px solid var(--resume-accent, #175cd3); padding-left: 11px; }
.tpl-pm .r-section-title {
  display: inline-flex;
  padding: 2px 8px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: var(--resume-accent, #175cd3);
}
.tpl-neon .resume-sheet {
  background: #050816;
  color: #e5f7ff;
}
.tpl-neon .resume-inner {
  padding: 16mm;
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 211, 238, .28), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(236, 72, 153, .24), transparent 32%),
    linear-gradient(180deg, #050816, #0f172a);
}
.tpl-neon .r-header {
  padding: 9mm;
  border: 1px solid rgba(103, 232, 249, .48);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, .22), rgba(219, 39, 119, .18));
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 24px rgba(34, 211, 238, .18);
}
.tpl-neon .r-name,
.tpl-neon .r-section-title {
  color: #67e8f9;
  text-shadow: 0 0 10px rgba(34, 211, 238, .36);
}
.tpl-neon .r-title,
.tpl-neon .r-contact,
.tpl-neon .r-content,
.tpl-neon .r-item-main,
.tpl-neon .r-item-meta,
.tpl-neon .r-item-date,
.tpl-neon .r-edu-school,
.tpl-neon .r-edu-degree,
.tpl-neon .r-edu-major,
.tpl-neon .r-edu-years,
.tpl-neon .r-edu-extra {
  color: #dbeafe;
}
.tpl-neon .r-section {
  padding: 8px;
  border: 1px solid rgba(103, 232, 249, .22);
  border-radius: 12px;
  background: rgba(15, 23, 42, .52);
}
.tpl-neon .r-section-title {
  border-bottom-color: rgba(103, 232, 249, .28);
}
.tpl-neon .r-tag {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, .42);
  background: rgba(14, 165, 233, .12);
}
.tpl-poster .resume-inner {
  padding: 14mm 15mm;
  background: linear-gradient(90deg, var(--resume-soft, #fef3c7) 0 19mm, #fff 19mm 100%);
}
.tpl-poster .r-header {
  margin: 0 0 3mm;
  padding: 8mm 10mm;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--resume-dark, #0f172a), var(--resume-accent, #175cd3));
}
.tpl-poster .r-title,
.tpl-poster .r-contact {
  color: #e5e7eb;
}
.tpl-poster .r-name {
  letter-spacing: 0;
  text-transform: uppercase;
}
.tpl-poster .r-section-title {
  display: inline-flex;
  padding: 3px 9px;
  border: 0;
  color: #fff;
  background: var(--resume-accent, #175cd3);
  transform: skew(-8deg);
}
.tpl-poster .r-section-title::first-letter {
  color: #fef3c7;
}
.tpl-poster .r-tag {
  border-radius: 3px;
  color: #111827;
  border-color: #fbbf24;
  background: #fef3c7;
}
.dropzone {
  color: #dbeafe;
  border-color: rgba(103, 232, 249, .28);
  background:
    linear-gradient(135deg, rgba(8, 18, 33, .72), rgba(15, 23, 42, .58)),
    repeating-linear-gradient(135deg, rgba(34, 211, 238, .08), rgba(34, 211, 238, .08) 1px, transparent 1px, transparent 18px);
}
.dropzone span { color: #94a3b8; }
.dropzone svg { color: #67e8f9; }
.dropzone.drag-over { border-color: #22d3ee; background: rgba(14, 165, 233, .14); }
.dropzone.has-file {
  border-color: #34d399;
  background:
    linear-gradient(180deg, rgba(6, 78, 59, .55), rgba(15, 23, 42, .72));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .16);
}
.ocr-dropzone {
  border-color: rgba(168, 85, 247, .28);
  background:
    linear-gradient(135deg, rgba(46, 16, 101, .28), rgba(15, 23, 42, .58)),
    repeating-linear-gradient(135deg, rgba(168, 85, 247, .08), rgba(168, 85, 247, .08) 1px, transparent 1px, transparent 18px);
}
.ocr-dropzone svg {
  color: #a78bfa;
}
.ocr-dropzone .primary {
  border-color: #7c3aed;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
}
.resume-status {
  border-left: 4px solid rgba(148, 163, 184, .5);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .24);
  background: rgba(3, 7, 18, .34);
}
.resume-status.mini {
  margin: 7px auto 0;
  max-width: 180px;
  padding: 5px 8px;
  border-left-width: 3px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.resume-status.success { border-color: rgba(52, 211, 153, .35); border-left-color: #34d399; background: rgba(6, 78, 59, .34); color: #bbf7d0; }
.resume-status.warn { border-color: rgba(245, 158, 11, .38); border-left-color: #f59e0b; background: rgba(120, 53, 15, .34); color: #fde68a; }
.resume-status.error { border-color: rgba(248, 113, 113, .38); border-left-color: #f87171; background: rgba(127, 29, 29, .34); color: #fecaca; }
.dropzone .primary {
  background: linear-gradient(180deg, #0f766e, #0b625c);
  border-color: #0f766e;
  box-shadow: 0 10px 22px rgba(15, 118, 110, .18);
}
.dropzone button:not(.primary) {
  color: #dbeafe;
  border-color: rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .72);
}

.theme-tuner-card[data-theme-tuner="hidden"] {
  display: none;
}
.theme-preset-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  max-height: 252px;
  margin-bottom: 14px;
  padding: 2px 4px 2px 2px;
  overflow: auto;
}
.theme-preset-button {
  min-height: 62px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  border-radius: 10px;
  background: rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low));
  text-align: left;
  font-size: 12px;
  font-weight: 900;
}
.theme-preset-button:hover {
  color: var(--ra-accent);
  border-color: var(--ra-accent);
  transform: translateY(-1px);
}
.theme-swatch {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 8px 18px rgba(0, 0, 0, .16);
}
.theme-tuner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.theme-tuner-grid label {
  margin: 0;
  padding: 11px;
  border: 1px solid rgba(62, 113, 153, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .52);
  color: var(--ra-text);
}
.theme-tuner-grid strong {
  float: right;
  color: var(--ra-accent);
  font-size: 12px;
}
.theme-tuner-grid input[type="range"] {
  width: 100%;
  min-height: 24px;
  margin-top: 8px;
  padding: 0;
  accent-color: var(--ra-accent);
  background: transparent;
}
.theme-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.theme-code-row code {
  display: block;
  min-height: 34px;
  padding: 9px 10px;
  overflow: auto;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  white-space: nowrap;
}

/* Softer panel skin: darker page, lighter work surfaces. */
.preview-tools,
.project-file-bar,
.template-scroll,
.palette-scroll,
.template-choice,
.palette-choice,
.resume-editor .card,
.resume-editor .card-head,
.resume-editor .card-body,
.avatar-uploader,
.resume-module,
.resume-module-head,
.dropzone,
.resume-status {
  color: var(--ra-text);
  border-color: var(--ra-border);
  background: rgba(var(--ra-panel-rgb), var(--ra-panel-alpha));
  box-shadow: 0 18px 42px rgba(24, 50, 74, var(--ra-shadow-alpha));
}
.resume-editor .card {
  backdrop-filter: blur(16px);
  --resume-card-accent: #2563eb;
  --resume-card-soft: #eff6ff;
  border-left: 5px solid var(--resume-card-accent);
}
.resume-editor .card-head,
.resume-module-head,
.project-file-bar {
  background: linear-gradient(180deg, rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-high)), rgba(228, 242, 252, var(--ra-panel-alpha)));
}
.resume-editor .card-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--resume-card-accent) 11%, #fff), rgba(255,255,255,0));
}
.resume-editor .card-head::before {
  background: var(--resume-card-accent);
}
.resume-editor .card:nth-of-type(6n + 2) {
  --resume-card-accent: #0f766e;
  --resume-card-soft: #f0fdfa;
}
.resume-editor .card:nth-of-type(6n + 3) {
  --resume-card-accent: #7c3aed;
  --resume-card-soft: #f5f3ff;
}
.resume-editor .card:nth-of-type(6n + 4) {
  --resume-card-accent: #b45309;
  --resume-card-soft: #fffbeb;
}
.resume-editor .card:nth-of-type(6n + 5) {
  --resume-card-accent: #be123c;
  --resume-card-soft: #fff1f2;
}
.resume-editor .card:nth-of-type(6n) {
  --resume-card-accent: #0369a1;
  --resume-card-soft: #f0f9ff;
}
.resume-editor .card-body {
  background: linear-gradient(180deg, color-mix(in srgb, var(--resume-card-soft) 54%, rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low))), rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low)));
}
.resume-editor .card-title,
.project-file-bar strong,
.preview-label {
  color: var(--ra-title);
}
.resume-editor .card-sub,
.resume-editor label,
.resume-editor .muted,
.project-file-bar span,
.dropzone span,
.resume-status {
  color: var(--ra-muted);
}
.resume-editor input,
.resume-editor textarea,
.resume-editor select,
.asset-filter input,
.raw-resume-text {
  color: var(--ra-text);
  border-color: var(--ra-border);
  background: var(--ra-input-bg);
}
.resume-editor input::placeholder,
.resume-editor textarea::placeholder {
  color: var(--ra-placeholder);
}
.resume-editor input:focus,
.resume-editor textarea:focus,
.resume-editor select:focus {
  border-color: var(--ra-accent);
  background: var(--ra-input-focus-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ra-accent) 18%, transparent);
}
.resume-editor button,
.resume-module-head .row button,
.dropzone button:not(.primary) {
  color: var(--ra-text);
  border-color: var(--ra-border);
  background: var(--ra-button-bg);
  box-shadow: 0 8px 18px rgba(24, 50, 74, .1);
}
.resume-editor button:hover,
.resume-module-head .row button:hover {
  color: var(--ra-accent);
  border-color: var(--ra-accent);
}
.resume-editor button.primary,
.dropzone .primary {
  color: #fff;
  border-color: var(--ra-accent-strong);
  background: linear-gradient(180deg, var(--ra-accent), var(--ra-accent-strong));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--ra-accent) 24%, transparent);
}
.resume-module {
  --module-accent: #2563eb;
  --module-soft: #eff6ff;
  border-left: 4px solid var(--module-accent);
}
.resume-module-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--module-accent) 12%, #fff), rgba(255,255,255,0));
}
.resume-module:nth-child(6n + 2) {
  --module-accent: #0f766e;
  --module-soft: #f0fdfa;
}
.resume-module:nth-child(6n + 3) {
  --module-accent: #7c3aed;
  --module-soft: #f5f3ff;
}
.resume-module:nth-child(6n + 4) {
  --module-accent: #b45309;
  --module-soft: #fffbeb;
}
.resume-module:nth-child(6n + 5) {
  --module-accent: #be123c;
  --module-soft: #fff1f2;
}
.resume-module:nth-child(6n) {
  --module-accent: #0369a1;
  --module-soft: #f0f9ff;
}
.resume-editor .palette-choice-core {
  color: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.template-choice.active,
.palette-choice.active {
  border-color: var(--ra-accent);
  color: var(--ra-title);
  background: var(--ra-active-bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ra-accent) 14%, transparent), 0 10px 24px rgba(24, 50, 74, .12);
}
#zoom-value,
#font-value {
  color: var(--ra-text);
  background: var(--ra-active-bg);
}
.dropzone {
  background: var(--ra-drop-bg);
}
.dropzone svg {
  color: var(--ra-accent);
}
.ocr-dropzone {
  background:
    linear-gradient(135deg, rgba(91, 33, 182, .12), rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low))),
    repeating-linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(124, 58, 237, .08) 1px, transparent 1px, transparent 18px);
}
.ocr-dropzone svg {
  color: #7c3aed;
}
.dropzone.has-file {
  border-color: rgba(6, 118, 71, .42);
  background: linear-gradient(180deg, rgba(236, 253, 243, .92), rgba(218, 248, 232, .78));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .18), 0 14px 30px rgba(6, 118, 71, .1);
}
.resume-status.success { background: rgba(236, 253, 243, .9); color: #05603a; }
.resume-status.warn { background: rgba(255, 250, 235, .9); color: #92400e; }
.resume-status.error { background: rgba(254, 243, 242, .92); color: #b42318; }
.target-job-dropzone {
  border-color: rgba(245, 158, 11, .6);
  background:
    linear-gradient(135deg, rgba(254, 243, 199, .9), rgba(255, 251, 235, .76)),
    repeating-linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(245, 158, 11, .12) 1px, transparent 1px, transparent 18px);
}
.target-job-dropzone.has-file {
  border-color: rgba(180, 83, 9, .55);
  background: linear-gradient(180deg, rgba(255, 251, 235, .94), rgba(254, 243, 199, .82));
}
.target-job-dropzone svg,
.target-job-dropzone i { color: #b45309; }
.resume-editor .target-optimize-button {
  border-color: #b45309;
  background: linear-gradient(180deg, #f59e0b, #b45309);
}
.paid-feature-note {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px 13px;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  border-left: 4px solid var(--ra-accent);
  border-radius: 8px;
  background: var(--ra-active-bg);
}
.paid-feature-note strong {
  color: var(--ra-title);
}
.paid-feature-note span {
  color: var(--ra-muted);
  line-height: 1.7;
}
.job-report-preview {
  margin-top: 14px;
}
#pdf-export-stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 794px;
  background: #fff;
  color: #111827;
  pointer-events: none;
  z-index: -1;
}
.workflow-progress {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 11px 12px;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  border-radius: 9px;
  background: rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low));
}
.workflow-progress[hidden] {
  display: none;
}
.workflow-progress div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.workflow-progress span,
.workflow-progress small {
  color: var(--ra-muted);
}
.workflow-progress b {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .28);
}
.workflow-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ra-accent), #0f766e);
  transition: width .18s ease;
}
.company-job-list {
  margin-top: 10px;
}
.company-job-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 9px 10px;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  border-radius: 8px;
  background: var(--ra-active-bg);
}
.company-job-summary span {
  color: var(--ra-muted);
  font-size: 12px;
}
.company-job-queue {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  padding-right: 3px;
}
.company-job-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  text-align: left;
  color: var(--ra-text);
  border: 1px solid var(--ra-border);
  background: rgba(var(--ra-panel-rgb), var(--ra-panel-alpha-low));
}
.company-job-item.active {
  border-color: var(--ra-accent);
  background: var(--ra-active-bg);
}
.company-job-item span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  border-radius: 999px;
  background: var(--ra-accent-strong);
  font-size: 11px;
}
.company-job-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-job-item em {
  color: var(--ra-muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}
.report-sheet {
  width: 794px;
  color: #172033;
  background: #ffffff;
  box-shadow: none;
}
.report-page {
  width: 794px;
  min-height: 1123px;
  padding: 44px;
  overflow: hidden;
  background: #ffffff;
  box-sizing: border-box;
  page-break-after: always;
  break-after: page;
}
.report-page:last-child {
  page-break-after: auto;
  break-after: auto;
}
.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #102033, #175cd3 64%, #0f766e);
}
.report-hero h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.2;
}
.report-hero p {
  margin: 0;
  color: #eff6ff;
  line-height: 1.7;
}
.paid-badge {
  display: inline-flex;
  padding: 4px 8px;
  color: #0f172a;
  border-radius: 999px;
  background: #a7f3d0;
  font-size: 12px;
  font-weight: 950;
}
.report-score {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-left: auto;
  border: 8px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}
.report-score strong {
  font-size: 34px;
  line-height: 1;
}
.report-score span {
  color: #eff6ff;
  font-size: 12px;
  font-weight: 900;
}
.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.donut-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}
.donut-card strong {
  color: #111827;
}
.donut-card p {
  margin: 0;
  color: #475467;
  font-size: 12px;
}
.donut {
  --value: 0;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(#175cd3 calc(var(--value) * 1%), #e2e8f0 0);
}
.donut-green {
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(#0f766e calc(var(--value) * 1%), #e2e8f0 0);
}
.donut-gold {
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    conic-gradient(#b7791f calc(var(--value) * 1%), #e2e8f0 0);
}
.donut span {
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}
.report-meta-grid,
.salary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.salary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.report-meta {
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}
.report-meta span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}
.report-meta strong {
  display: block;
  margin-top: 4px;
  color: #111827;
}
.report-sheet section {
  margin-top: 13px;
}
.report-sheet h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 15px;
}
.report-sheet p {
  margin: 6px 0;
  color: #26364a;
  line-height: 1.62;
}
.report-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.score-card {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}
.score-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #111827;
}
.score-card b {
  display: block;
  height: 8px;
  margin: 9px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #175cd3, #0f766e);
}
.score-card p {
  margin: 0;
  color: #344054;
  font-size: 12px;
}
.report-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  color: #172033;
  font-size: 11px;
}
.report-table th,
.report-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}
.report-table th {
  color: #172033;
  background: #dfe7f2;
  font-weight: 950;
}
.report-list {
  margin: 0;
  padding-left: 18px;
  color: #344054;
  line-height: 1.8;
}
@media (max-width: 1180px) {
  .resume-page { grid-template-columns: 1fr; }
  .resume-preview { position: static; max-height: none; }
  .preview-tools { position: sticky; top: 74px; }
}
@media (max-width: 720px) {
  .resume-modules-card { min-height: 560px; max-height: 72vh; }
  .resume-modules-card .card-body { min-height: 360px; }
  .target-job-dropzone .import-button-row { grid-template-columns: 1fr; }
  .resume-note-sheet { width: 100%; height: 58vh; min-height: 360px; }
  .template-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palette-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .resume-import-grid { grid-template-columns: 1fr; }
  .avatar-uploader { grid-template-columns: 82px minmax(0, 1fr); }
  .avatar-actions-column { grid-column: 2; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-fields-grid { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .report-meta-grid, .salary-grid, .report-score-grid { grid-template-columns: 1fr; }
  .report-hero { grid-template-columns: 1fr; }
  .custom-basic-row, .basic-field-control { grid-template-columns: 1fr; }
  .resume-pages { transform: scale(.52); }
  .preview-tools {
    grid-template-columns: 1fr;
    width: 100%;
    overflow-x: auto;
  }
  .preview-label, .preview-export-actions, .preview-adjust-toggle { justify-self: stretch; }
  .preview-export-actions { justify-content: stretch; }
  .preview-main-action { flex: 1; justify-content: center; }
  .resume-action-grid { grid-template-columns: 1fr; }
  .project-file-bar { align-items: flex-start; flex-direction: column; }
  .r-item-head { grid-template-columns: 1fr; gap: 1px; }
  .r-item-date { text-align: left; }
}

@media print {
  body { background: #fff; }
  .topbar, .resume-editor, .preview-tools { display: none !important; }
  .resume-page { display: block; padding: 0; }
  .resume-preview { display: block; position: static; min-height: 0; overflow: visible; }
  .resume-pages { transform: none !important; gap: 0; }
  .resume-sheet { box-shadow: none; page-break-after: always; }
  [data-export-exclude], .resume-note-sheet { display: none !important; }
}


.resume-import-grid .dropzone > div {
  min-width: 0;
  max-width: 100%;
}

.resume-import-grid .resume-file-name {
  width: 100%;
  max-width: 100%;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}


/* 20260529: manual resume parse actions */
.manual-resume-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.manual-resume-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.manual-resume-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
}
.raw-resume-text {
  min-height: 156px;
}
.manual-resume-help {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  color: var(--ra-muted);
  font-size: 12px;
  line-height: 1.55;
}
.manual-resume-help strong {
  color: var(--ra-title);
}
@media (max-width: 720px) {
  .manual-resume-head { align-items: stretch; flex-direction: column; }
  .manual-resume-actions { display: grid; grid-template-columns: 1fr 1fr; }
}


/* 20260529: import actions and QR fallback */
.resume-import-grid .import-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(260px, 100%);
  gap: 8px;
  margin: 10px auto 0;
}
.resume-import-grid .import-button-row button {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
  white-space: nowrap;
}
.qr-fallback {
  padding: 14px;
  border: 1px dashed rgba(23, 92, 211, .36);
  border-radius: 10px;
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.65;
}
@media (max-width: 720px) {
  .resume-import-grid .import-button-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
