/*
 * Final typography system for yuemeiyu.com
 * This file is intentionally loaded after page-level inline styles.
 * Keep typography changes here instead of adding more scattered overrides.
 */

:root {
  --ty-font-sans: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --ty-meta: 12px;
  --ty-control: 13px;
  --ty-body: 14px;
  --ty-card-title: 15px;
  --ty-list-title: 15px;
  --ty-panel-title: 17px;
  --ty-section-title: 18px;
  --ty-page-title: 24px;
  --ty-detail-title: 26px;
  --ty-price: 24px;
}

html,
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--ty-font-sans) !important;
  font-size: var(--ty-body) !important;
  line-height: 1.72 !important;
  letter-spacing: 0 !important;
  color: #333;
}

/* Preserve the original PC header rhythm. */
@media screen and (min-width: 769px) {
  #header .mobile-menu-state {
    display: none !important;
  }

  #header .header-top {
    height: 80px !important;
    margin: 0 !important;
    background: #b60511 !important;
  }

  #header .header-top .logo-container {
    height: 80px !important;
    padding-top: 5px !important;
    overflow: hidden !important;
  }

  #header .header-top .logo-container .icon-shiliangzhinengduixiang,
  #header .header-top .logo-container .logo-text,
  #header .logo-text {
    font-size: 30px !important;
    line-height: 80px !important;
    letter-spacing: 1.5px !important;
  }

  #header .header-top .logo-container .icon-shiliangzhinengduixiang::before {
    height: 38px !important;
    margin: 21px 28px 0 !important;
  }

  #header .header-menu {
    height: 60px !important;
    margin: 0 !important;
    background: #0d0d0d !important;
  }

  #header .header-menu .list,
  #header .header-menu .list .item .link {
    height: 60px !important;
  }

  #header .header-menu .list .item .link span {
    font-size: 18px !important;
    line-height: 60px !important;
    color: #fff;
  }

  #header .header-menu .list .item .child-list .child-item .child-link {
    font-size: 15px !important;
    line-height: 42px !important;
  }
}

