.layout-edit-button{height:30px;padding:0 11px;margin-right:8px;border-radius:16px;color:#747f88;font-size:11px;letter-spacing:.2px}.layout-edit-button[hidden],.layout-controls[hidden],.layout-widget-pop[hidden]{display:none}.layout-controls{display:flex;align-items:center;gap:6px;padding:2px 18px 8px;min-height:36px}.layout-controls button{border:0;border-radius:13px;background:#ffffffa8;color:#627e8b;font-size:11px;padding:7px 10px;white-space:nowrap}.layout-controls #layoutDone{background:#6f9fb1;color:#fff;font-weight:600}.layout-controls #layoutReset{color:#a98b84}.layout-controls span{flex:1;color:#8a999e;font-size:10px;text-align:center;line-height:1.3}.layout-widget-pop{position:absolute;top:76px;left:16px;right:16px;z-index:55;padding:15px;background:#fffffff2;border:1px solid #fff;border-radius:19px;box-shadow:0 12px 38px #344f5c25;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}.layout-pop-head{display:flex;align-items:center;justify-content:space-between;color:#485e69;font-size:14px}.layout-pop-head button{border:0;background:#eff5f6;color:#8da2aa;width:28px;height:28px;border-radius:50%;font-size:20px}.layout-widget-pop p{font-size:11px;color:#98a9ae;line-height:1.6}.layout-widget-row{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-top:1px solid #eef2f3;background:transparent;padding:11px 2px;color:#61767e;text-align:left;font-size:12px}.layout-widget-row i{font-style:normal;color:#77a4b4;font-size:11px}.home.is-layout-editing .lock-button{display:none}.home.is-layout-editing .toolbar{height:18px}.home.is-layout-editing .pages{touch-action:pan-y}.page.layout-grid-page{padding:8px 20px 20px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}.page.layout-grid-page> :not(.layout-grid){display:none!important}.layout-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 10px;align-content:start;align-items:center;min-height:100%;padding-bottom:16px}.layout-item{grid-column:span var(--layout-span,1);min-width:0;position:relative}.layout-item[hidden]{display:none}.layout-item .app{width:100%;min-height:78px}.layout-item .app-icon{width:min(58px,100%);aspect-ratio:1;height:auto}.layout-item .profile{padding:10px 0 4px}.layout-item .large-avatar{width:105px;height:105px}.layout-item .profile-name{margin:12px 0 8px;font-size:17px}.layout-item .pill{height:23px;min-width:62px}.layout-item .couple-area{padding:12px;background:#ffffff50;border:1px solid #ffffffa0;border-radius:18px;min-height:112px;box-sizing:border-box}.layout-item .small-avatar{width:40px;height:40px}.layout-item .couple-caption{font-size:10px;margin-top:8px}.layout-item .week{margin:0;padding:15px 10px;border:1px solid #ffffffa0;border-radius:18px;background:#ffffff50;min-height:112px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}.layout-item .week-title{font-size:8px}.layout-item .photo-stack{width:100%;height:auto;aspect-ratio:1;margin:0}.layout-item .photo-stack .front-photo,.layout-item .photo-stack .back-photo{width:100%;height:auto;aspect-ratio:1}.layout-item .dialogue{margin:0;padding:10px;background:#ffffff45;border:1px solid #ffffff90;border-radius:18px}.layout-item .dialogue-row{min-width:0}.layout-item .bubble{max-width:calc(100% - 52px)}.layout-dock{display:block!important}.layout-dock-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center}.layout-dock-items .layout-item .app{min-height:68px}.layout-dock-items .layout-item .app-icon{width:53px;height:49px}.layout-item-mark{display:none}.home.is-layout-editing .layout-item{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;animation:layoutWiggle 1.1s ease-in-out infinite alternate}.home.is-layout-editing .layout-item:nth-child(even){animation-delay:-.5s}.home.is-layout-editing .layout-item.is-selected{outline:2px solid #79b0c1;outline-offset:4px;border-radius:15px}.home.is-layout-editing .layout-item.is-dragging{opacity:.5;transform:scale(.95);animation:none}.home.is-layout-editing .layout-item-mark{position:absolute;display:grid;place-items:center;top:-6px;right:-3px;width:19px;height:19px;border-radius:50%;background:#fff;color:#7593a0;box-shadow:0 2px 8px #597b8b33;font-size:11px;z-index:3;pointer-events:none}.layout-page-drop,.layout-dock-drop{display:none}.home.is-layout-editing .layout-page-drop{display:block;grid-column:1/-1;border:1px dashed #a7c2ca;background:#ffffff5c;border-radius:13px;padding:10px;color:#91abb3;font-size:11px}.home.is-layout-editing .layout-dock-drop{display:block;width:44px;height:44px;border:1px dashed #a6bec6;background:#ffffff66;border-radius:14px;color:#87a2ac;font-size:22px;margin:auto}@keyframes layoutWiggle{from{rotate:-.5deg}to{rotate:.5deg}}@media(prefers-reduced-motion:reduce){.home.is-layout-editing .layout-item{animation:none}}
/* 自定义布局较长时可上下滑动；左右滑动仍由桌面分页处理。 */
.home.has-custom-layout .pages{touch-action:pan-y}
/* 编辑时明确显示换页入口，选中项目后可以一键移到另一页。 */
.layout-pagebar{display:flex;align-items:center;gap:8px;padding:0 18px 9px;min-height:38px}.layout-pagebar[hidden],#layoutMovePage[hidden]{display:none}.layout-page-tabs{display:inline-flex;padding:3px;gap:3px;background:#ffffff80;border:1px solid #ffffffb5;border-radius:14px}.layout-page-tabs button{border:0;background:transparent;color:#91a1a7;padding:6px 11px;font-size:11px;border-radius:10px}.layout-page-tabs button.is-active{background:#fff;color:#628798;box-shadow:0 2px 8px #66839116;font-weight:600}#layoutMovePage{margin-left:auto;border:0;border-radius:12px;background:#dceef4;color:#567f8f;font-size:11px;font-weight:600;padding:8px 11px}.layout-remove{display:none}.home.is-layout-editing .layout-remove{position:absolute;top:-8px;left:-5px;z-index:5;width:25px;height:25px;display:grid;place-items:center;padding:0;border:1px solid #fff;border-radius:50%;background:#f7fbfc;color:#668692;font-size:19px;line-height:1;box-shadow:0 2px 8px #597b8b33;touch-action:manipulation}.layout-widget-pop{top:113px}
/* 所有可移动组件预留自己的空间，照片叠层不会伸进相邻格子。 */
.layout-grid{align-items:start;gap:16px 12px}.layout-item{align-self:start}.layout-item .photo-stack{width:calc(100% - 28px);height:auto;aspect-ratio:1;margin:10px 14px 22px}.layout-item .photo-stack .back-photo{top:6px;left:6px;transform:rotate(4deg)}.layout-item .photo-stack .front-photo{transform:rotate(-3deg)}.layout-item .dialogue{width:100%;margin:0;padding:12px}.layout-item .couple-area{min-height:120px}.layout-item .couple-caption{width:100%;min-height:0;margin-top:8px;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.45}.layout-item .couple-caption .couple-days{font-size:12px;line-height:1.45}.layout-item .couple-caption .anniv-num{font-size:18px}
.layout-item .couple-caption .couple-pair{display:block;overflow-wrap:anywhere}.layout-item .couple-caption .couple-dayline{display:inline-block;word-break:keep-all}
/* 保留原本的大头像与照片观感，依靠格子留白避免相互遮挡。 */
.layout-edit-button{width:31px;height:31px;flex:0 0 31px;display:grid;place-items:center;padding:0;border-radius:50%;margin-right:8px;color:#7d9096}.layout-edit-button svg{width:17px;height:17px;stroke-width:1.45}.layout-item .large-avatar{width:min(147px,38vw);height:min(147px,38vw)}.layout-item .profile-name{margin:18px 0 11px;font-size:20px}.layout-item .pill{height:26px;min-width:74px}.layout-item .small-avatar{width:clamp(37px,12.5vw,51px);height:clamp(37px,12.5vw,51px)}.layout-item .photo-stack{width:92%;height:auto;aspect-ratio:1;margin:8px auto 20px}.layout-item .photo-stack .back-photo{top:4px;left:4px;transform:rotate(4deg)}.layout-item .photo-stack .front-photo{transform:rotate(-3deg)}

/* 手机上移首页内容，并为浏览器底部导航和安全区域留出空间。 */
@media (max-width:500px){
  .profile{padding-top:16px}
  .bottom{padding-bottom:calc(38px + env(safe-area-inset-bottom, 0px))}
  .page.layout-grid-page{padding-top:0}
  .layout-item .profile{padding-top:0}
}
@media (max-width:500px) and (max-height:740px){.profile{padding-top:4px}}
@media (max-width:500px) and (max-height:640px){.profile{padding-top:2px}}
