/* 南京乐之芯手机端门户式导航。桌面端始终隐藏，不改变现有电脑端页面。 */
.mobile-portal-header {
  display: none;
}

.mobile-article-back {
  display: none;
}

@media (max-width: 760px) {
  body.has-mobile-portal {
    overflow-x: hidden;
  }

  body.has-mobile-portal > .premium-header,
  body.has-mobile-portal > .navbar {
    display: none !important;
  }

  .mobile-portal-header {
    position: relative;
    z-index: 1200;
    display: block;
    width: 100%;
    color: #ffffff;
    background: #081d34;
    box-shadow: 0 8px 24px rgba(3, 15, 29, .16);
  }

  .mobile-portal-brandbar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(105deg, #07192e 0%, #0d2c4d 100%);
  }

  .mobile-portal-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #ffffff;
    text-decoration: none;
  }

  .mobile-portal-brand img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
  }

  .mobile-portal-brand span {
    min-width: 0;
    display: block;
  }

  .mobile-portal-brand strong,
  .mobile-portal-brand small {
    display: block;
    white-space: nowrap;
  }

  .mobile-portal-brand strong {
    font-size: 16px;
    line-height: 1.15;
    letter-spacing: .04em;
  }

  .mobile-portal-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, .66);
    font-size: 9px;
    line-height: 1;
    letter-spacing: .12em;
  }

  .mobile-portal-consult {
    min-height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    color: #f5d797;
    border: 1px solid rgba(232, 193, 112, .48);
    border-radius: 4px;
    background: rgba(255, 255, 255, .045);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-portal-primary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #ffffff;
    border-bottom: 1px solid #dce4ec;
  }

  .mobile-portal-primary > a,
  .mobile-portal-more-toggle {
    position: relative;
    min-width: 0;
    min-height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 5px 2px;
    color: #24374b;
    border: 0;
    border-right: 1px solid #e2e8ee;
    border-bottom: 1px solid #e2e8ee;
    border-radius: 0;
    background: #ffffff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-portal-primary > :nth-child(4n) {
    border-right: 0;
  }

  .mobile-portal-primary > :nth-child(n + 5) {
    border-bottom: 0;
  }

  .mobile-portal-primary > a[aria-current="page"],
  .mobile-portal-more-toggle.is-current,
  .mobile-portal-more-toggle[aria-expanded="true"] {
    color: #815711;
    background: #fff8e9;
    box-shadow: inset 0 -3px 0 #c99b47;
  }

  .mobile-portal-primary > a:active,
  .mobile-portal-more-toggle:active {
    background: #f3f6f8;
  }

  .mobile-portal-more-toggle::after {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 6px;
    content: "";
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease, margin .18s ease;
  }

  .mobile-portal-more-toggle[aria-expanded="true"]::after {
    margin-top: 3px;
    transform: rotate(225deg);
  }

  .mobile-portal-more-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    background: #0b233d;
    box-shadow: inset 0 10px 22px rgba(0, 0, 0, .08);
  }

  .mobile-portal-more-panel[hidden] {
    display: none;
  }

  .mobile-portal-more-panel a {
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 4px;
    background: rgba(255, 255, 255, .045);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-portal-more-panel a[aria-current="page"] {
    color: #f6d792;
    border-color: rgba(232, 193, 112, .58);
    background: rgba(201, 155, 71, .13);
  }

  body.has-mobile-portal .topic-hero {
    padding-top: 30px;
  }

  body.has-mobile-portal .topic-header {
    padding-top: 30px;
  }

  body.has-mobile-portal .topic-header h1 {
    color: #ffffff !important;
  }

  body.has-mobile-portal .topic-header .article-date,
  body.has-mobile-portal .topic-header .article-date time {
    color: rgba(255, 255, 255, .84) !important;
  }

  body.has-mobile-portal .article-body a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* 问题文章：让列表与详情页继续沿用当前手机端门户外壳。 */
  body.mobile-articles-index {
    background: #f4f1eb;
  }

  body.mobile-articles-index > main.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  body.mobile-articles-index .articles-list {
    margin: 0;
    padding: 0 0 50px;
  }

  body.mobile-articles-index .articles-list > h1 {
    margin: 0;
    padding: 29px 16px 7px;
    color: #ffffff;
    background: #0b2947;
    font-size: 26px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: .03em;
    text-align: center;
  }

  body.mobile-articles-index .articles-list > h1::before {
    display: block;
    margin-bottom: 8px;
    color: #d7b56e;
    content: "南京本地问题资料";
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .22em;
  }

  body.mobile-articles-index .list-subtitle {
    margin: 0 0 14px;
    padding: 0 16px 27px;
    color: rgba(255, 255, 255, .68);
    background: #0b2947;
    font-size: 12.5px;
    line-height: 1.5;
    text-align: center;
  }

  body.mobile-articles-index .articles-list .article-grid {
    width: 100%;
    max-width: 760px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 auto;
    padding: 0 14px;
  }

  body.mobile-articles-index .articles-list .article-card {
    position: relative;
    margin: 0;
    padding: 17px 17px 16px;
    overflow: hidden;
    border: 1px solid #dbe1e5;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(8, 29, 52, .045);
    transform: none;
  }

  body.mobile-articles-index .articles-list .article-card:first-child {
    border-top: 3px solid #c79a4b;
    padding-top: 15px;
  }

  body.mobile-articles-index .card-meta {
    gap: 7px;
    margin-bottom: 9px;
    color: #788797;
    font-size: 11.5px;
    line-height: 1.4;
  }

  body.mobile-articles-index .tag-category {
    padding: 3px 8px;
    color: #855a18;
    border-radius: 3px;
    background: #f6eddf;
    font-size: 10.5px;
    font-weight: 700;
  }

  body.mobile-articles-index .card-title {
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.48;
  }

  body.mobile-articles-index .card-title a {
    color: #102b45;
  }

  body.mobile-articles-index .card-summary {
    margin: 0;
    color: #667481;
    font-size: 13px;
    line-height: 1.68;
    -webkit-line-clamp: 2;
  }

  body.mobile-article-detail {
    background: #f4f1eb;
  }

  body.mobile-article-detail .topic-header {
    margin-bottom: 0 !important;
    padding: 24px 0 30px !important;
    background: linear-gradient(135deg, #0a223d 0%, #123d64 100%);
  }

  body.mobile-article-detail .topic-header .container {
    padding-right: 17px;
    padding-left: 17px;
  }

  body.mobile-article-detail .mobile-article-back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    color: #e6c579;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
  }

  body.mobile-article-detail .mobile-article-back::before {
    margin-right: 5px;
    content: "‹";
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 10px;
  }

  body.mobile-article-detail .topic-header h1 {
    max-width: 620px;
    margin: 0 auto 9px;
    font-size: 24px !important;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: .01em;
  }

  body.mobile-article-detail .topic-header .article-date {
    margin: 0;
    font-size: 11.5px !important;
  }

  body.mobile-article-detail .topic-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 17px 12px 34px;
    background: #f4f1eb;
  }

  body.mobile-article-detail .topic-content .article-body {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 19px 15px 25px;
    border: 1px solid #e0e4e6;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(8, 29, 52, .04);
  }

  body.mobile-article-detail .quick-answer {
    border-color: #d6b36c;
    border-left-width: 4px;
    background: #fbf7ee;
  }
}

@media (max-width: 360px) {
  .mobile-portal-brandbar {
    padding-right: 11px;
    padding-left: 11px;
  }

  .mobile-portal-primary > a,
  .mobile-portal-more-toggle {
    font-size: 11.5px;
  }

  .mobile-portal-consult {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-portal-more-toggle::after {
    transition: none;
  }
}