/* Shared page title hierarchy. */
.shop-hero-main h1,
.article-intro h1,
.training-hero h1,
.gallery-intro h1,
.about-title,
.cert-title-panel h1 {
  font-size: var(--ty-page-title) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.article-detail-title,
.product-title,
.work-title,
.work-stage-placeholder strong,
.work-image-frame::after {
  font-size: var(--ty-detail-title) !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.article-feature-copy h2,
.gallery-feature-copy h2,
.article-body h2,
.about-section-title,
.cert-guide h2,
.cert-form h2,
.cert-result h2,
.cert-result-title,
.product-detail h2,
.work-section-title,
.work-side-title,
.work-panel-card h3,
.article-side h2,
.article-guide h3,
.training-guide h2,
.training-side-card h2,
.gallery-side h2,
.gallery-note h3,
.about-side-card h2 {
  font-size: var(--ty-section-title) !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.shop-card-title,
.shop-card-title a,
.gallery-card-title,
.gallery-card-title a,
.article-item h2,
.article-item h2 a,
.training-card h2,
.training-card h2 a,
.training-empty strong,
.work-bottom-link.is-list strong,
.product-note span {
  font-size: var(--ty-card-title) !important;
  line-height: 1.45 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

.shop-hero-main p,
.article-intro p,
.training-hero p,
.gallery-intro p,
.about-lead,
.cert-title-panel p,
.article-richtext,
.about-richtext,
.product-content,
.work-content {
  font-size: var(--ty-body) !important;
  line-height: 1.78 !important;
  letter-spacing: 0 !important;
}

.shop-card-desc,
.article-item p,
.training-card p,
.gallery-feature-copy p,
.gallery-note p,
.article-feature-copy p,
.article-side p,
.training-side-card p,
.about-side-card p,
.work-summary,
.work-panel-card p,
.shop-empty-note {
  font-size: var(--ty-body) !important;
  line-height: 1.72 !important;
  letter-spacing: 0 !important;
}

.shop-eyebrow,
.article-kicker,
.article-detail-kicker,
.training-kicker,
.gallery-kicker,
.about-kicker,
.cert-kicker,
.product-kicker,
.article-label,
.gallery-label,
.cert-badge,
.product-meta,
.gallery-card-meta,
.article-date span,
.training-date span,
.work-meta-item span,
.work-bottom-link span,
.cert-field label {
  font-size: var(--ty-meta) !important;
  line-height: 1.4 !important;
  letter-spacing: .04em !important;
}

.shop-tabs a,
.article-tabs a,
.training-tabs a,
.gallery-tabs a,
.shop-btn,
.product-btn,
.cert-submit,
.article-detail-back,
.about-back,
.work-bottom-home,
.shop-pagebar .paging,
.shop-pagebar .paging a,
.shop-pagebar .paging .page-status,
.paging,
.paging a {
  font-size: var(--ty-control) !important;
  line-height: 1.35 !important;
}

.shop-price,
.product-price,
.order-total {
  font-size: var(--ty-price) !important;
  line-height: 1.22 !important;
  font-weight: 700 !important;
}

.shop-price small,
.product-price small {
  font-size: var(--ty-control) !important;
}

/* Homepage modules. */
#index .glass-card .card-title,
#index .layout-service-title,
#index .bento-title,
#index .bento-item:nth-child(1) .bento-title,
#index .mobile-work-title,
#index .pc-final-side-copy strong,
#index .pc-final-subject strong,
#index .pc-final-work-copy strong {
  font-family: var(--ty-font-sans) !important;
  font-size: var(--ty-card-title) !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

#index .layout-section-title,
#index .luxury-news-title,
#index .mobile-works-title,
#index .public-title-1 .title-ch,
#index .pc-final-title,
#index .pc-final-list-title,
#index .pc-final-column-copy strong {
  font-family: var(--ty-font-sans) !important;
  font-size: var(--ty-section-title) !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

#index .layout-news-title,
#index .luxury-news-title-text,
#index .mobile-news .mobile-list .item .link .text-right .text,
#index .public-switch-list .item .link .news-title,
#index .pc-final-news-title,
#index .pc-final-mini-list a,
#index .pc-final-mini-list span {
  font-family: var(--ty-font-sans) !important;
  font-size: var(--ty-body) !important;
  line-height: 1.55 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

#index .public-title-1 .title-en,
#index .layout-section-sub,
#index .glass-card .card-subtitle,
#index .layout-service-meta,
#index .luxury-news-tabs .switch-item,
#index .bento-subtitle,
#index .mobile-work-meta,
#index .mobile-news .mobile-list .item .link .text-right .tag,
#index .mobile-news .mobile-list .item .link .text-right .date,
#index .pc-final-eyebrow,
#index .pc-final-news-date,
#index .pc-final-work-copy span {
  font-size: var(--ty-meta) !important;
  line-height: 1.35 !important;
  letter-spacing: .04em !important;
}

/* Public footer: stable left information stack + right QR area. */
@media screen and (min-width: 769px) {
  #footer {
    height: auto !important;
    min-height: 142px !important;
    padding: 28px 0 !important;
    background: #303030 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #footer .container {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 228px !important;
    grid-auto-rows: auto !important;
    column-gap: 42px !important;
    row-gap: 8px !important;
    align-items: center !important;
    width: min(1180px, calc(100% - 48px)) !important;
    min-height: 86px !important;
    transform: none !important;
  }

  #footer .info {
    grid-column: 1 !important;
    float: none !important;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #footer .info:nth-of-type(1) { grid-row: 1 !important; }
  #footer .info:nth-of-type(2) { grid-row: 2 !important; }
  #footer .info:nth-of-type(3) { grid-row: 3 !important; }
  #footer .info:nth-of-type(4) { grid-row: 4 !important; }

  #footer .wechat-container {
    grid-column: 2 !important;
    grid-row: 1 / span 4 !important;
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 86px !important;
    transform: none !important;
  }

  #footer .wechat-container .wechat {
    width: auto !important;
    max-width: 102px !important;
    height: 86px !important;
    object-fit: contain !important;
    margin-left: 8px !important;
  }
}

