:root {
  --blue: #1267ff;
  --deep: #052b64;
  --ink: #17243a;
  --muted: #6f7f95;
  --line: #e4edf8;
  --card: #fff;
  --top-hero-cover: url("assets/category-hero-start.jpg");
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #edf4fb;
  font-family: "HarmonyOS Sans SC", "MiSans", "Alibaba PuHuiTi 3.0", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.page {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 16px 42px;
  background:
    radial-gradient(circle at 78% 0%, rgba(20, 201, 223, .2), transparent 120px),
    linear-gradient(180deg, #f8fbff 0%, #eef5fb 42%, #f8fafc 100%);
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding-left: 50px;
}

.back {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, calc(50% - 240px + 16px));
  z-index: 120;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(226, 237, 248, .86);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 26px rgba(23, 67, 116, .14);
  backdrop-filter: blur(14px);
}

.back svg {
  width: 22px;
  height: 22px;
  color: var(--deep);
}

.topbar-title {
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .86);
}

.hero {
  position: relative;
  min-height: 154px;
  margin: 10px 0 22px;
  padding: 18px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background: #1267ff;
  box-shadow: 0 18px 42px rgba(6, 44, 112, .18);
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: var(--top-hero-cover);
  background-size: cover;
  background-position: center;
  content: "";
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4, 28, 84, .82), rgba(6, 59, 143, .42), rgba(7, 80, 150, .08));
  content: "";
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 270px;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 900;
}

.hero p {
  max-width: 285px;
  margin-top: 8px;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  line-height: 1.5;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-head h2 {
  min-width: 0;
  color: var(--deep);
  font-size: 21px;
  font-weight: 900;
}

.count {
  flex: 0 0 auto;
  color: #8190a3;
  font-size: 13px;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(223, 232, 242, .86);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 67, 116, .09);
  cursor: pointer;
  outline: 0;
}

.card:focus-visible {
  box-shadow: 0 0 0 3px rgba(18, 103, 255, .22), 0 12px 30px rgba(29, 67, 116, .09);
}

.thumb {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: #fff;
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
}

.thumb::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .22), transparent 26%),
    linear-gradient(180deg, rgba(3, 28, 72, .08), rgba(3, 28, 72, .62));
  content: "";
}

.thumb strong {
  position: relative;
  z-index: 1;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 20, 55, .3);
}

.thumb .badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(5, 43, 100, .78);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.card.is-video:not([data-external-watch="1"]) .thumb::before {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(5, 25, 58, .18);
  content: "▶";
}

