:root {
  --bg: #f4eee9;
  --surface: #f4eee9;
  --surface-strong: #fff8ef;
  --cream: #fff8ef;
  --ink: #331b24;
  --muted: #8f777d;
  --accent: #c51f55;
  --accent-deep: #8f143c;
  --rose-soft: #f2ccd5;
  --rose-smoke: #e8dde0;
  --line: rgba(143, 20, 60, 0.13);
  --shadow-dark: rgba(119, 86, 94, 0.28);
  --shadow-press: rgba(108, 69, 80, 0.34);
  --shadow-light: rgba(255, 255, 255, 0.92);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    "Noto Serif SC",
    "Songti SC",
    "Microsoft YaHei",
    serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(197, 31, 85, 0.2), transparent 31%),
    radial-gradient(circle at 88% 8%, rgba(255, 248, 239, 0.86), transparent 28%),
    radial-gradient(circle at 88% 78%, rgba(143, 20, 60, 0.13), transparent 30%),
    linear-gradient(145deg, #fff9f0 0%, #f3e7e7 47%, #eadde2 100%);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 56px);
  display: grid;
  place-items: center;
}

.profile-card {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-lg);
  background: rgba(244, 238, 233, 0.88);
  box-shadow:
    28px 28px 58px var(--shadow-dark),
    -24px -24px 54px var(--shadow-light),
    inset 1px 1px 0 rgba(255, 255, 255, 0.72),
    inset -1px -1px 0 rgba(108, 69, 80, 0.08);
  isolation: isolate;
  overflow: hidden;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(143, 20, 60, 0.08);
  border-radius: 24px;
  box-shadow:
    inset 10px 10px 22px rgba(119, 86, 94, 0.16),
    inset -10px -10px 22px rgba(255, 255, 255, 0.82);
}

.ambient {
  position: absolute;
  z-index: -2;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.72;
}

.ambient-one {
  top: -70px;
  right: -60px;
  background: rgba(197, 31, 85, 0.16);
}

.ambient-two {
  bottom: -86px;
  left: -80px;
  background: rgba(255, 248, 239, 0.8);
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.avatar-wrap {
  width: 104px;
  height: 104px;
  padding: 11px;
  border-radius: 32px;
  background: var(--surface);
  box-shadow:
    12px 12px 24px rgba(119, 86, 94, 0.3),
    -12px -12px 24px rgba(255, 255, 255, 0.9),
    inset 1px 1px 0 rgba(255, 255, 255, 0.65);
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    inset 6px 6px 13px rgba(119, 86, 94, 0.22),
    inset -6px -6px 13px rgba(255, 255, 255, 0.78);
}

.avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.identity {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 10vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.tagline {
  max-width: 320px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.fortune-panel {
  margin: 30px 0 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow:
    inset 10px 10px 20px rgba(119, 86, 94, 0.2),
    inset -10px -10px 20px rgba(255, 255, 255, 0.86);
}

.fortune-mark {
  width: 46px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 999px 999px 14px 14px;
  color: var(--accent-deep);
  font-size: 22px;
  font-weight: 900;
  background: var(--cream);
  box-shadow:
    8px 8px 15px rgba(119, 86, 94, 0.22),
    -8px -8px 15px rgba(255, 255, 255, 0.84);
}

.fortune-label {
  margin: 0 0 5px;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 800;
}

.fortune-text {
  margin: 0;
  color: #4a3038;
  font-size: 15px;
  line-height: 1.7;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--accent-deep);
  cursor: pointer;
  background: var(--surface);
  box-shadow:
    8px 8px 15px rgba(119, 86, 94, 0.28),
    -8px -8px 15px rgba(255, 255, 255, 0.92);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.icon-button:hover {
  color: var(--accent);
  transform: rotate(28deg) translateY(-1px);
}

.icon-button:active {
  box-shadow:
    inset 5px 5px 10px rgba(119, 86, 94, 0.22),
    inset -5px -5px 10px rgba(255, 255, 255, 0.86);
  transform: scale(0.96);
}

.links {
  display: grid;
  gap: 15px;
}

.link-button {
  min-height: 74px;
  padding: 14px 17px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow:
    12px 12px 24px rgba(119, 86, 94, 0.25),
    -12px -12px 24px rgba(255, 255, 255, 0.88),
    inset 1px 1px 0 rgba(255, 255, 255, 0.68);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.link-button:hover {
  border-color: rgba(197, 31, 85, 0.28);
  transform: translateY(-3px);
  box-shadow:
    14px 14px 28px rgba(119, 86, 94, 0.26),
    -12px -12px 26px rgba(255, 255, 255, 0.92);
}

.link-button:active {
  transform: translateY(0);
  box-shadow:
    inset 6px 6px 12px rgba(119, 86, 94, 0.2),
    inset -6px -6px 12px rgba(255, 255, 255, 0.84);
}

.link-button.primary {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(197, 31, 85, 0.12)),
    var(--surface);
}

.link-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--accent-deep);
  font-size: 19px;
  font-weight: 900;
  background: var(--surface-strong);
  box-shadow:
    inset 5px 5px 10px rgba(119, 86, 94, 0.15),
    inset -5px -5px 10px rgba(255, 255, 255, 0.92);
}

.link-button strong {
  display: block;
  margin-bottom: 4px;
  font-size: 17px;
}

.link-button small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.runtime-bar {
  margin-top: 22px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 248, 239, 0.44), rgba(197, 31, 85, 0.08)),
    var(--surface);
  box-shadow:
    inset 9px 9px 18px rgba(119, 86, 94, 0.2),
    inset -9px -9px 18px rgba(255, 255, 255, 0.9);
}

