:root {
  --bg: #f3ede6;
  --card: #ffffff;
  --dark: #1b1c2a;
  --accent: #f6b94d;
  --accent-dark: #f08a4b;
  --muted: #8b8f9a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body {
  font-family: "Poppins", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--dark);
  min-height: 100%;
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

input,
button,
textarea,
select {
  font: inherit;
  line-height: 1.4;
}

/* 主内容区：占满除页脚外的剩余高度，避免页脚被挤到「下一屏」导致误以为消失 */
.page-root {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  position: relative;
}

.app {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

body > footer {
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.sidebar {
  width: 72px;
  flex-shrink: 0;
  align-self: stretch;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border-right: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 8px;
  gap: 16px;
}

.sidebar .logo {
  font-weight: 600;
  margin-bottom: 12px;
  color: #f08a4b;
  cursor: pointer;
}

.sidebar button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 18px;
  color: #777;
}

/* 康复库：听诊器以 HTML 内 data:SVG +「康」为主；此处为未内联时的样式补充 */
.sidebar button.sidebar-btn-kf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 3px 0 2px;
  font-size: 12px;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
  color: #c2410c;
}

.sidebar button.sidebar-btn-kf .sidebar-kf-img {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  object-fit: contain;
}

.sidebar button.sidebar-btn-kf .sidebar-kf-mark {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  pointer-events: none;
}

/* 内联 style 可能盖住背景：选中康复库时用 !important */
.sidebar button.sidebar-btn-kf.active {
  border-color: transparent !important;
  color: #ffffff !important;
  background: #1b1c2a !important;
}

.sidebar button.sidebar-btn-kf.active .sidebar-kf-img {
  filter: brightness(0) invert(1);
}

.sidebar button.active {
  background: #1b1c2a;
  color: #fff;
}

/* 页脚底部备案条：随页面流排在最下方，非固定悬浮；背景透明以免遮挡底图 */
.site-footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 40px;
  margin-top: 14px;
  padding: 12px 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
}

.site-footer-legal a {
  color: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.site-footer-legal a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.site-footer-legal-psb-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #c41e3a, #8b1538);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.35);
}
