/* 美粉圈 V4 · Warm editorial visual system / responsive */
:root {
  --v4-ink: #24221c;
  --v4-muted: #827d71;
  --v4-cream: #fff9eb;
  --v4-line: #ece8db;
  --v4-gold: #f9c331;
  --v4-gold-dark: #b28010;
}
button:not(:disabled) {
  cursor: pointer;
}
a[data-go] {
  cursor: pointer;
}
.v4-home-hero {
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.8fr);
  gap: 32px;
  background: linear-gradient(108deg, #fff8e4 0%, #fffdf8 70%);
  border: 1px solid #eee1bd;
  border-radius: 24px;
  padding: 43px 48px;
  align-items: center;
  overflow: hidden;
}
.v4-overline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #b78418;
}
.v4-hi {
  font-size: 19px;
  font-weight: 700;
  margin-top: 19px;
}
.v4-hi span {
  color: #da9a0d;
}
.v4-home-copy h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.27;
  margin: 15px 0;
  letter-spacing: -1px;
  color: var(--v4-ink);
}
.v4-home-copy p {
  font-size: 14px;
  color: #797365;
  margin: 0 0 23px;
  line-height: 1.8;
}
.v4-home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.v4-home-art {
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.v4-home-art img {
  width: 100%;
  height: 244px;
  object-fit: contain;
  border-radius: 17px;
}
.v4-home-art:has(img[src^="/family-media/"]) img {
  object-fit: cover;
}
.v4-home-art span {
  font-size: 11px;
  color: #a4987e;
  margin-top: 10px;
}
.v4-home-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 30px;
}
.v4-counter {
  background: #fff;
  border: 1px solid var(--v4-line);
  padding: 20px 22px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v4-counter b {
  font-size: 30px;
  color: #1e201d;
  letter-spacing: -1px;
}
.v4-counter span {
  font-size: 12px;
  color: var(--v4-muted);
}
.v4-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 15px;
  margin: 30px 0 14px;
}
.v4-section-head h2 {
  font-size: 23px;
  margin: 0 0 5px;
  color: #292721;
}
.v4-section-head p {
  margin: 0;
  font-size: 12px;
  color: #989389;
}
.v4-text-btn {
  border: 0;
  background: none;
  color: #b78a19;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 1px;
  text-align: left;
}
.v4-text-btn:hover {
  text-decoration: underline;
}
.v4-next-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 23px;
  padding: 26px 33px;
  align-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 20px #362e1510;
  border: 1px solid #e8e3d3;
}
.v4-next-emoji {
  font-size: 62px;
  background: #fff9e4;
  height: 100px;
  width: 100px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.v4-mini-tag {
  font-size: 11px;
  color: #b58413;
  font-weight: 750;
}
.v4-next-card h3 {
  font-size: 21px;
  margin: 7px 0;
}
.v4-next-card p {
  font-size: 13px;
  color: #867f72;
  margin: 5px 0 14px;
}
.v4-next-card small {
  color: #918676;
  font-size: 11px;
}
.v4-progress-bar {
  height: 9px;
  width: 100%;
  background: #ece8df;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}
.v4-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffd555, #f0b31e);
  border-radius: 10px;
}
.v4-home-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.v4-home-perk {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  border: 1px solid var(--v4-line);
  background: #fff;
  padding: 14px;
  border-radius: 17px;
  align-items: center;
}
.v4-home-perk > img {
  width: 140px;
  height: 142px;
  object-fit: cover;
  border-radius: 12px;
}
.v4-home-perk small {
  font-size: 11px;
  color: #b58b22;
  font-weight: 700;
}
.v4-home-perk h3 {
  font-size: 18px;
  margin: 8px 0;
}
.v4-home-perk p {
  font-size: 12px;
  color: #7c7a75;
  line-height: 1.65;
}
.v4-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}
.v4-action {
  border: 1px solid var(--v4-line);
  padding: 22px;
  border-radius: 17px;
  background: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  transition:
    transform 0.15s,
    border 0.15s;
}
.v4-action:hover {
  transform: translateY(-3px);
  border-color: #efcb69;
}
.v4-action i {
  font-style: normal;
  color: #cd9821;
  font-size: 25px;
}
.v4-action b {
  font-size: 16px;
  margin: 12px 0 6px;
}
.v4-action small {
  font-size: 11px;
  color: #8b877e;
}
.v4-action span {
  margin-top: auto;
  font-size: 12px;
  color: #b88615;
}
.v4-home-event {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: 25px;
  border: 1px solid var(--v4-line);
  background: #fff;
  border-radius: 18px;
  padding: 15px;
  align-items: center;
}
.v4-home-event > img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 12px;
}
.v4-home-event h3 {
  font-size: 21px;
}
.v4-home-event p {
  color: #7a766f;
  line-height: 1.7;
  font-size: 13px;
}
.v4-family-cover {
  display: grid;
  grid-template-columns: 43% 1fr;
  gap: 26px;
  background: linear-gradient(105deg, #fff9ec, #fff);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #f0e7d5;
  padding: 19px;
}
.v4-family-photo {
  border-radius: 16px;
  overflow: hidden;
  height: 290px;
  background: #faf5e6;
}
.v4-family-photo > img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.v4-photo-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #d4b25e;
  font-size: 74px;
}
.v4-photo-placeholder small {
  font-size: 12px;
  color: #9c937e;
}
.v4-family-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}
.v4-family-content small {
  font-size: 12px;
  color: #b68d2d;
}
.v4-family-content h2 {
  font-size: 29px;
  margin: 13px 0;
}
.v4-family-content p {
  color: #7c746b;
  margin: 7px 0;
  font-size: 13px;
}
.v4-family-content .btn {
  margin-top: 21px;
  align-self: start;
}
.v4-family-list {
  background: #fff;
  border: 1px solid var(--v4-line);
  border-radius: 16px;
  overflow: hidden;
}
.v4-student {
  padding: 23px;
  display: flex;
  gap: 21px;
  border-bottom: 1px solid #f3eee5;
}
.v4-student:last-child,
.v4-service:last-child {
  border: 0;
}
.v4-child {
  flex: 0 0 61px;
  width: 61px;
  height: 61px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffebad;
  font-size: 23px;
  font-weight: 800;
  color: #ae7a12;
}
.v4-student h3 {
  margin: 0 0 9px;
  font-size: 20px;
}
.v4-student p {
  margin: 5px 0;
  color: #777;
  font-size: 12px;
  line-height: 1.8;
}
.v4-service {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 23px;
  border-bottom: 1px solid #eee9e1;
  font-size: 13px;
}
.v4-service b {
  color: #3e3a32;
}
.v4-service span {
  color: #827e78;
}
.v4-id-fold {
  margin: 26px 0;
  border: 1px dashed #e4d9bd;
  border-radius: 14px;
  background: #fffdf7;
  padding: 18px;
  color: #847b68;
  font-size: 12px;
}
.v4-id-fold summary {
  cursor: pointer;
  font-weight: 700;
}
.v4-profile-header {
  background: #fff;
  border-radius: 15px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--v4-line);
}
.v4-initial {
  background: #ffe9a5;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 30px;
}
.v4-profile-header h2 {
  margin: 0;
}
.v4-profile-header p {
  color: #888;
}
.v4-permission-note {
  padding: 25px;
  background: #fffaf0;
  border: 1px solid #e6d9b9;
  border-radius: 15px;
  margin: 19px 0;
}
.v4-permission-note p {
  line-height: 2;
  color: #786f5e;
}
.v4-achievement-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(110deg, #fff4cf, #fff8e9 60%, #fffdf8);
  border: 1px solid #eed29b;
  border-radius: 23px;
  padding: 36px 45px;
}
.v4-achievement-hero h2 {
  font-size: 62px;
  margin: 4px 0;
}
.v4-achievement-hero h2 small {
  font-size: 21px;
  color: #b5a27d;
}
.v4-achievement-hero p {
  color: #756b5d;
  font-size: 13px;
}
.v4-achievement-big {
  font-size: 110px;
}
.v4-achievement-hero .v4-progress-bar {
  max-width: 360px;
}
.v4-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 15px 0 30px;
}
.v4-milestone {
  display: flex;
  gap: 15px;
  background: #fff;
  border: 1px solid #eae5d8;
  border-radius: 16px;
  padding: 19px;
  align-items: flex-start;
}
.v4-milestone.done {
  border-color: #e6c86f;
  background: #fffbee;
}
.v4-milestone > span {
  background: #f4f2eb;
  border-radius: 12px;
  padding: 12px;
  font-size: 21px;
}
.v4-milestone.done > span {
  background: #ffe499;
  color: #7d5608;
}
.v4-milestone b {
  font-size: 14px;
}
.v4-milestone p {
  font-size: 12px;
  color: #858075;
  line-height: 1.7;
}
.v4-milestone small {
  font-size: 11px;
  color: #b18d4e;
}
.v4-badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}
.v4-badge {
  background: #faf9f6;
  border: 1px solid #edebe5;
  border-radius: 17px;
  padding: 19px 12px;
  min-height: 185px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  filter: saturate(0.38);
  transition:
    transform 0.15s,
    filter 0.15s;
}
.v4-badge:hover {
  transform: translateY(-3px);
}
.v4-badge.is-earned {
  filter: none;
  background: linear-gradient(180deg, #fff7df, #fff);
  border-color: #edcf75;
}
.v4-badge-icon {
  width: 83px;
  height: 83px;
  background: #f0efec;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 38px;
}
.v4-badge.is-earned .v4-badge-icon {
  background: #ffebaf;
}
.v4-badge strong {
  font-size: 14px;
}
.v4-badge small {
  color: #9c968d;
  font-size: 11px;
}
.v4-mini-progress {
  width: 100%;
  max-width: 110px;
  height: 5px;
  border-radius: 7px;
  background: #ebe6dd;
  overflow: hidden;
  margin-top: auto;
}
.v4-mini-progress i {
  display: block;
  height: 100%;
  background: #eac14e;
}
.v4-badge-detail {
  text-align: center;
  padding: 25px;
}
.v4-badge-detail > span {
  font-size: 90px;
}
.v4-badge-detail h2 {
  font-size: 29px;
}
.v4-badge-detail p {
  color: #776f63;
  line-height: 1.7;
}
.v4-memories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v4-memory {
  display: grid;
  grid-template-columns: 135px 1fr 150px;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--v4-line);
  padding: 18px;
  border-radius: 14px;
}
.v4-memory-date {
  font-size: 13px;
  color: #b28a22;
  font-weight: 700;
}
.v4-memory h3 {
  font-size: 17px;
}
.v4-memory p {
  font-size: 12px;
  color: #807b75;
  line-height: 1.7;
}
.v4-memory img {
  width: 150px;
  height: 95px;
  border-radius: 9px;
  object-fit: cover;
}
.v4-referral {
  border-radius: 22px;
  box-shadow: 0 13px 45px #e2c98d20;
}
.v4-referral h2 {
  font-size: 30px;
  line-height: 1.35;
}
.v4-ref-rule {
  background: #fff9e8;
  border-left: 4px solid #f2bd2c;
  padding: 18px 24px;
  border-radius: 4px 14px 14px 4px;
  margin: 16px 0 24px;
}
.v4-ref-rule b {
  font-size: 15px;
}
.v4-ref-rule p {
  line-height: 1.8;
  color: #796d56;
  font-size: 12px;
}
.v4-upload-spec {
  padding: 15px 17px;
  background: #fff4d9;
  border: 1px solid #ead098;
  border-radius: 11px;
  margin: 17px 0 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v4-upload-spec strong {
  font-size: 13px;
}
.v4-upload-spec span {
  font-size: 13px;
  color: #6e5a2d;
}
.v4-upload-spec span b {
  color: #ba8c18;
}
.v4-upload-spec small {
  font-size: 11px;
  color: #988264;
  line-height: 1.7;
}
.v4-photo-ratio-msg {
  font-size: 11px;
  color: #a17215;
  margin: 8px 0;
}
.v4-poster-compose > p {
  font-size: 12px;
  color: #817b70;
  line-height: 1.8;
}
.v4-poster-preview {
  max-height: 490px;
  overflow: auto;
  background: #ece9e0;
  border-radius: 13px;
  padding: 14px;
}
.v4-poster-preview > div {
  max-width: 345px;
  background: #fffdf7;
  padding: 22px;
  margin: 0 auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 9px;
}
.v4-poster-preview img {
  max-width: 100%;
  max-height: 138px;
  object-fit: contain;
}
.v4-poster-preview img:first-child {
  width: 130px;
  height: 70px;
}
.v4-poster-preview h3 {
  font-size: 23px;
  line-height: 1.3;
}
.v4-poster-preview p {
  font-size: 11px;
  color: #797166;
  margin: 0;
}
.v4-poster-preview img.v4-poster-qr {
  width: 116px;
  height: 116px;
}
.v4-poster-preview small {
  font-size: 11px;
}
.v4-poster-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.v4-poster-admin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  background: #fff;
  padding: 22px;
  border: 1px solid var(--v4-line);
  border-radius: 17px;
}
.v4-poster-admin img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
}
.v4-poster-admin small {
  font-size: 11px;
  color: #998e79;
  line-height: 1.8;
  display: block;
  padding-top: 9px;
}
.v4-poster-admin h2 {
  font-size: 24px;
}
.v4-poster-admin p {
  color: #827970;
  font-size: 13px;
  line-height: 1.9;
}
.v4-badge-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0;
}
.v4-badge-admin {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border-radius: 13px;
  border: 1px solid #eae8df;
  padding: 15px;
}
.v4-badge-admin > span {
  font-size: 29px;
  background: #fff7e4;
  border-radius: 11px;
  padding: 9px;
}
.v4-badge-admin > div {
  flex: 1;
  min-width: 0;
}
.v4-badge-admin b {
  font-size: 15px;
}
.v4-badge-admin p {
  margin: 6px 0;
  color: #807b73;
  font-size: 11px;
}
.v4-badge-admin small {
  font-size: 11px;
  color: #b28a2f;
}
.v4-privacy-tip {
  font-size: 12px;
  line-height: 1.8;
  color: #766e60;
  background: #fff8e5;
  padding: 13px 16px;
  border-radius: 10px;
}
.v4-cover-preview img {
  max-width: 100%;
  max-height: 230px;
  object-fit: cover;
  border-radius: 12px;
}
.v4-detail > img {
  width: 100%;
  max-height: 270px;
  object-fit: cover;
  border-radius: 14px;
}
.v4-detail h2 {
  font-size: 24px;
  line-height: 1.4;
}
.v4-detail-text {
  line-height: 1.9;
  white-space: pre-wrap;
  color: #66645b;
}
.v4-detail-lead {
  font-size: 14px;
  color: #b28a22;
  font-weight: 700;
}
/* Better content-management image preview, not a tiny portrait floating in a landscape container. */
.v3-editor .v3-input-preview {
  background: linear-gradient(135deg, #f9f8f2, #fffaf0);
  border: 1px solid #eae5d9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
}
.v3-editor .v3-input-preview > img {
  width: 100%;
  max-width: 450px;
  height: 190px;
  max-height: 190px;
  object-fit: cover;
  background: #f7f6ee;
}
.v3-editor .v3-image-input label {
  font-size: 12px;
  font-weight: 700;
  color: #544a36;
}
.v3-admin-row {
  min-height: 103px;
}
@media (max-width: 1150px) {
  .v4-home-perks {
    grid-template-columns: 1fr;
  }
  .v4-badge-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .v4-milestones {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .v4-home-hero {
    grid-template-columns: 1fr;
    padding: 25px 22px;
    gap: 15px;
  }
  .v4-home-copy h1 {
    font-size: 28px;
  }
  .v4-home-art {
    height: 180px;
    flex-direction: column;
  }
  .v4-home-art img {
    height: 160px;
  }
  .v4-home-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .v4-counter {
    padding: 15px;
  }
  .v4-counter b {
    font-size: 24px;
  }
  .v4-next-card {
    grid-template-columns: 73px 1fr;
    gap: 13px;
    padding: 17px;
  }
  .v4-next-emoji {
    width: 73px;
    height: 73px;
    font-size: 45px;
  }
  .v4-next-card .btn {
    grid-column: 1/-1;
  }
  .v4-action-grid {
    grid-template-columns: 1fr;
  }
  .v4-action {
    min-height: 125px;
  }
  .v4-home-event,
  .v4-family-cover,
  .v4-poster-admin {
    grid-template-columns: 1fr;
  }
  .v4-home-event > img {
    height: 200px;
  }
  .v4-family-photo {
    height: 230px;
  }
  .v4-family-content {
    padding: 9px;
  }
  .v4-achievement-hero {
    padding: 22px;
  }
  .v4-achievement-big {
    font-size: 70px;
  }
  .v4-milestones {
    grid-template-columns: 1fr;
  }
  .v4-badge-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .v4-badge {
    padding: 15px 8px;
  }
  .v4-badge-icon {
    width: 65px;
    height: 65px;
    font-size: 29px;
  }
  .v4-memories .v4-memory {
    grid-template-columns: 1fr 1fr;
  }
  .v4-memory > div:nth-child(2) {
    grid-column: 1/-1;
  }
  .v4-badge-admin-grid {
    grid-template-columns: 1fr;
  }
  .v4-home-perk {
    grid-template-columns: 110px 1fr;
  }
  .v4-home-perk > img {
    width: 110px;
    height: 120px;
  }
  .v4-section-head h2 {
    font-size: 20px;
  }
  .v4-referral h2 {
    font-size: 23px;
  }
}

.v3-editor .v3-image-input[data-ratio] .v3-input-preview > img {
  width: min(100%, var(--v4-guide-w, 400px));
  height: var(--v4-guide-h, 300px);
  max-height: 320px;
  max-width: 100%;
  object-fit: cover;
  margin: auto;
  background: #f7f7f2;
}
.v3-editor .v3-image-input[data-ratio] .v3-input-preview {
  padding: 12px;
}

/* V7.2.2 成就图鉴：双排卡片 */
.v4-badge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}
.v4-badge{display:flex;flex-direction:column;align-items:flex-start;gap:6px;background:#fff;border:1px solid #ece8dd;border-radius:16px;padding:16px;text-align:left;cursor:pointer;width:100%;box-sizing:border-box}
.v4-badge.is-earned{border-color:#e6c989;background:#fffaf0}
.v4-badge-icon{font-size:28px;line-height:1.1}
.v4-badge strong{font-size:15px;color:#2d2b24}
.v4-badge small{color:#8a8a7a;font-size:12px;line-height:1.5}
.v4-mini-progress{width:100%;height:6px;border-radius:999px;background:#f0ece2;overflow:hidden}
.v4-mini-progress i{display:block;height:100%;background:#e8b74a}