@font-face {
  font-family: "Dong Signature";
  src: url("fonts/SegoeScript-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #4c4032;
  --paper: #f5edd8;
  --surrounding: #d5cebf;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(18px, 4vw, 56px);
  color: var(--ink);
  background-color: var(--surrounding);
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent 45%);
  font-family: "Noto Serif SC", "Songti SC", SimSun, serif;
}

.paper {
  display: grid;
  width: min(100%, 1040px);
  min-height: min(780px, calc(100vh - clamp(36px, 8vw, 112px)));
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px) clamp(28px, 8vw, 96px) clamp(24px, 4vw, 42px);
  border: 1px solid rgba(117, 95, 61, 0.18);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 18% 12%, rgba(154, 116, 61, 0.07), transparent 32%),
    radial-gradient(ellipse at 88% 90%, rgba(154, 116, 61, 0.09), transparent 38%),
    repeating-linear-gradient(0deg, rgba(116, 88, 47, 0.018) 0, rgba(116, 88, 47, 0.018) 1px, transparent 1px, transparent 5px);
  box-shadow: 0 18px 46px rgba(72, 59, 42, 0.2), inset 0 0 60px rgba(128, 96, 48, 0.06);
}

.page-title {
  margin: 0;
  color: rgba(76, 64, 50, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-align: center;
}

.signature-area {
  display: grid;
  place-items: center;
  padding-bottom: 4vh;
}

.signature {
  position: relative;
  margin: 0;
  color: #453729;
  font-family: "Dong Signature", "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(6.5rem, 18vw, 13rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: 0;
  transform: rotate(-7deg);
  text-shadow: 1px 1px 0 rgba(74, 53, 29, 0.13);
}

.signature::after {
  position: absolute;
  right: -0.04em;
  bottom: -0.12em;
  left: 0.08em;
  height: 0.028em;
  background: currentColor;
  border-radius: 100%;
  content: "";
  opacity: 0.76;
  transform: rotate(-1deg);
}

footer {
  color: rgba(76, 64, 50, 0.62);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

footer a {
  color: inherit;
  text-decoration: none;
}

.public-security-record {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.public-security-record img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

footer a:hover,
footer a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.separator {
  padding: 0 0.75em;
  opacity: 0.65;
}

@media (max-width: 560px) {
  body {
    padding: 12px;
  }

  .paper {
    min-height: calc(100vh - 24px);
    padding: 30px 22px 24px;
  }

  .signature-area {
    padding-bottom: 7vh;
  }

  footer {
    font-size: 11px;
  }

  .separator {
    padding: 0 0.45em;
  }
}
