:root {
  /* 主屏布局系统唯一视觉母变量组；所有移动布局尺寸从现有全局变量与实际可用矩形派生。 */
  --home-grid-columns: 4;
  --home-grid-rows: 6;
  --home-page-transition: 320ms cubic-bezier(.2,.8,.2,1);
  --home-item-transition: 170ms cubic-bezier(.2,.8,.2,1);
  --home-edit-control-size: 24px;
  /* 4×6 网格内部顶部安全留白：只解决首行真实内容/编辑控件的视觉溢出，不改变逻辑坐标。 */
  --home-grid-edge-top: 8px;
  --home-widget-radius: clamp(18px, 5vw, 28px);
  --home-widget-placeholder-bg: #d8d8d8;
  --home-widget-avatar-placeholder-bg: var(--home-widget-placeholder-bg);
  --home-widget-media-placeholder-bg: var(--home-widget-placeholder-bg);
  --home-grid-cell: calc((100vw - (var(--global-page-inline) * 2) - (var(--column-gap) * 3)) / 4);
  /* 逻辑坐标仍是 4×6；像素行高必须容纳 QWQ 的“图标 + 名称”，不能强制等于列宽。 */
  --home-grid-row-cell: max(var(--home-grid-cell), calc((var(--icon-size) * var(--custom-icon-scale)) + var(--label-gap) + (var(--label-line) * var(--user-font-size-scale)) + 2px));
}

#page-my-phone-home.desktop {
  grid-template-rows: minmax(0, 1fr) auto;
}

/* 刷新启动闸门：Registry 默认节点与运行时容器在 Dexie active hydrate 前都不参与绘制。
   hidden 由这一处显式兑现，避免 .top-grid/.dock 的 author display 覆盖浏览器 UA hidden 规则。 */
#page-my-phone-home > .top-grid[hidden],
#page-my-phone-home > .dock[hidden],
#page-my-phone-home > .home-screen-viewport[hidden] {
  display: none;
}

.home-screen-viewport {
  position: relative;
  z-index: var(--layer-content);
  grid-row: 1;
  /* 只扩展“显示/裁剪窗口”：父级 desktop 已有左右页面留白，这里把该留白反向吃回，
     让翻页可视区抵达真实屏幕边缘；绝不改变 4×6 布局坐标系。 */
  width: calc(100% + var(--global-page-inline) + var(--global-page-inline));
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin-inline: calc(0px - var(--global-page-inline));
  justify-self: stretch;
  overflow: hidden;
  touch-action: pan-y;
  overscroll-behavior: contain;
  user-select: none;
}

.home-page-track {
  --home-page-index: 0;
  --home-swipe-offset: 0px;
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(calc((var(--home-page-index) * -100%) + var(--home-swipe-offset)), 0, 0);
  transition: transform var(--home-page-transition);
  will-change: transform;
}
.home-page-track.is-swiping,
.home-page-track.no-transition { transition: none; }

.home-page {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  /* 页面本身才是整屏真实显示窗口。横向只在屏幕真实边缘裁切；纵向滚动仍由页面承担。 */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}

/*
 * 4×6 网格仍严格占用修改前 desktop 的原内容矩形。
 * 禁止 width:100vw、auto 居中或二次减 padding；显示窗口与布局坐标彻底分离。
 */
.home-page-grid {
  width: auto;
  min-width: 0;
  min-height: 100%;
  height: auto;
  margin-left: var(--global-page-inline);
  margin-right: var(--global-page-inline);
  display: grid;
  grid-template-columns: repeat(var(--home-grid-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--home-grid-rows), var(--home-grid-row-cell));
  column-gap: var(--column-gap);
  row-gap: var(--row-gap);
  align-content: start;
  align-items: stretch;
  padding-top: var(--home-grid-edge-top);
  padding-bottom: var(--home-grid-edge-top);
  justify-items: stretch;
  overflow: visible;
}

.home-item {
  position: relative;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  transition: transform var(--home-item-transition), opacity 140ms ease;
  touch-action: manipulation;
}
.home-page::-webkit-scrollbar { display: none; }
.is-home-editing .home-item,
.is-home-editing .home-dock-item { touch-action: none; }
.home-app { justify-content: center; }
.home-item.is-drag-source,
.home-dock-item.is-drag-source { opacity: 1; }

.home-widget {
  overflow: hidden;
  border-radius: var(--home-widget-radius);
  background: transparent;
}
.home-widget-frame,
.home-basic-widget {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
.home-widget-frame { display: block; }
.home-basic-widget { padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; color: var(--ui-text); }
.home-basic-widget strong { font-size: 14px; }
.home-basic-widget span { color: var(--ui-muted); font-size: 11px; }
.home-widget-edit-cover { display: none; position: absolute; inset: 0; z-index: 2; background: transparent; }
.is-home-editing .home-widget-edit-cover { display: block; }

.home-item-remove,
.home-item-edit {
  position: absolute;
  z-index: 4;
  top: -5px;
  width: var(--home-edit-control-size);
  height: var(--home-edit-control-size);
  border: 0;
  border-radius: 50%;
  display: none;
  place-items: center;
  padding: 0;
  background: var(--ui-surface);
  color: var(--ui-text);
  line-height: 1;
}
.home-item-remove {
  left: 0;
  font-size: 17px;
  border: 0;
  outline: 0;
  filter: none;
}
.home-item-remove > i {
  display: block;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}
.home-item-edit { right: 0; font-size: 15px; }
.is-home-editing .home-item-remove,
.is-home-editing .home-item-edit { display: grid; }
.home-widget .home-item-remove { top: 6px; left: 6px; }
.home-widget .home-item-edit { top: 6px; right: 6px; }
.home-dock-remove { top: -5px; left: 0; }

/* 移动布局编辑态保持静止：只显示编辑控件，不再给 App、Dock 或 Widget 添加持续摆动。 */
.is-home-editing .home-app:not(.is-drag-source) > .icon-shell,
.is-home-editing .home-dock-item:not(.is-drag-source) > .icon-shell,
.is-home-editing .home-widget:not(.is-drag-source) {
  animation: none;
  transform: none;
  will-change: auto;
}

.home-page-indicator {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  height: 14px;
  pointer-events: none;
}
.home-page-indicator[hidden] { display: none; }
.home-page-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  background: #fff;
  opacity: .58;
  transition: width 170ms cubic-bezier(.2,.8,.2,1), flex-basis 170ms cubic-bezier(.2,.8,.2,1), opacity 150ms ease;
}
.home-page-dot.is-active {
  width: 12px;
  flex-basis: 12px;
  opacity: 1;
}

#page-my-phone-home > .dock {
  grid-row: 2;
  z-index: calc(var(--layer-content) + 1);
  margin-top: clamp(8px, 1.6vh, 14px);
}
.dock-grid { min-height: calc(var(--icon-size) * var(--custom-icon-scale)); }
/* 空 Dock 只隐藏视觉，不移除几何命中区；下一次拖入 App 仍可直接进入。 */
#page-my-phone-home > .dock[data-dock-count="0"] {
  min-width: calc(var(--dock-slot-size) + (var(--dock-pad) * 2) + 2px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}