@media screen and (min-width: 769px) and (max-width: 1180px) {
  #footer .container {
    grid-template-columns: minmax(0, 1fr) 112px !important;
    column-gap: 24px !important;
  }

  #footer .wechat-container .wechat:first-child {
    display: none !important;
  }
}

/* Mobile scale. */
@media screen and (max-width: 768px) {
  :root {
    --ty-meta: 12px;
    --ty-control: 13px;
    --ty-body: 14px;
    --ty-card-title: 15px;
    --ty-list-title: 15px;
    --ty-panel-title: 16px;
    --ty-section-title: 17px;
    --ty-page-title: 20px;
    --ty-detail-title: 22px;
    --ty-price: 22px;
  }

  body {
    font-size: var(--ty-body) !important;
    line-height: 1.72 !important;
  }

  #header .header-top .logo-container .icon-shiliangzhinengduixiang {
    font-size: 15px !important;
  }

  #header .header-top .logo-container .logo-text {
    font-size: 16px !important;
  }

  #header .header-menu .list .item .link span {
    font-size: 13px !important;
  }

  #header .header-menu .list .item .child-list .child-item .child-link {
    font-size: 12px !important;
  }

  .shop-hero-main h1,
  .article-intro h1,
  .training-hero h1,
  .gallery-intro h1,
  .about-title,
  .cert-title-panel h1,
  .product-title,
  .work-title,
  .article-detail-title {
    font-size: var(--ty-page-title) !important;
    line-height: 1.32 !important;
  }

  .shop-card-title,
  .shop-card-title a,
  .gallery-card-title,
  .gallery-card-title a,
  .article-item h2,
  .article-item h2 a,
  .training-card h2,
  .training-card h2 a {
    font-size: var(--ty-card-title) !important;
    line-height: 1.42 !important;
  }

  #index .layout-section-title,
  #index .luxury-news-title,
  #index .mobile-works-title,
  #index .public-title-1 .title-ch,
  #index .pc-final-title,
  #index .pc-final-list-title,
  #index .pc-final-column-copy strong {
    font-size: 16px !important;
  }

  #index .glass-card .card-title,
  #index .layout-service-title,
  #index .bento-title,
  #index .bento-item:nth-child(1) .bento-title,
  #index .mobile-work-title {
    font-size: 14px !important;
  }
}

/* Codex shop compact mobile start */
@media screen and (max-width: 768px) {
  .shop-shell {
    padding: 10px 0 34px !important;
  }

  .shop-wrap {
    width: min(100% - 18px, 1180px) !important;
  }

  .shop-hero {
    margin-bottom: 8px !important;
    padding: 14px 14px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 18px rgba(50, 31, 22, 0.045) !important;
  }

  .shop-hero:before {
    display: none !important;
  }

  .shop-hero-main {
    min-height: 0 !important;
    padding: 0 !important;
    justify-content: flex-start !important;
  }

  .shop-title-row {
    gap: 6px !important;
    align-items: flex-end !important;
  }

  .shop-eyebrow {
    margin: 0 0 2px !important;
    padding: 2px 6px !important;
    color: #7b5f5f !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    letter-spacing: .02em !important;
    background: #fff4f5 !important;
  }

  .shop-hero-main h1 {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.25 !important;
  }

  .shop-hero-main p {
    margin-top: 7px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: #666 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }

  .shop-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin: 0 0 12px !important;
    padding: 7px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    border-radius: 6px !important;
    box-shadow: none !important;
  }

  .shop-tabs::-webkit-scrollbar {
    display: none;
  }

  .shop-tabs a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    border-radius: 5px !important;
    white-space: nowrap !important;
  }

  .shop-grid {
    gap: 10px !important;
  }
}

@media screen and (max-width: 390px) {
  .shop-tabs a {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 10px !important;
  }
}
/* Codex shop compact mobile end */

/* Codex member profile form start */
.member-profile-page {
  margin-top: 0 !important;
}

.member-profile-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(182, 5, 17, 0.12);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(40, 22, 18, 0.07);
}

