.match-launch,
.match-game {
  --forest-black: #020b08;
  --forest-deep: #043d35;
  --forest-panel: #075b4f;
  --forest-panel-soft: rgb(7 91 79 / 88%);
  --forest-line: #087b18;
  --forest-green: #2dba0b;
  --forest-lime: #73e512;
  --forest-mint: #d9ffd3;
  --forest-muted: #9bc9b1;
  --forest-danger: #ff8e72;
  color: var(--forest-mint);
  font-family: "MPlus Chinese Pixel", "Noto Sans SC", "PingFang SC", sans-serif;
}

.match-launch {
  position: absolute;
  top: calc(
    var(--right-layout-top) +
    var(--biography-banner-height) +
    var(--biography-list-height) +
    var(--profile-actions-height) +
    var(--right-divider-height) +
    var(--loves-banner-height) +
    var(--hobby-grid-height) +
    var(--hobby-labels-height) +
    var(--right-layout-gap) +
    var(--right-layout-gap) +
    var(--right-layout-gap) +
    var(--right-layout-gap) +
    var(--right-layout-gap) +
    var(--right-layout-gap) +
    var(--right-layout-gap)
  );
  left: 40.3%;
  z-index: 3;
  width: 24%;
  height: var(--feature-buttons-height);
  filter: none;
}

.match-launch .feature-button-image {
  top: -144.8%;
  left: -1.75%;
  width: 103.5%;
}

.match-launch .button-label {
  width: max-content;
  overflow: visible;
  color: #123f25;
  font-family: "MPlus Chinese Pixel", "Noto Sans SC", sans-serif;
  font-size: clamp(9px, 1.23vw, 19px);
  line-height: 1;
  letter-spacing: .03em;
  text-align: center;
  text-shadow: 1px 1px 0 rgb(217 255 211 / 62%);
  white-space: nowrap;
}

.match-launch::after {
  content: none;
}

.match-game[hidden],
.match-result[hidden],
.match-empty[hidden] {
  display: none;
}

.match-game {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(0 5 3 / 88%);
  backdrop-filter: blur(4px);
}

.match-window {
  position: relative;
  width: min(1230px, calc(100vw - 32px), calc((100dvh - 32px) * 1.5));
  aspect-ratio: 3 / 2;
  padding: 86px 96px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #03110d url("./assets/icon/岗位匹配森林背景板.png") center / 133.5% 109% no-repeat;
  box-shadow: 12px 15px 0 rgb(0 0 0 / 58%);
  image-rendering: pixelated;
}

.match-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 70px 0 22px;
  border: 4px solid var(--forest-black);
  border-bottom-color: var(--forest-line);
  background: rgb(2 48 41 / 88%);
  box-shadow: inset 0 0 0 3px rgb(31 185 48 / 22%), 5px 5px 0 rgb(0 15 8 / 62%);
}

.match-title {
  margin: 0;
  color: #e4ffda;
  font-size: clamp(23px, 2.4vw, 34px);
  letter-spacing: .08em;
  text-shadow: 3px 3px 0 #002a17;
}

.match-subtitle {
  margin: 5px 0 0;
  color: var(--forest-muted);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.match-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 4px solid var(--forest-black);
  border-radius: 0;
  background: #35bd0c;
  box-shadow: 3px 3px 0 rgb(0 15 8 / 72%), inset 0 0 0 3px #70eb19;
  color: #052c18;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.match-close:hover,
.pixel-action:hover {
  filter: brightness(1.12);
}

.match-close:focus-visible,
.pixel-action:focus-visible,
.match-text-input:focus-visible,
.match-jd-input:focus-visible {
  outline: 3px solid #b9ff40;
  outline-offset: 3px;
}

.match-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 36%) minmax(0, 1fr);
  gap: 14px;
  height: calc(100% - 78px);
  padding: 14px 0 10px;
}

.match-card {
  min-width: 0;
  border: 4px solid var(--forest-black);
  border-radius: 0;
  background: var(--forest-panel-soft);
  box-shadow: inset 0 0 0 3px rgb(62 204 54 / 18%), 5px 5px 0 rgb(0 15 8 / 62%);
  backdrop-filter: blur(2px);
}

.match-input-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.match-label {
  display: block;
  margin-bottom: 7px;
  color: #dcffd0;
  font-size: 16px;
  text-shadow: 2px 2px 0 #003222;
}

.match-label + .match-label {
  margin-top: 12px;
}

