:root {
  --bg: #eef3f6;
  --paper: #fffffb;
  --panel: #f8fbfb;
  --ink: #202327;
  --muted: #62717c;
  --line: #d2dee3;
  --line-strong: #242321;
  --accent: #f08a00;
  --accent-soft: #fff0c2;
  --danger: #ff5a52;
  --blue: #2687e9;
  --green: #30b894;
  --shadow: 0 22px 70px rgba(31, 53, 67, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background:
    linear-gradient(rgba(38, 74, 91, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 74, 91, 0.055) 1px, transparent 1px),
    var(--bg);
  background-size: 36px 36px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(440px, 1fr) 340px;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.preview-pane,
.editor-pane,
.layout-panel {
  min-width: 0;
}

.preview-pane,
.layout-panel,
.editor-panel {
  border: 1px solid rgba(36, 35, 33, 0.14);
  background: rgba(248, 251, 251, 0.96);
  box-shadow: var(--shadow);
}

.preview-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
}

.pane-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 251, 0.88);
}

.pane-topbar h1,
.layout-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.pane-topbar h1 {
  font-size: 24px;
}

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

.page-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f6;
}

.page-toggle button {
  min-height: 32px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.page-toggle button.is-active {
  color: #5f3900;
  background: #ffd14c;
  box-shadow: 0 4px 12px rgba(240, 138, 0, 0.18);
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 251, 0.92);
}

.canvas-toolbar button,
.canvas-toolbar select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffffb;
  font-weight: 800;
}

.canvas-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 0 10px;
}

.canvas-toolbar select {
  padding: 0 8px;
}

.canvas-toolbar button:hover,
.canvas-toolbar select:hover {
  border-color: var(--accent);
}

.canvas-toolbar svg {
  width: 16px;
  height: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ghost-action,
.icon-action,
.module-control,
.small-button,
.tool-chip,
.rich-toolbar button,
.custom-color,
.upload-commands button,
.date-trigger,
.option-pill,
.add-row,
.entry-tabs button,
.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffffb;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.ghost-action {
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.ghost-action:hover,
.icon-action:hover,
.module-control:hover,
.small-button:hover,
.tool-chip:hover,
.rich-toolbar button:hover,
.custom-color:hover,
.upload-commands button:hover,
.date-trigger:hover,
.option-pill:hover,
.entry-tabs button:hover,
.download-link:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(240, 138, 0, 0.13);
  transform: translateY(-1px);
}

.ghost-action svg,
.icon-action svg,
.module-control svg,
.small-button svg,
.rich-toolbar svg,
.upload-commands svg,
.download-link svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.preview-scroll {
  flex: 1;
  overflow: auto;
  padding: 22px;
}

.resume-pages {
  display: grid;
  gap: 34px;
  justify-items: center;
  min-width: max-content;
}

.resume-page {
  --resume-accent: var(--accent);
  --content-scale: 1;
  width: 210mm;
  height: 297mm;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid #d9e2e6;
  background: var(--paper);
  box-shadow: 0 18px 50px rgba(31, 53, 67, 0.16);
  overflow: hidden;
  position: relative;
}

.resume-page-content {
  position: relative;
  min-height: 100%;
  outline: 0;
  transform: scale(var(--content-scale));
  transform-origin: top left;
}

.resume-page-content:focus {
  box-shadow: inset 0 0 0 1px rgba(240, 138, 0, 0.26);
}

.resume-page-content * {
  user-select: text;
}

.canvas-movable {
  outline: 1px solid transparent;
  outline-offset: 2px;
  transition: outline-color 120ms ease, background 120ms ease;
  touch-action: auto;
  -webkit-user-drag: none;
  will-change: transform, left, top, width, height;
}

.canvas-movable:hover {
  outline-color: rgba(240, 138, 0, 0.45);
  background: rgba(255, 209, 76, 0.08);
}

.canvas-movable.is-resize-selected {
  outline-color: transparent;
}

.canvas-movable.is-canvas-dragging {
  transition: none;
  user-select: none;
}

.canvas-resize-overlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 80;
  box-sizing: border-box;
  border: 0;
  outline: 2px solid #ff4d5a;
  outline-offset: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.78);
  transform: translate3d(0, 0, 0);
  will-change: transform, width, height;
}

.canvas-resize-handle {
  position: absolute;
  pointer-events: auto;
  box-sizing: border-box;
  border: 2px solid #ff4d5a;
  background: #fffffb;
  box-shadow: 0 2px 8px rgba(20, 29, 36, 0.18);
}

.canvas-move-handle {
  position: absolute;
  pointer-events: auto;
  top: -28px;
  left: -2px;
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ff4d5a;
  border-radius: 6px;
  background: #fffffb;
  color: #ff4d5a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
  box-shadow: 0 2px 8px rgba(20, 29, 36, 0.18);
}

.canvas-move-handle:active {
  cursor: grabbing;
}

.canvas-copy-handle,
.canvas-delete-handle {
  position: absolute;
  pointer-events: auto;
  top: -28px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ff4d5a;
  border-radius: 6px;
  background: #fff8f8;
  color: #ff4d5a;
  padding: 0;
  box-shadow: 0 2px 8px rgba(20, 29, 36, 0.18);
}

.canvas-copy-handle {
  right: 26px;
  border-color: #2874d9;
  background: #f8fbff;
  color: #2874d9;
}

.canvas-delete-handle {
  right: -2px;
}

.canvas-copy-handle:hover {
  background: #2874d9;
  color: #ffffff;
}

.canvas-delete-handle:hover {
  background: #ff4d5a;
  color: #ffffff;
}

.canvas-copy-handle svg,
.canvas-delete-handle svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}

.canvas-resize-handle.handle-e {
  top: 50%;
  right: -5px;
  width: 10px;
  height: 24px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.canvas-resize-handle.handle-s {
  left: 50%;
  bottom: -5px;
  width: 24px;
  height: 10px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.canvas-resize-handle.handle-se {
  right: -5px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}

.resume-section h3.canvas-movable,
.entry-title-part.canvas-movable,
.entry-submeta.canvas-movable,
.entry-meta.canvas-movable,
.resume-info-grid span.canvas-movable,
.resume-tag.canvas-movable,
.docx-text.canvas-movable {
  cursor: text;
}

.resume-photo.canvas-movable,
.docx-photo.canvas-movable,
.docx-rect.canvas-movable,
.docx-line.canvas-movable {
  cursor: grab;
  touch-action: none;
}

.resume-photo.canvas-movable:active,
.docx-photo.canvas-movable:active,
.docx-rect.canvas-movable:active,
.docx-line.canvas-movable:active {
  cursor: grabbing;
}

.docx-line.canvas-movable:hover {
  background: transparent;
}

.resume-page.is-auto-fit::after {
  content: "A4 · 1页自动排版 " attr(data-fit-label);
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #b8c0c6;
  font-size: 10px;
  letter-spacing: 0;
  pointer-events: none;
}

.resume-blank {
  display: grid;
  place-items: center;
  height: calc(297mm - 80px);
  color: #b3bec5;
  font-size: 22px;
  font-weight: 900;
}

.resume-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--resume-accent);
}

.resume-name {
  margin: 0;
  font-family: Georgia, "Songti SC", SimSun, serif;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

.resume-intent {
  margin: 8px 0 0;
  color: var(--resume-accent);
  font-weight: 800;
}

.resume-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  color: #3e454d;
  font-size: 13px;
}

.resume-photo {
  width: 96px;
  height: 128px;
  border: 2px solid var(--resume-accent);
  background: #d9eefc;
  overflow: hidden;
  cursor: move;
  user-select: none;
}

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

.resume-section {
  margin-top: 20px;
}

.resume-section.is-muted {
  opacity: 0.42;
}

.resume-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--resume-accent);
  font-size: 18px;
  letter-spacing: 0;
}

.resume-section h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--resume-accent), transparent);
}

.resume-entry {
  padding: 10px 0;
  border-bottom: 1px dashed #d7e0e4;
}

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

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-weight: 800;
}

.entry-head-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-title-part {
  display: inline-block;
  min-width: 1em;
}

.entry-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.entry-submeta {
  margin-top: 4px;
  color: #4c5661;
  font-size: 13px;
}

.rich-output {
  margin-top: 8px;
  color: #262a2f;
  line-height: 1.72;
  font-size: 13.5px;
}

.rich-output ul,
.rich-output ol {
  margin: 0;
  padding-left: 1.3em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-tag {
  padding: 4px 9px;
  border: 1px solid rgba(240, 138, 0, 0.42);
  color: #7d4a00;
  background: #fff3d2;
  font-size: 12px;
}

.resume-template-orange-duo,
.resume-template-blue-sidebar,
.resume-template-blue-sales,
.resume-template-purple-resume,
.resume-template-rendered-docx {
  background: #fff;
}

.resume-template-orange-duo .resume-page-content,
.resume-template-blue-sidebar .resume-page-content,
.resume-template-blue-sales .resume-page-content,
.resume-template-purple-resume .resume-page-content,
.resume-template-rendered-docx .resume-page-content {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.docx-exact-page {
  position: absolute;
  inset: 0;
  width: 595.28pt;
  height: 841.89pt;
  overflow: hidden;
  background: #fff;
  letter-spacing: 0;
}

.resume-template-rendered-docx .docx-exact-page {
  overflow: visible;
}

.docx-template-graduate-1,
.docx-template-graduate-5,
.docx-template-graduate-7 {
  overflow: visible;
}

.docx-text,
.docx-rect,
.docx-static-rect,
.docx-line,
.docx-photo {
  position: absolute;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.docx-text {
  z-index: 3;
  overflow: hidden;
  white-space: pre-line;
  word-break: break-word;
  letter-spacing: 0;
}

.docx-editable-overlay {
  padding: 2pt 3pt;
  border: 1px dashed rgba(31, 78, 121, 0.22);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(0.2px);
}

.docx-editable-overlay:hover,
.docx-editable-overlay:focus {
  border-color: rgba(240, 138, 0, 0.72);
  background: rgba(255, 255, 255, 0.95);
}

.docx-word-text {
  padding: 0;
  border: 0;
  background: transparent;
  outline: 0;
  overflow: visible;
  user-select: text;
  -webkit-user-select: text;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  overflow-wrap: anywhere;
}

.docx-word-text.docx-strong-title {
  font-weight: 900 !important;
  -webkit-text-stroke: 0.18px currentColor;
}

.docx-word-line {
  overflow: visible;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.docx-word-text.docx-valign-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.docx-word-text.docx-valign-middle {
  display: flex;
  align-items: center;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="8"],
.docx-template-job-4 .docx-word-text[data-template-text-index="12"],
.docx-template-job-4 .docx-word-text[data-template-text-index="21"],
.docx-template-job-4 .docx-word-text[data-template-text-index="23"] {
  white-space: pre-wrap;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="8"],
.docx-template-job-4 .docx-word-text[data-template-text-index="12"],
.docx-template-job-4 .docx-word-text[data-template-text-index="21"] {
  line-height: 12.6pt !important;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="23"] {
  line-height: 14pt !important;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="14"],
.docx-template-job-4 .docx-word-text[data-template-text-index="19"] {
  white-space: pre-wrap;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="14"] {
  line-height: 14pt !important;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="19"] {
  line-height: 12.6pt !important;
}

.docx-template-job-4 .docx-ai-rich-flow:not([data-job-four-manual-layout="true"]) {
  box-sizing: border-box;
  max-width: none !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
}

.docx-template-job-4 .docx-word-text[data-template-text-index="7"],
.docx-template-job-4 .docx-word-text[data-template-text-index="11"],
.docx-template-job-4 .docx-word-text[data-template-text-index="18"],
.docx-template-job-4 .docx-word-text[data-job-four-education-meta="date"] {
  text-align: right !important;
  white-space: pre !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.docx-template-job-5 .docx-ai-rich-flow {
  white-space: pre-line !important;
  overflow-wrap: anywhere !important;
  word-break: break-all !important;
  text-align-last: left;
  text-justify: inter-character;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="7"]:not([data-job-five-manual-layout="true"]) {
  width: 381.56pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="17"]:not([data-job-five-manual-layout="true"]) {
  width: 382pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="22"]:not([data-job-five-manual-layout="true"]) {
  width: 380.1pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="25"]:not([data-job-five-manual-layout="true"]) {
  width: 380.3pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="31"]:not([data-job-five-manual-layout="true"]) {
  width: 382.15pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="14"]:not([data-job-five-manual-layout="true"]) {
  width: 94.35pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="21"]:not([data-job-five-manual-layout="true"]) {
  width: 91.35pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="30"]:not([data-job-five-manual-layout="true"]) {
  width: 92.1pt !important;
}

.docx-template-job-5 .docx-word-text[data-template-text-index="14"],
.docx-template-job-5 .docx-word-text[data-template-text-index="21"],
.docx-template-job-5 .docx-word-text[data-template-text-index="30"] {
  text-align: right !important;
  white-space: pre !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.docx-word-text.canvas-movable:hover {
  background: transparent;
  outline-color: rgba(240, 138, 0, 0.45);
}

.docx-word-text:focus {
  background: rgba(255, 255, 255, 0.88);
  outline: 1px dashed rgba(240, 138, 0, 0.8);
}

.docx-free-shape {
  cursor: move;
}

.docx-text p {
  margin: 0 0 0.22em;
}

.docx-text ol,
.docx-text ul {
  margin: 0;
  padding-left: 1.25em;
}

.docx-text li {
  margin: 0 0 0.18em;
}

.docx-rect {
  z-index: 0;
}

.docx-static-rect {
  pointer-events: none;
}

.docx-line {
  z-index: 4;
  min-height: 18px;
  pointer-events: auto;
}

.docx-line.canvas-movable:hover {
  background: rgba(40, 116, 217, 0.06);
}

.docx-line.is-resize-selected {
  background: rgba(255, 77, 90, 0.08);
}

.docx-photo {
  z-index: 2;
  overflow: hidden;
  background: #f8f8f4;
}

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

.docx-rendered-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scale(var(--content-scale-inverse, 1));
  transform-origin: top left;
  user-select: none;
  pointer-events: none;
}

.template-orange-sheet,
.template-sidebar-sheet {
  min-height: 100%;
}

.template-orange-sheet {
  display: grid;
  grid-template-columns: 30% minmax(0, 1fr);
  gap: 20px;
  color: #222325;
}

.template-orange-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 15px;
  color: #fff9ef;
  background: #252525;
}

.template-orange-side .resume-photo {
  width: 108px;
  height: 138px;
  margin: 0 auto 4px;
  border-color: var(--resume-accent);
  background: #f8f8f4;
}

.template-orange-name {
  text-align: center;
}

.template-orange-name span {
  color: var(--resume-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.template-orange-name h2 {
  margin: 6px 0 3px;
  font-size: 30px;
  line-height: 1.08;
}

.template-orange-name p {
  margin: 0;
  color: #f0e8dc;
  font-size: 13px;
  font-weight: 800;
}

.template-side-section {
  display: grid;
  gap: 8px;
}

.template-side-section h3 {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--resume-accent);
  font-size: 15px;
  line-height: 1.15;
}

.template-side-section h3 small {
  color: currentColor;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.8;
}

.template-orange-side .rich-output,
.template-orange-side .template-contact-list {
  color: #fff9ef;
  font-size: 11.5px;
  line-height: 1.6;
}

.template-contact-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.template-contact-list li {
  display: grid;
  gap: 2px;
}

.template-contact-list span {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.72;
}

.template-contact-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.template-orange-main {
  padding: 4px 0 0;
}

.template-main-section {
  margin-top: 16px;
}

.template-main-section:first-child {
  margin-top: 0;
}

.template-main-section h3 {
  border-bottom: 2px solid var(--resume-accent);
  padding-bottom: 5px;
  font-size: 17px;
  text-transform: none;
}

.template-main-section h3::after {
  display: none;
}

.template-main-section h3 small {
  margin-left: 8px;
  color: #67717a;
  font-size: 11px;
}

.template-orange-sheet .resume-entry,
.template-sidebar-sheet .resume-entry {
  padding: 8px 0;
}

.template-orange-sheet .rich-output,
.template-sidebar-sheet .rich-output {
  font-size: 12.4px;
  line-height: 1.55;
}

.template-sidebar-sheet {
  display: grid;
  grid-template-columns: 32% minmax(0, 1fr);
  color: #26313a;
  background: #fffffb;
}

.template-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px 22px;
  background: #d9edf6;
}

.template-sidebar .resume-photo {
  width: 132px;
  height: 164px;
  margin: 0 auto 8px;
  border: 3px solid #fffffb;
  box-shadow: 0 10px 28px rgba(40, 79, 98, 0.18);
}

.template-sidebar h2 {
  margin: 0;
  text-align: center;
  font-size: 34px;
  line-height: 1.1;
}

.template-sidebar-intent {
  margin: -10px 0 0;
  text-align: center;
  color: #28536a;
  font-weight: 900;
}

.template-sidebar .template-side-section h3 {
  color: #28536a;
  border-bottom: 1px solid rgba(40, 83, 106, 0.32);
  padding-bottom: 5px;
}

.template-sidebar .rich-output,
.template-sidebar .template-contact-list {
  font-size: 11.5px;
  line-height: 1.55;
}

.template-sidebar-main {
  padding: 32px 34px;
}

.template-profile-section {
  margin-top: 0;
}

.template-sidebar-main .resume-section h3 {
  color: #28536a;
  border-bottom: 2px solid #28536a;
  padding-bottom: 6px;
  font-size: 18px;
}

.template-sidebar-main .resume-section h3::after {
  display: none;
}

.template-language-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.template-language-compact span {
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
}

.editor-panel {
  min-height: calc(100vh - 36px);
  overflow: hidden;
  border-radius: var(--radius);
}

.editor-scroll {
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 22px;
}

.editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffdf8;
}

.editor-title input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.editor-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

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

.field {
  position: relative;
  min-width: 0;
}

.field label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #30343a;
  font-weight: 800;
}

.field label svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.text-input,
.field input,
.field select,
.date-trigger,
.module-title-input,
.custom-module-form input {
  width: 100%;
  min-height: 44px;
  border: 2px solid rgba(36, 35, 33, 0.88);
  border-radius: var(--radius);
  outline: 0;
  padding: 0 13px;
  color: var(--ink);
  background: #fffdf8;
}

.text-input:focus,
.field input:focus,
.field select:focus,
.date-trigger:focus,
.module-title-input:focus,
.rich-editor:focus,
.custom-module-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 138, 0, 0.13);
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.date-trigger {
  justify-content: space-between;
  text-align: left;
}

.date-trigger svg {
  width: 18px;
  height: 18px;
  color: var(--ink);
}

.date-picker-popover {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 6px);
  width: min(420px, 100vw - 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffffb;
  box-shadow: 0 18px 48px rgba(20, 29, 36, 0.22);
}

.date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.date-picker-head button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffffb;
}