.home-dock-item {
  position: relative;
  width: calc(var(--icon-size) * var(--custom-icon-scale));
  height: calc(var(--icon-size) * var(--custom-icon-scale));
  display: grid;
  place-items: center;
  touch-action: manipulation;
  transition: transform var(--home-item-transition), opacity 140ms ease;
}
.home-dock-drag-placeholder {
  width: calc(var(--icon-size) * var(--custom-icon-scale));
  height: calc(var(--icon-size) * var(--custom-icon-scale));
  min-width: 0;
  min-height: 0;
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.home-edit-bar {
  position: absolute;
  z-index: var(--layer-popover);
  top: auto;
  bottom: calc(var(--global-page-bottom) + (var(--icon-size) * var(--custom-icon-scale)) + (var(--dock-pad) * 2) + 20px);
  left: var(--global-page-inline);
  right: var(--global-page-inline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.home-edit-bar[hidden] { display: none; }
.home-edit-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
}
.home-edit-bar button {
  pointer-events: auto;
  border: 0;
  outline: 0;
  background: color-mix(in srgb, var(--ui-surface) 84%, transparent);
  color: var(--ui-text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.home-edit-icon-action {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.home-edit-icon-action svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.home-edit-done {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}


/* 高频交互期不让大面积毛玻璃参与每一帧重采样；背景透明度仍由单一主题变量保持。 */
.is-home-editing > .dock {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.is-home-editing .home-edit-bar button {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.home-drag-layer {
  position: fixed;
  inset: 0;
  z-index: calc(var(--layer-modal-overlay) - 1);
  pointer-events: none;
  display: none;
}
.home-drag-layer.is-active { display: block; }
.home-drag-layer > .home-drag-direct {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
  transform-origin: 0 0;
  transition: none;
  animation: none;
  rotate: 0deg;
  filter: none;
}
.home-drag-layer > .home-drag-direct .home-item-remove,
.home-drag-layer > .home-drag-direct .home-item-edit { display: none; }

.home-drawer-section { display: grid; gap: 8px; margin-bottom: var(--global-drawer-section-gap); }
.home-drawer-section h3 { margin: 0 2px 4px; color: var(--ui-muted); font-size: 12px; font-weight: 650; }
.home-drawer-row {
  width: 100%; min-height: 58px; border: 0; padding: 10px 14px; border-radius: var(--global-section-radius); background: var(--ui-surface-secondary); color: var(--ui-text); display: flex; align-items: center; justify-content: space-between; text-align: left;
}
.home-drawer-row span { display: grid; gap: 3px; min-width: 0; }
.home-drawer-row strong { font-size: 14px; font-weight: 650; }
.home-drawer-row small { color: var(--ui-muted); font-size: 11px; line-height: 1.35; }
.home-drawer-row b { font-size: 20px; font-weight: 400; color: var(--ui-muted); }
.home-widget-picker-row { gap: 10px; }
.home-widget-size-preview {
  flex: 0 0 auto;
  width: calc(var(--preview-w) * 8px + 6px);
  height: calc(var(--preview-h) * 8px + 6px);
  min-width: 14px;
  min-height: 14px;
  max-width: 38px;
  max-height: 38px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--ui-text) 8%, transparent);
}
.home-drawer-row.is-danger strong { color: var(--ui-danger); }
.home-drawer-empty { margin: 0; padding: 18px; color: var(--ui-muted); font-size: 12px; text-align: center; }

.home-widget-editor { display: grid; gap: 13px; }
.home-widget-editor label { display: grid; gap: 7px; color: var(--ui-text); font-size: 12px; font-weight: 650; }
.home-widget-editor label small { color: var(--ui-muted); font-weight: 400; line-height: 1.35; }
.home-widget-editor input,
.home-widget-editor select,
.home-widget-editor textarea {
  width: 100%; border: 1px solid var(--ui-line); border-radius: 16px; background: var(--ui-surface-secondary); color: var(--ui-text); padding: 10px 12px; font: inherit; font-weight: 400; resize: vertical;
}
.home-widget-editor input,
.home-widget-editor select { min-height: 42px; }
.home-widget-editor > button,
.home-modal-actions button { min-height: 44px; border: 0; border-radius: 16px; background: var(--global-emphasis-shell-bg); color: var(--global-emphasis-shell-fg); font-weight: 650; }
.home-widget-preview { height: 220px; border: 1px solid var(--ui-line); border-radius: 22px; overflow: hidden; background: var(--ui-panel); }
.home-widget-preview iframe { width: 100%; height: 100%; border: 0; }
.home-modal-actions { display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  #page-my-phone-home {
    --home-page-transition: 1ms linear;
    --home-item-transition: 1ms linear;
  }
}


/* ===== Component Library / UIIY preset =====
   4×4 外壳始终保留为真实布局/拖拽/命中容器，仅取消外壳视觉；组件内容从外壳左上角开始渲染。 */
.home-widget[data-widget="uiiy-top-music"] {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.home-widget[data-widget="uiiy-top-music"] > .home-uiiy-top-shell {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.is-home-editing .home-widget[data-widget="uiiy-top-music"] .home-item-remove {
  top: -5px;
  left: 0;
}
.home-uiiy-top-shell {
  --uiiy-space: clamp(9px, calc(var(--home-grid-cell) * .105), 17px);
  --uiiy-control-size: clamp(34px, calc(var(--home-grid-row-cell) * .34), 50px);
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--uiiy-space);
}
.home-uiiy-top-shell button {
  pointer-events: none;
  font: inherit;
  color: inherit;
  outline: 0;
}
.home-uiiy-top-shell .uiiy-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--uiiy-space) * .7);
}
.home-uiiy-top-shell .uiiy-control-cluster {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: calc(var(--uiiy-space) * .48);
}
.home-uiiy-top-shell .uiiy-mini-button,
.home-uiiy-top-shell .uiiy-tag-button {
  background: rgb(255,255,255);
}
.home-uiiy-top-shell .uiiy-mini-button {
  width: var(--uiiy-control-size);
  height: var(--uiiy-control-size);
  flex: 0 0 var(--uiiy-control-size);
  border-radius: calc(var(--uiiy-space) * .74);
  padding: 0;
  display: grid;
  place-items: center;
}
.home-uiiy-top-shell .uiiy-mini-button i {
  color: rgb(136,136,136);
  font-size: clamp(13px, calc(var(--home-grid-cell) * .16), 18px);
}
.home-uiiy-top-shell .uiiy-tag-button {
  height: var(--uiiy-control-size);
  min-width: 0;
  max-width: none;
  border-radius: calc(var(--uiiy-space) * .74);
  padding-inline: calc(var(--uiiy-space) * .9);
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  color: rgb(132,132,132);
  font-size: clamp(10px, calc(var(--home-grid-cell) * .13), 14px);
  font-weight: 600;
}
.home-uiiy-top-shell .uiiy-music-card-wrap {
  width: min(100%, calc(var(--home-grid-cell) * 3.75));
  min-width: 0;
  margin-left: auto;
  display: grid;
  grid-template-columns: clamp(34px, calc(var(--home-grid-cell) * .42), 48px) minmax(0,1fr);
  column-gap: calc(var(--uiiy-space) * .78);
  align-items: stretch;
}
.home-uiiy-top-shell .uiiy-side-next {
  align-self: end;
  margin: 0 0 calc(var(--uiiy-space) * .35);
  width: clamp(34px, calc(var(--home-grid-cell) * .42), 48px);
  height: clamp(34px, calc(var(--home-grid-cell) * .42), 48px);
  border: 0;
  border-radius: calc(var(--uiiy-space) * .62);
  background: rgb(145,145,145);
  display: grid;
  place-items: center;
  padding: 0;
}
.home-uiiy-top-shell .uiiy-side-next i {
  color: #fff;
  font-size: clamp(15px, calc(var(--home-grid-cell) * .18), 21px);
}
.home-uiiy-top-shell .uiiy-music-stack {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--uiiy-space) var(--uiiy-space) calc(var(--uiiy-space) * .55) calc(var(--uiiy-space) * .55);
  background: rgb(255,255,255);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.home-uiiy-top-shell .uiiy-music-main {
  min-height: clamp(76px, calc(var(--home-grid-row-cell) * 1.02), 122px);
  margin: calc(var(--uiiy-space) * .34) calc(var(--uiiy-space) * .45);
  border-radius: calc(var(--uiiy-space) * .88);
  padding: calc(var(--uiiy-space) * .34) calc(var(--uiiy-space) * 1.25) calc(var(--uiiy-space) * .34) calc(var(--uiiy-space) * .68);
  background: rgb(228,228,228);
  display: grid;
  grid-template-columns: clamp(44px, calc(var(--home-grid-cell) * .64), 72px) minmax(0,1fr);
  align-items: center;
  gap: calc(var(--uiiy-space) * .48);
  position: relative;
}
.home-uiiy-top-shell .uiiy-media-placeholder {
  background: rgb(239,239,239);
 }
.home-uiiy-top-shell .uiiy-album-placeholder {
  width: clamp(44px, calc(var(--home-grid-cell) * .64), 72px);
  height: clamp(44px, calc(var(--home-grid-cell) * .64), 72px);
  border-radius: calc(var(--uiiy-space) * .76);
}
.home-uiiy-top-shell .uiiy-album-placeholder.has-cover {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
 }
.home-uiiy-top-shell .uiiy-music-copy {
  min-width: 0;
  padding-left: calc(var(--uiiy-space) * .08);
}
.home-uiiy-top-shell .uiiy-music-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(59,59,59);
  font-size: clamp(13px, calc(var(--home-grid-cell) * .18), 19px);
  line-height: 1.08;
  font-weight: 700;
}
.home-uiiy-top-shell .uiiy-music-artist {
  margin-top: calc(var(--uiiy-space) * .18);
  color: rgb(65,65,65);
  font-size: clamp(11px, calc(var(--home-grid-cell) * .145), 16px);
  line-height: 1.12;
  font-weight: 600;
}
.home-uiiy-top-shell .uiiy-music-meta {
  margin-top: calc(var(--uiiy-space) * .22);
  color: rgb(140,140,140);
  font-size: clamp(9px, calc(var(--home-grid-cell) * .115), 13px);
}
.home-uiiy-top-shell .uiiy-close-music {
  position: absolute;
  top: calc(var(--uiiy-space) * .31);
  right: calc(var(--uiiy-space) * .31);
  width: clamp(20px, calc(var(--home-grid-cell) * .22), 27px);
  height: clamp(20px, calc(var(--home-grid-cell) * .22), 27px);
  border: 0;
  border-radius: 50%;
  background: rgb(133,133,133);
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
}
.home-uiiy-top-shell .uiiy-close-music i { font-size: clamp(9px, calc(var(--home-grid-cell) * .1), 12px); }
.home-uiiy-top-shell .uiiy-quote-row {
  min-height: clamp(38px, calc(var(--home-grid-row-cell) * .42), 56px);
  border-top: 1px solid rgba(81,81,81,.18);
  background: rgb(255,255,255);
  display: grid;
  grid-template-columns: minmax(0,1fr) clamp(36px, calc(var(--home-grid-cell) * .46), 50px);
  align-items: center;
}
.home-uiiy-top-shell .uiiy-quote-text {
  min-width: 0;
  padding-inline: calc(var(--uiiy-space) * .5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(54,54,54);
  font-size: clamp(12px, calc(var(--home-grid-cell) * .155), 18px);
  font-weight: 600;
}
.home-uiiy-top-shell .uiiy-send-button {
  width: clamp(25px, calc(var(--home-grid-cell) * .31), 35px);
  height: clamp(25px, calc(var(--home-grid-cell) * .31), 35px);
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: rgb(139,139,139);
  display: grid;
  place-items: center;
  padding: 0;
}
.home-uiiy-top-shell .uiiy-send-button i {
  color: #fff;
  font-size: clamp(10px, calc(var(--home-grid-cell) * .125), 14px);
}
.home-uiiy-top-shell .uiiy-widget-area {
  min-width: 0;
  overflow: hidden;
  padding: calc(var(--uiiy-space) * .58) var(--uiiy-space) calc(var(--uiiy-space) * .5);
  border-radius: calc(var(--uiiy-space) * 1.5);
  background: rgb(234,234,234);
}
.home-uiiy-top-shell .uiiy-drag-handle {
  width: calc(var(--uiiy-space) * 3.2);
  height: max(3px, calc(var(--uiiy-space) * .2));
  margin: 0 auto calc(var(--uiiy-space) * .5);
  border-radius: 999px;
  background: rgb(169,169,169);
}
.home-uiiy-top-shell .uiiy-widget-grid {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--uiiy-space);
  align-items: center;
}
.home-uiiy-top-shell .uiiy-widget-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-width: 0;
  border-radius: calc(var(--uiiy-space) * .86);
  background: rgb(239,239,239);
 }
.home-uiiy-top-shell .uiiy-widget-meta {
  margin-top: calc(var(--uiiy-space) * .5);
  display: flex;
  justify-content: flex-end;
  gap: calc(var(--uiiy-space) * .5);
}
.home-uiiy-top-shell .uiiy-chip {
  min-height: clamp(22px, calc(var(--home-grid-row-cell) * .25), 32px);
  padding-inline: calc(var(--uiiy-space) * .62);
  border: 0;
  border-radius: 999px;
  background: rgb(255,255,255);
  color: rgb(133,133,133);
  font-size: clamp(9px, calc(var(--home-grid-cell) * .115), 13px);
  font-weight: 500;
}

/* 组件库：使用现有 GlobalDrawer。预览只做等比缩放，不重新排版组件。 */
.home-component-library {
  width: 100%;
  display: grid;
  gap: 18px;
  margin-bottom: var(--global-drawer-section-gap);
}
.home-component-library-size-tabs { display:flex; flex-wrap:nowrap; align-items:center; justify-content:flex-start; gap:8px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.home-component-library-size-tabs::-webkit-scrollbar{display:none}
.home-component-library-size-tab { flex:0 0 auto; min-height:30px; padding:0 13px; border-radius:999px; border:1px solid var(--ui-line); background:transparent; color:var(--ui-text); font-size:13px; font-weight:700; }
.home-component-library-size-tab.is-active { background: #111; border-color: #111; color: #fff; }
.home-component-library-size-group { display:grid; gap:10px; }
.home-component-library-size-group[hidden]{display:none}
.home-component-library-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px 12px;
}
.home-component-library-grid[data-size="2x2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-component-library-card {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ui-text);
  display: grid;
  gap: 10px;
  text-align: left;
}
.home-component-library-preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 1px;
  overflow: hidden;
  background: transparent;
}
.home-component-library-render {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  transform-origin: 0 0;
  pointer-events: none;
}
.home-component-library-render > .home-uiiy-top-shell {
  display: flex;
  flex-direction: column;
  height: auto;
}
.home-component-library-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 2px;
}
.home-component-library-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
}
.home-component-library-copy small {
  flex: 0 0 auto;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1;
}



/* O3O 主屏组件：逻辑网格壳与视觉壳彻底分离。
   home-widget 只负责占位 / 拖拽 / 编辑控件；home-o3o-visual-shell 是唯一视觉裁切边界。 */
