* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  background: #f5f6f8;
  color: #15171a;
}

button,
select,
input {
  font: inherit;
}


/* =========================
   App
========================= */

.app {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 52px 0 32px;
}


/* =========================
   Header
========================= */

.header {
  margin-bottom: 30px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
}

.tagline {
  margin: 7px 0 0;
  font-size: 15px;
  color: #6b7280;
}


/* =========================
   Tool Card
========================= */

.tool-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 32px;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 8px 30px rgba(0, 0, 0, 0.04);
}

.tool-heading {
  margin-bottom: 28px;
}

.tool-heading h1 {
  margin: 0;

  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -1.2px;
}

.tool-heading p {
  margin: 10px 0 0;

  font-size: 16px;
  line-height: 1.6;
  color: #6b7280;
}


/* =========================
   Fields
========================= */

.field {
  margin-top: 22px;
}

.field label {
  display: block;

  margin-bottom: 8px;

  font-size: 14px;
  font-weight: 700;
}


/* =========================
   PDF Upload
========================= */

input[type="file"] {
  width: 100%;

  padding: 18px;

  border: 2px dashed #d7dbe0;
  border-radius: 12px;

  background: #fafbfc;
  color: #6b7280;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

input[type="file"]:hover {
  border-color: #aeb4bc;
  background: #f6f7f9;
}

input[type="file"]::file-selector-button {
  margin-right: 14px;

  padding: 11px 18px;

  border: 0;
  border-radius: 8px;

  background: #17191d;
  color: #ffffff;

  font-weight: 700;

  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: #30343a;
}


/* =========================
   Part Select
========================= */

select {
  width: 100%;
  height: 46px;

  padding: 0 12px;

  border: 1px solid #d7dbe0;
  border-radius: 10px;

  background: #ffffff;
  color: #15171a;

  cursor: pointer;
}


/* =========================
   Buttons
========================= */

.actions {
  display: flex;
  gap: 10px;

  margin-top: 28px;
}

.actions button {
  min-height: 48px;

  padding: 0 22px;

  border: 0;
  border-radius: 10px;

  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.actions button:not(:disabled):active {
  transform: scale(0.98);
}

.primary-button {
  background: #17191d;
  color: #ffffff;
}

.primary-button:hover:not(:disabled) {
  background: #30343a;
}

.secondary-button {
  background: #eef0f3;
  color: #202226;
}

.secondary-button:hover:not(:disabled) {
  background: #e2e5e9;
}

.actions button:disabled {
  opacity: 0.35;

  cursor: not-allowed;
}


/* =========================
   Status
========================= */

.status-message {
  min-height: 24px;

  margin: 18px 0 0;

  font-size: 14px;
  font-weight: 600;
}


/* =========================
   Privacy
========================= */

.privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;

  margin-top: 20px;

  padding: 12px 14px;

  border-radius: 10px;

  background: #f5f6f8;

  font-size: 13px;
  color: #5f6368;
}


/* =========================
   Preview
========================= */

.preview-section {
  margin-top: 34px;
}

.preview-heading h2 {
  margin: 0 0 14px;

  font-size: 18px;
}

.preview {
  width: 100%;
  min-height: 220px;

  padding: 20px;

  overflow: auto;

  background: #e9ebee;

  border: 1px solid #dfe2e6;
  border-radius: 14px;
}

#pdfCanvas {
  display: block;

  max-width: 100%;
  height: auto;

  margin: 0 auto;

  background: #ffffff;

  box-shadow:
    0 5px 20px rgba(0, 0, 0, 0.08);
}


/* =========================
   Footer
========================= */

.footer {
  padding: 34px 0 10px;

  text-align: center;
}

.footer p {
  margin: 0;

  font-size: 12px;
  color: #9aa0a6;
}


/* =========================
   Smartphone
========================= */

@media (max-width: 640px) {

  .app {
    width: min(100% - 24px, 920px);

    padding-top: 28px;
  }

  .header {
    margin-bottom: 22px;
  }

  .logo {
    font-size: 24px;
  }

  .tool-card {
    padding: 22px 18px;

    border-radius: 15px;
  }

  .tool-heading h1 {
    font-size: 28px;
  }

  .tool-heading p {
    font-size: 14px;
  }

  input[type="file"] {
    padding: 14px;
  }

  input[type="file"]::file-selector-button {
    padding: 10px 14px;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }

  .preview {
    min-height: 160px;

    padding: 10px;
  }
}