.match-text-input,
.match-jd-input {
  width: 100%;
  border: 3px solid #021c14;
  border-radius: 0;
  outline: 0;
  background: rgb(1 37 32 / 92%);
  box-shadow: inset 3px 3px 0 rgb(0 0 0 / 27%);
  color: #eaffdf;
  caret-color: var(--forest-lime);
  font-family: "Noto Sans SC", sans-serif;
}

.match-text-input::placeholder,
.match-jd-input::placeholder {
  color: #76aa91;
}

.match-text-input {
  height: 42px;
  padding: 6px 10px;
  font-size: 16px;
}

.match-jd-input {
  flex: 1 1 auto;
  min-height: 210px;
  padding: 10px 11px;
  resize: none;
  font-size: 14px;
  line-height: 1.55;
}

.match-text-input:focus,
.match-jd-input:focus {
  border-color: var(--forest-lime);
  box-shadow: 0 0 0 2px rgb(115 229 18 / 26%), inset 3px 3px 0 rgb(0 0 0 / 27%);
}

.match-privacy {
  margin: 9px 0 7px;
  color: #9bc9b1;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
  line-height: 1.45;
}

.match-error {
  min-height: 19px;
  margin: 0 0 7px;
  color: var(--forest-danger);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.pixel-action {
  min-height: 44px;
  border: 4px solid var(--forest-black);
  border-radius: 0;
  background: #37c40d;
  box-shadow: 4px 4px 0 rgb(0 15 8 / 72%), inset 0 0 0 3px #75eb1c;
  color: #062b16;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 1px 1px 0 rgb(216 255 203 / 35%);
}

.pixel-action:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgb(0 15 8 / 72%), inset 0 0 0 3px #75eb1c;
}

.pixel-action:disabled {
  cursor: wait;
  filter: saturate(.45);
  opacity: .7;
}

.match-run {
  width: 100%;
}

.match-output-card {
  position: relative;
  overflow: auto;
  padding: 15px 16px 16px;
  background: rgb(7 91 79 / 76%);
  scrollbar-color: var(--forest-green) #032b22;
  scrollbar-width: thin;
}

.match-output-card::-webkit-scrollbar {
  width: 10px;
}

.match-output-card::-webkit-scrollbar-track {
  background: #032b22;
}

.match-output-card::-webkit-scrollbar-thumb {
  border: 2px solid #032b22;
  background: var(--forest-green);
}

.match-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 34px;
  text-align: center;
}

.match-empty-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px;
  border: 5px solid var(--forest-black);
  border-radius: 0;
  background: #2dba0b;
  box-shadow: 5px 5px 0 rgb(0 15 8 / 72%), inset 0 0 0 4px #6fea18;
  color: #eaffd8;
  font-family: Arial, sans-serif;
  font-size: 42px;
  text-shadow: 3px 3px 0 #07551f;
}

.match-empty h3 {
  margin: 0 0 10px;
  color: #e4ffda;
  font-size: 23px;
}