.runtime-kicker,
.runtime-title {
  margin: 0;
}

.runtime-kicker {
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.runtime-title {
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.runtime-count {
  display: grid;
  grid-template-columns: repeat(4, minmax(42px, auto));
  gap: 8px;
}

.runtime-count span {
  min-width: 42px;
  padding: 8px 7px;
  display: grid;
  justify-items: center;
  border-radius: 14px;
  background: rgba(255, 248, 239, 0.72);
  box-shadow:
    6px 6px 12px rgba(119, 86, 94, 0.18),
    -6px -6px 12px rgba(255, 255, 255, 0.86);
}

.runtime-value {
  color: var(--accent-deep);
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.runtime-count small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.footer {
  margin-top: 28px;
  padding-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer p,
.footer span {
  margin: 0;
}

@media (max-width: 560px) {
  .page-shell {
    padding: 8px;
    place-items: start center;
  }

  .profile-card {
    width: min(100%, 374px);
    padding: 18px 14px 14px;
    border-radius: 24px;
  }

  .hero {
    grid-template-columns: auto auto;
    gap: 12px;
    justify-content: center;
    align-items: center;
    text-align: left;
    justify-items: start;
  }

  .avatar-wrap {
    width: 66px;
    height: 66px;
    padding: 7px;
    border-radius: 22px;
  }

  .avatar {
    border-radius: 16px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(34px, 9vw, 40px);
    line-height: 1;
  }

  .tagline {
    max-width: 218px;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
  }

  .fortune-panel {
    margin: 16px 0 14px;
    padding: 12px;
    grid-template-columns: 38px 1fr 38px;
    gap: 10px;
    border-radius: 18px;
  }

  .fortune-mark {
    width: 36px;
    height: 50px;
    border-radius: 999px 999px 12px 12px;
    font-size: 18px;
  }

  .fortune-label {
    margin-bottom: 3px;
    font-size: 12px;
  }

  .fortune-text {
    font-size: 13px;
    line-height: 1.52;
  }

  .icon-button {
    width: 36px;
    height: 36px;
    grid-column: auto;
    justify-self: end;
  }

  .links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .link-button {
    min-height: 92px;
    padding: 12px 8px 10px;
    gap: 8px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    border-radius: 15px;
  }

  .link-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 16px;
  }

  .link-button strong {
    margin-bottom: 3px;
    font-size: 14px;
  }

  .link-button small {
    font-size: 11px;
    line-height: 1.25;
  }

  .runtime-bar {
    margin-top: 12px;
    padding: 10px;
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
    border-radius: 18px;
  }

  .runtime-bar > div:first-child {
    min-width: 0;
    align-self: center;
  }

  .runtime-kicker {
    font-size: 10px;
  }

  .runtime-title {
    margin-top: 3px;
    font-size: 13px;
  }

  .runtime-count {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .runtime-count span {
    min-width: 0;
    padding: 6px 4px;
    border-radius: 12px;
  }

  .runtime-value {
    font-size: 14px;
  }

  .runtime-count small {
    margin-top: 3px;
    font-size: 10px;
  }

  .footer {
    margin-top: 14px;
    padding-top: 12px;
    gap: 7px;
    flex-direction: column;
    text-align: center;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
