:root {
  --title-font: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --body-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --certificate-text-inset: clamp(10px, 1.8vw, 28px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #263033;
  color: #e4e8e8;
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow: hidden;
}

button {
  color: inherit;
  font: inherit;
}

.opening-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.page-noise {
  display: none;
}

.replay-button {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  min-width: 104px;
  min-height: 42px;
  border: 1px solid rgba(228, 232, 232, 0.32);
  background: rgba(38, 48, 51, 0.88);
  color: #e4e8e8;
  cursor: pointer;
}

.opening-shell {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  padding: clamp(48px, 6vh, 72px) clamp(36px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #263033;
  background-size: 24px 24px;
}

.certificate-stage {
  position: relative;
  width: min(1240px, 100%);
  height: 100%;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.certificate-panel {
  position: relative;
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 140px));
  padding: clamp(68px, 9vh, 104px) clamp(96px, 10vw, 160px) clamp(56px, 8vh, 90px);
  overflow: hidden;
}

.submit-scene-shell {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.submit-dropzone-title {
  display: block;
  width: min(100%, 1180px);
  height: auto;
  overflow: visible;
}

.submit-dropzone-plate {
  fill: #e4e8e8;
  stroke: #11191b;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.submit-dropzone-solid-plate {
  fill: #e4e8e8;
  stroke: #11191b;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.submit-dropzone-knockout {
  fill: #263033;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.submit-dropzone-plain {
  fill: #e4e8e8;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.submit-dropzone-plain.sub-text,
.submit-dropzone-knockout.sub-text {
  font-weight: 650;
}

.certificate-sheet {
  position: relative;
  width: 100%;
  max-width: 936px;
  margin: 0 auto;
  min-height: 100%;
}

.certificate-layout,
.certificate-overlay {
  position: absolute;
  inset: 0;
}

.certificate-layout {
  visibility: hidden;
  pointer-events: none;
}

.certificate-row {
  position: absolute;
  left: 0;
  width: 100%;
}

.certificate-row-title {
  top: clamp(0px, 0.4vh, 6px);
  display: flex;
  justify-content: center;
}

.certificate-row-recipient {
  top: clamp(108px, 13.5vh, 130px);
  display: flex;
  justify-content: flex-start;
  padding-left: var(--certificate-text-inset);
}

.certificate-row-body {
  top: clamp(172px, 21.5vh, 204px);
  display: flex;
  justify-content: flex-start;
  padding-left: var(--certificate-text-inset);
}

.certificate-row-award {
  top: clamp(250px, 31.5vh, 298px);
  display: flex;
  justify-content: center;
}

.certificate-row-footer {
  top: clamp(366px, 46vh, 420px);
  display: flex;
  justify-content: flex-start;
  padding-left: var(--certificate-text-inset);
}

.certificate-row-date {
  top: clamp(438px, 55vh, 502px);
  display: flex;
  justify-content: flex-end;
  padding-right: clamp(0px, 0.3vw, 8px);
}

.anchor-title-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12em;
}

.anchor-recipient-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34em;
}

.anchor-text {
  display: inline-block;
  color: transparent;
  white-space: nowrap;
}

.anchor-title-char {
  font-family: var(--title-font);
  font-size: clamp(72px, 5.8vw, 106px);
  font-weight: 700;
  letter-spacing: 0;
}

.anchor-recipient {
  font-size: clamp(30px, 2vw, 40px);
  line-height: 1.7;
}

.body-line,
.flash-line {
  margin: 0;
  font-size: clamp(22px, 1.72vw, 32px);
  line-height: 1.56;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: rgba(228, 232, 232, 0.98);
}

.anchor-footer,
.sign-text {
  margin: 0;
  font-size: clamp(28px, 2.1vw, 38px);
  line-height: 1.72;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: rgba(228, 232, 232, 0.98);
}

.flash-line {
  min-height: 1.72em;
}

.award-text {
  color: rgba(228, 232, 232, 0.98);
  font-family: var(--title-font);
  font-size: clamp(44px, 3.8vw, 68px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: 0.12em;
  text-align: center;
  opacity: 0;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .opening-shell {
    padding: 26px 22px 30px;
  }

  .certificate-panel {
    min-height: calc(100vh - 56px);
    padding: 62px 30px 46px;
  }

  .submit-dropzone-title {
    width: min(100%, 960px);
  }

  .certificate-sheet {
    max-width: 100%;
  }

  .certificate-row-title {
    top: 2px;
  }

  .certificate-row-recipient {
    top: 94px;
  }

  .certificate-row-body {
    top: 148px;
  }

  .certificate-row-award {
    top: 218px;
  }

  .certificate-row-footer {
    top: 316px;
  }

  .certificate-row-date {
    top: 374px;
  }

  .anchor-title-char {
    font-size: clamp(54px, 8vw, 84px);
  }

  .anchor-recipient {
    font-size: clamp(24px, 3vw, 34px);
  }

  .body-line,
  .flash-line {
    font-size: clamp(20px, 3vw, 28px);
  }

  .anchor-footer,
  .sign-text {
    font-size: clamp(21px, 3.4vw, 30px);
  }

  .award-text {
    font-size: clamp(34px, 5vw, 54px);
  }
}
