:root {
  --bg: #eef3f2;
  --panel: #ffffff;
  --paper: #ffffff;
  --ink: #222222;
  --muted: #5f6866;
  --line: #cfdad7;
  --accent: #176b5f;
  --accent-dark: #0f4d44;
  --accent-soft: #dceee9;
  --focus: #b96f1d;
  --danger: #9d3a2f;
  font-family:
    "Noto Sans SC",
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.brand-mark img {
  display: block;
  width: 96px;
  height: auto;
}

.brand-mark:hover span {
  color: var(--accent-dark);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.language-switcher {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.language-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 800;
}

.language-button.active {
  background: var(--accent);
  color: #ffffff;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.02;
}

.intro-copy {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.privacy-box {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  line-height: 1.6;
}

.privacy-box strong {
  color: var(--accent-dark);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.form-panel,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.form-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  position: sticky;
  top: 16px;
}

.preview-panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
}

.panel-title h2 {
  margin: 0;
  font-size: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.5;
  outline: none;
}

input {
  height: 46px;
  padding: 10px 12px;
}

textarea {
  min-height: 140px;
  resize: vertical;
  padding: 11px 12px;
}

input:focus,
textarea:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(199, 125, 34, 0.18);
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.ghost-button {
  min-height: 36px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.status-pill {
  min-width: 82px;
  border-radius: 999px;
  background: #e3e9e8;
  color: var(--muted);
  padding: 6px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.status-pill.ready {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.resume-paper {
  margin-top: 16px;
  min-height: 720px;
  padding: 42px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 18px 46px rgba(49, 44, 35, 0.08);
}

.resume-header {
  padding-bottom: 22px;
  border-bottom: 2px solid var(--ink);
}

.resume-header h3 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.15;
}

.resume-header p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.resume-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 24px 0;
  border-top: 1px solid #e7e7e7;
  border-left: 1px solid #e7e7e7;
}

.resume-facts div {
  min-height: 72px;
  padding: 12px;
  border-right: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
}

.resume-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.resume-facts dd {
  margin: 7px 0 0;
  line-height: 1.55;
  word-break: break-word;
}

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

.resume-section h4 {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d8d8d8;
  font-size: 17px;
}

.resume-section p {
  margin-bottom: 0;
  line-height: 1.8;
  white-space: pre-line;
}

@media (max-width: 900px) {
  .intro,
  .workspace {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .app {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .two-column,
  .actions,
  .resume-facts {
    grid-template-columns: 1fr;
  }

  .form-panel,
  .preview-panel {
    padding: 14px;
  }

  .resume-paper {
    min-height: 0;
    padding: 24px 18px;
  }

  .resume-header h3 {
    font-size: 28px;
  }

  .brand-mark {
    margin-bottom: 14px;
  }

  .brand-mark img {
    width: 78px;
  }
}

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

  .intro,
  .brand-mark,
  .form-panel,
  .preview-panel > .panel-title {
    display: none;
  }

  .app {
    width: 100%;
    padding: 0;
  }

  .workspace {
    display: block;
  }

  .preview-panel {
    border: 0;
    padding: 0;
  }

  .resume-paper {
    min-height: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }
}