.date-picker-head svg {
  width: 16px;
  height: 16px;
}

.date-picker-wheels {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
}

.date-wheel {
  height: 178px;
  overflow-y: auto;
  border: 1px solid #e0e8ec;
  border-radius: var(--radius);
  background: #f8fbfb;
  scroll-snap-type: y mandatory;
}

.date-wheel button {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid #e8eef1;
  color: var(--ink);
  background: transparent;
  scroll-snap-align: center;
}

.date-wheel button:hover,
.date-wheel button.is-selected {
  color: #5f3900;
  background: #ffd14c;
  font-weight: 900;
}

.date-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}

.date-picker-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fffffb;
  font-weight: 800;
}

.date-picker-actions .confirm {
  border-color: var(--accent);
  color: #5f3900;
  background: #ffd14c;
}

.icon-action {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
}

.icon-action.danger,
.module-control.danger {
  border-color: rgba(255, 90, 82, 0.35);
  color: var(--danger);
}

.add-row {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  border-color: var(--accent);
  color: #6b3f00;
  background: #ffd14c;
  font-weight: 900;
}

.add-row:disabled,
.add-row.is-loading {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.add-row.is-loading svg {
  animation: spin 900ms linear infinite;
}

.editor-divider {
  height: 1px;
  margin: 20px 0;
  background: var(--line-strong);
}

.photo-station {
  display: grid;
  gap: 16px;
}

.photo-identity-area,
.photo-life-area {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.photo-uploader {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 196px;
  border: 2px solid var(--line-strong);
  background: #9ed0f3;
  color: #064d89;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.photo-uploader-id {
  width: 154px;
  height: 206px;
}

.photo-uploader-life {
  width: 150px;
  height: 176px;
  background: #a9d8f6;
}

.photo-uploader img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-uploader.has-image::after {
  content: "双击预览";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 5px 7px;
  border-radius: calc(var(--radius) - 2px);
  color: #fff;
  background: rgba(20, 29, 36, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.photo-uploader.has-image:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.photo-uploader input {
  display: none;
}

.upload-empty {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #083f70;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.upload-empty::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.upload-commands {
  display: flex;
  gap: 10px;
}

.upload-commands button {
  min-height: 36px;
  padding: 0 15px;
  border: 2px solid var(--line-strong);
  font-weight: 800;
}

.photo-helper {
  margin: 0;
  color: #4f5d66;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.photo-uploader:hover,
.photo-uploader.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 10px 24px rgba(240, 138, 0, 0.14);
  transform: translateY(-1px);
}

.photo-option-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.option-group h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-row-size {
  align-items: stretch;
}

.option-pill {
  min-height: 38px;
  padding: 0 15px;
  border: 2px solid var(--line-strong);
  font-weight: 800;
}

.size-pill {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  min-width: 128px;
  min-height: 64px;
  padding: 8px 12px;
  text-align: left;
}

.size-pill small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.color-pill {
  gap: 8px;
}

.color-chip {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(36, 35, 33, 0.28);
  border-radius: 50%;
}

.option-pill.is-selected {
  border-color: var(--accent);
  color: #6b3f00;
  background: var(--accent-soft);
}

.custom-bg-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.custom-bg-control label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.custom-bg-control input {
  width: 100%;
  min-height: 36px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fffdf8;
}

.custom-bg-control input[type="color"] {
  padding: 3px;
}

.section-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 18px;
}

.small-button,
.download-link {
  min-height: 38px;
  padding: 0 12px;
  font-weight: 800;
}

.small-button.primary {
  border-color: var(--accent);
  color: #6b3f00;
  background: #ffd14c;
}

.small-button.danger {
  color: var(--danger);
}

.entry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.entry-tabs button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
}

.entry-tabs button.is-active {
  border-color: var(--accent);
  color: #6b3f00;
  background: var(--accent-soft);
  font-weight: 900;
}

.editor-entry {
  padding-top: 2px;
}

.rich-block {
  margin-top: 20px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fffdf8;
}

.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.rich-toolbar button {
  width: 32px;
  height: 32px;
  padding: 0;
}

.rich-toolbar .polish-tool {
  width: auto;
  padding: 0 10px;
  color: #463306;
  background: #fff7df;
}

.rich-toolbar select {
  min-height: 32px;
  max-width: 176px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  color: var(--ink);
  background: #fffdf8;
}

.tool-color {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  cursor: pointer;
}

.tool-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.tool-separator {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.rich-editor {
  min-height: 176px;
  padding: 18px 20px;
  outline: 0;
  color: var(--ink);
  line-height: 1.75;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #b8b2aa;
}

.language-list {
  display: grid;
  gap: 12px;
}

.inline-card {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.inline-card:last-child {
  border-bottom: 0;
}

.custom-module-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 18px;
}

.layout-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
}

.layout-header {
  text-align: center;
}

.layout-header h2 {
  font-size: 25px;
}

.template-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffdf8;
}

.template-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-panel-head h3 {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
}

.template-panel-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-switcher {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 20px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--ink);
  background: #fffffb;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.template-switcher:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(240, 138, 0, 0.14);
  transform: translateY(-1px);
}

.template-switcher-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.template-switcher-copy strong,
.template-switcher-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.template-switcher-copy strong {
  font-size: 14px;
}

.template-switcher-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.template-switcher > svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.template-gallery,
.template-group {
  display: grid;
  gap: 10px;
}

.template-group h4 {
  margin: 2px 0 0;
  color: #39434c;
  font-size: 13px;
}

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