.cover-live-studio .thumb { background-image: linear-gradient(120deg, rgba(9, 65, 162, .08), rgba(94, 214, 255, .34)), url("assets/banner-mdt.webp"); }
.cover-live-roundtable .thumb { background-image: linear-gradient(135deg, rgba(0, 72, 180, .58), rgba(0, 188, 212, .22)), url("assets/banner-mdt.webp"); background-position: 58% center; }
.cover-fus-precision .thumb { background-image: linear-gradient(135deg, rgba(3, 29, 90, .08), rgba(0, 205, 214, .2)), url("assets/cover-fus.webp"); }
.cover-fus-principle .thumb { background: radial-gradient(circle at 78% 24%, rgba(94, 214, 255, .95), transparent 18%), radial-gradient(circle at 76% 28%, transparent 0 16%, rgba(255,255,255,.4) 17% 18%, transparent 19%), linear-gradient(135deg, #073a9a, #0f7dff 54%, #13c8c9); }
.cover-fus-process .thumb { background-image: linear-gradient(150deg, rgba(3, 31, 91, .66), rgba(15, 93, 255, .16)), url("assets/banner-home-main.webp"); background-position: 60% center; }
.cover-fus-guide .thumb { background: radial-gradient(circle at 82% 18%, rgba(34, 197, 94, .85), transparent 16%), linear-gradient(145deg, #053986, #0f5dff 62%, #5ed6ff); }
.cover-pd-symptom .thumb { background-image: linear-gradient(135deg, rgba(5, 43, 100, .42), rgba(15, 93, 255, .08)), url("assets/banner-parkinson-dbs.webp"); }
.cover-pd-medication .thumb { background: radial-gradient(circle at 76% 24%, rgba(94, 214, 255, .68), transparent 22%), linear-gradient(135deg, #06418f, #0f5dff 56%, #22c55e); }
.cover-pd-surgery .thumb { background-image: linear-gradient(135deg, rgba(5, 43, 100, .62), rgba(15, 93, 255, .12)), url("assets/hero-focused-ultrasound.webp"); background-position: 64% center; }
.cover-tremor-hands .thumb { background-image: linear-gradient(135deg, rgba(5, 43, 100, .48), rgba(34, 197, 94, .12)), url("assets/banner-tremor.webp"); background-position: 58% center; }
.cover-tremor-writing .thumb { background: radial-gradient(circle at 78% 22%, rgba(34, 197, 94, .75), transparent 17%), linear-gradient(145deg, #06367c, #1169ff 54%, #5ed6ff); }
.cover-ad-memory .thumb { background-image: linear-gradient(135deg, rgba(8, 68, 164, .1), rgba(34, 197, 94, .18)), url("assets/banner-ad.webp"); background-position: 58% center; }
.cover-ad-family .thumb { background-image: linear-gradient(135deg, rgba(7, 66, 152, .58), rgba(94, 214, 255, .18)), url("assets/cover-ad.webp"); }
.cover-story-care .thumb { background: radial-gradient(circle at 78% 24%, rgba(255, 255, 255, .28), transparent 18%), linear-gradient(135deg, #0752b6, #18a4cf 58%, #22c55e); }
.cover-custom .thumb { background-image: linear-gradient(180deg, rgba(2, 24, 65, .04) 0%, rgba(2, 28, 72, .34) 58%, rgba(2, 26, 70, .74) 100%), var(--custom-cover); }

.system-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  min-height: 0;
  align-content: start;
  padding: 12px 14px;
  border: 1px dashed #cbdff2;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #6f7f95;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.system-card strong {
  display: block;
  color: var(--deep);
  font-size: 15px;
  line-height: 1.32;
  font-weight: 900;
}

.system-card span {
  display: block;
  max-width: 30em;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 500;
}

.system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.system-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}


.grid.is-system-feed {
  display: block;
}

.system-card.is-empty {
  width: min(100%, 380px);
  min-height: 0;
  margin: 0;
  padding: 8px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.system-card.is-empty strong {
  font-size: 15px;
  line-height: 1.28;
}

.system-card.is-empty span {
  max-width: 28em;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.5;
}

.system-card.is-empty .system-actions {
  margin-top: 8px;
}

.system-card.is-empty .system-actions a {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.system-actions a.primary {
  background: linear-gradient(135deg, #1267ff, #0f4dd8);
  color: #fff;
  box-shadow: 0 10px 20px rgba(18, 103, 255, .2);
}

.body {
  padding: 10px 11px 12px;
}

.body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: #202b3b;
  font-size: 15px;
  line-height: 1.38;
  font-weight: 850;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card[data-external-watch="1"] {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  height: 138px;
  aspect-ratio: auto;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(29, 67, 116, .13);
}

.card[data-external-watch="1"] .thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-height: 0;
  padding: 0;
}

.card[data-external-watch="1"] .thumb strong {
  display: none;
}

.card[data-external-watch="1"] .external-platform {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  overflow: hidden;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(4, 29, 70, .66);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.card[data-external-watch="1"] .body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 11px 12px;
}

.card[data-external-watch="1"] .body h3 {
  min-height: 0;
  font-size: 15px;
  line-height: 1.35;
}

.external-watch-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-top: auto;
}

.external-live-time {
  overflow: hidden;
  margin: 6px 0 0;
  color: #6f8199;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-watch-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #1677ff;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(22, 119, 255, .18);
  margin-right: auto;
}

.card[data-live-status="live"] .badge {
  background: rgba(239, 68, 68, .92);
}

.card[data-live-status="preview"] .badge {
  background: rgba(37, 99, 235, .92);
}

.card[data-live-status="preview"] .external-watch-action {
  background: #eaf3ff;
  color: #1267ff;
  box-shadow: none;
}

.card[data-live-status="replay"] .badge {
  background: rgba(51, 65, 85, .88);
}

.card[data-live-status="replay"] .external-watch-action {
  background: #edf2f7;
  color: #27415f;
  box-shadow: none;
}

html[data-theme="dark"] .card[data-live-status="preview"] .external-watch-action,
html[data-theme="dark"] .card[data-live-status="replay"] .external-watch-action {
  background: rgba(67, 111, 174, .24);
  color: #b8d7ff;
}

html[data-theme="dark"] .external-live-time {
  color: #91a7c4;
}

html[data-theme="dark"] .card[data-external-watch="1"] {
  border-color: rgba(127, 158, 196, .22);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .28);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid #e0edf8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(23, 67, 116, .08);
}

.contact strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--deep);
  font-size: 17px;
}

.contact > div {
  min-width: 0;
}

.contact span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.contact img {
  flex: 0 0 78px;
  width: clamp(66px, 20vw, 78px);
  height: clamp(66px, 20vw, 78px);
  border-radius: 8px;
  object-fit: cover;
}

.float-contact {
  position: fixed;
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  bottom: 42px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--deep);
  box-shadow: 0 10px 26px rgba(16, 50, 91, .18);
  cursor: grab;
  touch-action: none;
  transition: transform .24s ease, opacity .24s ease, box-shadow .24s ease;
  user-select: none;
}

.float-contact:active {
  cursor: grabbing;
}

.float-contact.is-peek {
  transform: scale(.96);
  opacity: .82;
  box-shadow: 0 8px 20px rgba(16, 50, 91, .13);
}

.float-contact svg {
  width: 25px;
  height: 25px;
}

.float-label {
  position: fixed;
  right: max(14px, calc((100vw - 480px) / 2 + 14px));
  bottom: 18px;
  z-index: 19;
  width: 48px;
  color: #7d8897;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  transition: transform .24s ease, opacity .24s ease;
  pointer-events: none;
  user-select: none;
}

.float-label.is-peek {
  opacity: 0;
  transform: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 21, 42, .5);
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(100%, 320px);
  padding: 22px 20px 20px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.modal-card h2 {
  color: var(--deep);
  font-size: 19px;
  line-height: 1.3;
}

.modal-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.modal-card img {
  width: min(220px, 72vw);
  height: min(220px, 72vw);
  margin: 18px auto 12px;
  border-radius: 8px;
  object-fit: cover;
}

.close-btn {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  background: #eff4fa;
  color: #4c5a6b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #07111f;
  color: #e9f1fb;
}

html[data-theme="dark"] .page {
  background:
    radial-gradient(circle at 82% 0%, rgba(56, 139, 255, .18), transparent 190px),
    linear-gradient(180deg, #0b1524 0%, #07111f 52%, #08101c 100%);
}

html[data-theme="dark"] .back,
html[data-theme="dark"] .card,
html[data-theme="dark"] .contact,
html[data-theme="dark"] .system-card,
html[data-theme="dark"] .article-panel,
html[data-theme="dark"] .comments-panel,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .contact-card {
  border-color: rgba(127, 158, 196, .22);
  background: rgba(15, 27, 45, .80);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] .topbar-title,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .body h3,
html[data-theme="dark"] .article-panel h2,
html[data-theme="dark"] .article-panel h3,
html[data-theme="dark"] .article-panel h4,
html[data-theme="dark"] .comments-panel h2,
html[data-theme="dark"] .contact strong,
html[data-theme="dark"] .system-card strong {
  color: #f2f7ff;
  text-shadow: none;
}

html[data-theme="dark"] .section-head span,
html[data-theme="dark"] .article-panel p,
html[data-theme="dark"] .article-panel li,
html[data-theme="dark"] .article-meta,
html[data-theme="dark"] .contact span,
html[data-theme="dark"] .system-card span,
html[data-theme="dark"] .comment-item,
html[data-theme="dark"] .comment-empty {
  color: #a9b8ca;
}

html[data-theme="dark"] .back svg {
  color: #8cb9ff;
}

html[data-theme="dark"] .close-btn,
html[data-theme="dark"] .comment-form textarea {
  border-color: rgba(127, 158, 196, .22);
  background: rgba(9, 18, 32, .82);
  color: #e9f1fb;
}

@media (max-width: 360px) {
  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero {
    min-height: 142px;
    padding: 16px;
  }

  h1 {
    font-size: 23px;
  }

  .grid {
    gap: 10px;
  }

  .contact {
    gap: 10px;
    padding: 12px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .section-head,
  .card,
  .system-card,
  .contact {
    animation: soft-enter .38s ease both;
  }

  .card,
  .back,
  .float-contact,
  .system-actions a {
    transition: transform .22s ease, box-shadow .22s ease, opacity .22s ease;
  }

  .card:active,
  .back:active,
  .system-actions a:active {
    transform: scale(.98);
  }

  @keyframes soft-enter {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
