:root {
  --paper: #f8f5ef;
  --ink: #23211f;
  --muted: #746d64;
  --line: #ded7cc;
  --green: #18b86b;
  --green-dark: #079252;
  --rose: #df5f72;
  --blue: #4169a8;
  --sun: #f2bc55;
  --white: #fffdf8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 24px 80px rgba(33, 30, 25, 0.12);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(280px, 46vh) 1fr;
  overflow: hidden;
}

.hero-media {
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, rgba(242, 188, 85, 0.9), transparent 24%),
    linear-gradient(140deg, #ffe7bf 0%, #f2c7be 45%, #c7d6ec 100%);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 88px;
  background: linear-gradient(0deg, var(--white), rgba(255, 253, 248, 0));
}

.portrait {
  position: absolute;
  width: 34%;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 24px 24px;
  background: var(--rose);
  box-shadow: 0 20px 45px rgba(49, 38, 31, 0.18);
}

.portrait::before {
  content: "";
  position: absolute;
  width: 44%;
  aspect-ratio: 1;
  left: 28%;
  top: 12%;
  border-radius: 50%;
  background: #ffe0c6;
}

.portrait::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 28%;
  left: 15%;
  bottom: 18%;
  border-radius: 999px 999px 18px 18px;
  background: rgba(255, 255, 255, 0.82);
}

.portrait-a {
  left: 9%;
  bottom: 18%;
  transform: rotate(-7deg);
  background: #d8586f;
}

.portrait-b {
  width: 38%;
  right: 10%;
  bottom: 10%;
  transform: rotate(5deg);
  background: #4169a8;
}

.portrait-c {
  width: 24%;
  left: 39%;
  top: 16%;
  transform: rotate(2deg);
  background: #18b86b;
}

.hero-content,
.panel {
  padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
}

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

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 9vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.hero-copy {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.primary-button,
.ghost-button,
.outline-button,
.text-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(24, 184, 107, 0.24);
}

.wechat-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 10px 4px 0 -4px #fff;
}

.ghost-button {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  background: #f2eee6;
  color: var(--ink);
  font-weight: 700;
}

.panel {
  min-height: 100vh;
}

.hidden {
  display: none;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.text-button {
  flex: 0 0 auto;
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
  padding: 7px 0;
}

.profile-form {
  display: grid;
  gap: 15px;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 13px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(24, 184, 107, 0.14);
}

.search-box {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 10px;
  margin-bottom: 16px;
}

.match-list {
  display: grid;
  gap: 12px;
}

.match-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.match-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.match-topline h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.score {
  flex: 0 0 auto;
  color: var(--rose);
  font-size: 13px;
  font-weight: 900;
}

.meta,
.bio {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  border-radius: 999px;
  background: #f2eee6;
  color: #5d554b;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.outline-button {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--green);
  background: transparent;
  color: var(--green-dark);
  font-weight: 800;
}

@media (min-width: 720px) {
  body {
    padding: 28px 0;
  }

  .app-shell {
    min-height: calc(100vh - 56px);
    border-radius: 8px;
    overflow: hidden;
  }

  .hero,
  .panel {
    min-height: calc(100vh - 56px);
  }
}