.template-option {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px;
  color: var(--ink);
  background: #fffffb;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.template-option:hover,
.template-option.is-active {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(240, 138, 0, 0.14);
  transform: translateY(-1px);
}

.template-option.is-active {
  background: #fff6df;
}

.template-option strong,
.template-option small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.template-option strong {
  font-size: 12px;
}

.template-option small {
  color: var(--muted);
  font-size: 10px;
}

.template-thumb {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 8px;
  border: 1px solid #d9e2e6;
  background: #fffffb;
  overflow: hidden;
}

.template-thumb span {
  display: block;
  min-height: 5px;
  border-radius: 999px;
  background: #d2dee3;
}

.template-thumb::before {
  content: "";
  display: block;
  height: 18px;
  border-bottom: 2px solid var(--accent);
}

.template-thumb-classic span:nth-child(2),
.template-thumb-orange span:nth-child(2) {
  width: 70%;
}

.template-thumb-orange {
  border-left: 10px solid #242321;
}

.template-thumb-orange::before {
  border-color: #f08a00;
  background: linear-gradient(90deg, #f08a00 0 42%, transparent 42%);
}

.template-thumb-sidebar {
  grid-template-columns: 34% 1fr;
  gap: 5px;
  padding: 0;
}

.template-thumb-sidebar::before {
  height: auto;
  min-height: 100%;
  border: 0;
  background: #d9edf6;
}

.template-thumb-sidebar span {
  margin: 7px 7px 0 0;
  background: #8fb8cb;
}

.template-thumb-blue-sales {
  grid-template-columns: 34% 1fr;
  gap: 5px;
  padding: 0;
}

.template-thumb-blue-sales::before {
  height: auto;
  min-height: 100%;
  border: 0;
  background: linear-gradient(#91ace0 0 48%, #dce8f8 48%);
}

.template-thumb-blue-sales span {
  margin: 7px 7px 0 0;
  background: #1f3f6b;
}

.template-thumb-purple::before {
  border-color: #a7a4c7;
  background: linear-gradient(90deg, #a9a7c9 0 58%, #ececf4 58%);
}

.template-thumb-purple span:nth-child(1),
.template-thumb-purple span:nth-child(3) {
  width: 62%;
  background: #a7a4c7;
}

.template-thumb-rendered {
  background-color: #fff;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
}

.template-thumb-rendered::before,
.template-thumb-rendered span {
  display: none;
}

.template-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: auto;
  padding: 28px 24px;
  background: rgba(238, 243, 246, 0.92);
  backdrop-filter: blur(10px);
}

.template-picker {
  width: min(1240px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(36, 35, 33, 0.12);
  border-radius: var(--radius);
  background: #fffffb;
  box-shadow: 0 28px 80px rgba(20, 29, 36, 0.2);
}

.template-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.template-picker-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.template-picker-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.template-picker-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
}

.template-picker-close:hover {
  border-color: var(--accent);
}

.template-picker-close span {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

.template-picker-grid {
  display: grid;
  gap: 24px;
  padding: 22px 24px 26px;
}

.template-picker-section {
  display: grid;
  gap: 12px;
}

.template-picker-section h3 {
  margin: 0;
  color: #1f2933;
  font-size: 17px;
  font-weight: 900;
}

.template-picker-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.template-preview-option {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 2px solid #e5ecef;
  border-radius: var(--radius);
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.template-preview-option:hover,
.template-preview-option.is-active {
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(20, 29, 36, 0.12);
  transform: translateY(-2px);
}

.template-preview-option.is-active {
  background: #fff9e9;
}

.template-preview-frame {
  display: grid;
  justify-content: center;
  align-content: start;
  height: 420px;
  overflow: hidden;
  border: 1px solid #d9e2e6;
  border-radius: calc(var(--radius) - 2px);
  background: #eef3f6;
  pointer-events: none;
}

.template-preview-page {
  width: 210mm;
  height: 297mm;
  margin-top: 0;
  border: 0;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
  position: relative;
  transform: scale(0.36);
  transform-origin: top center;
}

.template-preview-page .resume-page-content {
  min-height: 100%;
  outline: 0;
}

.template-preview-page .docx-text {
  user-select: none;
}

.template-preview-page.resume-template-rendered-docx .docx-editable-overlay,
.template-preview-page.resume-template-rendered-docx .docx-rect,
.template-preview-page.resume-template-rendered-docx .docx-line {
  display: none;
}

.template-preview-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.template-preview-meta strong,
.template-preview-meta small {
  min-width: 0;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  line-height: 1.25;
}

.template-preview-meta strong {
  font-size: 15px;
}

.template-preview-meta small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-stack {
  display: grid;
  gap: 10px;
}

.module-row {
  display: grid;
  grid-template-columns: 1fr 36px 36px;
  gap: 8px;
  align-items: center;
}

.module-pill {
  min-height: 44px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  background: #fffdf8;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.module-pill:hover,
.module-pill.is-active {
  color: #5f3900;
  background: var(--accent-soft);
  box-shadow: 0 8px 18px rgba(240, 138, 0, 0.12);
}

.module-control {
  width: 36px;
  height: 36px;
  padding: 0;
  color: #4c5661;
}

.module-control.is-hidden {
  color: #9ca3af;
  background: #f2efe8;
}

.settings-block {
  padding: 14px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffdf8;
}

.settings-block h3,
.setting-line h3 {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
}

.setting-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.custom-color {
  min-height: 34px;
  padding: 0 8px;
  color: var(--accent);
  font-weight: 800;
}

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

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
}

.swatch.is-active {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px #fffdf8, 0 0 0 5px var(--accent);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 35, 33, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 14px 40px rgba(54, 44, 30, 0.18);
  animation: toast-in 220ms ease both;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 29, 36, 0.34);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(36, 35, 33, 0.16);
  border-radius: var(--radius);
  background: #fffffb;
  box-shadow: 0 26px 80px rgba(20, 29, 36, 0.24);
}

.modal-panel form,
.modal-content {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-panel h3 {
  margin: 0;
  font-size: 20px;
}

.modal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-panel input {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 12px;
  outline: 0;
  background: #fffffb;
}

.modal-panel input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 138, 0, 0.13);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: #fffffb;
  font-weight: 800;
}

.modal-actions .confirm {
  border-color: var(--accent);
  color: #6b3f00;
  background: #ffd14c;
}

.modal-actions .danger {
  border-color: rgba(255, 90, 82, 0.36);
  color: var(--danger);
}

.photo-preview-modal {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.photo-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.photo-preview-head h3 {
  margin: 0;
}

.photo-preview-head button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  font-size: 24px;
  line-height: 1;
}

.photo-preview-stage {
  display: grid;
  place-items: center;
  max-height: calc(100vh - 116px);
  padding: 18px;
  background:
    linear-gradient(45deg, rgba(36, 35, 33, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(36, 35, 33, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(36, 35, 33, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(36, 35, 33, 0.06) 75%),
    #f8fbfb;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.photo-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 152px);
  border: 2px solid var(--line-strong);
  background: #fff;
  object-fit: contain;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 1260px) {
  .studio-shell {
    grid-template-columns: minmax(420px, 1fr) 330px;
  }

  .editor-pane {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .editor-panel {
    min-height: auto;
  }

  .editor-scroll {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .studio-shell {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .layout-panel {
    max-height: none;
  }

  .pane-topbar,
  .preview-actions,
  .canvas-toolbar,
  .section-actions,
  .setting-line {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .photo-option-groups,
  .inline-card,
  .custom-module-form {
    grid-template-columns: 1fr;
  }

  .custom-bg-control {
    grid-template-columns: 1fr;
  }

  .resume-hero {
    grid-template-columns: 1fr;
  }

  .resume-photo {
    order: -1;
  }

  .resume-pages {
    min-width: 0;
  }

  .resume-page {
    width: 210mm;
  }
}

@media print {
  body {
    background: #fff;
  }

  .editor-pane,
  .layout-panel,
  .pane-topbar {
    display: none;
  }

  .studio-shell {
    display: block;
    padding: 0;
  }

  .preview-pane {
    border: 0;
    box-shadow: none;
  }

  .preview-scroll {
    padding: 0;
    overflow: visible;
  }

  .resume-page {
    width: 210mm;
    height: 297mm;
    break-after: page;
    margin: 0;
    box-shadow: none;
    border: 0;
  }

  .resume-pages {
    gap: 0;
  }
}

/* Reference workbench layout */
:root {
  --bg: #f5f4ef;
  --paper: #fffffb;
  --panel: #f8f9f7;
  --ink: #252525;
  --muted: #6b6f74;
  --line: #cfd5d8;
  --line-strong: #2b2b2b;
  --accent: #ff8a00;
  --accent-soft: #fff1d7;
  --danger: #ff6b7b;
  --shadow: none;
  --radius: 8px;
  --editor-width: 320px;
  --layout-width: 220px;
  --preview-width: 1fr;
  --right-width: 260px;
  --splitter-width: 12px;
  --editor-height: calc(100vh - 64px);
  --layout-height: calc(100vh - 64px);
  --preview-height: calc(100vh - 64px);
  --right-height: calc(100vh - 64px);
  --template-height: 190px;
}

html,
body {
  min-height: 100%;
}

body {
  overflow: hidden;
  background:
    linear-gradient(rgba(43, 43, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 43, 43, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
}

.studio-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 42px minmax(0, 1fr);
  gap: 0;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0 12px 12px;
  border: 0;
  background: rgba(255, 255, 250, 0.9);
  box-shadow: none;
}

.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 0 8px 0 22px;
  border-bottom: 2px solid rgba(43, 43, 43, 0.72);
  background: #f6ecdf;
}

.studio-header strong {
  font-size: 17px;
  letter-spacing: 0;
}

.profile-button {
  min-width: 104px;
  min-height: 30px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: #fffef8;
  color: var(--ink);
  font-weight: 800;
}

.workspace-grid {
  display: grid;
  grid-template-columns:
    minmax(280px, var(--editor-width))
    var(--splitter-width)
    minmax(180px, var(--layout-width))
    var(--splitter-width)
    minmax(360px, var(--preview-width))
    var(--splitter-width)
    minmax(230px, var(--right-width));
  gap: 0;
  height: 100%;
  min-height: 0;
  padding-top: 12px;
  align-items: stretch;
}

.workspace-splitter {
  position: relative;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: var(--splitter-width);
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}

.workspace-splitter::before {
  content: "";
  width: 2px;
  height: min(420px, 72%);
  border-radius: 999px;
  background: rgba(43, 43, 43, 0.22);
  transition: background 140ms ease, box-shadow 140ms ease, width 140ms ease;
}

.workspace-splitter::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 42px;
  border-top: 2px solid rgba(255, 138, 0, 0);
  border-bottom: 2px solid rgba(255, 138, 0, 0);
  opacity: 0;
  transition: opacity 140ms ease, border-color 140ms ease;
}

.workspace-splitter:hover::before,
.workspace-splitter.is-dragging::before,
.workspace-splitter:focus-visible::before {
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.12);
}

.workspace-splitter:hover::after,
.workspace-splitter.is-dragging::after,
.workspace-splitter:focus-visible::after {
  opacity: 1;
  border-color: var(--accent);
}

.workspace-splitter:focus-visible {
  outline: 0;
}

body.is-resizing-workspace {
  cursor: col-resize;
  user-select: none;
}

body.is-resizing-panel-height {
  cursor: row-resize;
  user-select: none;
}

.editor-pane,
.layout-panel,
.preview-pane,
.right-workbench {
  min-width: 0;
}

.editor-pane {
  position: relative;
  align-self: stretch;
  height: min(100%, var(--editor-height));
  max-width: 360px;
}

.editor-panel {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border: 2px solid var(--line-strong);
  border-radius: 0;
  background: #fffef9;
  box-shadow: none;
}

.editor-scroll {
  height: 100%;
  max-height: none;
  padding: 12px;
}

.editor-title {
  min-height: 34px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #fffef9;
}

.editor-title input {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}

.editor-title svg {
  width: 15px;
  height: 15px;
}

.editor-pane .form-grid,
.editor-pane .inline-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.editor-pane .photo-option-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editor-pane .field label,
.editor-pane .option-group h3 {
  font-size: 12px;
}

.editor-pane .text-input,
.editor-pane .field input,
.editor-pane .field select,
.editor-pane .date-trigger,
.editor-pane .module-title-input,
.editor-pane .custom-module-form input {
  min-height: 32px;
  padding: 0 8px;
  border-width: 1.5px;
  font-size: 12px;
}

.editor-pane input[data-entry-field="role"],
.editor-pane input[data-entry-field="result"],
.editor-pane input[data-entry-field="major"] {
  padding-left: 6px;
  padding-right: 6px;
  font-size: 11px;
}

.editor-pane .icon-action {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
}

.editor-pane .add-row {
  min-height: 34px;
  margin-top: 12px;
  border-width: 1.5px;
  font-size: 12px;
}

.editor-pane .section-actions {
  margin: 10px 0 12px;
  flex-direction: row;
}

.editor-pane .small-button {
  min-height: 32px;
  flex: 1;
  font-size: 12px;
}

.editor-pane .entry-tabs {
  gap: 6px;
  margin-bottom: 10px;
}

.editor-pane .entry-tabs button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.rich-block {
  margin-top: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
}

.rich-toolbar {
  gap: 3px;
  padding: 6px;
}

.rich-toolbar button {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.rich-toolbar .polish-tool {
  width: auto;
  padding: 0 6px;
  font-size: 10px;
}

.rich-toolbar select {
  min-height: 24px;
  max-width: 88px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 10px;
}

.rich-toolbar svg,
.editor-pane .icon-action svg,
.editor-pane .small-button svg,
.editor-pane .add-row svg {
  width: 13px;
  height: 13px;
}

.tool-separator {
  height: 21px;
}

.tool-color {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.rich-editor {
  min-height: 132px;
  padding: 13px;
  font-size: 12px;
  line-height: 1.65;
}

.photo-station,
.photo-option-groups {
  gap: 10px;
}

.photo-station {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.photo-station > .editor-divider {
  display: none;
}

.photo-option-groups,
.photo-station > .add-row {
  grid-column: 1 / -1;
}

.photo-uploader-id,
.photo-uploader-life {
  width: 112px;
  height: 148px;
  min-height: 0;
}

.photo-uploader-life {
  height: 132px;
}

.editor-pane .upload-empty {
  gap: 6px;
  font-size: 14px;
}

.editor-pane .upload-empty::before {
  width: 30px;
  height: 30px;
  font-size: 24px;
}

.editor-pane .upload-commands {
  gap: 6px;
}

.editor-pane .upload-commands button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.editor-pane .photo-helper {
  font-size: 11px;
  line-height: 1.35;
}

.editor-pane .size-pill {
  min-width: 0;
  min-height: 48px;
  padding: 6px 8px;
}

.editor-pane .option-pill {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.editor-pane .option-row {
  gap: 6px;
}

.editor-pane .custom-bg-control {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-pane .custom-bg-control input {
  min-height: 30px;
  padding: 0 7px;
}

.layout-panel {
  position: relative;
  align-self: stretch;
  gap: 8px;
  height: min(100%, var(--layout-height));
  max-height: none;
  padding: 11px 16px 28px;
  overflow: auto;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #f7f8f7;
  box-shadow: none;
}

.layout-header {
  padding-bottom: 4px;
  text-align: center;
}

.layout-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.module-stack {
  gap: 5px;
}

.module-row {
  grid-template-columns: 1fr 24px 24px;
  gap: 5px;
}

.module-pill {
  min-height: 22px;
  padding: 0 8px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: #fffef9;
  font-size: 12px;
  font-weight: 900;
}

.module-pill:hover,
.module-pill.is-active {
  color: var(--accent);
  background: #fff7e9;
  box-shadow: none;
}

.module-control {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #6e7378;
}

.module-control:hover {
  transform: none;
  box-shadow: none;
}

.module-control svg {
  width: 13px;
  height: 13px;
}

.settings-block {
  padding: 8px 10px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #fffef9;
}

.settings-block h3,
.setting-line h3 {
  font-size: 12px;
}

.setting-line {
  align-items: center;
  gap: 8px;
}

.custom-color {
  min-height: 26px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  font-size: 10px;
}

.custom-color:hover {
  transform: none;
  box-shadow: none;
}

.custom-color input {
  width: 20px;
  height: 20px;
}

.swatch-row {
  gap: 8px;
  margin-top: 8px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-width: 1px;
}

.swatch.is-active {
  box-shadow: 0 0 0 2px #fffef9, 0 0 0 4px var(--accent);
}

.preview-pane {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-self: stretch;
  height: min(100%, var(--preview-height));
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pane-topbar,
.canvas-toolbar {
  width: min(100%, 500px);
  margin: 0 auto;
  border: 1px solid #d7e4ed;
  background: rgba(255, 255, 255, 0.94);
}

.pane-topbar {
  align-items: center;
  padding: 7px 10px;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.pane-topbar h1 {
  font-size: 16px;
  line-height: 1.2;
}

.eyebrow {
  margin-bottom: 2px;
  color: #2478c7;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.preview-actions {
  gap: 5px;
}

.page-toggle {
  padding: 2px;
  border-color: #d7e4ed;
  border-radius: 4px;
}

.page-toggle button {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 10px;
}

.page-toggle button.is-active {
  color: #3b2900;
  background: #ffd24d;
  box-shadow: none;
}

.ghost-action {
  min-height: 25px;
  padding: 0 8px;
  border-color: #d7e4ed;
  border-radius: 4px;
  font-size: 10px;
}

.ghost-action svg {
  width: 12px;
  height: 12px;
}

.canvas-toolbar {
  gap: 4px;
  padding: 5px 8px;
  border-radius: 0 0 4px 4px;
}

.canvas-toolbar button,
.canvas-toolbar select {
  min-height: 22px;
  border-color: #d7e4ed;
  border-radius: 4px;
  font-size: 10px;
}

.canvas-toolbar button {
  min-width: 23px;
  padding: 0 6px;
}

.canvas-toolbar select {
  max-width: 84px;
  padding: 0 4px;
}

.canvas-toolbar svg {
  width: 12px;
  height: 12px;
}

.preview-scroll {
  display: grid;
  place-items: start center;
  min-height: 0;
  overflow: auto;
  padding: 0 0 6px;
}

.preview-pane .resume-pages {
  gap: 0;
  min-width: 0;
  zoom: 1;
}

.preview-pane .resume-page {
  border-color: #e0e5e7;
  box-shadow: 0 10px 28px rgba(44, 47, 50, 0.1);
}

.preview-bottom-actions {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  pointer-events: auto;
}

.ai-action {
  grid-column: 2;
  min-height: 28px;
  padding: 0 18px;
  border: 1.5px solid #ff6b7b;
  border-radius: 6px;
  color: #ff4f62;
  background: #ffeef0;
  font-size: 15px;
  font-weight: 900;
}

.refine-action {
  grid-column: 3;
  min-height: 28px;
  padding: 0 16px;
  border: 1.5px solid #2b5d73;
  border-radius: 6px;
  color: #214f63;
  background: #eef7f8;
  font-size: 14px;
  font-weight: 900;
}

.preview-download {
  grid-column: 4;
  justify-self: start;
  min-width: 100px;
}

.right-workbench {
  position: relative;
  display: grid;
  grid-template-rows: minmax(178px, var(--template-height)) 10px minmax(0, 1fr);
  gap: 9px;
  align-self: stretch;
  height: min(100%, var(--right-height));
  max-height: none;
  min-height: 0;
}

.right-workbench .template-panel,
.job-panel {
  min-height: 0;
  overflow: auto;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #fffef9;
  box-shadow: none;
}

.panel-height-handle,
.right-v-splitter {
  display: grid;
  place-items: center;
  touch-action: none;
  user-select: none;
}

.panel-height-handle {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  z-index: 9;
  height: 18px;
  cursor: row-resize;
}

.preview-pane > .panel-height-handle,
.right-workbench > .panel-height-handle,
.editor-pane > .panel-height-handle {
  bottom: -8px;
}

.panel-height-handle::before,
.right-v-splitter::before {
  content: "";
  width: min(96px, 42%);
  height: 2px;
  border-radius: 999px;
  background: rgba(43, 43, 43, 0.22);
  transition: background 140ms ease, box-shadow 140ms ease, height 140ms ease;
}

.panel-height-handle:hover::before,
.panel-height-handle.is-dragging::before,
.panel-height-handle:focus-visible::before,
.right-v-splitter:hover::before,
.right-v-splitter.is-dragging::before,
.right-v-splitter:focus-visible::before {
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 138, 0, 0.12);
}

.panel-height-handle:focus-visible,
.right-v-splitter:focus-visible {
  outline: 0;
}

.right-v-splitter {
  cursor: row-resize;
}

.right-workbench .template-panel {
  gap: 4px;
  padding: 9px 13px;
}

.template-panel-head h3 {
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.template-panel-head span {
  max-width: 90px;
  font-size: 10px;
}

.template-switcher {
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  gap: 7px;
  padding: 5px;
  border-color: #d5d5d1;
  border-radius: 5px;
}

.template-switcher .template-thumb {
  aspect-ratio: 3 / 4;
}

.template-switcher-copy strong {
  font-size: 11px;
}

.template-switcher-copy small {
  font-size: 9px;
}

.template-group {
  gap: 3px;
}

.template-group h4 {
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.template-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
}

.template-option {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.template-option:hover,
.template-option.is-active {
  transform: none;
  box-shadow: none;
}

.template-option strong,
.template-option small {
  display: none;
}

.template-thumb {
  width: 100%;
  max-width: 36px;
  margin: 0 auto;
  aspect-ratio: 0.72;
  padding: 4px;
  border: 1.5px solid var(--line-strong);
  background: #fffef9;
}

.template-option.is-active .template-thumb {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.template-thumb span {
  min-height: 3px;
  border-radius: 0;
  background: #2b2b2b;
  opacity: 0.2;
}

.template-thumb::before {
  height: 10px;
  border-bottom-width: 1px;
}

.template-thumb-orange,
.template-thumb-sidebar,
.template-thumb-blue-sales,
.template-thumb-purple {
  border-left-width: 1.5px;
}

.template-thumb-sidebar,
.template-thumb-blue-sales {
  grid-template-columns: 32% 1fr;
}

.right-workbench .template-panel {
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow: visible;
}

.right-workbench .template-panel-head h3 {
  font-size: 20px;
  line-height: 1.1;
}

.right-workbench .template-panel-head span {
  max-width: 112px;
  color: #596777;
  font-size: 12px;
}

.template-gallery {
  display: block;
}

.template-switcher {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 104px;
  padding: 9px 10px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  background: #fffef9;
}

.template-switcher:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(255, 138, 0, 0.12);
  transform: translateY(-1px);
}

.template-switcher .template-thumb {
  width: 62px;
  max-width: none;
  height: 88px;
  margin: 0;
  padding: 8px 9px;
  border: 1px solid #dbe5e9;
  border-left: 12px solid #2b2b2b;
  background: #fff;
}

.template-switcher .template-thumb::before {
  height: 22px;
  border-bottom: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent) 0 44%, transparent 44%);
}

.template-switcher .template-thumb span {
  min-height: 7px;
  border-radius: 999px;
  background: #cfdae0;
  opacity: 1;
}

.template-switcher-copy {
  align-content: center;
  gap: 5px;
}

.template-switcher-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
  white-space: normal;
}

.template-switcher-copy small {
  color: #607181;
  font-size: 11px;
  line-height: 1.35;
  white-space: normal;
}

.template-switcher > svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  stroke-width: 2.4;
}

.template-picker-backdrop {
  padding: 8px 56px;
  background: rgba(228, 235, 239, 0.9);
  backdrop-filter: blur(14px);
}

.template-picker {
  width: min(1548px, 100%);
  max-height: calc(100vh - 16px);
  overflow: hidden;
  border: 1px solid #d8e0e4;
  border-radius: 8px;
  background: #fffef9;
}

.template-picker-head {
  min-height: 118px;
  padding: 28px 30px;
  background: #fffef9;
}

.template-picker-head h2 {
  font-size: 26px;
  font-weight: 900;
}

.template-picker-head p {
  color: #607181;
  font-size: 16px;
  font-weight: 800;
}

.template-picker-close {
  width: 48px;
  height: 48px;
  border-color: #d5e1e8;
  border-radius: 8px;
}

.template-picker-close span {
  color: #101820;
  font-size: 30px;
}

.template-picker-grid {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 28px 30px 36px;
  background: #fffef9;
}

.template-picker-section h3 {
  font-size: 21px;
}

.template-picker-section-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 24px;
}

.template-preview-option {
  gap: 14px;
  border: 2px solid #dfe9ee;
  border-radius: 8px;
  padding: 12px;
  background: #fffef9;
}

.template-preview-option:hover,
.template-preview-option.is-active {
  border-color: var(--line-strong);
  box-shadow: 0 16px 36px rgba(29, 35, 39, 0.12);
}

.template-preview-option.is-active {
  background: #fff9e8;
}

.template-preview-frame {
  height: 524px;
  border-color: #d9e5eb;
  border-radius: 7px;
  background: #f3f8fa;
}

.template-preview-page {
  transform: scale(0.44);
}

.template-preview-meta strong {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.template-preview-meta small {
  color: #607181;
  font-size: 15px;
}

.job-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 14px 14px;
}

.job-panel h3 {
  margin: 0;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
}

.job-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.job-panel label,
.job-description {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.job-panel span {
  color: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

.job-panel input,
.job-panel textarea {
  width: 100%;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: #fffef9;
  color: var(--ink);
  font-size: 13px;
  outline: 0;
}

.job-panel input {
  min-height: 36px;
  padding: 0 10px;
}

.job-panel textarea {
  min-height: 66px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.45;
}

.job-description-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.job-description.is-drag-over textarea {
  border-color: #ff8a00;
  background: #fff7e8;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.16);
}

.jd-ocr-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 27px;
  padding: 0 8px;
  border: 2px solid var(--line-strong);
  border-radius: 7px;
  color: var(--accent);
  background: #fffef9;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.jd-ocr-action svg {
  width: 14px;
  height: 14px;
}

.jd-ocr-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.jd-ocr-input {
  display: none;
}

.match-action {
  justify-self: center;
  min-height: 31px;
  padding: 0 16px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent);
  background: #fffef9;
  font-size: 15px;
  font-weight: 900;
}

.interview-advice-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  color: #fffef9;
  background: var(--accent);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.interview-advice-action svg {
  width: 15px;
  height: 15px;
}

.interview-advice-action:disabled {
  opacity: 0.68;
  cursor: wait;
}

.credit-cost-hint {
  position: relative;
}

.credit-cost-hint::after {
  content: attr(data-credit-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 80;
  min-width: max-content;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fffdfa;
  background: rgba(20, 34, 30, 0.96);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(20, 34, 30, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.credit-cost-hint::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  z-index: 81;
  width: 8px;
  height: 8px;
  background: rgba(20, 34, 30, 0.96);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) rotate(45deg);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.credit-cost-hint:hover::after,
.credit-cost-hint:hover::before,
.credit-cost-hint:focus-visible::after,
.credit-cost-hint:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0) rotate(0deg);
}

.credit-cost-hint:hover::before,
.credit-cost-hint:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.need-info {
  display: grid;
  gap: 10px;
}

.need-info textarea {
  min-height: 58px;
}

.continue-action {
  position: sticky;
  bottom: 0;
  justify-self: center;
  min-height: 34px;
  padding: 0 17px;
  border: 2px solid var(--line-strong);
  border-radius: 7px;
  color: var(--accent);
  background: #fffef9;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 -4px 0 #fffef9;
}

.download-link {
  min-height: 30px;
  padding: 0 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: #fffef9;
  font-size: 13px;
  font-weight: 800;
}

.job-download {
  justify-self: center;
  min-width: 100px;
}

.download-link:hover,
.ai-action:hover,
.refine-action:hover,
.match-action:hover,
.interview-advice-action:hover,
.profile-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(43, 43, 43, 0.08);
}

@media screen and (min-width: 1280px) {
  .workspace-grid {
    --editor-width: 320px;
    --layout-width: 232px;
    --preview-width: 1fr;
    --right-width: 260px;
  }
}

@media screen and (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .studio-shell {
    width: calc(100vw - 16px);
    height: auto;
    min-height: calc(100vh - 16px);
    margin: 8px;
  }

  .workspace-grid {
    grid-template-columns: 220px minmax(430px, 1fr) 220px;
    gap: 12px;
    align-items: start;
  }

  .workspace-splitter {
    display: none;
  }

  .panel-height-handle,
  .right-v-splitter {
    display: none;
  }

  .editor-pane,
  .layout-panel,
  .preview-pane,
  .right-workbench {
    height: auto;
  }

  .editor-pane {
    grid-column: 1;
  }

  .layout-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .preview-pane {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 720px;
  }

  .right-workbench {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media screen {
  .preview-actions {
    display: none !important;
  }
}

@media screen and (min-width: 1081px) {
  .layout-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "layout-title layout-modules layout-settings";
    align-items: center;
    gap: 10px;
    min-height: 82px;
    max-height: 92px;
    padding: 8px 12px;
  }

  .layout-header {
    padding: 0 10px 0 0;
    border-right: 1px solid var(--premium-line);
  }

  .module-stack {
    flex-wrap: nowrap;
    align-items: center;
    max-height: 38px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 2px 3px;
  }

  .module-pill {
    min-height: 28px;
  }

  .settings-block {
    min-width: 0;
    padding: 6px 9px;
  }

  .pane-topbar {
    min-height: 56px;
    padding: 10px 14px 7px;
  }

  .pane-topbar h1 {
    font-size: 18px;
  }

  .eyebrow {
    margin-bottom: 1px;
  }

  .canvas-toolbar {
    min-height: 40px;
    padding: 6px 10px 7px;
  }

  .canvas-toolbar button,
  .canvas-toolbar select {
    min-height: 26px;
  }

  .preview-scroll {
    padding-top: 14px;
  }
}

@media screen and (max-width: 1080px) {
  .layout-panel {
    gap: 8px;
    padding: 10px 12px;
  }

  .pane-topbar {
    padding: 10px 12px 7px;
  }

  .canvas-toolbar {
    min-height: 40px;
    padding: 6px 10px 7px;
  }

  .preview-scroll {
    padding-top: 14px;
  }
}

@media screen and (max-width: 860px) {
  .studio-shell {
    display: block;
    padding: 0 8px 8px;
  }

  .studio-header {
    min-height: 42px;
    margin-bottom: 10px;
  }

  .workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 0;
  }

  .editor-pane,
  .layout-panel,
  .preview-pane,
  .right-workbench {
    grid-column: auto;
    grid-row: auto;
    max-height: none;
  }

  .editor-panel,
  .editor-scroll,
  .layout-panel,
  .right-workbench {
    height: auto;
    max-height: none;
  }

  .preview-pane {
    min-height: 680px;
  }

  .preview-pane .resume-pages {
    zoom: 0.44;
  }

  .pane-topbar,
  .canvas-toolbar {
    width: 100%;
  }

  .pane-topbar,
  .preview-actions,
  .canvas-toolbar,
  .setting-line {
    align-items: stretch;
    flex-direction: column;
  }

  .job-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    overflow: visible;
    background: #fff;
  }

  .studio-header,
  .editor-pane,
  .layout-panel,
  .right-workbench,
  .workspace-splitter,
  .panel-height-handle,
  .right-v-splitter,
  .pane-topbar,
  .canvas-toolbar,
  .preview-bottom-actions {
    display: none !important;
  }

  .studio-shell,
  .workspace-grid,
  .preview-pane {
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .preview-pane .resume-pages {
    zoom: 1;
  }
}

@media screen {
  :root {
    --bg: #eef1ee;
    --paper: #fffdf8;
    --panel: #f6f8f5;
    --ink: #17201f;
    --muted: #63716d;
    --line: #d7dfdc;
    --line-strong: #596663;
    --accent: #b66a2a;
    --accent-strong: #945121;
    --accent-soft: #f3e4d3;
    --danger: #b54b57;
    --blue: #476f7d;
    --green: #3f7c6a;
    --shadow: 0 18px 48px rgba(30, 45, 42, 0.12);
    --font-ui: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
    --font-display: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", "SimSun", serif;
  }

  * {
    scrollbar-color: rgba(89, 102, 99, 0.52) transparent;
    scrollbar-width: thin;
  }

  html {
    background: var(--bg);
  }

  body {
    color: var(--ink);
    font-family: var(--font-ui);
    font-feature-settings: "tnum" 1, "ss01" 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    background:
      linear-gradient(rgba(23, 32, 31, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(23, 32, 31, 0.035) 1px, transparent 1px),
      linear-gradient(180deg, #f7f6ef 0, var(--bg) 44%, #e8eeec 100%);
    background-size: 28px 28px, 28px 28px, auto;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
      linear-gradient(135deg, rgba(255, 255, 255, 0.42) 25%, transparent 25%),
      linear-gradient(315deg, rgba(23, 32, 31, 0.045) 25%, transparent 25%);
    background-size: 7px 7px;
  }

  button,
  input,
  select,
  textarea {
    font-family: inherit;
  }

  button,
  [role="button"],
  .template-switcher,
  .template-option,
  .template-preview-option {
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
  }

  button:active:not(:disabled),
  [role="button"]:active {
    transform: translateY(1px) scale(0.99);
  }

  button:focus-visible,
  [role="button"]:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  .template-switcher:focus-visible,
  .template-option:focus-visible,
  .template-preview-option:focus-visible {
    outline: 2px solid rgba(182, 106, 42, 0.55);
    outline-offset: 2px;
  }

  button:disabled,
  [aria-busy="true"] {
    cursor: wait;
    opacity: 0.7;
    transform: none;
  }

  .skip-link {
    position: fixed;
    left: 16px;
    top: 10px;
    z-index: 90;
    transform: translateY(-140%);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--paper);
    background: var(--accent-strong);
    font-weight: 800;
    text-decoration: none;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .studio-shell {
    position: relative;
    z-index: 1;
    padding: 0 14px 14px;
    background: rgba(250, 250, 245, 0.9);
  }

  .studio-header {
    min-height: 48px;
    padding: 0 8px 0 18px;
    border-bottom: 1px solid rgba(89, 102, 99, 0.38);
    background: rgba(253, 250, 243, 0.94);
    backdrop-filter: blur(12px);
  }

  .brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    overflow: hidden;
  }

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

  .brand-lockup strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
  }

  .brand-lockup span:not(.brand-mark) {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
  }

  .studio-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .studio-status span {
    border: 1px solid rgba(99, 113, 109, 0.28);
    border-radius: 6px;
    padding: 3px 8px;
    background: rgba(255, 253, 248, 0.72);
  }

  .profile-button,
  .ghost-action,
  .download-link,
  .small-button,
  .upload-commands button,
  .date-trigger,
  .option-pill,
  .entry-tabs button,
  .modal-actions button {
    border: 1px solid rgba(89, 102, 99, 0.38);
    color: var(--ink);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84) inset;
  }

  .profile-button {
    min-height: 32px;
    border-radius: 7px;
    padding: 0 14px;
    font-size: 13px;
  }

  .workspace-grid {
    padding-top: 14px;
  }

  .workspace-splitter::before {
    width: 1px;
    background: rgba(89, 102, 99, 0.32);
  }

  .workspace-splitter:hover::before,
  .workspace-splitter.is-dragging::before,
  .workspace-splitter:focus-visible::before,
  .panel-height-handle:hover::before,
  .panel-height-handle.is-dragging::before,
  .panel-height-handle:focus-visible::before,
  .right-v-splitter:hover::before,
  .right-v-splitter.is-dragging::before,
  .right-v-splitter:focus-visible::before {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(182, 106, 42, 0.13);
  }

  .editor-panel,
  .layout-panel,
  .right-workbench .template-panel,
  .job-panel {
    border: 1px solid rgba(89, 102, 99, 0.35);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(246, 248, 245, 0.98));
    box-shadow: var(--shadow);
  }

  .editor-scroll,
  .layout-panel,
  .job-panel {
    scrollbar-gutter: stable;
  }

  .editor-title {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.88);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.84) inset;
  }

  .editor-title input {
    color: var(--ink);
    font-size: 15px;
    text-align: left;
  }

  .editor-title svg,
  .field label svg,
  .template-switcher > svg {
    color: var(--accent);
  }

  .field label,
  .option-group h3,
  .template-group h4,
  .job-panel span,
  .custom-bg-control label {
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 0;
  }

  .text-input,
  .field input,
  .field select,
  .date-trigger,
  .module-title-input,
  .custom-module-form input,
  .custom-bg-control input,
  .modal-panel input,
  .job-panel input,
  .job-panel textarea,
  .rich-block {
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(255, 253, 248, 0.94);
  }

  .text-input:focus,
  .field input:focus,
  .field select:focus,
  .date-trigger:focus,
  .module-title-input:focus,
  .rich-editor:focus,
  .custom-module-form input:focus,
  .custom-bg-control input:focus,
  .modal-panel input:focus,
  .job-panel input:focus,
  .job-panel textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(182, 106, 42, 0.14);
  }

  .add-row,
  .small-button.primary,
  .date-picker-actions .confirm,
  .modal-actions .confirm {
    border-color: var(--accent);
    color: #fffaf2;
    background: var(--accent);
  }

  .add-row:hover,
  .small-button.primary:hover,
  .date-picker-actions .confirm:hover,
  .modal-actions .confirm:hover {
    background: var(--accent-strong);
  }

  .module-pill {
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #32413e;
    background: rgba(255, 253, 248, 0.86);
    font-size: 12px;
  }

  .module-pill:hover,
  .module-pill.is-active {
    border-color: var(--accent);
    color: #fffaf2;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(148, 81, 33, 0.16);
  }

  .module-control {
    color: rgba(50, 65, 62, 0.68);
  }

  .module-control:hover {
    color: var(--accent-strong);
    background: rgba(182, 106, 42, 0.08);
  }

  .module-control.danger,
  .icon-action.danger,
  .small-button.danger {
    color: var(--danger);
  }

  .settings-block {
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.82);
  }

  .settings-block h3,
  .setting-line h3 {
    color: var(--ink);
  }

  .custom-color {
    color: var(--muted);
  }

  .swatch {
    border-color: rgba(89, 102, 99, 0.28);
  }

  .swatch.is-active {
    border-color: var(--paper);
    box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);
  }

  .rich-toolbar {
    border-bottom: 1px solid var(--line);
    background: rgba(246, 248, 245, 0.92);
  }

  .rich-toolbar button,
  .canvas-toolbar button,
  .canvas-toolbar select,
  .rich-toolbar select,
  .tool-color {
    border: 1px solid var(--line);
    color: var(--ink);
    background: rgba(255, 253, 248, 0.96);
  }

  .rich-toolbar .polish-tool {
    color: var(--accent-strong);
    background: var(--accent-soft);
  }

  .rich-editor {
    color: var(--ink);
    background: rgba(255, 253, 248, 0.72);
  }

  .photo-uploader {
    border: 1px solid rgba(89, 102, 99, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(50, 65, 62, 0.1);
  }

  .photo-helper {
    color: var(--muted);
    font-weight: 700;
  }

  .option-pill.is-selected,
  .entry-tabs button.is-active,
  .page-toggle button.is-active {
    border-color: var(--accent);
    color: var(--accent-strong);
    background: var(--accent-soft);
    box-shadow: none;
  }

  .pane-topbar,
  .canvas-toolbar {
    width: min(100%, 560px);
    border: 1px solid rgba(89, 102, 99, 0.28);
    background: rgba(255, 253, 248, 0.95);
    box-shadow: 0 14px 34px rgba(30, 45, 42, 0.08);
  }

  .pane-topbar {
    padding: 9px 12px;
    border-bottom: 0;
  }

  .pane-topbar h1 {
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
  }

  .page-toggle {
    border-color: var(--line);
    background: #eef1ee;
  }

  .ghost-action:hover,
  .icon-action:hover,
  .module-control:hover,
  .small-button:hover,
  .tool-chip:hover,
  .rich-toolbar button:hover,
  .custom-color:hover,
  .upload-commands button:hover,
  .date-trigger:hover,
  .option-pill:hover,
  .entry-tabs button:hover,
  .download-link:hover,
  .canvas-toolbar button:hover,
  .canvas-toolbar select:hover,
  .profile-button:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 20px rgba(148, 81, 33, 0.12);
  }

  .preview-scroll {
    padding-top: 10px;
    background:
      linear-gradient(180deg, rgba(255, 253, 248, 0.68), rgba(238, 241, 238, 0) 180px);
  }

  .preview-pane .resume-page {
    border: 1px solid rgba(89, 102, 99, 0.2);
    box-shadow: 0 18px 44px rgba(30, 45, 42, 0.13);
  }

  .preview-bottom-actions {
    min-height: 58px;
    padding: 8px 0 2px;
  }

  .ai-action,
  .match-action,
  .interview-advice-action {
    border: 1px solid var(--accent);
    color: #fffaf2;
    background: var(--accent);
    box-shadow: 0 10px 22px rgba(148, 81, 33, 0.18);
  }

  .ai-action:hover,
  .match-action:hover,
  .interview-advice-action:hover {
    background: var(--accent-strong);
    box-shadow: 0 12px 26px rgba(148, 81, 33, 0.2);
  }

  .refine-action {
    border: 1px solid rgba(71, 111, 125, 0.5);
    color: var(--blue);
    background: rgba(238, 247, 248, 0.9);
  }

  .download-link {
    color: var(--ink);
  }

  .right-workbench {
    gap: 10px;
  }

  .right-workbench .template-panel {
    padding: 13px;
    overflow: visible;
  }

  .template-panel-head h3,
  .right-workbench .template-panel-head h3,
  .job-panel h3 {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.15;
    text-align: left;
    letter-spacing: 0;
  }

  .template-panel-head span,
  .right-workbench .template-panel-head span {
    color: var(--muted);
    font-size: 11px;
  }

  .template-switcher {
    min-height: 104px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.92);
  }

  .template-switcher:hover {
    border-color: var(--accent);
    box-shadow: 0 12px 26px rgba(148, 81, 33, 0.13);
  }

  .template-switcher .template-thumb {
    border: 1px solid rgba(89, 102, 99, 0.24);
    border-left: 10px solid var(--accent);
    background: #fff;
  }

  .template-switcher-copy strong {
    color: var(--ink);
    font-size: 15px;
    text-wrap: balance;
  }

  .template-switcher-copy small {
    color: var(--muted);
  }

  .template-picker-backdrop {
    background: rgba(238, 241, 238, 0.82);
    backdrop-filter: blur(16px);
  }

  .template-picker {
    border: 1px solid rgba(89, 102, 99, 0.28);
    background: var(--paper);
    box-shadow: 0 30px 80px rgba(30, 45, 42, 0.18);
  }

  .template-picker-head,
  .template-picker-grid,
  .template-preview-option {
    background: var(--paper);
  }

  .template-picker-head h2,
  .template-picker-section h3,
  .template-preview-meta strong {
    color: var(--ink);
    letter-spacing: 0;
  }

  .template-picker-head p,
  .template-preview-meta small {
    color: var(--muted);
  }

  .template-preview-option {
    border: 1px solid var(--line);
  }

  .template-preview-option:hover,
  .template-preview-option.is-active {
    border-color: var(--accent);
    box-shadow: 0 16px 36px rgba(148, 81, 33, 0.14);
  }

  .template-preview-option.is-active {
    background: #fff8ed;
  }

  .job-panel {
    gap: 10px;
    padding: 14px;
  }

  .job-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .job-panel span {
    color: var(--muted);
    font-size: 12px;
  }

  .job-panel input {
    min-height: 36px;
  }

  .job-panel textarea {
    min-height: 98px;
    line-height: 1.55;
  }

  .job-description-head {
    align-items: end;
  }

  .jd-ocr-action {
    border: 1px solid var(--line);
    color: var(--accent-strong);
    background: var(--accent-soft);
  }

  .jd-ocr-action:hover {
    border-color: var(--accent);
  }

  .job-description.is-drag-over textarea {
    border-color: var(--accent);
    background: #fff8ed;
    box-shadow: 0 0 0 3px rgba(182, 106, 42, 0.16);
  }

  .match-action,
  .interview-advice-action {
    justify-self: stretch;
    min-height: 34px;
    border-radius: 7px;
  }

  .toast {
    z-index: 80;
    border: 1px solid rgba(89, 102, 99, 0.28);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 18px 44px rgba(30, 45, 42, 0.18);
  }

  .modal-backdrop {
    z-index: 70;
    background: rgba(23, 32, 31, 0.36);
  }

  .modal-panel {
    border: 1px solid rgba(89, 102, 99, 0.32);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 26px 80px rgba(23, 32, 31, 0.24);
  }

  .photo-preview-stage {
    background:
      linear-gradient(45deg, rgba(89, 102, 99, 0.06) 25%, transparent 25%),
      linear-gradient(-45deg, rgba(89, 102, 99, 0.06) 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, rgba(89, 102, 99, 0.06) 75%),
      linear-gradient(-45deg, transparent 75%, rgba(89, 102, 99, 0.06) 75%),
      var(--panel);
  }
}

@media screen and (max-width: 1080px) {
  .studio-status {
    display: none;
  }
}

@media screen and (max-width: 860px) {
  .studio-shell {
    padding: 0 10px 10px;
  }

  .studio-header {
    min-height: 52px;
    padding-left: 10px;
  }

  .brand-lockup span:not(.brand-mark) {
    display: none;
  }

  .profile-button {
    min-width: 92px;
  }

  .job-grid {
    grid-template-columns: 1fr;
  }

  .match-action,
  .interview-advice-action,
  .preview-download {
    width: 100%;
  }
}

@media screen {
  :root {
    --ui-bg: #f3f5f2;
    --ui-surface: #fffdfa;
    --ui-surface-2: #f8f9f6;
    --ui-ink: #141a19;
    --ui-muted: #66736f;
    --ui-border: #d8dfda;
    --ui-border-strong: #aeb9b4;
    --ui-accent: #41645b;
    --ui-accent-strong: #243f39;
    --ui-accent-soft: #e5eeea;
    --ui-danger: #ae4b58;
    --ui-shadow: 0 14px 34px rgba(28, 42, 39, 0.08);
  }

  body {
    color: var(--ui-ink);
    background: var(--ui-bg);
  }

  body::before {
    display: none;
  }

  .studio-shell {
    background: rgba(250, 251, 248, 0.92);
  }

  .studio-header {
    border-bottom-color: rgba(65, 100, 91, 0.2);
    background: rgba(250, 251, 248, 0.94);
  }

  .brand-mark {
    border-color: transparent;
    color: inherit;
    background: transparent;
  }

  .brand-lockup strong,
  .pane-topbar h1,
  .template-panel-head h3,
  .right-workbench .template-panel-head h3,
  .job-panel h3,
  .layout-header h2 {
    color: var(--ui-ink);
  }

  .brand-lockup span:not(.brand-mark),
  .studio-status,
  .eyebrow,
  .template-panel-head span,
  .right-workbench .template-panel-head span,
  .field label,
  .option-group h3,
  .job-panel span,
  .photo-helper,
  .template-switcher-copy small {
    color: var(--ui-muted);
  }

  .studio-status span {
    border-color: var(--ui-border);
    background: rgba(255, 253, 250, 0.72);
  }

  .editor-panel,
  .layout-panel,
  .right-workbench .template-panel,
  .job-panel,
  .pane-topbar,
  .canvas-toolbar,
  .template-picker,
  .modal-panel {
    border-color: var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
  }

  .pane-topbar,
  .canvas-toolbar {
    box-shadow: 0 10px 26px rgba(28, 42, 39, 0.06);
  }

  .preview-scroll {
    background: linear-gradient(180deg, rgba(255, 253, 250, 0.72), rgba(243, 245, 242, 0) 170px);
  }

  .preview-pane .resume-page {
    border-color: rgba(65, 100, 91, 0.14);
    box-shadow: 0 18px 42px rgba(28, 42, 39, 0.1);
  }

  .editor-title,
  .settings-block,
  .text-input,
  .field input,
  .field select,
  .date-trigger,
  .module-title-input,
  .custom-module-form input,
  .custom-bg-control input,
  .modal-panel input,
  .job-panel input,
  .job-panel textarea,
  .rich-block,
  .rich-toolbar button,
  .canvas-toolbar button,
  .canvas-toolbar select,
  .rich-toolbar select,
  .tool-color,
  .template-switcher,
  .download-link,
  .profile-button,
  .ghost-action,
  .small-button,
  .upload-commands button,
  .date-trigger,
  .option-pill,
  .entry-tabs button,
  .modal-actions button,
  .jd-ocr-action {
    border-color: var(--ui-border);
    color: var(--ui-ink);
    background: var(--ui-surface);
    box-shadow: none;
  }

  .rich-toolbar,
  .canvas-toolbar {
    background: rgba(248, 249, 246, 0.96);
  }

  .module-pill {
    border-color: var(--ui-border);
    color: var(--ui-ink);
    background: rgba(255, 253, 250, 0.84);
  }

  .module-pill:hover,
  .module-pill.is-active,
  .page-toggle button.is-active,
  .entry-tabs button.is-active,
  .option-pill.is-selected {
    border-color: var(--ui-accent);
    color: var(--ui-accent-strong);
    background: var(--ui-accent-soft);
    box-shadow: none;
  }

  .module-pill.is-active {
    color: #fffdfa;
    background: var(--ui-accent);
  }

  .module-control {
    color: rgba(20, 26, 25, 0.56);
  }

  .module-control:hover,
  .rich-toolbar button:hover,
  .canvas-toolbar button:hover,
  .canvas-toolbar select:hover,
  .ghost-action:hover,
  .icon-action:hover,
  .small-button:hover,
  .custom-color:hover,
  .upload-commands button:hover,
  .date-trigger:hover,
  .option-pill:hover,
  .entry-tabs button:hover,
  .download-link:hover,
  .profile-button:hover,
  .jd-ocr-action:hover {
    border-color: var(--ui-accent);
    color: var(--ui-accent-strong);
    background: var(--ui-accent-soft);
    box-shadow: none;
  }

  .text-input:focus,
  .field input:focus,
  .field select:focus,
  .date-trigger:focus,
  .module-title-input:focus,
  .rich-editor:focus,
  .custom-module-form input:focus,
  .custom-bg-control input:focus,
  .modal-panel input:focus,
  .job-panel input:focus,
  .job-panel textarea:focus {
    border-color: var(--ui-accent);
    box-shadow: 0 0 0 3px rgba(65, 100, 91, 0.12);
  }

  .add-row,
  .small-button.primary,
  .date-picker-actions .confirm,
  .modal-actions .confirm,
  .ai-action,
  .match-action,
  .interview-advice-action {
    border-color: var(--ui-accent);
    color: #fffdfa;
    background: var(--ui-accent);
    box-shadow: none;
  }

  .add-row:hover,
  .small-button.primary:hover,
  .date-picker-actions .confirm:hover,
  .modal-actions .confirm:hover,
  .ai-action:hover,
  .match-action:hover,
  .interview-advice-action:hover {
    border-color: var(--ui-accent-strong);
    color: #fffdfa;
    background: var(--ui-accent-strong);
    box-shadow: none;
  }

  .refine-action {
    border-color: rgba(65, 100, 91, 0.36);
    color: var(--ui-accent-strong);
    background: rgba(229, 238, 234, 0.72);
    box-shadow: none;
  }

  .jd-ocr-action {
    color: var(--ui-accent-strong);
    background: rgba(229, 238, 234, 0.72);
  }

  .job-description.is-drag-over textarea {
    border-color: var(--ui-accent);
    background: #f4faf7;
    box-shadow: 0 0 0 3px rgba(65, 100, 91, 0.12);
  }

  .template-switcher {
    border-color: var(--ui-border);
    background: linear-gradient(180deg, #fffdfa, #f8f9f6);
  }

  .template-switcher:hover,
  .template-preview-option:hover,
  .template-preview-option.is-active {
    border-color: var(--ui-accent);
    box-shadow: 0 12px 30px rgba(28, 42, 39, 0.08);
  }

  .template-switcher .template-thumb {
    border-color: var(--ui-border);
    border-left-color: var(--ui-accent);
  }

  .template-picker-backdrop {
    background: rgba(243, 245, 242, 0.86);
  }

  .template-preview-option,
  .template-picker-head,
  .template-picker-grid {
    background: var(--ui-surface);
  }

  .template-preview-option {
    border-color: var(--ui-border);
  }

  .template-preview-option.is-active {
    background: #f5faf7;
  }

  .swatch.is-active {
    border-color: #fffdfa;
    box-shadow: 0 0 0 2px #fffdfa, 0 0 0 4px var(--ui-accent);
  }

  .icon-action.danger,
  .module-control.danger,
  .small-button.danger,
  .module-control.is-hidden,
  .canvas-delete-handle,
  .modal-actions .danger {
    color: var(--ui-danger);
  }

  .toast {
    border-color: var(--ui-border);
    background: var(--ui-surface);
    box-shadow: 0 18px 44px rgba(28, 42, 39, 0.14);
  }

  i[data-lucide] {
    display: inline-grid;
    place-items: center;
    width: 1em;
    height: 1em;
    color: currentColor;
    font-style: normal;
    line-height: 1;
  }

  i[data-lucide]::before {
    font-size: 13px;
    font-weight: 800;
  }

  i[data-lucide="download"]::before,
  i[data-lucide="file-down"]::before {
    content: "↓";
  }

  i[data-lucide="undo-2"]::before {
    content: "↶";
  }

  i[data-lucide="redo-2"]::before {
    content: "↷";
  }

  i[data-lucide="copy"]::before,
  i[data-lucide="clipboard"]::before {
    content: "⧉";
  }

  i[data-lucide="trash-2"]::before {
    content: "×";
  }

  i[data-lucide="type"]::before {
    content: "T";
  }

  i[data-lucide="square"]::before {
    content: "□";
  }

  i[data-lucide="minus"]::before {
    content: "−";
  }

  i[data-lucide="align-left"]::before,
  i[data-lucide="align-center"]::before,
  i[data-lucide="align-right"]::before,
  i[data-lucide="align-justify"]::before,
  i[data-lucide="list"]::before,
  i[data-lucide="list-ordered"]::before {
    content: "≡";
  }

  i[data-lucide="paintbrush"]::before {
    content: "●";
  }

  i[data-lucide="eraser"]::before {
    content: "◇";
  }

  i[data-lucide="image-up"]::before {
    content: "▧";
  }

  i[data-lucide="pencil"]::before {
    content: "✎";
  }

  i[data-lucide="eye"]::before {
    content: "•";
  }

  i[data-lucide="bold"]::before {
    content: "B";
  }

  i[data-lucide="italic"]::before {
    content: "I";
    font-style: italic;
  }

  i[data-lucide="underline"]::before {
    content: "U";
    text-decoration: underline;
  }
}

@media screen and (min-width: 1081px) {
  :root {
    --premium-bg: #f5f6f4;
    --premium-surface: #fffdfa;
    --premium-surface-soft: #f9faf8;
    --premium-ink: #121716;
    --premium-muted: #68736f;
    --premium-line: #dde3df;
    --premium-line-strong: #b8c2bd;
    --premium-accent: #365a51;
    --premium-accent-hover: #213d37;
    --premium-accent-soft: #e8f0ed;
    --premium-shadow: 0 20px 52px rgba(22, 32, 29, 0.075);
    --premium-radius: 10px;
  }

  html {
    background: var(--premium-bg);
  }

  body {
    overflow: hidden;
    color: var(--premium-ink);
    background:
      radial-gradient(circle at 50% -20%, rgba(54, 90, 81, 0.08), transparent 36rem),
      var(--premium-bg);
  }

  .studio-shell {
    grid-template-rows: 56px minmax(0, 1fr);
    width: 100vw;
    height: 100dvh;
    padding: 0 18px 18px;
    background: transparent;
  }

  .studio-header {
    min-height: 56px;
    padding: 0;
    border-bottom: 1px solid rgba(22, 32, 29, 0.08);
    background: transparent;
    backdrop-filter: none;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    color: inherit;
    background: transparent;
    font-size: 18px;
  }

  .brand-lockup strong {
    font-size: 17px;
    font-weight: 850;
  }

  .brand-lockup span:not(.brand-mark) {
    color: var(--premium-muted);
    font-size: 11px;
    font-weight: 650;
  }

  .studio-status {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 0;
    padding: 3px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    background: rgba(255, 253, 250, 0.72);
  }

  .studio-status span {
    border: 0;
    border-radius: 999px;
    padding: 5px 12px;
    color: var(--premium-muted);
    background: transparent;
    font-size: 12px;
    font-weight: 760;
  }

  .studio-status span:first-child {
    color: var(--premium-accent);
    background: var(--premium-accent-soft);
  }

  .profile-button {
    min-width: 104px;
    min-height: 34px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    background: rgba(255, 253, 250, 0.76);
    font-size: 13px;
    font-weight: 760;
  }

  .workspace-grid {
    display: grid;
    grid-template-columns:
      minmax(310px, var(--editor-width))
      var(--splitter-width)
      minmax(600px, 1fr)
      var(--splitter-width)
      minmax(292px, var(--right-width));
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "editor split-left modules split-right right"
      "editor split-left preview split-right right";
    gap: 14px 0;
    height: 100%;
    min-height: 0;
    padding-top: 14px;
    align-items: stretch;
  }

  .right-v-splitter,
  .panel-height-handle {
    display: none !important;
  }

  .workspace-splitter {
    display: none !important;
  }

  .workspace-splitter[data-left-panel="editor"][data-right-panel="layout"] {
    grid-area: split-left;
    display: grid !important;
  }

  .workspace-splitter[data-left-panel="preview"][data-right-panel="right"] {
    grid-area: split-right;
    display: grid !important;
  }

  .editor-pane {
    grid-area: editor;
    height: 100%;
    max-width: none;
  }

  .layout-panel {
    grid-area: modules;
  }

  .preview-pane {
    grid-area: preview;
  }

  .right-workbench {
    grid-area: right;
  }

  .editor-panel,
  .layout-panel,
  .right-workbench .template-panel,
  .job-panel {
    border: 1px solid var(--premium-line);
    border-radius: var(--premium-radius);
    background: rgba(255, 253, 250, 0.92);
    box-shadow: none;
  }

  .editor-panel {
    height: 100%;
    overflow: hidden;
  }

  .editor-scroll {
    height: 100%;
    padding: 18px;
  }

  .editor-title {
    min-height: 42px;
    margin-bottom: 16px;
    border: 0;
    border-bottom: 1px solid var(--premium-line);
    border-radius: 0;
    padding: 0 0 12px;
    background: transparent;
  }

  .editor-title input {
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0;
  }

  .editor-title svg,
  .editor-title i[data-lucide] {
    color: var(--resume-accent, var(--accent));
  }

  .form-grid,
  .editor-pane .form-grid,
  .editor-pane .inline-card {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .field label,
  .editor-pane .field label,
  .option-group h3 {
    margin-bottom: 6px;
    color: var(--premium-muted);
    font-size: 12px;
    font-weight: 760;
  }

  .text-input,
  .field input,
  .field select,
  .date-trigger,
  .module-title-input,
  .custom-module-form input,
  .custom-bg-control input,
  .job-panel input,
  .job-panel textarea,
  .modal-panel input {
    min-height: 38px;
    border: 1px solid var(--premium-line);
    border-radius: 8px;
    background: var(--premium-surface-soft);
    font-size: 13px;
  }

  .rich-block {
    border: 1px solid var(--premium-line);
    border-radius: 8px;
    background: var(--premium-surface);
  }

  .rich-toolbar {
    padding: 8px;
    border-bottom: 1px solid var(--premium-line);
    background: var(--premium-surface-soft);
  }

  .rich-editor {
    min-height: 168px;
    padding: 16px;
    background: var(--premium-surface);
    font-size: 13px;
    line-height: 1.72;
  }

  .layout-panel {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "layout-title layout-settings"
      "layout-modules layout-modules";
    align-items: start;
    gap: 10px 14px;
    height: auto;
    min-height: 120px;
    max-height: 132px;
    padding: 12px 14px;
    overflow: hidden;
  }

  .layout-header {
    grid-area: layout-title;
    min-width: 78px;
    padding: 6px 0 0;
    border-right: 0;
    text-align: left;
  }

  .layout-header h2 {
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .module-stack {
    grid-area: layout-modules;
    display: flex;
    align-items: center;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 7px;
    min-width: 0;
    max-height: 68px;
    overflow: auto;
    padding: 1px 2px 4px;
    scrollbar-width: thin;
  }

  .module-stack::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  .module-row {
    position: relative;
    flex: 0 0 auto;
    display: block;
    align-items: center;
  }

  .module-pill {
    min-height: 27px;
    min-width: 86px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--premium-ink);
    background: transparent;
    font-size: 11px;
    font-weight: 760;
    white-space: nowrap;
  }

  .module-pill:hover,
  .module-pill.is-active {
    border-color: var(--premium-accent);
    color: #fffdfa;
    background: var(--premium-accent);
  }

  .module-control {
    position: absolute;
    top: -9px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: rgba(18, 23, 22, 0.5);
    background: var(--premium-surface);
    opacity: 0;
    pointer-events: none;
  }

  .module-control:nth-of-type(2) {
    right: 16px;
  }

  .module-control:nth-of-type(3) {
    right: -6px;
  }

  .module-row:hover .module-control,
  .module-row:focus-within .module-control {
    opacity: 1;
    pointer-events: auto;
  }

  .settings-block {
    grid-area: layout-settings;
    justify-self: end;
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 10px;
    min-width: 196px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 7px 10px;
    background: var(--premium-surface-soft);
  }

  .setting-line {
    gap: 8px;
  }

  .settings-block h3,
  .setting-line h3 {
    color: var(--premium-muted);
    font-size: 11px;
    white-space: nowrap;
  }

  .custom-color {
    min-height: 24px;
    padding: 0;
    color: var(--premium-muted);
    font-size: 0;
  }

  .custom-color span {
    display: none;
  }

  .custom-color input {
    width: 20px;
    height: 20px;
  }

  .swatch-row {
    gap: 7px;
    margin: 0;
  }

  .swatch {
    width: 14px;
    height: 14px;
    border-width: 1px;
  }

  .preview-pane {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    border: 0;
    background: transparent;
  }

  .pane-topbar {
    width: 100%;
    margin: 0;
    border: 1px solid var(--premium-line);
    border-bottom: 0;
    border-radius: var(--premium-radius) var(--premium-radius) 0 0;
    padding: 14px 16px 10px;
    background: rgba(255, 253, 250, 0.92);
    box-shadow: none;
  }

  .pane-topbar h1 {
    font-size: 19px;
    font-weight: 880;
  }

  .eyebrow {
    margin-bottom: 3px;
    color: var(--premium-muted);
    font-size: 11px;
  }

  .preview-actions {
    gap: 8px;
  }

  .page-toggle {
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 3px;
    background: var(--premium-surface-soft);
  }

  .page-toggle button {
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
  }

  .page-toggle button.is-active {
    color: var(--premium-accent);
    background: var(--premium-accent-soft);
  }

  .ghost-action {
    min-height: 34px;
    border-radius: 999px;
    padding: 0 13px;
    font-size: 12px;
  }

  .canvas-toolbar {
    order: initial;
    width: 100%;
    margin: 0;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 48px;
    padding: 8px 12px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--premium-line);
    border-top: 0;
    border-radius: 0 0 var(--premium-radius) var(--premium-radius);
    background: rgba(255, 253, 250, 0.92);
    box-shadow: none;
  }

  .canvas-toolbar button,
  .canvas-toolbar select,
  .rich-toolbar button,
  .rich-toolbar select,
  .tool-color {
    flex: 0 0 auto;
    min-height: 28px;
    border: 1px solid var(--premium-line);
    border-radius: 7px;
    background: var(--premium-surface-soft);
    font-size: 12px;
  }

  .canvas-toolbar button {
    min-width: 28px;
    padding: 0 8px;
  }

  .canvas-toolbar select {
    flex: 0 0 auto;
  }

  .tool-separator {
    height: 22px;
    background: var(--premium-line);
  }

  .preview-scroll {
    display: grid;
    place-items: start center;
    min-height: 0;
    padding: 22px 12px 8px;
    overflow: auto;
    border-left: 1px solid var(--premium-line);
    border-right: 1px solid var(--premium-line);
    background:
      linear-gradient(180deg, rgba(255, 253, 250, 0.72), rgba(245, 246, 244, 0) 140px),
      transparent;
  }

  .preview-pane .resume-pages {
    gap: 18px;
  }

  .preview-pane .resume-page {
    border: 1px solid rgba(54, 90, 81, 0.12);
    box-shadow: var(--premium-shadow);
  }

  .preview-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px 0 0;
    border-top: 1px solid rgba(22, 32, 29, 0.05);
  }

  .ai-action,
  .refine-action,
  .download-link {
    grid-column: auto;
    min-height: 36px;
    min-width: 116px;
    border-radius: 999px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 800;
  }

  .ai-action {
    border: 1px solid var(--premium-accent);
    color: #fffdfa;
    background: var(--premium-accent);
  }

  .refine-action,
  .download-link {
    border: 1px solid var(--premium-line);
    color: var(--premium-accent);
    background: rgba(255, 253, 250, 0.84);
  }

  .right-workbench {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    height: 100%;
    min-height: 0;
  }

  .right-workbench .template-panel,
  .job-panel {
    overflow: auto;
  }

  .right-workbench .template-panel {
    gap: 14px;
    padding: 18px;
  }

  .template-panel-head h3,
  .right-workbench .template-panel-head h3,
  .job-panel h3 {
    color: var(--premium-ink);
    font-size: 18px;
    font-weight: 880;
  }

  .template-panel-head span,
  .right-workbench .template-panel-head span {
    color: var(--premium-muted);
    font-size: 12px;
    font-weight: 720;
  }

  .template-switcher {
    grid-template-columns: 64px minmax(0, 1fr) 18px;
    min-height: 108px;
    border: 1px solid var(--premium-line);
    border-radius: 9px;
    padding: 10px;
    background: var(--premium-surface-soft);
  }

  .template-switcher .template-thumb {
    width: 62px;
    height: 88px;
    border: 1px solid var(--premium-line);
    border-left: 8px solid var(--premium-accent);
    border-radius: 4px;
  }

  .template-switcher-copy strong {
    font-size: 15px;
    font-weight: 850;
  }

  .job-panel {
    align-content: start;
    gap: 14px;
    padding: 18px;
  }

  .job-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .job-panel input {
    min-height: 42px;
    padding: 0 13px;
  }

  .job-panel textarea {
    min-height: 128px;
    padding: 12px 13px;
  }

  .jd-ocr-action {
    min-height: 30px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 0 11px;
    color: var(--premium-accent);
    background: var(--premium-accent-soft);
  }

  .match-action,
  .interview-advice-action {
    justify-self: stretch;
    min-height: 40px;
    border: 1px solid var(--premium-accent);
    border-radius: 9px;
    color: #fffdfa;
    background: var(--premium-accent);
    font-size: 14px;
    font-weight: 820;
  }

  .interview-advice-action {
    background: var(--premium-accent-hover);
  }

  .ghost-action:hover,
  .profile-button:hover,
  .canvas-toolbar button:hover,
  .canvas-toolbar select:hover,
  .rich-toolbar button:hover,
  .rich-toolbar select:hover,
  .tool-color:hover,
  .module-control:hover,
  .small-button:hover,
  .option-pill:hover,
  .download-link:hover,
  .refine-action:hover,
  .jd-ocr-action:hover {
    border-color: var(--premium-accent);
    color: var(--premium-accent);
    background: var(--premium-accent-soft);
    box-shadow: none;
  }

  .ai-action:hover,
  .match-action:hover,
  .interview-advice-action:hover {
    border-color: var(--premium-accent-hover);
    color: #fffdfa;
    background: var(--premium-accent-hover);
    box-shadow: none;
  }

  .text-input:focus,
  .field input:focus,
  .field select:focus,
  .date-trigger:focus,
  .module-title-input:focus,
  .rich-editor:focus,
  .custom-module-form input:focus,
  .custom-bg-control input:focus,
  .modal-panel input:focus,
  .job-panel input:focus,
  .job-panel textarea:focus {
    border-color: var(--premium-accent);
    box-shadow: 0 0 0 3px rgba(54, 90, 81, 0.12);
  }
}

@media screen and (min-width: 1081px) and (max-width: 1320px) {
  .workspace-grid {
    grid-template-columns:
      minmax(284px, var(--editor-width))
      var(--splitter-width)
      minmax(520px, 1fr)
      var(--splitter-width)
      minmax(260px, var(--right-width));
    gap: 12px 0;
  }

  .settings-block {
    min-width: 172px;
  }

  .module-row {
    grid-template-columns: minmax(92px, auto) 20px 20px;
  }

  .module-pill {
    min-width: 92px;
    padding: 0 10px;
  }
}

@media screen {
  :root {
    --premium-bg: #f5f6f4;
    --premium-surface: #fffdfa;
    --premium-surface-soft: #f9faf8;
    --premium-ink: #121716;
    --premium-muted: #68736f;
    --premium-line: #dde3df;
    --premium-line-strong: #b8c2bd;
    --premium-accent: #365a51;
    --premium-accent-hover: #213d37;
    --premium-accent-soft: #e8f0ed;
    --premium-shadow: 0 20px 52px rgba(22, 32, 29, 0.075);
    --premium-radius: 10px;
  }
}

@media screen and (max-width: 1080px) {
  body {
    overflow: auto;
    color: var(--premium-ink);
    background: var(--premium-bg);
  }

  .studio-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: auto;
    min-height: 100dvh;
    margin: 0;
    padding: 0 12px 14px;
    background: transparent;
  }

  .studio-header {
    min-height: 54px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(22, 32, 29, 0.08);
    background: transparent;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-color: transparent;
    color: inherit;
    background: transparent;
  }

  .profile-button {
    min-width: 92px;
    min-height: 32px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    background: var(--premium-surface);
  }

  .workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "modules"
      "preview"
      "editor"
      "right";
    gap: 12px;
    height: auto;
    min-height: 0;
    padding-top: 12px;
  }

  .workspace-splitter,
  .right-v-splitter,
  .panel-height-handle {
    display: none !important;
  }

  .layout-panel {
    grid-area: modules;
  }

  .preview-pane {
    grid-area: preview;
  }

  .editor-pane {
    grid-area: editor;
    width: 100%;
    max-width: none;
    height: auto;
  }

  .right-workbench {
    grid-area: right;
  }

  .editor-panel,
  .layout-panel,
  .right-workbench .template-panel,
  .job-panel,
  .pane-topbar,
  .canvas-toolbar {
    border: 1px solid var(--premium-line);
    border-radius: var(--premium-radius);
    background: var(--premium-surface);
    box-shadow: none;
  }

  .layout-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    height: auto;
    max-height: none;
    padding: 14px;
    overflow: hidden;
  }

  .layout-header {
    padding: 0;
    text-align: left;
  }

  .layout-header h2 {
    font-size: 13px;
    font-weight: 850;
  }

  .module-stack {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 0 4px;
  }

  .module-row {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(94px, auto) 22px 22px;
    gap: 4px;
    align-items: center;
  }

  .module-pill {
    min-height: 30px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--premium-ink);
    background: var(--premium-surface-soft);
    font-size: 12px;
    font-weight: 760;
    white-space: nowrap;
  }

  .module-pill.is-active {
    border-color: var(--premium-accent);
    color: #fffdfa;
    background: var(--premium-accent);
  }

  .settings-block {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    border: 1px solid var(--premium-line);
    border-radius: 999px;
    padding: 8px 10px;
    background: var(--premium-surface-soft);
  }

  .swatch-row {
    margin-top: 0;
  }

  .preview-pane {
    display: grid;
    grid-template-rows: auto auto minmax(420px, auto) auto;
    min-height: 720px;
    border: 0;
    background: transparent;
  }

  .pane-topbar {
    width: 100%;
    margin: 0;
    border-bottom: 0;
    border-radius: var(--premium-radius) var(--premium-radius) 0 0;
    padding: 13px 14px 10px;
  }

  .pane-topbar h1 {
    font-size: 18px;
    font-weight: 880;
  }

  .preview-actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .canvas-toolbar {
    width: 100%;
    margin: 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    min-height: 48px;
    padding: 8px 12px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 0;
    border-radius: 0 0 var(--premium-radius) var(--premium-radius);
  }

  .canvas-toolbar button,
  .canvas-toolbar select {
    flex: 0 0 auto;
    width: auto;
    min-height: 28px;
    border-radius: 7px;
  }

  .canvas-toolbar button {
    min-width: 30px;
  }

  .canvas-toolbar .tool-separator {
    flex: 0 0 1px;
  }

  .preview-scroll {
    min-height: 420px;
    padding: 20px 8px 8px;
    border-left: 1px solid var(--premium-line);
    border-right: 1px solid var(--premium-line);
    background: linear-gradient(180deg, rgba(255, 253, 250, 0.72), rgba(245, 246, 244, 0) 140px);
  }

  .preview-bottom-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 0 0;
  }

  .ai-action,
  .refine-action,
  .preview-download {
    min-height: 36px;
    border-radius: 999px;
    padding: 0 16px;
  }

  .right-workbench {
    display: grid;
    grid-template-rows: auto auto;
    gap: 12px;
    height: auto;
  }

  .right-workbench .template-panel,
  .job-panel,
  .editor-panel {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 16px;
  }

  .editor-scroll {
    height: auto;
    max-height: none;
  }
}