.home-widget[data-widget^="o3o-"]{
  position:relative;width:100%;height:100%;padding:0;overflow:visible;border:0;border-radius:0;background:transparent;
}
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell{
  position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;border-radius:18px;
  background:transparent;isolation:isolate;pointer-events:none;
}
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-preset{
  position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;
  margin:0;aspect-ratio:auto;transform:none;transform-origin:top left;pointer-events:none;
}
.is-home-editing .home-widget[data-widget^="o3o-"] .home-item-remove{top:-5px;left:0}
.home-component-library-render>.home-o3o-preset{position:relative;top:auto;left:auto;width:100%;height:auto;max-width:none;max-height:none;margin:0}
/* 桌面中的 O3O 根组件必须严格吃满所属逻辑网格槽，禁止按源比例继续向外长高。 */
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-profile,
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-music-battery,
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-time-capsule,
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-duet-music,
.home-widget[data-widget^="o3o-"]>.home-o3o-visual-shell>.home-o3o-memory-gallery{
  width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;aspect-ratio:auto;
}
.home-o3o-preset,.home-o3o-preset *{box-sizing:border-box}
.home-o3o-preset{--o3o-ink:#111;--o3o-cover:#ccc;--o3o-panel:#fff;--o3o-shell:#ececec;--o3o-control:rgba(84,84,84,.84);--o3o-avatar-bg:var(--home-widget-avatar-placeholder-bg);--o3o-media-bg:var(--home-widget-media-placeholder-bg);color:var(--o3o-ink);font-family:var(--user-font-family,-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Segoe UI",Arial,sans-serif);overflow:hidden}
.home-widget-avatar-placeholder{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}

/* 个人资料 · 4×4 */
.home-o3o-profile{--o3o-profile-gap:6px;position:relative;aspect-ratio:1/1;border-radius:18px;background:var(--o3o-media-bg)}
.home-o3o-profile-cover{position:absolute;inset:0 0 auto;height:52%;background:var(--o3o-media-bg)}
.home-o3o-profile-info{position:absolute;left:0;right:0;bottom:0;height:51.5%;border-radius:16px 16px 0 0;background:#fff;display:flex;flex-direction:column;align-items:center;padding:calc(16% + var(--o3o-profile-gap)) 20px 14px}
.home-o3o-profile-avatar{position:absolute;z-index:4;left:50%;top:46.8%;transform:translate(-50%,-50%);width:35.4%;aspect-ratio:1;border-radius:50%;background:var(--o3o-avatar-bg);border:2px solid #fff;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.home-o3o-profile-name{font-size:18px;font-weight:900;line-height:1.08;letter-spacing:-.55px;text-align:center}
.home-o3o-profile-handle{margin-top:var(--o3o-profile-gap);color:#c4c4c4;font-size:10px;font-weight:650;line-height:1.04;text-align:center}
.home-o3o-profile-bio{margin-top:6px;width:100%;font-size:11.2px;font-weight:720;line-height:1.2;text-align:center;word-break:break-word}
.home-o3o-profile-location{margin-top:6px;display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:#333}
.home-o3o-profile-location i{font-size:15px;color:#c9c9c9}

/* 音乐与电量 · 2×2，保留 O3O 原卡片纵横比，不拉伸到逻辑外壳。 */
.home-o3o-music-battery{aspect-ratio:153/178;max-height:100%;border-radius:18px;padding:12px;background:#fff;display:flex;flex-direction:column;min-width:0}
.home-o3o-music-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex:0 0 auto}
.home-o3o-album{width:64px;height:64px;border-radius:15px;background:var(--o3o-media-bg);flex:0 0 64px}
.home-o3o-music-icon{color:var(--o3o-control);font-size:22px;line-height:1;padding-top:1px}
.home-o3o-music-copy{margin-top:9px;min-width:0;display:flex;flex-direction:column;gap:4px}
.home-o3o-track-title{font-size:15px;font-weight:850;line-height:1.12;word-break:break-word}
.home-o3o-track-sub{color:#929292;font-size:12.5px;font-weight:650;line-height:1.18;word-break:break-word}
.home-o3o-power{margin-top:auto;padding-top:7px}
.home-o3o-power-label{color:#969696;font-size:12px;font-weight:650;line-height:1.05}
.home-o3o-power-bar{position:relative;height:20px;border-radius:7px;background:#d2d2d2;overflow:hidden;margin-top:4px}
.home-o3o-power-fill{position:absolute;inset:0 auto 0 0;width:0;border-radius:7px;background:#9b9b9b;transition:width .28s ease}
.home-o3o-power-value{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:13px;font-weight:850;line-height:20px;}

/* 时间与电量 · 4×2 */
.home-o3o-time-capsule{aspect-ratio:320/178;max-height:100%;display:flex;flex-direction:column;align-items:center;overflow:visible}
.home-o3o-battery-row{height:42px;flex:0 0 42px;display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:16px}
.home-o3o-battery-pill{width:112px;height:42px;border-radius:21px;background:#fff;padding:0 16px;display:flex;flex-direction:column;justify-content:center;color:#292929}
.home-o3o-battery-pill strong{font-size:14px;font-weight:720;line-height:1.05;letter-spacing:-.15px}.home-o3o-battery-pill span{margin-top:2px;font-size:9px;font-weight:620;line-height:1;color:#737373}
.home-o3o-battery-ring{display:block;width:42px;height:42px;flex:0 0 42px;overflow:visible}.home-o3o-battery-ring circle{fill:none;stroke-width:6.1}.home-o3o-battery-ring-track{stroke:#e4e4e4}.home-o3o-battery-ring-value{stroke:var(--o3o-control);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100;transform:rotate(-90deg);transform-origin:21px 21px;transition:stroke-dashoffset .3s ease}
.home-o3o-clock-stack{position:relative;width:100%;height:104px;flex:0 0 104px}.home-o3o-clock-layer,.home-o3o-clock-capsule{position:absolute;height:80px;border-radius:40px;background:#fff}.home-o3o-clock-layer{pointer-events:none;}
.home-o3o-clock-layer-1{z-index:3;top:16px;left:11px;right:11px;opacity:.58}.home-o3o-clock-layer-2{z-index:2;top:8px;left:22px;right:22px;opacity:.34}.home-o3o-clock-layer-3{z-index:1;top:0;left:33px;right:33px;opacity:.17}
.home-o3o-clock-capsule{z-index:4;inset:24px 0 auto;display:grid;grid-template-columns:58px minmax(0,1fr) minmax(82px,auto);align-items:center;gap:12px;padding:0 16px 0 10px;color:#303030;}
.home-o3o-clock-avatar{position:relative;width:58px;height:58px;border-radius:50%;background:var(--o3o-avatar-bg);justify-self:start;overflow:hidden;display:flex;align-items:center;justify-content:center}.home-o3o-clock-copy{min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.home-o3o-clock-title{max-width:100%;font-size:13px;font-weight:650;line-height:1.14;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-o3o-clock-date{margin-top:7px;font-size:10.5px;font-weight:650;color:#616161;white-space:nowrap}.home-o3o-clock-stats{min-width:0;display:flex;flex-direction:column;align-items:flex-end;justify-content:center}.home-o3o-clock-time{font-variant-numeric:tabular-nums;font-size:29px;font-weight:820;line-height:1;letter-spacing:-1px}.home-o3o-clock-stats span{margin-top:7px;font-size:9.5px;font-weight:650;color:#666;white-space:nowrap}

/* 双人音乐 · 2×2 */
.home-o3o-duet-music{--o3o-control:#545454;position:relative;width:100%;height:100%;aspect-ratio:auto;max-height:100%;border-radius:18px;padding:10px;background:#fff;display:flex;flex-direction:column;min-width:0;overflow:hidden}
.home-o3o-headphone-labels{height:24px;display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:start;position:relative;z-index:5;margin-top:5px}.home-o3o-headphone-labels span{justify-self:center;max-width:66px;padding:4px 6px 5px;border-radius:10px;background:#fff;font-size:9px;font-weight:650;line-height:1;white-space:nowrap;color:#333;overflow:hidden;text-overflow:ellipsis}
.home-o3o-headphone-stage{position:relative;height:86px;flex:0 0 86px;margin-top:0;isolation:isolate}
.home-o3o-ear-disc{position:absolute;top:-4px;width:50px;height:50px;aspect-ratio:1/1;border-radius:50%;background:transparent;border:2px solid var(--o3o-shell);z-index:3;overflow:visible}.home-o3o-ear-disc.is-left{left:18px;transform:none}.home-o3o-ear-disc.is-right{right:18px;transform:none}
.home-o3o-ear-photo{position:absolute;left:50%;top:50%;display:block;width:42px;height:42px;aspect-ratio:1/1;transform:translate(-50%,-50%);border-radius:50%;background:var(--o3o-avatar-bg);overflow:hidden}
/* 头像+头像框+耳机整体上移；头像与框向内侧加大，避免外侧碰到耳机头。 */
.home-o3o-ear-node{position:absolute;top:11px;width:8px;height:12px;border-radius:999px;background:var(--o3o-control);display:block;z-index:5;transform-origin:50% 82%}
.home-o3o-ear-node::after{content:none}
.home-o3o-ear-node.is-left{left:4px;transform:rotate(30deg)}.home-o3o-ear-node.is-right{right:4px;transform:rotate(-30deg)}
.home-o3o-ear-cable{position:absolute;top:20px;width:64px;height:84px;overflow:visible;z-index:2}.home-o3o-ear-cable.is-left{left:6px}.home-o3o-ear-cable.is-right{right:6px}.home-o3o-ear-cable path{fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.home-o3o-mini-player{position:absolute;z-index:4;left:10px;right:10px;bottom:10px;height:66px;min-height:0;overflow:hidden;border-radius:11px;background:var(--o3o-shell);padding:4px 9px;color:#4e4e4e}.home-o3o-player-title{display:flex;align-items:center;justify-content:center;gap:5px;font-size:10.8px;font-weight:780;line-height:1;color:#545454;position:relative}.home-o3o-player-title span{font-weight:780}.home-o3o-player-title i{position:absolute;right:0;font-size:11px;color:#545454}.home-o3o-player-artist{display:block;margin-top:1px;text-align:center;font-size:7.8px;font-weight:600;line-height:1;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-o3o-player-progress{position:relative;height:2.5px;margin-top:3px;border-radius:99px;background:#d7d7d7;overflow:hidden}.home-o3o-player-progress span{display:block;width:0;height:100%;border-radius:inherit;background:#545454;transition:width .16s linear}.home-o3o-player-times{display:flex;align-items:center;justify-content:space-between;margin-top:2px;font-size:7px;font-weight:650;color:#545454;line-height:1}.home-o3o-player-controls{display:grid;grid-template-columns:repeat(5,1fr);align-items:center;justify-items:center;margin-top:1px}.home-o3o-player-controls button{width:24px;height:18px;border:0;padding:0;background:transparent;color:#545454;display:grid;place-items:center;font-size:11.5px}.home-o3o-player-controls button:active{transform:scale(.94)}.home-o3o-player-controls i{font-size:inherit;line-height:1}.home-o3o-player-controls button[data-o3o-music-action="prev"] i,.home-o3o-player-controls button[data-o3o-music-action="next"] i{font-size:15.5px}.home-o3o-player-controls button[data-o3o-music-action="toggle"] i{font-size:17.5px}
.is-home-editing .home-o3o-player-controls{pointer-events:none}.home-o3o-player-controls{pointer-events:auto}

/* 双人音乐 · 4×4：克隆 2×2 结构，仅按 4×4 逻辑网格等比例放大内部 UI。 */
.home-o3o-duet-music-4x4{border-radius:22px;padding:20px}
.home-o3o-duet-music-4x4 .home-o3o-headphone-labels{height:48px;gap:12px;margin-top:10px}
.home-o3o-duet-music-4x4 .home-o3o-headphone-labels span{max-width:132px;padding:8px 12px 10px;border-radius:16px;font-size:18px}
.home-o3o-duet-music-4x4 .home-o3o-headphone-stage{height:172px;flex:0 0 172px}
.home-o3o-duet-music-4x4 .home-o3o-ear-disc{top:-8px;width:100px;height:100px;border-width:4px}
.home-o3o-duet-music-4x4 .home-o3o-ear-disc.is-left{left:36px}
.home-o3o-duet-music-4x4 .home-o3o-ear-disc.is-right{right:36px}
.home-o3o-duet-music-4x4 .home-o3o-ear-photo{width:84px;height:84px}
.home-o3o-duet-music-4x4 .home-o3o-ear-node{top:22px;width:16px;height:24px}
.home-o3o-duet-music-4x4 .home-o3o-ear-node.is-left{left:8px}
.home-o3o-duet-music-4x4 .home-o3o-ear-node.is-right{right:8px}
.home-o3o-duet-music-4x4 .home-o3o-ear-cable{top:40px;width:128px;height:168px}
.home-o3o-duet-music-4x4 .home-o3o-ear-cable.is-left{left:12px}
.home-o3o-duet-music-4x4 .home-o3o-ear-cable.is-right{right:12px}
.home-o3o-duet-music-4x4 .home-o3o-ear-cable path{stroke-width:2.6}
.home-o3o-duet-music-4x4 .home-o3o-mini-player{left:20px;right:20px;bottom:20px;height:132px;border-radius:18px;padding:9px 18px}
.home-o3o-duet-music-4x4 .home-o3o-player-title{gap:10px;font-size:21.6px}
.home-o3o-duet-music-4x4 .home-o3o-player-title i{font-size:22px}
.home-o3o-duet-music-4x4 .home-o3o-player-artist{margin-top:3px;font-size:15.6px}
.home-o3o-duet-music-4x4 .home-o3o-player-progress{height:5px;margin-top:7px}
.home-o3o-duet-music-4x4 .home-o3o-player-times{margin-top:5px;font-size:14px}
.home-o3o-duet-music-4x4 .home-o3o-player-controls{margin-top:3px}
.home-o3o-duet-music-4x4 .home-o3o-player-controls button{width:48px;height:36px;font-size:23px}
.home-o3o-duet-music-4x4 .home-o3o-player-controls button[data-o3o-music-action="prev"] i,
.home-o3o-duet-music-4x4 .home-o3o-player-controls button[data-o3o-music-action="next"] i{font-size:31px}
.home-o3o-duet-music-4x4 .home-o3o-player-controls button[data-o3o-music-action="toggle"] i{font-size:35px}

/* 照片回忆 · 4×2 */
.home-widget[data-widget="o3o-memory-gallery"]{border-radius:18px;overflow:hidden;background:linear-gradient(90deg,var(--home-widget-media-placeholder-bg) 0 24%,#fff 24% 100%)}
.home-o3o-memory-gallery{position:relative;display:grid;grid-template-columns:minmax(60px,24%) minmax(0,1fr);width:100%;height:100%;max-height:none;aspect-ratio:auto;border-radius:18px;background:var(--o3o-media-bg);overflow:hidden}
.home-o3o-memory-progress{position:relative;inset:auto;width:auto;padding:15px 10px 12px;background:var(--o3o-media-bg);color:#fff;display:flex;flex-direction:column;min-width:0}.home-o3o-memory-avatar{position:relative;display:flex;width:36px;height:36px;border-radius:50%;background:var(--o3o-avatar-bg);overflow:hidden;align-items:center;justify-content:center}.home-o3o-progress-spacer{flex:1}.home-o3o-progress-line{--o3o-mark:16px;display:flex;align-items:center;gap:6px}.home-o3o-progress-orbs{position:relative;width:calc(var(--o3o-mark)*1.48);height:var(--o3o-mark);flex:0 0 calc(var(--o3o-mark)*1.48)}.home-o3o-progress-orbs i{position:absolute;top:0;width:var(--o3o-mark);height:var(--o3o-mark);border-radius:50%;display:block}.home-o3o-progress-orbs .is-back{left:0;background:#777}.home-o3o-progress-orbs .is-front{right:0;background:#ececec;border:1px solid rgba(255,255,255,.72)}.home-o3o-progress-line strong{font-size:15px;font-weight:820;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.35px}.home-o3o-memory-progress time{margin-top:10px;font-size:10px;font-weight:650;line-height:1;color:rgba(255,255,255,.92);font-variant-numeric:tabular-nums}
.home-o3o-memory-gallery-inner{position:relative;inset:auto;width:auto;height:100%;border-radius:16px 0 0 16px;padding:16px 12px 8px;background:#fff;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:10px;align-items:stretch;min-width:0;overflow:hidden}.home-o3o-memory-card{height:100%;min-width:0;text-align:center;color:#3a3a3a;display:flex;flex-direction:column;align-items:stretch}.home-o3o-memory-placeholder{display:block;width:100%;flex:1 1 auto;min-height:0;border-radius:14px;background:var(--o3o-media-bg);overflow:hidden}.home-o3o-memory-placeholder.is-alt{background:var(--o3o-media-bg)}.home-o3o-memory-meta{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:5px;min-height:18px;white-space:nowrap;overflow:hidden}.home-o3o-memory-meta span{width:10px;height:10px;flex:0 0 10px;border-radius:50%;background:#777}.home-o3o-memory-meta b{min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;font-size:9px;font-weight:760;line-height:1.05;padding:0 2px}.home-o3o-memory-caption{width:100%;min-height:18px;margin-top:1px;background:transparent;overflow:hidden}.home-o3o-memory-caption small{display:block;width:100%;min-height:18px;margin:0;padding:0 2px;font-size:7.8px;line-height:1.05;color:#ababab;white-space:normal;word-break:break-word}

@media(max-width:390px){
  .home-o3o-profile-info{padding-top:calc(16% + var(--o3o-profile-gap))}.home-o3o-profile-name{font-size:17px}.home-o3o-profile-bio,.home-o3o-profile-location{font-size:11px}
  .home-o3o-time-capsule{transform:scale(.98)}
}

/* 移动布局编辑态：组件内部媒体/文字热区直接编辑；空白区域仍由组件逻辑外壳负责拖拽。 */
.is-home-editing .home-widget-edit-cover { pointer-events: none; }
.is-home-editing .home-widget[data-widget^="o3o-"] > .home-o3o-visual-shell { pointer-events: auto; }
.is-home-editing .home-widget[data-widget^="o3o-"] > .home-o3o-visual-shell > .home-o3o-preset { pointer-events: auto; }
.is-home-editing .home-widget [data-home-media-slot],
.is-home-editing .home-widget [data-home-text-slot] {
  pointer-events: auto;
  touch-action: manipulation;
}
.is-home-editing .home-widget [data-home-media-slot] { cursor: pointer; }
.is-home-editing .home-widget [data-home-text-slot] {
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}
.home-widget [data-home-media-slot].has-user-media {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.home-widget [data-home-media-slot].has-user-media > .home-widget-avatar-placeholder { display: none; }
.home-widget [data-home-inline-editing="true"] {
  outline: none;
  caret-color: currentColor;
  -webkit-user-select: text;
  user-select: text;
  touch-action: manipulation;
}
.is-home-editing .home-uiiy-top-shell .uiiy-tag-button,
.is-home-editing .home-uiiy-top-shell .uiiy-chip { pointer-events: auto; }
.home-widget [data-home-text-multiline="true"] { white-space: pre-wrap; }


/* ===== Initial Small Phone / extracted main-screen components =====
   Visual-only extraction: source labels are library metadata only. Each instance occupies the QWQ logical grid
   rect exactly; component surfaces derive from QWQ theme tokens and automatically follow light/dark/theme color. */
.home-widget[data-widget^="os-"] {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.home-widget[data-widget^="os-"] > .home-os-preset {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  transform-origin: top left;
  pointer-events: none;
}
.is-home-editing .home-widget[data-widget^="os-"] .home-item-remove { top: -5px; left: 0; }
.home-component-library-render > .home-os-preset { position: relative; inset: auto; width: 100%; margin: 0; }

.home-os-preset,
.home-os-preset * { box-sizing: border-box; }
.home-os-preset {
  --os-row: var(--home-grid-row-px, var(--home-grid-row-cell));
  --os-space: clamp(7px, calc(var(--home-grid-cell) * .105), 14px);
  --os-radius: clamp(14px, calc(var(--home-grid-cell) * .23), 22px);
  --os-text: var(--ui-text);
  --os-muted: var(--ui-muted);
  --os-accent: var(--theme-color);
  --os-accent-contrast: var(--theme-color-contrast);
  --os-surface: color-mix(in srgb, var(--ui-surface) 84%, transparent);
  --os-surface-soft: color-mix(in srgb, var(--ui-surface) 66%, transparent);
  --os-avatar-bg: var(--home-widget-avatar-placeholder-bg);
  --os-photo: var(--home-widget-media-placeholder-bg);
  color: var(--os-text);
  font-family: var(--user-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif);
  font-size: calc(1em * var(--user-font-size-scale));
  overflow: visible;
}
.home-os-glass {
  background: var(--os-surface);
  backdrop-filter: blur(14px) saturate(108%);
  -webkit-backdrop-filter: blur(14px) saturate(108%);
}
.home-os-media-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: color-mix(in srgb, var(--os-muted) 72%, transparent);
  font-size: clamp(15px, calc(var(--home-grid-cell) * .25), 28px);
  pointer-events: none;
}
.home-os-preset [data-home-media-slot] {
  position: relative;
  background-color: var(--os-photo);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
.home-os-preset [data-home-media-slot].has-user-media > .home-os-media-icon { display: none; }

/* 状态控制 · 2×1：保留参考页的胶囊 + 圆形控制关系，纵向以 QWQ 实际 row 高度居中。 */
.home-os-status-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, calc(var(--home-grid-cell) * .1), 11px);
}
.home-os-battery-capsule {
  width: min(calc(var(--home-grid-cell) * 1.35), calc(100% - (var(--os-row) * .52) - 7px));
  height: clamp(38px, calc(var(--os-row) * .54), 48px);
  border-radius: 999px;
  padding: 0 clamp(11px, calc(var(--home-grid-cell) * .16), 16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.home-os-battery-capsule strong { font-size: clamp(12px, calc(var(--home-grid-cell) * .17), 15px); line-height: 1.05; font-weight: 680; }
.home-os-battery-capsule span { margin-top: 3px; color: var(--os-muted); font-size: clamp(8px, calc(var(--home-grid-cell) * .115), 10px); line-height: 1; white-space: nowrap; }
.home-os-circle-control {
  width: clamp(38px, calc(var(--os-row) * .54), 48px);
  height: clamp(38px, calc(var(--os-row) * .54), 48px);
  flex: 0 0 clamp(38px, calc(var(--os-row) * .54), 48px);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.home-os-circle-control i { color: var(--os-accent); font-size: clamp(16px, calc(var(--home-grid-cell) * .23), 21px); }

/* 状态组件 · 4×2：内部节奏与“时间与电量”一致：42 + 16 + 104。 */
.home-os-status-panel{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:0;gap:0;overflow:visible}
.home-os-status-top{height:42px;flex:0 0 42px;display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:16px}
.home-os-status-top .home-os-battery-capsule{width:112px;height:42px;flex:0 0 112px}
.home-os-status-top .home-os-circle-control{width:42px;height:42px;flex:0 0 42px}
.home-os-status-info{position:relative;width:100%;height:104px;flex:0 0 104px;overflow:visible}
.home-os-status-layer,.home-os-status-main{position:absolute;height:80px;border-radius:40px}
.home-os-status-layer{pointer-events:none;background:var(--os-surface-soft);}
.home-os-status-layer-1{z-index:3;top:16px;left:11px;right:11px;opacity:.58}
.home-os-status-layer-2{z-index:2;top:8px;left:22px;right:22px;opacity:.34}
.home-os-status-main{z-index:4;top:24px;left:0;right:0;display:grid;grid-template-columns:clamp(44px,calc(var(--home-grid-cell) * .72),60px) minmax(0,1fr) auto;align-items:center;gap:clamp(8px,calc(var(--home-grid-cell) * .14),13px);padding:0 clamp(12px,calc(var(--home-grid-cell) * .18),17px) 0 clamp(7px,calc(var(--home-grid-cell) * .1),10px)}

/* 信息卡片 · 4×1：外部逻辑矩形完全使用 QWQ 4×1 网格，内部层叠仅向上收 8% row 高度。 */
.home-os-info-card { position: relative; }
.home-os-info-layer,
.home-os-info-main { position: absolute; left: 0; right: 0; height: min(100%, calc(var(--os-row) * .84)); border-radius: 999px; }
.home-os-info-layer { background: var(--os-surface-soft); pointer-events: none; }
.home-os-info-layer-1 { top: calc(var(--os-row) * .08); left: calc(var(--os-space) * 1.2); right: calc(var(--os-space) * 1.2); opacity: .64; }
.home-os-info-layer-2 { top: 0; left: calc(var(--os-space) * 2.35); right: calc(var(--os-space) * 2.35); opacity: .34; }
.home-os-info-main {
  top: calc(var(--os-row) * .14);
  z-index: 2;
  display: grid;
  grid-template-columns: clamp(44px, calc(var(--home-grid-cell) * .72), 60px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, calc(var(--home-grid-cell) * .14), 13px);
  padding: 0 clamp(12px, calc(var(--home-grid-cell) * .18), 17px) 0 clamp(7px, calc(var(--home-grid-cell) * .1), 10px);
}
.home-os-info-avatar { width: clamp(44px, calc(var(--home-grid-cell) * .72), 60px); aspect-ratio: 1; border-radius: 50%; background: var(--os-avatar-bg); overflow: hidden; }
.home-os-info-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.home-os-info-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(13px, calc(var(--home-grid-cell) * .205), 17px); font-weight: 650; line-height: 1.1; }
.home-os-info-copy span { margin-top: 5px; color: var(--os-muted); font-size: clamp(10px, calc(var(--home-grid-cell) * .15), 13px); line-height: 1; white-space: nowrap; }
.home-os-info-weather { min-width: 66px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.home-os-info-weather > div { display: flex; align-items: baseline; color: var(--os-accent); line-height: .9; }
.home-os-info-weather b { font-size: clamp(29px, calc(var(--home-grid-cell) * .48), 40px); font-weight: 590; font-variant-numeric: tabular-nums; }
.home-os-info-weather em { font-size: clamp(18px, calc(var(--home-grid-cell) * .29), 24px); font-style: normal; }
.home-os-info-weather > span { margin-top: 5px; display: flex; gap: 4px; align-items: center; color: var(--os-muted); font-size: clamp(9px, calc(var(--home-grid-cell) * .14), 12px); white-space: nowrap; }
.home-os-info-weather > span > span { max-width: clamp(64px, calc(var(--home-grid-cell) * 1.25), 110px); overflow: hidden; text-overflow: ellipsis; }
.home-os-info-weather i { color: var(--os-accent); }

/* 图片卡片 · 2×2：以 QWQ 真实 2×2 矩形的较短边形成正方形，不按参考页固定像素拉伸。 */
.home-os-image-card { display: flex; align-items: flex-start; justify-content: center; }
.home-os-image-surface {
  width: min(100%, calc((var(--os-row) * 2) + var(--row-gap)));
  aspect-ratio: 1;
  max-height: 100%;
  border-radius: var(--os-radius);
}

/* 头像组合 · 2×2 */
.home-os-avatar-group { display: flex; flex-direction: column; justify-content: center; align-items: stretch; min-width: 0; }
.home-os-avatar-title { margin-bottom: clamp(7px, calc(var(--os-space) * .9), 12px); text-align: center; font-size: clamp(12px, calc(var(--home-grid-cell) * .19), 15px); font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-os-avatar-stage { display: flex; align-items: center; justify-content: center; min-width: 0; }
.home-os-avatar-frame {
  width: min(calc(var(--home-grid-cell) * 1.17), calc(var(--os-row) * 1.12));
  aspect-ratio: 1;
  border-radius: 50%;
  padding: clamp(4px, calc(var(--os-space) * .55), 6px);
  margin-right: calc(0px - var(--os-space));
  z-index: 2;
}
.home-os-avatar-photo { width: 100%; height: 100%; border-radius: 50%; background: var(--os-avatar-bg); overflow: hidden; }
.home-os-avatar-dots { display: flex; flex-direction: column; gap: clamp(8px, var(--os-space), 12px); z-index: 1; }
.home-os-avatar-dot {
  width: clamp(34px, calc(var(--os-row) * .5), 44px);
  height: clamp(34px, calc(var(--os-row) * .5), 44px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--os-accent);
  font-size: clamp(14px, calc(var(--home-grid-cell) * .21), 19px);
}

/* 通知卡片 · 2×2 */
.home-os-notification-card { min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; gap: clamp(6px, calc(var(--os-space) * .7), 9px); }
.home-os-notify-image {
  width: 100%;
  min-height: 0;
  border-radius: clamp(13px, calc(var(--home-grid-cell) * .2), 19px);
}
.home-os-notify-row { min-width: 0; min-height: clamp(34px, calc(var(--os-row) * .43), 40px); display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.home-os-notify-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(12px, calc(var(--home-grid-cell) * .19), 15px); font-weight: 520; }
.home-os-notify-action { width: clamp(32px, calc(var(--os-row) * .43), 38px); height: clamp(32px, calc(var(--os-row) * .43), 38px); flex: 0 0 clamp(32px, calc(var(--os-row) * .43), 38px); border-radius: 50%; display: grid; place-items: center; color: var(--os-accent); font-size: clamp(13px, calc(var(--home-grid-cell) * .18), 16px); }

/* 四向控制 · 4×2 */
.home-os-four-way-control { position: relative; min-width: 0; }
.home-os-four-center {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: min(calc(var(--home-grid-cell) * 1.15), calc(var(--os-row) * 1.15));
  aspect-ratio: 1;
  border-radius: 50%;
}
.home-os-four-pill {
  position: absolute;
  z-index: 3;
  width: clamp(82px, calc(var(--home-grid-cell) * 1.25), 104px);
  height: clamp(36px, calc(var(--os-row) * .47), 44px);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 clamp(8px, calc(var(--home-grid-cell) * .12), 11px);
  min-width: 0;
}
.home-os-four-pill i { flex: 0 0 auto; color: var(--os-accent); font-size: clamp(13px, calc(var(--home-grid-cell) * .19), 17px); }
.home-os-four-pill span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--os-muted); font-size: clamp(10px, calc(var(--home-grid-cell) * .15), 13px); }
.home-os-four-pill.is-top-left { right: calc(50% + (var(--home-grid-cell) * .57) + var(--os-space)); top: 8%; }
.home-os-four-pill.is-top-right { left: calc(50% + (var(--home-grid-cell) * .57) + var(--os-space)); top: 8%; }
.home-os-four-pill.is-bottom-left { right: calc(50% + (var(--home-grid-cell) * .57) + var(--os-space)); bottom: 24%; }
.home-os-four-pill.is-bottom-right { left: calc(50% + (var(--home-grid-cell) * .57) + var(--os-space)); bottom: 24%; }
.home-os-four-status { position: absolute; left: 12%; right: 12%; bottom: 3%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: var(--os-text); font-size: clamp(10px, calc(var(--home-grid-cell) * .16), 13px); }

/* 移动布局编辑：内部图片/文本直接编辑，其余区域仍交给现有外壳拖拽命中。 */
.is-home-editing .home-widget[data-widget^="os-"] > .home-os-preset { pointer-events: auto; }
.is-home-editing .home-widget[data-widget^="os-"] [data-home-media-slot],
.is-home-editing .home-widget[data-widget^="os-"] [data-home-text-slot] { pointer-events: auto; touch-action: manipulation; }
.is-home-editing .home-widget[data-widget^="os-"] [data-home-media-slot] { cursor: pointer; }
.is-home-editing .home-widget[data-widget^="os-"] [data-home-text-slot] { cursor: text; -webkit-user-select: text; user-select: text; }

/* 拖拽时不持续重采样内部玻璃；静止态质感仍由主题 token 保持。 */
.is-home-editing .home-os-glass,
.home-page-track.is-swiping .home-os-glass { backdrop-filter: none; -webkit-backdrop-filter: none; }


/* ===== 参考截图结构组件 =====
   只还原组件的布局、文字层级与信息密度。所有人物/照片/插画/头像内容均为空白媒体槽，
   且只能从 --home-widget-placeholder-bg 这一母变量取得占位色。 */
.home-widget[data-widget^="ref-"]{
  position:relative;width:100%;height:100%;min-width:0;min-height:0;padding:0;overflow:visible;
  border:0;border-radius:0;background:transparent;
}
.home-widget[data-widget^="ref-"]>.home-ref-preset{
  position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0;margin:0;pointer-events:none;
}
.is-home-editing .home-widget[data-widget^="ref-"] .home-item-remove{top:-5px;left:0}
.home-component-library-render>.home-ref-preset{position:relative;inset:auto;width:100%;height:auto;margin:0}
.home-ref-preset,.home-ref-preset *{box-sizing:border-box}
.home-ref-preset{
  --ref-text:var(--ui-text);
  --ref-muted:var(--ui-muted);
  --ref-surface:var(--ui-surface);
  --ref-soft:color-mix(in srgb,var(--ui-surface) 72%,var(--ui-panel));
  --ref-accent:var(--theme-color);
  --ref-media:var(--home-widget-placeholder-bg);
  color:var(--ref-text);
  font-family:var(--user-font-family,-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Segoe UI",Arial,sans-serif);
  overflow:hidden;
}
.home-ref-media{background:var(--home-widget-placeholder-bg);background-image:none;background-repeat:no-repeat;background-position:center;background-size:cover;overflow:hidden}
.home-ref-media.has-user-media{background-size:cover}

/* 动态卡片 · 2×2 */
.home-ref-social-thread{display:flex;flex-direction:column;gap:clamp(7px,1.8vw,10px);padding:clamp(8px,2.4vw,13px);background:transparent}
.home-ref-social-head{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0}
.home-ref-social-avatar{width:34px;height:34px;border-radius:50%}
.home-ref-social-identity{min-width:0;display:flex;flex-direction:column;gap:2px}
.home-ref-social-identity strong,.home-ref-social-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-ref-social-identity strong{font-size:10.5px;font-weight:760}.home-ref-social-identity span{font-size:9px;font-weight:650;color:var(--ref-muted)}
.home-ref-social-more{align-self:start;color:var(--ref-muted);font-size:12px;letter-spacing:1px}
.home-ref-social-message{font-size:clamp(10px,2.7vw,13px);font-weight:620;line-height:1.3;white-space:pre-wrap;word-break:break-word}
.home-ref-social-replies{display:grid;gap:6px;min-height:0}
.home-ref-social-reply{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:7px;padding:6px;border-radius:12px;background:var(--ref-soft);min-width:0}
.home-ref-social-reply-media{width:32px;height:32px;border-radius:9px}
.home-ref-social-reply>div:last-child{min-width:0;display:flex;flex-direction:column;gap:3px}.home-ref-social-reply strong,.home-ref-social-reply span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-social-reply strong{font-size:9px;color:var(--ref-accent);font-weight:720}.home-ref-social-reply span{font-size:8.5px;color:var(--ref-muted)}

/* 便签 · 2×2：按参考图重新拆分为粉色标题区 / 薄荷线 / 虚线 / 正文 / 底部保存时间。 */
.home-ref-note-card{
  --ref-note-head:color-mix(in srgb,#f6b7cf 42%,var(--ref-surface));
  --ref-note-mint:#c9f1d5;
  --ref-note-copy:color-mix(in srgb,var(--ref-text) 66%,transparent);
  display:grid;grid-template-rows:auto 2px 8px minmax(0,1fr) auto;min-width:0;min-height:0;height:100%;
  border-radius:clamp(18px,calc(var(--home-grid-cell) * .26),26px);background:var(--ref-surface);overflow:hidden;
}
.home-ref-note-head{
  min-height:clamp(34px,calc(var(--home-grid-row-cell) * .43),46px);padding:0 clamp(14px,calc(var(--home-grid-cell) * .18),20px);
  display:flex;align-items:center;background:var(--ref-note-head);
}
.home-ref-note-head strong{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ref-note-copy);
  font-size:clamp(14px,calc(var(--home-grid-cell) * .19),18px);font-weight:760;line-height:1;
}
.home-ref-note-mint-line{height:2px;background:var(--ref-note-mint)}
.home-ref-note-dash-line{align-self:center;height:0;margin:0 clamp(4px,calc(var(--home-grid-cell) * .05),7px);border-top:2px dashed color-mix(in srgb,var(--ref-text) 52%,transparent)}
.home-ref-note-content{min-height:0;padding:clamp(7px,calc(var(--home-grid-cell) * .09),10px) clamp(14px,calc(var(--home-grid-cell) * .18),19px) 0;overflow:hidden}
.home-ref-note-kicker{
  color:var(--ref-note-copy);font-size:clamp(8px,calc(var(--home-grid-cell) * .105),10.5px);font-weight:700;line-height:1.1;
  letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.home-ref-note-body{
  margin-top:clamp(2px,calc(var(--home-grid-cell) * .03),4px);color:var(--ref-note-copy);
  font-size:clamp(8.5px,calc(var(--home-grid-cell) * .115),11px);line-height:1.22;font-weight:550;
  white-space:pre-wrap;word-break:break-word;overflow:hidden;
}
.home-ref-note-foot{
  min-height:clamp(40px,calc(var(--home-grid-row-cell) * .48),50px);padding:0 clamp(14px,calc(var(--home-grid-cell) * .18),19px) clamp(7px,calc(var(--home-grid-cell) * .09),10px);
  display:flex;align-items:center;justify-content:space-between;gap:8px;color:color-mix(in srgb,var(--ref-muted) 34%,transparent);
}
.home-ref-note-save{display:flex;flex-direction:column;gap:2px;min-width:0}
.home-ref-note-save span{font-size:clamp(7px,calc(var(--home-grid-cell) * .09),9px);font-weight:520;letter-spacing:.035em}
.home-ref-note-save time{font-size:clamp(9.5px,calc(var(--home-grid-cell) * .13),12.5px);font-weight:480;line-height:1;font-variant-numeric:tabular-nums}
.home-ref-note-media{
  width:clamp(27px,calc(var(--home-grid-cell) * .34),34px);height:clamp(27px,calc(var(--home-grid-cell) * .34),34px);flex:0 0 auto;border-radius:50%;
}

/* 周历语录 · 4×2
   外壳原本就是 4×2；旧实现的问题是内部 UI 仍按约 1.5 行的自然高度堆在顶部，视觉上没有占满两行。
   这里不改逻辑网格，只让头像、文字层级、周历行和纵向分布共同吃满真实 4×2 高度。 */
.home-ref-week-calendar{
  height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;
  gap:clamp(14px,calc(var(--home-grid-row-cell) * .16),18px);
  padding:clamp(9px,calc(var(--home-grid-row-cell) * .11),12px) clamp(7px,calc(var(--home-grid-cell) * .10),10px) clamp(10px,calc(var(--home-grid-row-cell) * .12),13px);
}
.home-ref-week-head{
  align-self:center;display:grid;grid-template-columns:clamp(60px,calc(var(--home-grid-cell) * .80),66px) minmax(0,1fr);
  gap:clamp(11px,calc(var(--home-grid-cell) * .15),14px);align-items:center;min-width:0;
}
.home-ref-week-avatar{
  width:clamp(60px,calc(var(--home-grid-cell) * .80),66px);height:clamp(60px,calc(var(--home-grid-cell) * .80),66px);
  border-radius:clamp(14px,calc(var(--home-grid-cell) * .20),17px);
}
.home-ref-week-copy{min-width:0;display:flex;flex-direction:column;gap:clamp(4px,calc(var(--home-grid-cell) * .06),6px)}
.home-ref-week-copy strong{font-size:clamp(17px,calc(var(--home-grid-cell) * .245),21px);font-weight:760;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-ref-week-copy span{font-size:clamp(11.5px,calc(var(--home-grid-cell) * .165),14px);line-height:1.28;color:var(--ref-muted);white-space:pre-wrap;word-break:break-word}
.home-ref-week-grid{
  align-self:end;width:100%;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));
  gap:clamp(3px,calc(var(--home-grid-cell) * .055),5px);align-items:end;
}
.home-ref-week-day{display:flex;flex-direction:column;align-items:center;gap:clamp(8px,calc(var(--home-grid-row-cell) * .09),10px);min-width:0}
.home-ref-week-day>span{font-size:clamp(10.5px,calc(var(--home-grid-cell) * .145),12px);line-height:1;color:var(--ref-muted)}
.home-ref-week-day>b{
  display:grid;place-items:center;width:min(100%,clamp(42px,calc(var(--home-grid-cell) * .56),48px));aspect-ratio:1;border-radius:50%;
  background:var(--ref-soft);font-size:clamp(12px,calc(var(--home-grid-cell) * .18),15px);font-weight:680;font-variant-numeric:tabular-nums;
}
.home-ref-week-day.is-today>b{background:color-mix(in srgb,var(--ref-accent) 18%,var(--ref-soft));color:var(--ref-accent)}



/* 状态总栏 · 4×2 / 4×4：头像/周历独立在上，下面是一整块圆角状态外壳；4×4 的三张媒体完整落在外壳底部。 */
.home-ref-status-overview{
  height:100%;min-height:0;display:grid;grid-template-rows:64px minmax(0,1fr);gap:8px;
  padding:6px 6px 8px;background:transparent;
}
.home-ref-status-meta{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:11px;min-width:0}
.home-ref-status-avatar-wrap{position:relative;width:54px;height:54px}
.home-ref-status-avatar{width:54px;height:54px;border-radius:50%}
.home-ref-status-avatar-badge{position:absolute;right:-2px;bottom:-2px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--ref-text);color:var(--ref-surface);font-size:8px}
.home-ref-status-profile-copy{min-width:0;display:grid;gap:7px}
.home-ref-status-name-row{display:flex;align-items:center;gap:6px;min-width:0}
.home-ref-status-name-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px;font-weight:820;line-height:1}
.home-ref-status-name-row span{flex:0 0 auto;display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--ref-text);color:var(--ref-surface);font-size:8px}
.home-ref-status-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;min-width:0}
.home-ref-status-day{display:grid;justify-items:center;gap:3px;min-width:0;color:var(--ref-muted)}
.home-ref-status-day span{font-size:8px;line-height:1;font-weight:640}
.home-ref-status-day b{font-size:11px;line-height:1;font-weight:720}
.home-ref-status-day.is-today b{display:grid;place-items:center;min-width:18px;height:18px;padding:0 3px;border-radius:999px;background:var(--ref-surface);color:var(--ref-text)}
.home-ref-status-panel{
  min-height:0;display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:9px;padding:10px 10px 10px 8px;
  border-radius:24px;background:color-mix(in srgb,var(--ref-surface) 84%,var(--ref-soft) 16%);overflow:hidden;
}
.home-ref-status-rail{position:relative;min-width:36px;min-height:0}
.home-ref-status-rail-line{position:absolute;left:50%;top:17px;bottom:5px;width:2px;transform:translateX(-50%);background:color-mix(in srgb,var(--ref-muted) 17%,transparent)}
.home-ref-status-rail-button{position:absolute;z-index:1;left:50%;width:30px;height:30px;transform:translateX(-50%);border-radius:50%;display:grid;place-items:center;background:var(--ref-surface);color:var(--ref-muted);font-size:12px}
.home-ref-status-rail-button:nth-child(2){top:0}
.home-ref-status-rail-button:nth-child(3){top:38px}
.home-ref-status-content{min-width:0;display:grid;grid-template-rows:30px minmax(0,1fr);row-gap:6px}
.home-ref-status-row{min-width:0;display:grid;align-items:center;column-gap:7px}
.home-ref-status-row.is-listening{grid-template-columns:minmax(0,1fr) auto auto}
.home-ref-status-row.is-weather{grid-template-columns:minmax(76px,.86fr) minmax(0,1.14fr) 30px}
.home-ref-status-copy{min-width:0;display:flex;align-items:baseline;gap:4px;overflow:hidden}
.home-ref-status-copy span{flex:0 0 auto;color:var(--ref-muted);font-size:9px;font-weight:700}
.home-ref-status-copy strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:800}
.home-ref-status-row time{font-size:9px;color:var(--ref-muted);font-weight:700;white-space:nowrap}
.home-ref-status-check{font-size:17px;color:var(--ref-text)}
.home-ref-status-weather-copy{min-width:0;display:grid;gap:4px;align-content:center}
.home-ref-status-weather-copy>span{display:flex;align-items:center;gap:4px;min-width:0;color:var(--ref-muted)}
.home-ref-status-weather-copy>span i{font-size:9px}
.home-ref-status-weather-copy b,.home-ref-status-weather-copy strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-ref-status-weather-copy b{font-size:9px;font-weight:700}
.home-ref-status-weather-copy strong{font-size:11px;font-weight:820}
.home-ref-status-media-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:center;min-width:0}
.home-ref-status-media{width:100%;aspect-ratio:1;border-radius:8px;min-width:0}
.home-ref-status-now{display:grid;justify-items:center;align-content:center;gap:2px;color:var(--ref-muted)}
.home-ref-status-now span{font-size:8px;font-weight:700;line-height:1}
.home-ref-status-now i{width:18px;height:18px;border:2px solid currentColor;border-radius:50%}

.home-ref-status-overview.is-large{grid-template-rows:90px minmax(0,1fr);gap:7px;padding:7px 7px 8px}
.home-ref-status-overview.is-large .home-ref-status-meta{grid-template-columns:78px minmax(0,1fr);gap:14px}
.home-ref-status-overview.is-large .home-ref-status-avatar-wrap,.home-ref-status-overview.is-large .home-ref-status-avatar{width:78px;height:78px}
.home-ref-status-overview.is-large .home-ref-status-avatar-badge{width:24px;height:24px;font-size:10px}
.home-ref-status-overview.is-large .home-ref-status-profile-copy{gap:8px}
.home-ref-status-overview.is-large .home-ref-status-name-row strong{font-size:24px}
.home-ref-status-overview.is-large .home-ref-status-week{gap:5px}
.home-ref-status-overview.is-large .home-ref-status-day span{font-size:10px}
.home-ref-status-overview.is-large .home-ref-status-day b{font-size:14px}
.home-ref-status-overview.is-large .home-ref-status-day.is-today b{min-width:22px;height:22px}
.home-ref-status-overview.is-large .home-ref-status-panel{grid-template-columns:48px minmax(0,1fr);column-gap:9px;padding:12px 12px 11px 8px;border-radius:28px}
.home-ref-status-overview.is-large .home-ref-status-rail{min-width:48px}
.home-ref-status-overview.is-large .home-ref-status-rail-line{top:38px;bottom:8px}
.home-ref-status-overview.is-large .home-ref-status-rail-button{width:41px;height:41px;font-size:15px}
.home-ref-status-overview.is-large .home-ref-status-rail-button:nth-child(2){top:0}
.home-ref-status-overview.is-large .home-ref-status-rail-button:nth-child(3){top:84px}
.home-ref-status-overview.is-large .home-ref-status-content{grid-template-rows:52px minmax(0,1fr);row-gap:7px}
.home-ref-status-overview.is-large .home-ref-status-row{column-gap:8px}
.home-ref-status-overview.is-large .home-ref-status-copy span,.home-ref-status-overview.is-large .home-ref-status-row time{font-size:12px}
.home-ref-status-overview.is-large .home-ref-status-copy strong{font-size:15px}
.home-ref-status-overview.is-large .home-ref-status-check{font-size:22px}
.home-ref-status-overview.is-large .home-ref-status-row.is-weather{grid-template-columns:minmax(0,1fr) 46px;grid-template-rows:auto minmax(0,1fr);grid-template-areas:"weather now" "media media";column-gap:8px;row-gap:7px;align-items:start;min-height:0}
.home-ref-status-overview.is-large .home-ref-status-weather-copy{grid-area:weather;gap:5px;align-self:start;padding-top:1px}
.home-ref-status-overview.is-large .home-ref-status-weather-copy b{font-size:12px}
.home-ref-status-overview.is-large .home-ref-status-weather-copy strong{font-size:15px}
.home-ref-status-overview.is-large .home-ref-status-now{grid-area:now;align-self:start;padding-top:2px;gap:3px}
.home-ref-status-overview.is-large .home-ref-status-now span{font-size:10px}
.home-ref-status-overview.is-large .home-ref-status-now i{width:24px;height:24px}
.home-ref-status-overview.is-large .home-ref-status-media-strip{grid-area:media;align-self:end;justify-self:stretch;width:100%;min-width:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.home-ref-status-overview.is-large .home-ref-status-media{width:100%;height:auto;aspect-ratio:1;border-radius:11px}

/* 恋爱天数 · 4×2 */
.home-ref-love-days{height:100%;min-height:0;padding:7px;background:transparent}
.home-ref-love-shell{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;padding:18px 20px 14px;border-radius:34px;background:color-mix(in srgb,var(--ref-surface) 82%,var(--ref-soft) 18%);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--ref-surface) 92%,var(--ref-muted) 8%)}
.home-ref-love-top{display:grid;grid-template-columns:62px 18px minmax(0,1fr) 18px 62px;align-items:center;gap:10px;padding:8px 12px;border-radius:999px;background:color-mix(in srgb,var(--ref-surface) 90%,var(--ref-soft) 10%)}
.home-ref-love-media{width:62px;height:62px;border-radius:14px}
.home-ref-love-heart{display:grid;place-items:center;color:var(--ref-muted);font-size:13px}
.home-ref-love-copy{min-width:0;display:grid;justify-items:center;gap:4px;text-align:center}.home-ref-love-copy strong,.home-ref-love-copy b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-love-copy strong{font-size:14px;font-weight:780}.home-ref-love-copy b{font-size:18px;font-weight:850}
.home-ref-love-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;align-items:end}.home-ref-love-day{display:grid;justify-items:center;gap:10px;color:var(--ref-text)}.home-ref-love-day span{font-size:10px;font-weight:700}.home-ref-love-day b{font-size:16px;font-weight:820;line-height:1}.home-ref-love-day.is-today b{display:grid;place-items:center;min-width:34px;height:28px;padding:0 8px;border-radius:999px;background:color-mix(in srgb,var(--ref-muted) 42%,var(--ref-surface) 58%)}

/* 动态帖子 · 4×2 */
.home-ref-social-post{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:12px;padding:14px 16px;border-radius:30px;background:var(--ref-surface)}
.home-ref-post-head{display:grid;grid-template-columns:60px minmax(0,1fr) auto;align-items:center;gap:12px}.home-ref-post-avatar{width:60px;height:60px;border-radius:50%}.home-ref-post-meta{min-width:0;display:grid;gap:5px}.home-ref-post-name-row{display:flex;align-items:center;gap:8px;min-width:0}.home-ref-post-name-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;font-weight:800}.home-ref-post-name-row i{color:var(--ref-accent);font-size:20px}.home-ref-post-meta span{font-size:11px;color:var(--ref-accent);font-weight:700}.home-ref-post-head button{border:0;background:transparent;color:var(--ref-muted);font-size:26px;line-height:1;padding:0}
.home-ref-post-body{min-width:0;display:grid;align-content:start;gap:12px}.home-ref-post-body strong{font-size:16px;line-height:1.35;font-weight:680;white-space:pre-wrap;word-break:break-word}.home-ref-post-body span{font-size:12px;color:var(--ref-accent);font-weight:650}
.home-ref-post-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding-top:3px}.home-ref-post-actions div{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;font-weight:700;color:var(--ref-text)}.home-ref-post-actions i{font-size:18px}

/* 主页数据卡 · 4×2 */
.home-ref-my-story{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:11px;padding:12px 12px 14px;border-radius:26px;background:var(--ref-surface)}
.home-ref-story-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.home-ref-story-head strong{font-size:17px;font-weight:820}.home-ref-story-head span{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:var(--ref-soft);color:var(--ref-muted);font-size:18px}
.home-ref-story-body{min-height:0;display:grid;grid-template-columns:1.18fr repeat(3,minmax(0,.82fr));grid-template-rows:1fr auto;gap:6px}.home-ref-story-hero{grid-row:1 / span 2;width:100%;height:100%;border-radius:18px}.home-ref-story-stat,.home-ref-story-edit{background:var(--ref-surface);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ref-muted) 16%,transparent)}
.home-ref-story-stat{display:grid;place-items:center;align-content:center;gap:4px;border-radius:4px;padding:8px 6px;text-align:center}.home-ref-story-stat b{font-size:18px;font-weight:850;line-height:1}.home-ref-story-stat span{font-size:10px;color:var(--ref-muted);font-weight:700}
.home-ref-story-edit{grid-column:2 / span 3;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 16px;border-radius:0 0 18px 18px;font-size:14px;font-weight:800;color:var(--ref-muted)}.home-ref-story-edit span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* iMessage 对话 · 4×2 */
.home-ref-imessage-chat{height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:10px;padding:12px 14px;border-radius:26px;background:var(--ref-surface)}
.home-ref-imessage-top{display:grid;grid-template-columns:72px minmax(0,1fr) 164px;align-items:end;gap:12px}.home-ref-imessage-sticker{width:72px;height:72px;border-radius:16px 16px 16px 8px;position:relative}.home-ref-imessage-sticker::after{content:"";position:absolute;left:12px;bottom:-10px;width:18px;height:18px;background:inherit;clip-path:polygon(50% 0,100% 100%,0 100%)}
.home-ref-imessage-title{min-width:0;display:grid;gap:4px;padding-bottom:8px}.home-ref-imessage-title strong{font-size:16px;font-weight:820}.home-ref-imessage-title span{font-size:11px;color:var(--ref-muted);font-weight:700}
.home-ref-imessage-music{min-width:0;display:grid;grid-template-columns:52px minmax(0,1fr) 22px;align-items:center;gap:9px;padding:9px 10px;border-radius:14px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ref-muted) 16%,transparent)}.home-ref-imessage-cover{width:52px;height:52px;border-radius:4px}.home-ref-imessage-music-copy{min-width:0;display:grid;gap:3px}.home-ref-imessage-music-copy strong,.home-ref-imessage-music-copy span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-imessage-music-copy strong{font-size:11px;font-weight:800}.home-ref-imessage-music-copy span{font-size:10px;font-weight:700;color:var(--ref-muted)}.home-ref-imessage-music i{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;border:2px solid var(--ref-muted);color:var(--ref-muted);font-size:8px}
.home-ref-imessage-bubble{justify-self:start;max-width:55%;padding:10px 18px;border-radius:12px;background:color-mix(in srgb,var(--ref-soft) 86%,var(--ref-surface) 14%);font-size:14px;font-weight:700;color:var(--ref-text)}
.home-ref-imessage-input{align-self:end;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border-radius:999px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ref-muted) 18%,transparent);color:var(--ref-muted)}.home-ref-imessage-input span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700}.home-ref-imessage-input i{font-size:22px}

/* 验证面板 · 2×2 */
.home-ref-human-verification{height:100%;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:11px 11px 12px;border-radius:20px;background:var(--ref-surface)}
.home-ref-human-verification>strong{font-size:13px;font-weight:560;color:var(--ref-muted)}
.home-ref-verify-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--ref-accent);font-size:9px;font-weight:700}.home-ref-verify-links span+span::before{content:"|";margin-right:6px;color:var(--ref-accent)}
.home-ref-verify-media{width:100%;height:100%;border-radius:0}
.home-ref-verify-input{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:7px 9px;border-radius:4px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ref-muted) 22%,transparent);color:var(--ref-muted)}.home-ref-verify-input span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:700}.home-ref-verify-input i{font-size:12px}

/* 资料卡片 · 4×2 */
.home-ref-info-gallery{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);padding:clamp(9px,calc(var(--home-grid-cell) * .12),12px);border-radius:clamp(18px,calc(var(--home-grid-cell) * .25),24px);background:var(--ref-surface)}
.home-ref-info-tabs{display:grid;grid-template-columns:auto auto auto auto 1fr;align-items:center;gap:clamp(8px,calc(var(--home-grid-cell) * .11),12px);min-width:0;padding-bottom:clamp(7px,calc(var(--home-grid-cell) * .09),10px)}.home-ref-info-tabs button{width:22px;height:22px;border:0;border-radius:50%;background:var(--ref-soft);color:var(--ref-muted);font-size:16px;line-height:1}.home-ref-info-tabs strong,.home-ref-info-tabs span{font-size:clamp(10px,calc(var(--home-grid-cell) * .14),13px);white-space:nowrap}.home-ref-info-tabs strong{font-weight:780}.home-ref-info-tabs span{color:var(--ref-muted);font-weight:650}
.home-ref-info-body{min-height:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:clamp(8px,calc(var(--home-grid-cell) * .11),12px)}.home-ref-info-media-grid{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(5px,calc(var(--home-grid-cell) * .07),7px);align-items:center}.home-ref-info-media{width:100%;aspect-ratio:1;border-radius:clamp(9px,calc(var(--home-grid-cell) * .13),12px)}.home-ref-info-copy{min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:6px;padding-block:2px}.home-ref-info-copy strong{font-size:clamp(9px,calc(var(--home-grid-cell) * .13),12px);line-height:1.24;font-weight:680;white-space:pre-wrap;word-break:break-word;overflow:hidden}.home-ref-info-copy span{font-size:clamp(7.5px,calc(var(--home-grid-cell) * .105),9.5px);color:var(--ref-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}

/* 收藏资料 · 4×2：头图头像改为正方形圆角头像，恢复与参考一致的顶部结构。 */
.home-ref-collection-profile{height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;border-radius:clamp(20px,calc(var(--home-grid-cell) * .28),26px);background:var(--ref-surface);overflow:hidden}
.home-ref-collection-head{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(10px,calc(var(--home-grid-cell) * .13),14px);padding:clamp(12px,calc(var(--home-grid-cell) * .16),16px)}
.home-ref-collection-avatar-wrap{position:relative;width:max-content}.home-ref-collection-avatar{width:clamp(54px,calc(var(--home-grid-cell) * .72),64px);height:clamp(54px,calc(var(--home-grid-cell) * .72),64px);border-radius:clamp(14px,calc(var(--home-grid-cell) * .18),16px)}.home-ref-collection-avatar-badge{position:absolute;right:-3px;bottom:-3px;width:clamp(18px,calc(var(--home-grid-cell) * .24),21px);height:clamp(18px,calc(var(--home-grid-cell) * .24),21px);border-radius:50%;display:grid;place-items:center;background:var(--ref-text);color:var(--ref-surface);font-size:clamp(8px,calc(var(--home-grid-cell) * .11),10px)}
.home-ref-collection-copy{min-width:0;display:grid;gap:5px}.home-ref-collection-copy strong,.home-ref-collection-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-collection-copy strong{font-size:clamp(17px,calc(var(--home-grid-cell) * .24),21px);font-weight:810}.home-ref-collection-copy span{font-size:clamp(10px,calc(var(--home-grid-cell) * .14),12px);font-weight:670;color:var(--ref-muted)}.home-ref-collection-follow{min-width:clamp(70px,calc(var(--home-grid-cell) * .9),86px);padding:8px 12px;border-radius:999px;background:var(--ref-soft);font-size:clamp(10px,calc(var(--home-grid-cell) * .14),12px);font-weight:760;text-align:center;color:var(--ref-muted)}
.home-ref-collection-orbs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:clamp(7px,calc(var(--home-grid-cell) * .10),10px);padding:clamp(10px,calc(var(--home-grid-cell) * .13),13px) clamp(13px,calc(var(--home-grid-cell) * .17),17px);border-top:1px solid color-mix(in srgb,var(--ref-muted) 13%,transparent)}.home-ref-collection-orb,.home-ref-collection-add{width:100%;aspect-ratio:1;border-radius:50%}.home-ref-collection-orb{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ref-muted) 18%,transparent)}.home-ref-collection-add{display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--ref-muted) 48%,transparent);color:color-mix(in srgb,var(--ref-muted) 58%,transparent);font-size:clamp(22px,calc(var(--home-grid-cell) * .3),28px);font-weight:300}

/* 登录面板 · 2×2 */
.home-ref-login-panel{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:clamp(6px,calc(var(--home-grid-cell) * .08),8px);padding:clamp(8px,calc(var(--home-grid-cell) * .11),11px);background:transparent}
.home-ref-login-top{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:6px}.home-ref-login-tabs{display:flex;align-items:center;gap:3px;align-self:end}.home-ref-login-tabs strong,.home-ref-login-tabs span{padding:5px 7px;border-radius:5px;background:var(--ref-surface);font-size:clamp(7.5px,calc(var(--home-grid-cell) * .1),9px);white-space:nowrap}.home-ref-login-tabs strong{font-weight:760}.home-ref-login-tabs span{font-weight:650;color:var(--ref-muted)}.home-ref-login-mini{display:grid;justify-items:center;gap:2px;min-width:0}.home-ref-login-mini>span{max-width:58px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:3px 6px;border-radius:5px;background:var(--ref-surface);font-size:7px}.home-ref-login-mini-media{width:clamp(38px,calc(var(--home-grid-cell) * .5),46px);height:clamp(38px,calc(var(--home-grid-cell) * .5),46px);border-radius:6px}
.home-ref-login-form{min-height:0;display:grid;align-content:start;gap:clamp(4px,calc(var(--home-grid-cell) * .055),6px);padding:clamp(8px,calc(var(--home-grid-cell) * .11),11px);border-radius:6px;background:var(--ref-surface)}.home-ref-login-form>strong{font-size:clamp(8px,calc(var(--home-grid-cell) * .11),10px);font-weight:760}.home-ref-login-field{min-width:0;padding:5px 7px;border:1px solid color-mix(in srgb,var(--ref-muted) 34%,transparent);border-radius:3px;font-size:clamp(7.5px,calc(var(--home-grid-cell) * .1),9px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-login-form>span{font-size:clamp(6.5px,calc(var(--home-grid-cell) * .085),8px);color:var(--ref-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-ref-login-form>b{justify-self:start;padding:6px 9px;border-radius:4px;background:var(--ref-text);color:var(--ref-surface);font-size:clamp(7px,calc(var(--home-grid-cell) * .09),8.5px);font-weight:700}

/* 想法记录 · 4×2 */
.home-ref-thought-composer{height:100%;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:clamp(8px,calc(var(--home-grid-cell) * .11),12px);padding:clamp(8px,calc(var(--home-grid-cell) * .11),11px);background:transparent}
.home-ref-thought-card{min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(9px,calc(var(--home-grid-cell) * .12),12px);padding:clamp(9px,calc(var(--home-grid-cell) * .12),12px);border-radius:clamp(15px,calc(var(--home-grid-cell) * .21),20px);background:var(--ref-surface)}.home-ref-thought-media{width:clamp(58px,calc(var(--home-grid-cell) * .78),70px);height:clamp(58px,calc(var(--home-grid-cell) * .78),70px);border-radius:clamp(8px,calc(var(--home-grid-cell) * .11),11px)}.home-ref-thought-copy{min-width:0;display:grid;gap:3px}.home-ref-thought-copy strong,.home-ref-thought-copy span,.home-ref-thought-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-ref-thought-copy strong{font-size:clamp(14px,calc(var(--home-grid-cell) * .2),18px);font-weight:800}.home-ref-thought-copy span{font-size:clamp(11px,calc(var(--home-grid-cell) * .15),13px);font-weight:650}.home-ref-thought-copy small{font-size:clamp(8px,calc(var(--home-grid-cell) * .11),10px);color:var(--ref-muted)}.home-ref-thought-card>i{align-self:start;color:var(--ref-muted);font-size:clamp(16px,calc(var(--home-grid-cell) * .22),20px)}
.home-ref-thought-input{min-width:0;min-height:clamp(42px,calc(var(--home-grid-row-cell) * .45),52px);display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 clamp(12px,calc(var(--home-grid-cell) * .16),16px);border-radius:clamp(12px,calc(var(--home-grid-cell) * .17),16px);background:var(--ref-surface)}.home-ref-thought-input span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ref-muted);font-size:clamp(11px,calc(var(--home-grid-cell) * .15),14px);font-weight:600}.home-ref-thought-input i{flex:0 0 auto;color:var(--ref-accent);font-size:clamp(20px,calc(var(--home-grid-cell) * .27),24px)}
/* 移动布局编辑态：媒体槽上传，文字槽原位编辑；组件本体不新增第二套编辑逻辑。 */
.is-home-editing .home-widget[data-widget^="ref-"]>.home-ref-preset{pointer-events:auto}
.is-home-editing .home-widget[data-widget^="ref-"] [data-home-media-slot],
.is-home-editing .home-widget[data-widget^="ref-"] [data-home-text-slot]{pointer-events:auto;touch-action:manipulation}
.is-home-editing .home-widget[data-widget^="ref-"] [data-home-media-slot]{cursor:pointer}
.is-home-editing .home-widget[data-widget^="ref-"] [data-home-text-slot]{cursor:text;-webkit-user-select:text;user-select:text}

/* 组件库预览继续使用设计原比例；主屏实例使用真实 4×2 逻辑高度。 */
.home-component-library-render > .home-o3o-memory-gallery { height:auto; aspect-ratio:320/178; }

/* 相机相框 · 2×2
   PNG 相机本体始终在上层；用户图片仅铺在透明 LCD 窗口下层。组件库和主屏都保持 PNG 原始 1:1 比例，禁止把屏幕槽按 2×2 逻辑矩形拉伸。 */
.home-ref-camera-frame{
  position:relative;width:100%;height:100%;min-width:0;min-height:0;
  display:flex;align-items:center;justify-content:center;overflow:visible;background:transparent;
}
.home-ref-camera-stage{
  position:relative;flex:0 0 auto;width:100%;height:auto;aspect-ratio:1 / 1;max-width:100%;max-height:100%;overflow:visible;
}
.home-ref-camera-photo{
  position:absolute;z-index:1;left:21.13%;top:30.22%;width:54.47%;height:39.95%;
  border-radius:3.2% / 4.4%;background:var(--home-widget-placeholder-bg);background-position:center;background-repeat:no-repeat;background-size:cover;overflow:hidden;
}
.home-ref-camera-png-frame{
  position:absolute;z-index:2;inset:0;width:100%;height:100%;display:block;pointer-events:none;user-select:none;-webkit-user-drag:none;
}