.member-profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  border-bottom: 1px solid rgba(182, 5, 17, 0.12);
}

.member-profile-kicker {
  display: inline-block;
  margin-bottom: 7px;
  color: #b60511;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.member-profile-header h2 {
  margin: 0;
  color: #2c2c2c;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
}

.member-profile-header p {
  max-width: 620px;
  margin: 9px 0 0;
  color: #666;
  font-size: 14px;
  line-height: 1.75;
}

.member-profile-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(182, 5, 17, 0.24);
  border-radius: 5px;
  color: #b60511;
  font-size: 13px;
  line-height: 1;
  text-decoration: none !important;
}

.member-profile-back:hover {
  color: #fff;
  background: #b60511;
}

.member-profile-body {
  padding: 24px 28px 28px;
}

.member-profile-section + .member-profile-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #eee;
}

.member-section-title {
  margin-bottom: 16px;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

.member-section-note {
  margin: -8px 0 16px;
  color: #777;
  font-size: 13px;
  line-height: 1.7;
}

.member-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.member-profile-field--full {
  grid-column: 1 / -1;
}

.member-profile-field label {
  display: block;
  margin: 0 0 7px;
  color: #444;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

.member-profile-field .form-control {
  height: 42px;
  padding: 8px 12px;
  border: 1px solid #ded7d2;
  border-radius: 6px;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
}

.member-profile-field select.form-control {
  padding-right: 28px;
}

.member-profile-field .form-control:focus {
  border-color: #b60511;
  box-shadow: 0 0 0 3px rgba(182, 5, 17, 0.1);
}

.member-date-control {
  max-width: 100%;
}

.member-date-control .input-group-text {
  height: 42px;
  border-color: #ded7d2;
  border-radius: 0 6px 6px 0;
  background: #faf7f5;
  color: #b60511;
}

.member-avatar-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 122px;
  padding: 14px;
  border: 1px dashed rgba(182, 5, 17, 0.25);
  border-radius: 7px;
  background: #fffafa;
}

.member-avatar-preview {
  flex: 0 0 auto;
  width: 96px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e4d9d2;
  border-radius: 6px;
  background: #fff;
}

.member-avatar-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.member-avatar-copy p {
  margin: 8px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.7;
}

.member-upload-btn,
.member-primary-btn {
  border: 1px solid #b60511;
  background: #b60511;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 5px;
}

.member-upload-btn {
  min-height: 34px;
  padding: 0 16px;
  line-height: 32px;
}

.member-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #eee;
}

.member-primary-btn,
.member-secondary-btn {
  min-width: 112px;
  min-height: 40px;
  padding: 0 22px;
  line-height: 38px;
}

.member-secondary-btn {
  border: 1px solid #d7d0cb;
  background: #fff;
  color: #555 !important;
  font-size: 14px;
  border-radius: 5px;
}

.member-upload-btn:hover,
.member-primary-btn:hover {
  background: #9f0410;
  border-color: #9f0410;
}

.member-secondary-btn:hover {
  color: #b60511 !important;
  border-color: rgba(182, 5, 17, 0.36);
}

.member-mobile-tools {
  background: #b60511 !important;
}

@media screen and (max-width: 768px) {
  .member-profile-page {
    padding-right: 10px !important;
    padding-left: 10px !important;
  }

  .member-profile-card {
    border-radius: 6px;
    box-shadow: 0 10px 22px rgba(40, 22, 18, 0.06);
  }

  .member-profile-header {
    display: block;
    padding: 16px 16px 14px;
  }

  .member-profile-header h2 {
    font-size: 20px;
  }

  .member-profile-header p {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.65;
  }

  .member-profile-back {
    margin-top: 12px;
  }

  .member-profile-body {
    padding: 16px;
  }

  .member-profile-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .member-profile-section + .member-profile-section {
    margin-top: 20px;
    padding-top: 18px;
  }

  .member-avatar-editor {
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .member-avatar-preview {
    width: 82px;
    height: 104px;
  }

  .member-form-actions {
    gap: 10px;
  }

  .member-primary-btn,
  .member-secondary-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}
/* Codex member profile form end */