@media screen {
  .preview-actions {
    display: none !important;
  }
}

@media screen and (min-width: 1081px) {
  .workspace-grid > .layout-panel {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas: "layout-title layout-modules layout-settings" !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 78px !important;
    max-height: 88px !important;
    padding: 6px 10px !important;
  }

  .workspace-grid > .layout-panel .layout-header {
    padding: 0 10px 0 0 !important;
    border-right: 1px solid var(--premium-line) !important;
  }

  .workspace-grid > .layout-panel .module-stack {
    flex-wrap: nowrap !important;
    align-items: center !important;
    max-height: 34px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 2px 2px !important;
  }

  .workspace-grid > .layout-panel .module-pill {
    min-height: 26px !important;
  }

  .workspace-grid > .layout-panel .settings-block {
    min-width: 0 !important;
    padding: 5px 8px !important;
  }

  .preview-pane > .pane-topbar {
    min-height: 50px !important;
    padding: 8px 12px 6px !important;
  }

  .preview-pane > .pane-topbar h1 {
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  .preview-pane > .pane-topbar .eyebrow {
    margin-bottom: 0 !important;
  }

  .preview-pane > .canvas-toolbar {
    min-height: 38px !important;
    padding: 5px 9px 6px !important;
  }

  .preview-pane > .canvas-toolbar button,
  .preview-pane > .canvas-toolbar select {
    min-height: 26px !important;
  }

  .preview-pane > .preview-scroll {
    padding-top: 12px !important;
  }
}

@media screen and (max-width: 1080px) {
  .workspace-grid > .layout-panel {
    gap: 8px !important;
    padding: 10px 12px !important;
  }

  .preview-pane > .pane-topbar {
    padding: 9px 12px 6px !important;
  }

  .preview-pane > .canvas-toolbar {
    min-height: 38px !important;
    padding: 5px 9px 6px !important;
  }

  .preview-pane > .preview-scroll {
    padding-top: 12px !important;
  }
}

@media screen and (min-width: 1081px) {
  .workspace-grid {
    grid-template-columns:
      minmax(300px, var(--editor-width))
      var(--splitter-width)
      minmax(620px, min(var(--preview-width), 1280px))
      var(--splitter-width)
      minmax(280px, var(--right-width)) !important;
    justify-content: center;
  }
}

@media screen and (min-width: 1600px) {
  .workspace-grid {
    --editor-width: 360px;
    --preview-width: 1280px;
    --right-width: 328px;
    grid-template-columns:
      minmax(350px, var(--editor-width))
      var(--splitter-width)
      minmax(860px, min(var(--preview-width), 1280px))
      var(--splitter-width)
      minmax(320px, var(--right-width)) !important;
  }
}

@media screen and (min-width: 1920px) {
  .workspace-grid {
    --editor-width: 370px;
    --right-width: 338px;
  }
}

@media screen {
  .preview-pane > .pane-topbar {
    display: none !important;
  }
}

@media screen and (min-width: 1081px) {
  .workspace-grid {
    gap: 6px 0 !important;
    padding-top: 8px !important;
  }

  .workspace-grid > .layout-panel {
    min-height: 58px !important;
    max-height: 64px !important;
    padding: 4px 8px !important;
  }

  .workspace-grid > .layout-panel .layout-header {
    min-height: 24px !important;
    padding-right: 8px !important;
  }

  .workspace-grid > .layout-panel .module-stack {
    max-height: 28px !important;
    padding-bottom: 0 !important;
  }

  .workspace-grid > .layout-panel .module-stack::-webkit-scrollbar {
    height: 3px !important;
  }

  .workspace-grid > .layout-panel .module-pill {
    min-height: 24px !important;
    padding: 0 12px !important;
  }

  .workspace-grid > .layout-panel .settings-block {
    padding: 3px 7px !important;
  }

  .preview-pane > .canvas-toolbar {
    min-height: 32px !important;
    padding: 3px 8px 4px !important;
  }

  .preview-pane > .canvas-toolbar button,
  .preview-pane > .canvas-toolbar select {
    min-height: 24px !important;
  }

  .preview-pane > .preview-scroll {
    padding-top: 6px !important;
  }
}

@media screen and (max-width: 1080px) {
  .workspace-grid {
    gap: 8px !important;
  }

  .workspace-grid > .layout-panel {
    padding: 8px 10px !important;
  }

  .preview-pane > .canvas-toolbar {
    min-height: 34px !important;
    padding: 4px 8px !important;
  }

  .preview-pane > .preview-scroll {
    padding-top: 8px !important;
  }
}

@media screen {
  .preview-pane {
    grid-template-rows: auto minmax(0, 1fr) auto !important;
  }

  .preview-bottom-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 44px !important;
    padding: 6px 0 0 !important;
  }
}

