/* ==========================================================================
   embed.css —— 红河 OS 二期 · 嵌入模式「去壳」样式
   生效条件：页面 <html> 带 .embed 类（由各页 </head> 前的内联脚本在
   window.self !== window.top 时自动添加，即仅在被 iframe 嵌入时生效）。
   契约来源：honghe-os/CONTRACT2.md「嵌入模式」一节。
   ========================================================================== */

/* 1. 隐藏站壳元素：页头（自定义元素）、页脚、公告条、更新条 */
html.embed site-header,
html.embed .site-footer,
html.embed .hh-announcement,
html.embed .hh-whatsnew-bar {
  display: none !important;
}

/* 2. body 背景透明（融入 OS 窗口），并去掉全局装饰性背景层 */
html.embed,
html.embed body {
  background: transparent !important;
}
html.embed body::before {
  display: none !important;
}
html.embed body {
  min-height: auto !important;
}

/* 3. padding 收紧：嵌入窗口空间有限，压缩外层留白 */
html.embed .app-wrapper {
  padding: 0 0.5rem !important;
  max-width: none !important;
}
html.embed .main-content {
  padding-top: 0.5rem !important;
}
html.embed .content-area {
  padding-left: 0 !important;
}

/* 4. 滚动条细化（WebKit 内核 + Firefox）*/
html.embed ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html.embed ::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.45);
  border-radius: 4px;
}
html.embed ::-webkit-scrollbar-thumb:hover {
  background: rgba(128, 128, 128, 0.65);
}
html.embed ::-webkit-scrollbar-track {
  background: transparent;
}
html.embed * {
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.45) transparent;
}