.match-empty p {
  max-width: 420px;
  margin: 0;
  color: #afd7bf;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.score-overview {
  display: grid;
  grid-template-columns: 106px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.score-seal {
  display: grid;
  place-content: center;
  width: 96px;
  height: 96px;
  border: 5px solid var(--forest-black);
  border-radius: 0;
  background: #2fb90d;
  box-shadow: 5px 5px 0 rgb(0 15 8 / 72%), inset 0 0 0 4px #75e818;
  color: #eaffd8;
  text-align: center;
  text-shadow: 2px 2px 0 #07551f;
}

.score-number {
  font-family: "MPlus Chinese Pixel", Georgia, serif;
  font-size: 42px;
  font-weight: 900;
  line-height: .85;
}

.score-unit {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 900;
}

.score-copy h3 {
  margin: 0 0 6px;
  color: #e4ffda;
  font-size: 23px;
}

.score-copy p {
  margin: 0;
  color: #b5dac2;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

.matrix-title {
  margin: 10px 0 7px;
  color: #dcffd0;
  font-size: 18px;
}

.matrix-head,
.matrix-row {
  display: grid;
  grid-template-columns: 86px minmax(120px, 1fr) 38px 40px;
  gap: 7px;
  align-items: center;
}

.matrix-head {
  padding: 5px 7px;
  border-bottom: 2px solid var(--forest-line);
  background: rgb(1 44 34 / 46%);
  color: #8fcaaa;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  font-weight: 900;
}

.matrix-row {
  padding: 6px 7px;
  border-bottom: 1px dashed rgb(115 229 18 / 26%);
  color: #d7f5da;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
}

.matrix-label {
  font-weight: 900;
}

.matrix-track {
  height: 14px;
  overflow: hidden;
  border: 2px solid var(--forest-black);
  background: #013226;
  box-shadow: inset 2px 2px 0 rgb(0 0 0 / 28%);
}

.matrix-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #087f20, #32bd0c 56%, #83ef13);
  transition: width .65s steps(10, end);
}

.matrix-score {
  color: #e7ffdc;
  font-family: "MPlus Chinese Pixel", Georgia, serif;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.matrix-weight {
  color: #8bbda1;
  font-size: 10px;
  text-align: right;
}

.keyword-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 11px;
}

.keyword-box {
  min-width: 0;
  padding: 9px;
  border: 3px solid #021c14;
  border-radius: 0;
  background: rgb(1 48 38 / 64%);
  box-shadow: inset 0 0 0 2px rgb(59 191 49 / 12%);
}

.keyword-box h4 {
  margin: 0 0 7px;
  color: #d8ffd0;
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 25px;
}

.chip,
.chip-empty {
  display: inline-block;
  max-width: 100%;
  font-family: "Noto Sans SC", sans-serif;
  overflow-wrap: anywhere;
}

.chip {
  padding: 3px 6px;
  border: 2px solid #02170f;
  border-radius: 0;
  background: #196d3e;
  color: #e4ffe1;
  font-size: 10px;
  font-weight: 800;
}

.chip-empty {
  color: #91baa2;
  font-size: 11px;
}

.chip.is-hit {
  border-color: #0b4c15;
  background: #4acb10;
  color: #082911;
}

.chip.is-gap {
  border-color: #03231c;
  background: #218b76;
  color: #e0fff3;
}

.match-notes {
  margin-top: 11px;
  padding: 9px 11px;
  border: 3px solid #021c14;
  border-left: 6px solid var(--forest-green);
  background: rgb(1 48 38 / 68%);
  color: #c9ebd2;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

.match-notes strong {
  display: block;
  margin-bottom: 5px;
  color: #e2ffda;
}

.match-notes p {
  margin: 3px 0;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 11px;
}

.result-actions .pixel-action {
  min-height: 36px;
  padding: 3px 12px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .match-window {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
    aspect-ratio: auto;
    padding: 7.5vh 12vw 7vh;
    border: 4px solid #087b18;
    background-size: auto 109%;
    box-shadow: inset 0 0 0 4px #020b08, 8px 10px 0 rgb(0 0 0 / 58%);
  }

  .match-header {
    height: 74px;
    padding: 0 56px 0 16px;
  }

  .match-title {
    font-size: clamp(20px, 5vw, 28px);
  }

  .match-subtitle {
    font-size: 10px;
  }

  .match-close {
    top: 13px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .match-content {
    display: block;
    height: calc(100% - 74px);
    padding: 11px 0 6px;
    overflow: auto;
    scrollbar-color: var(--forest-green) #032b22;
  }

  .match-input-card {
    min-height: 455px;
    margin-bottom: 12px;
  }

  .match-output-card {
    min-height: 500px;
  }
}

@media (max-width: 560px) {
  .match-game {
    padding: 4px;
  }

  .match-window {
    width: calc(100vw - 8px);
    height: calc(100dvh - 8px);
    padding: 6.5vh 9vw 6vh;
    background-position: 62% center;
  }

  .match-header {
    height: 70px;
    padding-right: 48px;
    box-shadow: inset 0 0 0 2px rgb(31 185 48 / 22%), 4px 4px 0 rgb(0 15 8 / 62%);
  }

  .match-title {
    font-size: 19px;
  }

  .match-subtitle {
    max-width: 230px;
    line-height: 1.25;
  }

  .match-close {
    top: 12px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 23px;
  }

  .match-content {
    height: calc(100% - 70px);
  }

  .match-input-card,
  .match-output-card {
    padding: 13px;
  }

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

  .matrix-head,
  .matrix-row {
    grid-template-columns: 72px minmax(76px, 1fr) 31px 32px;
    gap: 4px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .score-overview {
    grid-template-columns: 82px 1fr;
  }

  .score-seal {
    width: 74px;
    height: 74px;
  }

  .score-number {
    font-size: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-fill {
    transition: none;
  }
}