@media screen {
  .photo-editor-scroll {
    padding: 16px 18px 18px !important;
  }

  .photo-editor-scroll .editor-title {
    min-height: 36px !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
  }

  .photo-editor-scroll .photo-station {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 14px 14px !important;
  }

  .photo-editor-scroll .photo-identity-area,
  .photo-editor-scroll .photo-life-area {
    position: relative;
    display: grid !important;
    grid-template-rows: auto auto;
    align-content: start;
    justify-items: stretch !important;
    min-width: 0;
    gap: 8px !important;
  }

  .photo-editor-scroll .photo-life-area {
    grid-template-rows: auto auto;
  }

  .photo-editor-scroll .photo-station > .editor-divider {
    display: none !important;
  }

  .photo-editor-scroll .photo-uploader {
    width: 100% !important;
    height: 146px !important;
    min-height: 0 !important;
    border: 1px solid rgba(54, 90, 81, 0.18) !important;
    border-radius: 8px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
      #9ed0f3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  }

  .photo-editor-scroll .photo-uploader-id {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
      var(--premium-accent-soft);
  }

  .photo-editor-scroll .photo-uploader-life {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
      #a9d8f6;
  }

  .photo-editor-scroll .upload-empty {
    gap: 8px !important;
    color: #113f63 !important;
    font-size: 14px !important;
    font-weight: 820 !important;
  }

  .photo-editor-scroll .upload-empty::before {
    width: 36px !important;
    height: 36px !important;
    border-width: 1.5px !important;
    font-size: 28px !important;
  }

  .photo-editor-scroll .upload-commands {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  .photo-editor-scroll .upload-commands button {
    justify-content: center;
    min-height: 32px !important;
    padding: 0 10px !important;
    border-width: 1px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }

  .photo-editor-scroll .photo-helper {
    align-self: start;
    min-height: 32px;
    margin: 0 !important;
    padding: 0 2px;
    color: var(--premium-muted) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    text-align: center !important;
  }

  .photo-editor-scroll .photo-option-groups {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
    padding-top: 2px;
  }

  .photo-editor-scroll .option-group {
    min-width: 0;
  }

  .photo-editor-scroll .option-group h3 {
    margin: 0 0 7px !important;
    color: var(--premium-muted) !important;
    font-size: 12px !important;
    font-weight: 760 !important;
  }

  .photo-editor-scroll .option-row {
    gap: 7px !important;
  }

  .photo-editor-scroll .option-pill {
    min-height: 31px !important;
    padding: 0 11px !important;
    border-width: 1px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 760 !important;
    background: rgba(255, 253, 250, 0.86) !important;
  }

  .photo-editor-scroll .option-pill.is-selected {
    color: var(--premium-accent-hover) !important;
    background: var(--premium-accent-soft) !important;
  }

  .photo-editor-scroll .size-pill {
    min-height: 48px !important;
    padding: 7px 10px !important;
    line-height: 1.2;
  }

  .photo-editor-scroll .size-pill small {
    margin-top: 2px;
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .photo-editor-scroll .color-pill {
    gap: 6px !important;
  }

  .photo-editor-scroll .color-chip {
    width: 15px !important;
    height: 15px !important;
    border-radius: 999px !important;
  }

  .photo-editor-scroll .custom-bg-control {
    display: grid !important;
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .photo-editor-scroll .custom-bg-control label {
    gap: 5px !important;
    font-size: 11px !important;
  }

  .photo-editor-scroll .custom-bg-control input {
    min-height: 32px !important;
    border-width: 1px !important;
    border-radius: 8px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
  }

  .photo-editor-scroll .custom-bg-control input[type="color"] {
    padding: 3px !important;
  }

  .photo-editor-scroll > .photo-station > .add-row {
    grid-column: 1 / -1 !important;
    min-height: 40px !important;
    margin-top: 4px !important;
    border-radius: 8px !important;
  }

  .photo-editor-scroll .photo-station {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    gap: 10px !important;
    max-width: 366px;
    margin: 0 auto;
  }

  .photo-editor-scroll .photo-flow-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
  }

  .photo-editor-scroll .photo-identity-area,
  .photo-editor-scroll .photo-life-area {
    justify-items: center !important;
    width: 100%;
    gap: 8px !important;
  }

  .photo-editor-scroll .photo-uploader {
    width: 118px !important;
    min-width: 118px !important;
    height: 138px !important;
    border: 2px solid rgba(20, 34, 30, 0.72) !important;
    border-radius: 3px !important;
  }

  .photo-editor-scroll .photo-uploader-id {
    width: 118px !important;
    height: 138px !important;
  }

  .photo-editor-scroll .photo-uploader-life {
    width: 126px !important;
    height: 132px !important;
    border-radius: 22px !important;
  }

  .photo-editor-scroll .upload-empty {
    font-size: 15px !important;
  }

  .photo-editor-scroll .upload-empty::before {
    width: 33px !important;
    height: 33px !important;
    font-size: 26px !important;
  }

  .photo-editor-scroll .upload-commands {
    display: flex !important;
    grid-template-columns: none !important;
    justify-content: center;
    gap: 6px !important;
  }

  .photo-editor-scroll .upload-commands button {
    min-width: 58px;
    min-height: 28px !important;
    padding: 0 9px !important;
    border: 2px solid rgba(20, 34, 30, 0.78) !important;
    border-radius: 7px !important;
    background: #fffefa;
    font-size: 12px !important;
  }

  .photo-editor-scroll .photo-station > .editor-divider {
    display: block !important;
    width: 100%;
    height: 2px;
    margin: 2px 0 0 !important;
    background: rgba(20, 34, 30, 0.82);
  }

  .photo-editor-scroll .photo-helper {
    min-height: 0;
    color: var(--muted) !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  .photo-editor-scroll .photo-option-groups {
    grid-template-columns: 1fr !important;
    justify-items: center;
    width: 100%;
    gap: 9px !important;
    padding-top: 0;
  }

  .photo-editor-scroll .photo-option-row {
    display: grid;
    justify-items: center;
    width: 100%;
    gap: 7px;
  }

  .photo-editor-scroll .photo-option-row-top {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 14px;
  }

  .photo-editor-scroll .option-group {
    display: grid;
    justify-items: center;
    min-width: 0;
  }

  .photo-editor-scroll .option-group h3 {
    margin: 0 0 6px !important;
    color: var(--ink) !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    text-align: center;
  }

  .photo-editor-scroll .option-row {
    justify-content: center;
    gap: 7px !important;
  }

  .photo-editor-scroll .option-pill {
    min-height: 31px !important;
    padding: 0 12px !important;
    border: 2px solid rgba(20, 34, 30, 0.78) !important;
    border-radius: 7px !important;
    color: var(--ink);
    background: #fffefa !important;
    font-size: 13px !important;
    font-weight: 850 !important;
  }

  .photo-editor-scroll .option-pill.is-selected {
    color: var(--premium-accent-hover) !important;
    background: var(--premium-accent-soft) !important;
  }

  .photo-editor-scroll .size-pill {
    min-width: 56px !important;
    min-height: 31px !important;
    padding: 0 10px !important;
    align-items: center !important;
  }

  .photo-editor-scroll .color-pill {
    min-width: 54px;
    gap: 0 !important;
  }

  .photo-editor-scroll .custom-bg-advanced {
    width: 100%;
    max-width: 280px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
  }

  .photo-editor-scroll .custom-bg-advanced summary {
    cursor: pointer;
    font-weight: 800;
  }

  .photo-editor-scroll .custom-bg-control {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) !important;
    margin-top: 7px !important;
  }

  .photo-editor-scroll > .photo-station > .add-row {
    width: 220px;
    min-height: 34px !important;
    margin-top: 3px !important;
    border: 2px solid rgba(20, 34, 30, 0.78) !important;
    border-radius: 8px !important;
    justify-content: center;
  }
}

@media screen and (max-width: 1080px) {
  .photo-editor-scroll .photo-station,
  .photo-editor-scroll .photo-option-groups {
    grid-template-columns: 1fr !important;
  }
}

@media screen {
  .photo-editor-scroll .photo-station {
    max-width: 366px;
    gap: 12px !important;
  }

  .photo-editor-scroll .photo-flow-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    color: #162821;
    font-size: 17px;
    letter-spacing: 0;
  }

  .photo-editor-scroll .photo-flow-title::after {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: -7px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(54, 90, 81, 0.7), transparent);
  }

  .photo-editor-scroll .photo-uploader {
    border-color: rgba(32, 53, 47, 0.78) !important;
    background:
      radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.42), transparent 42%),
      linear-gradient(160deg, #72b9ee, #2f86d4) !important;
    box-shadow:
      0 10px 22px rgba(21, 59, 86, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.42);
  }

  .photo-editor-scroll .photo-uploader-life {
    border-color: rgba(32, 53, 47, 0.58) !important;
    background:
      radial-gradient(circle at 30% 16%, rgba(255, 255, 255, 0.62), transparent 42%),
      linear-gradient(180deg, #c6e9fb, #8fcdf1) !important;
    box-shadow:
      0 10px 24px rgba(33, 88, 118, 0.13),
      inset 0 1px 0 rgba(255, 255, 255, 0.62);
  }

  .photo-editor-scroll .upload-empty {
    color: #113b5f !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  }

  .photo-editor-scroll .upload-commands button,
  .photo-editor-scroll .option-pill {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  }

  .photo-editor-scroll .upload-commands button:hover,
  .photo-editor-scroll .option-pill:hover,
  .photo-editor-scroll .custom-bg-inline summary:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(25, 45, 40, 0.12);
  }

  .photo-editor-scroll .photo-station > .editor-divider {
    height: 1px;
    margin: 3px 0 2px !important;
    background: linear-gradient(90deg, transparent, rgba(32, 53, 47, 0.8), transparent);
  }

  .photo-editor-scroll .photo-helper {
    color: rgba(38, 55, 49, 0.72) !important;
    font-size: 11px !important;
  }

  .photo-editor-scroll .photo-option-groups {
    gap: 10px !important;
  }

  .photo-editor-scroll .option-group h3 {
    color: #172821 !important;
    font-size: 15px !important;
  }

  .photo-editor-scroll .option-pill {
    border-color: rgba(54, 90, 81, 0.88) !important;
    color: #244b40 !important;
    background: linear-gradient(180deg, #e9f5f1, #dfeee9) !important;
    box-shadow: inset 0 0 0 1px rgba(54, 90, 81, 0.12), 0 4px 10px rgba(32, 53, 47, 0.06);
  }

  .photo-editor-scroll .option-pill.is-selected,
  .photo-editor-scroll .custom-bg-inline[open] summary {
    border-color: #214f43 !important;
    color: #fffdfa !important;
    background: linear-gradient(180deg, #3f715f, #2f5d50) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 8px 16px rgba(32, 53, 47, 0.18);
  }

  .photo-editor-scroll .custom-bg-inline {
    position: relative;
    display: inline-flex;
    width: 50px;
    height: 31px;
    margin-left: 1px;
    vertical-align: top;
  }

  .photo-editor-scroll .custom-bg-inline summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 31px;
    padding: 0;
    cursor: pointer;
    list-style: none;
    border: 2px solid rgba(54, 90, 81, 0.88);
    border-radius: 6px;
    background: linear-gradient(180deg, #e9f5f1, #dfeee9) !important;
    box-shadow: inset 0 0 0 1px rgba(54, 90, 81, 0.12), 0 4px 10px rgba(32, 53, 47, 0.06);
  }

  .photo-editor-scroll .custom-bg-inline summary::-webkit-details-marker {
    display: none;
  }

  .photo-editor-scroll .custom-color-preview {
    display: block;
    width: 36px;
    height: 18px;
    border-radius: 3px;
    border: 1px solid rgba(20, 34, 30, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }

  .photo-editor-scroll .custom-bg-inline:not([open]) .custom-bg-control {
    display: none !important;
  }

  .photo-editor-scroll .custom-bg-inline .custom-bg-control {
    position: absolute;
    top: 37px;
    right: 0;
    z-index: 20;
    display: grid !important;
    width: 182px;
    grid-template-columns: 70px minmax(0, 1fr) !important;
    gap: 8px !important;
    margin-top: 0 !important;
    padding: 10px;
    border: 1px solid rgba(54, 90, 81, 0.18);
    border-radius: 10px;
    background: rgba(255, 253, 250, 0.98);
    box-shadow: 0 16px 30px rgba(20, 34, 30, 0.16);
    text-align: left;
  }

  .photo-editor-scroll .custom-bg-inline .custom-bg-control label {
    gap: 5px !important;
  }

  .photo-editor-scroll .custom-bg-inline .custom-bg-control input[type="color"] {
    width: 100%;
    min-height: 32px !important;
  }

  .photo-editor-scroll .custom-bg-inline .custom-bg-control input[type="text"] {
    min-width: 0;
    width: 100%;
  }

  .photo-editor-scroll > .photo-station > .add-row {
    margin-top: 5px !important;
    border-color: rgba(32, 53, 47, 0.82) !important;
    background: linear-gradient(180deg, #3f715f, #315f51) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(49, 95, 81, 0.18);
  }

  .photo-editor-scroll .photo-uploader,
  .photo-editor-scroll .photo-uploader-id,
  .photo-editor-scroll .photo-uploader-life {
    border-color: rgba(55, 64, 60, 0.72) !important;
    background:
      radial-gradient(circle at 28% 16%, rgba(255, 255, 255, 0.78), transparent 42%),
      linear-gradient(160deg, #eef0ed 0%, #d6dbd6 48%, #bfc8c2 100%) !important;
    box-shadow:
      0 10px 24px rgba(44, 52, 48, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      inset 0 -18px 30px rgba(82, 93, 88, 0.08);
  }

  .photo-editor-scroll .photo-uploader-life {
    background:
      radial-gradient(circle at 30% 16%, rgba(255, 255, 255, 0.82), transparent 44%),
      linear-gradient(180deg, #f1f3f1 0%, #dce2dd 54%, #c5cec7 100%) !important;
  }

  .photo-editor-scroll .upload-empty {
    color: #263730 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .photo-editor-scroll .upload-empty::before {
    color: #263730 !important;
    border-color: rgba(38, 55, 48, 0.78) !important;
    background: rgba(255, 255, 255, 0.2);
  }
}

@media screen {
  .job-panel #jobDescription {
    min-height: 210px !important;
    padding: 20px 18px !important;
    line-height: 1.65 !important;
  }
}

@media screen {
  .right-workbench .template-panel {
    position: relative;
    gap: 14px !important;
    padding: 18px !important;
    overflow: hidden;
    border-color: rgba(54, 90, 81, 0.16) !important;
    background:
      linear-gradient(145deg, rgba(255, 253, 250, 0.98), rgba(247, 249, 246, 0.94)),
      var(--premium-surface);
  }

  .right-workbench .template-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--premium-accent), rgba(240, 138, 0, 0.8), transparent);
    opacity: 0.82;
  }

      .right-workbench .template-panel-head {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        position: relative;
        align-items: baseline;
        min-height: 26px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(54, 90, 81, 0.12);
  }

      .right-workbench .template-panel-head h3 {
        grid-column: 2;
        justify-self: center;
        text-align: center;
        color: var(--premium-ink) !important;
        font-size: 19px !important;
        line-height: 1.05 !important;
      }

      .right-workbench .template-panel-head span {
        grid-column: 3;
        justify-self: end;
        text-align: right;
        max-width: 128px !important;
        color: var(--premium-muted) !important;
        font-size: 12px !important;
        font-weight: 760 !important;
  }

  .right-workbench .template-gallery {
    display: grid !important;
  }

  .right-workbench .template-switcher {
    position: relative;
    grid-template-columns: 74px minmax(0, 1fr) 30px !important;
    gap: 14px !important;
    align-items: center !important;
    min-height: 120px !important;
    padding: 13px 12px !important;
    border: 1px solid rgba(54, 90, 81, 0.15) !important;
    border-radius: 10px !important;
    background:
      radial-gradient(circle at 18% 0%, rgba(54, 90, 81, 0.08), transparent 42%),
      linear-gradient(180deg, rgba(255, 253, 250, 0.98), rgba(249, 250, 248, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .right-workbench .template-switcher:hover {
    border-color: rgba(54, 90, 81, 0.34) !important;
    background:
      radial-gradient(circle at 18% 0%, rgba(54, 90, 81, 0.12), transparent 42%),
      linear-gradient(180deg, #fffdfa, #f7faf7) !important;
    box-shadow: 0 14px 34px rgba(28, 42, 39, 0.08);
    transform: translateY(-1px);
  }

  .right-workbench .template-switcher .template-thumb {
    width: 72px !important;
    height: 92px !important;
    margin: 0 !important;
    padding: 10px 11px !important;
    border: 1px solid rgba(54, 90, 81, 0.16) !important;
    border-left: 8px solid var(--premium-accent) !important;
    border-radius: 6px !important;
    background-color: #fffdfa !important;
    background-position: center;
    background-size: cover;
    box-shadow: 0 10px 22px rgba(28, 42, 39, 0.08);
  }

  .right-workbench .template-switcher .template-thumb::before {
    height: 20px !important;
    border-bottom: 2px solid rgba(240, 138, 0, 0.9) !important;
  }

  .right-workbench .template-switcher .template-thumb span {
    min-height: 6px !important;
    border-radius: 999px !important;
    background: #cbd7d2 !important;
    opacity: 1 !important;
  }

  .right-workbench .template-switcher-copy {
    display: grid !important;
    align-content: center;
    gap: 4px !important;
    min-width: 0;
  }

  .right-workbench .template-kicker {
    width: max-content;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--premium-accent-hover);
    background: var(--premium-accent-soft);
    font-size: 10px;
    font-weight: 820;
    line-height: 1.45;
  }

  .right-workbench .template-switcher-copy strong {
    color: var(--premium-ink) !important;
    font-size: 17px !important;
    font-weight: 880 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    text-wrap: balance;
  }

  .right-workbench .template-switcher-copy small {
    color: var(--premium-muted) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
  }

  .right-workbench .template-switcher-action {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(54, 90, 81, 0.16);
    border-radius: 999px;
    color: var(--premium-accent);
    background: rgba(255, 253, 250, 0.8);
  }

  .right-workbench .template-switcher-action svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.4;
  }

  .right-workbench .template-switcher > svg {
    display: none;
  }
}

@media screen and (max-width: 1080px) {
  .right-workbench .template-switcher {
    grid-template-columns: 64px minmax(0, 1fr) 28px !important;
    min-height: 108px !important;
  }

  .right-workbench .template-switcher .template-thumb {
    width: 62px !important;
    height: 82px !important;
  }
}

@media screen {
  .studio-status {
    max-width: min(42vw, 420px);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .studio-status::-webkit-scrollbar {
    display: none;
  }

  .studio-status span {
    flex: 0 0 auto;
    padding-inline: 14px !important;
  }
}

@media screen {
      .editor-panel-heading {
        margin: 0 0 14px;
        padding: 0 0 10px;
        border-bottom: 1px solid rgba(54, 90, 81, 0.12);
        color: var(--premium-ink, var(--ink));
        font-size: 20px;
        font-weight: 880;
        line-height: 1.08;
        text-align: center;
      }

  .editor-panel-heading + .editor-title {
    margin-bottom: 16px !important;
  }

  .photo-editor-scroll .editor-panel-heading {
    margin-bottom: 14px;
  }
}

@media screen {
  .date-trigger {
    min-height: 34px !important;
    padding: 0 9px !important;
  }

  .date-trigger svg {
    width: 16px !important;
    height: 16px !important;
  }

  .date-picker-popover {
    width: min(312px, calc(100vw - 28px)) !important;
    border-radius: 9px !important;
    box-shadow: 0 14px 34px rgba(20, 29, 36, 0.16) !important;
  }

  .date-picker-head {
    padding: 8px 9px !important;
  }

  .date-picker-head strong {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  .date-picker-head button {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    color: var(--premium-ink, var(--ink)) !important;
  }

  .date-picker-head svg {
    width: 14px !important;
    height: 14px !important;
  }

  .date-picker-wheels {
    grid-template-columns: 1.05fr 0.92fr 0.92fr !important;
    gap: 7px !important;
    padding: 8px 9px !important;
  }

  .date-wheel {
    height: 132px !important;
    border-radius: 8px !important;
    scrollbar-width: thin;
  }

  .date-wheel button {
    min-height: 30px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  .date-picker-actions {
    gap: 7px !important;
    padding: 8px 9px 9px !important;
  }

  .date-picker-actions button {
    min-height: 30px !important;
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }
}

.account-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.account-actions [hidden] {
  display: none !important;
}

.account-actions .profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 190px;
  padding: 0 12px;
  white-space: nowrap;
}

.account-actions .profile-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-actions .profile-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.account-pay-button {
  border-color: rgba(60, 124, 106, 0.34);
  color: #2f6e5c;
}

.account-logout-button {
  min-width: 70px;
}

.account-avatar {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.billing-modal {
  width: min(480px, calc(100vw - 32px));
}

.account-login-modal {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  padding: 28px 34px 26px;
  background: #ffffff;
}

.account-login-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #8c9490;
  font-size: 30px;
  line-height: 1;
}

.account-login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #d8dedb;
}

.account-login-tabs button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #26352f;
  font-size: 16px;
  font-weight: 800;
}

.account-login-tabs button.active {
  border-bottom-color: #3b82f6;
  color: #2f80ed;
}

.account-login-body {
  padding-top: 26px;
}

.account-login-panel {
  display: grid;
  gap: 16px;
}

.account-login-panel[hidden] {
  display: none;
}

.account-login-field {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.account-login-input {
  position: relative;
  display: block;
}

.account-login-input svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #a2aaa6;
  transform: translateY(-50%);
  pointer-events: none;
}

.account-login-input input {
  width: 100%;
  min-height: 48px;
  border-color: #d8dedb;
  border-radius: 4px;
  padding-left: 44px;
  font-size: 15px;
}

.account-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.account-code-row button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: #2f6e5c;
  background: #f4faf7;
  font-weight: 900;
}

.account-code-row button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.account-login-hint {
  min-height: 22px;
  border: 1px solid rgba(60, 124, 106, 0.2);
  border-radius: 8px;
  padding: 9px 11px;
  color: #2f6e5c !important;
  background: rgba(60, 124, 106, 0.08);
}

.account-send-code,
.account-login-submit {
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  background: #1fd0a0;
  font-size: 17px;
  font-weight: 900;
}

.account-send-code {
  color: #2f6e5c;
  background: #f4faf7;
  border: 1px solid rgba(60, 124, 106, 0.22);
}

.account-send-code:disabled,
.account-login-submit:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.account-login-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: #8a9691;
  font-size: 13px;
}

.account-login-links button {
  border: 0;
  background: transparent;
  color: inherit;
}

.account-login-links button:last-child {
  min-height: 32px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  padding: 0 12px;
  color: #2f80ed;
}

.account-login-agreement {
  margin: 6px 0 0;
  color: #9da6a2;
  text-align: center;
  font-size: 12px;
}

.wechat-login-panel {
  justify-items: center;
  color: #8a9691;
  text-align: center;
}

.wechat-login-panel p {
  margin: 0;
}

.wechat-login-qr {
  display: grid;
  place-items: center;
  width: 194px;
  height: 194px;
  border: 1px solid #d8dedb;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(#111 10px, transparent 10px) 0 0 / 20px 20px,
    #fff;
}

.wechat-login-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.wechat-login-qr.loading svg {
  animation: account-spin 0.9s linear infinite;
}

.wechat-login-qr svg {
  width: 84px;
  height: 84px;
  padding: 16px;
  border-radius: 10px;
  color: #111;
  background: #fff;
}

.wechat-login-panel strong {
  color: #2f80ed;
}

.wechat-login-panel [data-wechat-login-status] {
  min-height: 22px;
  color: #65736d;
  line-height: 1.6;
}

.wechat-login-panel [data-wechat-login-status].error {
  color: #b42318;
}

.wechat-login-panel button {
  min-height: 38px;
  border: 1px solid rgba(60, 124, 106, 0.24);
  border-radius: 8px;
  padding: 0 18px;
  color: #2f6e5c;
  background: #f4faf7;
  font-weight: 900;
}

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

.billing-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.billing-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffffb;
  font-size: 22px;
  line-height: 1;
}

.billing-plan-row,
.billing-qr-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(248, 251, 251, 0.86);
}

.billing-plan-row strong,
.billing-qr-wrap strong {
  display: block;
  margin-bottom: 4px;
}

.billing-plan-row span,
.billing-qr-wrap span,
.billing-status {
  color: var(--muted);
  font-size: 13px;
}

.billing-plan-row b {
  color: var(--accent);
  font-size: 24px;
}

.billing-qr-wrap {
  grid-template-columns: 132px minmax(0, 1fr);
}

.billing-qr-wrap img {
  width: 132px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.billing-warning {
  border: 1px solid rgba(181, 75, 87, 0.26);
  border-radius: 8px;
  padding: 10px 12px;
  color: #8a2f3c !important;
  background: rgba(181, 75, 87, 0.08);
}

.billing-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.billing-inline-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fffffb;
  font-weight: 800;
}

.billing-inline-actions .confirm {
  border-color: var(--accent);
  color: #6b3f00;
  background: #ffd14c;
}

i[data-lucide="message-circle"]::before {
  content: "微";
}

i[data-lucide="badge-check"]::before {
  content: "✓";
}

i[data-lucide="log-out"]::before {
  content: "出";
}

@media screen and (max-width: 980px) {
  .account-actions {
    width: 100%;
  }

  .account-actions .profile-button {
    flex: 1;
    max-width: none;
  }
}

@media screen and (max-width: 560px) {
  .account-actions {
    flex-wrap: wrap;
  }

  .billing-qr-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.credit-modal {
  width: min(660px, calc(100vw - 32px));
}

.credit-modal .modal-content {
  gap: 12px;
}

.credit-profile-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  border-radius: 8px;
  padding: 18px 22px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(0, 91, 96, 0.96), rgba(18, 126, 129, 0.86)),
    repeating-linear-gradient(38deg, rgba(255, 255, 255, 0.11) 0 1px, transparent 1px 22px);
  overflow: hidden;
}

.credit-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #117c82;
  background: #74e2e4;
  font-size: 24px;
  font-weight: 900;
}

.credit-profile-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.credit-profile-card span {
  display: inline-flex;
  width: max-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 9px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.credit-profile-card b {
  color: #fffdf8;
  font-size: 42px;
  line-height: 1;
}

.credit-tabs {
  display: flex;
  align-items: end;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.credit-tabs button {
  min-height: 42px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 0 16px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
}

.credit-tabs button.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: #fffffb;
}

.credit-recharge-panel {
  display: grid;
  gap: 12px;
  padding: 2px 0 0;
}

.credit-recharge-panel[hidden] {
  display: none;
}

.credit-field {
  display: grid;
  gap: 7px;
  font-weight: 850;
}

.credit-field input {
  width: min(320px, 100%);
  min-height: 42px;
  border: 1.5px solid #1c6cff;
  border-radius: 8px;
  padding: 0 12px;
  outline: 0;
  background: #fffffb;
}

.credit-result-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  color: var(--muted);
}

.credit-result-line b {
  color: #f03b2f;
}

.credit-package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.credit-package-grid button {
  display: grid;
  gap: 5px;
  min-height: 96px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fffffb;
  text-align: left;
}

.credit-package-grid button.is-selected {
  border-color: #1c6cff;
  box-shadow: 0 0 0 3px rgba(28, 108, 255, 0.1);
}

.credit-package-grid strong {
  font-size: 21px;
}

.credit-package-grid span {
  color: #1c6cff;
  font-weight: 900;
}

.credit-package-grid small {
  color: #f03b2f;
  font-weight: 800;
}

.credit-pay-method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-top: 2px;
}

.credit-pay-method > span {
  font-weight: 850;
}

.credit-pay-method button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffffb;
  font-weight: 850;
}

.credit-pay-method button.is-selected {
  border-color: rgba(34, 169, 88, 0.36);
  color: #12813c;
}

.billing-qr-wrap small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  word-break: break-all;
}

@media screen and (max-width: 680px) {
  .credit-profile-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .credit-profile-card b {
    grid-column: 1 / -1;
    font-size: 36px;
  }

  .credit-package-grid {
    grid-template-columns: 1fr;
  }

  .credit-pay-method {
    grid-template-columns: 1fr;
  }
}
