/* Stable demo viewport: one responsive 402:874 6.3-inch-class phone, one coordinate system. */
.demo-stage{
  display:grid!important;
  place-items:center!important;
  width:100vw!important;
  height:100vh!important;
  min-height:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#f4f3ed!important;
}
.product-note{display:none!important}
.phone-frame{
  width:auto!important;
  height:min(874px,calc(100vh - 24px),calc(217.413vw - 52.179px))!important;
  max-width:none!important;
  aspect-ratio:402/874!important;
  transform:none!important;
  border:4px solid #2b2d33!important;
  border-radius:42px!important;
  box-shadow:9px 12px 0 rgba(75,82,101,.13),0 30px 70px rgba(70,78,102,.2)!important;
}
.welcome-splash{
  left:var(--phone-center-x,50%)!important;
  top:var(--phone-center-y,50%)!important;
  width:var(--phone-inner-width,382px)!important;
  height:var(--phone-inner-height,812px)!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  scale:1!important;
  border-radius:38px!important;
  box-shadow:none!important;
}
.welcome-splash::backdrop,
.companion-picker-dialog::backdrop,
.planet-arrival-dialog::backdrop,
.dog-ready-dialog::backdrop,
.first-goal-satellite-dialog::backdrop{
  background:transparent!important;
  backdrop-filter:none!important;
}
.companion-picker-dialog,
.planet-arrival-dialog,
.dog-ready-dialog,
.first-goal-satellite-dialog,
.mood-checkin-dialog{
  left:var(--phone-center-x,50%)!important;
  max-width:var(--phone-inner-width,382px)!important;
  scale:1!important;
}
.journey-dialog{
  left:var(--phone-center-x,50%)!important;
  top:var(--phone-center-y,50%)!important;
  width:min(330px,calc(var(--phone-inner-width,382px) - 24px))!important;
  max-width:none!important;
  max-height:calc(var(--phone-inner-height,812px) - 32px)!important;
  margin:0!important;
  overflow-y:auto!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:center!important;
  scale:1!important;
}
.companion-picker-dialog:not([data-step="dog"]){
  top:var(--phone-center-y,50%)!important;
  transform:translate(-50%,-50%)!important;
}
.companion-picker-dialog[data-step="name"]{
  width:var(--phone-inner-width,382px)!important;
  height:var(--phone-inner-height,812px)!important;
  max-width:none!important;
  max-height:none!important;
  padding:64px 24px 38px!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:38px!important;
  background:#fffdf7!important;
  box-shadow:none!important;
}
.companion-picker-dialog[data-step="name"]::after{
  content:"";
  position:absolute;
  top:12px;
  left:50%;
  width:110px;
  height:28px;
  transform:translateX(-50%);
  border-radius:22px;
  background:#080b16;
}
.companion-picker-dialog[data-step="name"] .dialog-close,
.companion-picker-dialog[data-step="name"] .onboarding-progress{
  display:none!important;
}
.companion-picker-dialog[data-step="name"] #onboarding-name-step{
  display:flex!important;
  height:100%;
  flex-direction:column;
  justify-content:center;
  gap:22px;
}
.companion-picker-dialog[data-step="name"] .planet-name-field{
  width:100%;
  margin:0!important;
}
.companion-picker-dialog[data-step="name"] .primary-button{
  flex:0 0 auto;
}
.companion-picker-dialog[data-step="dog"]{
  top:var(--phone-dog-top,130px)!important;
  transform:translateX(-50%)!important;
}
.companion-picker-dialog[data-step="dog"] #onboarding-dog-step{
  display:flex!important;
  width:100%;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.companion-picker-dialog[data-step="dog"] .companion-carousel{
  width:100%;
}
.personal-view.is-onboarding-empty .planet-stage{
  height:520px!important;
}
.personal-view.is-onboarding-empty .planet-scene-art{
  bottom:-2px!important;
}
.planet-arrival-dialog,.dog-ready-dialog{
  top:var(--phone-arrival-top,330px)!important;
  transform:translateX(-50%)!important;
}
.first-goal-satellite-dialog{
  top:calc(var(--phone-orbit-top,68px) + 56px)!important;
  width:var(--phone-width,390px)!important;
  transform:translateX(-50%)!important;
}
.first-goal-category-orbit{
  height:218px!important;
}
.first-goal-category-orbit>svg,
.first-goal-satellite-rail{
  height:190px!important;
}
/* 弹窗宽度 = 手机内屏宽度：左右裁到手机框内，上下留空间给放大/阴影 */
.first-goal-satellite-rail{
  clip-path:inset(-120px 0 -120px 0);
}
.first-goal-satellite-rail button{
  width:96px!important;
  height:120px!important;
  grid-template-rows:88px 24px!important;
}
/* styles.css 里旧版横滑的 `.is-selected{transform:scale(1.08)}` 优先级更高，会吃掉 -50% 居中偏移 */
.first-goal-satellite-rail button,
.first-goal-satellite-rail button.is-selected{
  transform:translate3d(calc(-50% + var(--orbit-x)),var(--orbit-y),0) scale(var(--orbit-scale))!important;
}
.first-goal-satellite-rail button.is-selected{
  --orbit-x:0px;
  --orbit-y:8px;
  --orbit-scale:1;
}
.first-goal-satellite-rail button.is-previous{
  --orbit-x:-118px;
  --orbit-y:38px;
  --orbit-scale:.6;
}
.first-goal-satellite-rail button.is-next{
  --orbit-x:118px;
  --orbit-y:38px;
  --orbit-scale:.6;
}
.first-goal-satellite-rail button img{
  width:86px!important;
  height:86px!important;
  pointer-events:none!important;
  user-select:none!important;
  -webkit-user-drag:none!important;
}
.first-goal-satellite-rail button.is-selected img{
  width:86px!important;
  height:86px!important;
}
.first-goal-category-orbit:not(.is-dragging) .first-goal-satellite-rail button.is-selected{
  --orbit-x:0px!important;
  --orbit-y:8px!important;
  --orbit-scale:1!important;
}
.first-goal-category-orbit:not(.is-dragging) .first-goal-satellite-rail button.is-previous{
  --orbit-x:-118px!important;
  --orbit-y:38px!important;
  --orbit-scale:.6!important;
}
.first-goal-category-orbit:not(.is-dragging) .first-goal-satellite-rail button.is-next{
  --orbit-x:118px!important;
  --orbit-y:38px!important;
  --orbit-scale:.6!important;
}
.first-goal-orbit-arrow{
  top:104px!important;
}
/* 图片和文字尺寸固定，大小只由 --orbit-scale 决定，停下时不会再"跳大一点" */
.first-goal-satellite-rail button span,
.first-goal-satellite-rail button.is-selected span{
  font-size:11px!important;
}

/* Every popup belongs to the phone preview, never to the surrounding webpage. */
dialog::backdrop{
  background:transparent!important;
  backdrop-filter:none!important;
}
.phone-dialog-shade{
  position:absolute;
  z-index:130;
  inset:0;
  border-radius:38px;
  background:rgba(41,44,51,.42);
  backdrop-filter:blur(3px);
  pointer-events:none;
}
.phone-dialog-shade[hidden]{display:none!important}
.sheet-dialog:not(.goal-create-dialog),
.goal-confirm-dialog:not(.phone-confirm-card){
  left:var(--phone-center-x,50%)!important;
  top:var(--phone-center-y,50%)!important;
  width:min(340px,calc(var(--phone-inner-width,382px) - 28px))!important;
  max-width:none!important;
  max-height:calc(var(--phone-inner-height,812px) - 32px)!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:center!important;
  scale:1!important;
  overflow-y:auto!important;
}
.mood-checkin-dialog{
  top:var(--phone-center-y,50%)!important;
  width:min(350px,calc(var(--phone-inner-width,382px) - 24px))!important;
  max-height:calc(var(--phone-inner-height,812px) - 28px)!important;
  margin:0!important;
  overflow-y:auto!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:center!important;
}
.goal-confirm-dialog:not(.phone-confirm-card){
  width:min(320px,calc(var(--phone-inner-width,382px) - 42px))!important;
}

/* First created Goal is introduced inside the home scene, without a dialog card. */
.first-goal-home-guide{
  position:absolute;
  z-index:18;
  left:50%;
  top:156px;
  width:310px;
  margin:0;
  transform:translateX(-50%);
  color:#292c33;
  font:700 16px/1.5 FullSeto,SetoFont,"PingFang SC","Microsoft YaHei",sans-serif;
  text-align:center;
  pointer-events:none;
}
.first-goal-home-guide[hidden]{display:none!important}
.first-goal-home-guide span{color:#747985;font-size:12px;font-weight:400}
.personal-view[data-journey-stage="first-goal"] .selected-goal-card{display:none!important}
.phone-frame .personal-view[data-journey-stage="first-goal"] .home-create-goal{display:none!important}
.phone-frame .personal-view[data-journey-stage="first-goal"] .planet-stage.has-goals{height:520px!important}
.phone-frame .personal-view[data-journey-stage="first-goal"] .planet-stage.has-goals .swipe-hint.goal-orbit-deferred{display:none!important}
.phone-frame .personal-view .planet-stage.has-goals .orbit-arrow.goal-orbit-deferred[hidden]{display:none!important}
.phone-frame .personal-view .planet-stage.has-goals .goal-orbit-slider.goal-orbit-deferred[hidden]{display:none!important;pointer-events:none!important}

/* Space save returns to an in-scene mood prompt; the four moods use the same curved motion language as Goal satellites. */
.mood-home-guide{position:absolute;z-index:19;left:50%;top:252px;width:310px;padding:0;transform:translateX(-50%);border:0;background:transparent;color:#292c33;font:700 17px/1.45 FullSeto,SetoFont,"PingFang SC","Microsoft YaHei",sans-serif;text-align:center;cursor:pointer}
.mood-home-guide[hidden]{display:none!important}
.mood-home-guide span{display:block;margin-top:5px;color:#747985;font-size:12px;font-weight:400}
.personal-view[data-journey-stage="mood"] .mood-home-guide:after{content:"";display:block;width:34px;height:1px;margin:10px auto 0;background:#aeb5c0}
.mood-checkin-dialog .mood-arc-thumb{transform:translate(-50%,-50%) scale(var(--mood-scale,1))!important;transform-origin:center!important;transition:left .22s ease,top .22s ease,transform .22s ease!important}
.mood-checkin-dialog .mood-slider-labels.four{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin-top:-4px;text-align:center}
.mood-checkin-dialog .mood-slider-labels.four span{font-size:10px}
.mood-checkin-dialog .mood-custom-note[hidden]{display:none!important}
.mood-checkin-dialog .mood-arc-control>.arc-face,.mood-checkin-dialog .mood-arc-thumb{visibility:hidden}
.mood-checkin-dialog .mood-slider-labels.four{display:none}
.mood-orbit{position:absolute;z-index:4;inset:0;overflow:hidden;pointer-events:none}
.mood-orbit-item{position:absolute;left:var(--mood-item-x);top:var(--mood-item-y);display:grid;place-items:center;width:92px;transform:translateX(-50%) scale(var(--mood-item-scale));transform-origin:center top;opacity:.64;transition:left .24s ease,top .24s ease,transform .24s ease,opacity .24s ease}
.mood-orbit-item[hidden]{display:none!important}
.mood-orbit-item.is-selected{z-index:2;opacity:1}
.mood-orbit-item img{display:block;width:72px;height:68px;object-fit:contain;filter:drop-shadow(2px 3px 0 rgba(41,44,51,.12))}
.mood-orbit-item small{display:block;margin-top:0;padding:3px 8px;border:1px solid #aeb3bb;border-radius:99px;background:#fffdf8;color:#292c33;font-size:9px;font-weight:800;white-space:nowrap}
.mood-orbit-arrow{position:absolute;z-index:7;top:58px;display:grid;place-items:center;width:30px;height:30px;padding:0;border:1.5px solid #292c33;border-radius:50%;background:#fffdf8;color:#292c33;font-size:22px;line-height:1;box-shadow:2px 2px 0 rgba(41,44,51,.12);cursor:pointer}
.mood-orbit-arrow.is-prev{left:-4px}.mood-orbit-arrow.is-next{right:-4px}
.mood-checkin-dialog #mood-checkin-label{display:none!important}
.mood-checkin-dialog .mood-arc-control{height:180px;margin:20px 0 12px;touch-action:none;user-select:none;cursor:grab}
.mood-checkin-dialog .mood-arc-control:active{cursor:grabbing}
.mood-checkin-dialog .mood-arc-control svg{height:128px;top:0}
.mood-checkin-dialog .mood-arc-control path{stroke-width:2;stroke:#bac2c5;stroke-dasharray:5 6}
.mood-checkin-dialog .mood-orbit-item{transition:none!important;transform-origin:center;will-change:transform,left,top;pointer-events:none}
.mood-checkin-dialog .mood-orbit-item small{font-size:13px;padding:3px 8px}
.mood-checkin-dialog .mood-orbit-arrow{top:118px}
.mood-checkin-dialog #mood-slider{width:1px;height:1px;clip-path:inset(50%);pointer-events:none}
.mood-checkin-dialog .mood-extra-actions{display:block}
.mood-checkin-dialog .mood-extra-actions button{width:100%;font-size:16px;min-height:44px}
.mood-checkin-dialog [data-action="confirm-mood-checkin"]{font-size:18px}

/* Keep the home balance and settings aligned, including the non-button balance label. */
/* Temporarily simplify settings while preserving stored preferences. */
.phone-frame .profile-view{background:#f7f7f2!important;color:#292c33}
.profile-view .friend-code-card,.profile-view .add-friend-card,
.profile-view [data-action="open-companion-picker"],.profile-view [data-action="open-device"],
.profile-view .field-row:has(#profile-dog-name),.profile-view .field-row:has(#default-goal-visibility),
.profile-view .profile-section-title small{display:none!important}
.profile-view .paper-card,.profile-view .settings-list button{background:#fffefa;color:#292c33}
.profile-view .settings-list button>span{background:#dcebe4}
.profile-view .subbar p{color:#777b88}
.phone-frame .personal-view .planet-stage.has-goals #goal-orbit-slider{display:none!important;pointer-events:none!important}
.phone-frame #personal-orbit{touch-action:pan-y;user-select:none}
.phone-frame #personal-orbit img{-webkit-user-drag:none;pointer-events:none}
.handdrawn-home .top-actions{align-items:center;gap:8px;flex-shrink:0}
.handdrawn-home .top-actions .stardust-wallet{display:flex;align-items:center;justify-content:center;gap:4px;height:42px;min-width:60px;padding:0 11px;line-height:1;cursor:default}
.handdrawn-home .top-actions .stardust-wallet b{display:block;margin:0;line-height:1}
.handdrawn-home .top-actions .icon-button{width:42px;min-width:42px;height:42px;padding:0;align-items:center;justify-content:center;line-height:1}
/* Mood calendar shares the planet's paper, ink and soft accent palette. */
.phone-frame .mood-history-view{background:#f7f7f2!important;color:#292c33;--ink:#292c33}
.mood-history-view .subbar p,.mood-history-view .mood-history-intro{color:#777b88}
.mood-history-view .subbar h2{font-size:22px}
.mood-history-view .icon-button{display:flex;align-items:center;justify-content:center;background:#fffefa;color:#292c33}
.mood-history-view .mood-history-intro{font-size:12px;line-height:1.7;margin:12px 2px 16px}
.mood-history-view .mood-calendar,.mood-history-view .mood-history-stats article,.mood-history-view .mood-distribution,.mood-history-view .mood-history-list article{background:#fffefa;border-color:#292c33;box-shadow:2px 3px 0 rgba(41,44,51,.09)}
.mood-history-view .mood-calendar>header button{display:grid;place-items:center;padding:0;background:#f7f7f2;font-size:24px;line-height:1}
.mood-history-view .mood-calendar>header strong{font-size:17px}
.mood-history-view .mood-calendar-weekdays{margin-top:16px;color:#777b88;font-size:12px}
.mood-history-view .mood-calendar-grid button,.mood-history-view .mood-calendar-blank{min-height:40px}
.mood-history-view .mood-calendar-grid button{color:#292c33;font-size:13px}
.mood-history-view .mood-calendar-grid button.has-entry{background:#eaf0eb}
.mood-history-view .mood-calendar-grid button.is-selected{background:#dcebe4;outline:2px solid #292c33;outline-offset:-2px}
.mood-history-view .mood-calendar-grid button i[data-mood="cheerful"]{background:#b5b2ce}
.mood-history-view .mood-calendar-grid button i[data-mood="calm"]{background:#91b4a0}
.mood-history-view .mood-calendar-grid button i[data-mood="quiet"]{background:#8eabc1}
.mood-history-view .mood-history-stats strong{font-size:20px;text-align:center}
.mood-history-view .mood-history-stats span{color:#777b88;font-size:12px}
.mood-history-view .mood-distribution>div{grid-template-columns:70px 1fr 24px;font-size:12px}
.mood-history-view .mood-distribution i{background:#eeeee8;border-color:#c9ccc7}
.mood-history-view .mood-distribution b{min-width:0;background:#9ab4c9}
.mood-history-view .mood-distribution>div:nth-child(2) b{background:#a9c5b5}
.mood-history-view .mood-distribution>div:nth-child(3) b{background:#bcb9d3}
.mood-history-view .mood-distribution>div:nth-child(4) b{background:#c8b8aa}
.mood-history-view .mood-history-list-title{font-size:16px;margin:20px 2px 12px}
.mood-history-view .mood-history-face{background:#dcebe4}
.mood-history-view .mood-history-face[data-mood="quiet"]{background:#dce8f3}
.mood-history-view .mood-history-face[data-mood="thinking"],.mood-history-view .mood-history-face[data-mood="cheerful"]{background:#deddf0}
.mood-history-view .mood-history-list b{font-size:15px}
.mood-history-view .mood-history-list p{color:#565c63;font-size:12px;line-height:1.6}
.mood-history-view .mood-history-list small{color:#777b88;font-size:11px;white-space:normal;overflow-wrap:anywhere}
.mood-history-view .mood-history-list article>i{color:#777b88;font-size:10px}
.mood-history-view .empty-history{background:#fffefa;border-color:#d0d2cc;color:#777b88;font-size:13px;line-height:1.8}
.mood-history-view button:focus-visible{outline:2px solid #292c33;outline-offset:2px}
.first-goal-satellite-page .first-goal-category-description{
  width:min(300px,calc(100% - 48px));
  min-height:46px;
  margin:-18px auto 0;
  color:#626873;
  font-size:13px;
  line-height:1.75;
  text-align:center;
  text-wrap:balance;
}
.first-goal-satellite-page .satellite-picker-confirm{margin-top:18px}

/* Illustrated sky and ground share the viewport, while controls stay interactive. */
.phone-frame .personal-view{
  position:relative;
  isolation:isolate;
  background:#b5dcf5!important;
}
.planet-home-background{
  position:absolute;
  z-index:-1;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center bottom;
  pointer-events:none;
  user-select:none;
}
.phone-frame .personal-view .planet-scene-art,
.phone-frame .personal-view .ambient-stars{
  display:none!important;
}
.phone-frame .personal-view .planet-stage,
.phone-frame .personal-view.is-onboarding-empty .planet-stage,
.phone-frame .personal-view[data-journey-stage="first-goal"] .planet-stage.has-goals{
  height:calc(var(--phone-inner-height,812px) - 180px)!important;
}
.phone-frame .personal-view .personal-ground{
  bottom:75px;
}
.phone-frame .personal-view .home-create-goal{
  top:auto!important;
  bottom:8px;
  background:#fffdf0;
}
.phone-frame .personal-view .topbar{
  position:relative;
  z-index:20;
}
.phone-frame .personal-view .first-goal-home-guide,
.phone-frame .personal-view .mood-home-guide{
  color:#243c4c;
  text-shadow:0 1px 5px rgba(255,255,255,.9);
}
.phone-frame .personal-view .first-goal-home-guide span,
.phone-frame .personal-view .mood-home-guide span{
  color:#395364;
}

.phone-frame .personal-view .personal-ground .line-dog{
  width:174px!important;
  height:174px!important;
  top:0!important;
  filter:drop-shadow(0 5px 3px rgba(57,77,35,.18));
}
.companion-picker-dialog[data-step="dog"] .companion-art img{
  width:168px;
  height:154px;
  filter:drop-shadow(0 4px 2px rgba(57,77,35,.14));
}
.companion-picker-dialog[data-step="dog"] .companion-choice-grid>button{
  grid-template-rows:154px;
}
.companion-picker-dialog[data-step="dog"] #dog-default-name-note{
  display:none!important;
}
.personal-view .home-world-actions{
  grid-template-columns:minmax(0,240px);
  justify-content:center;
}
.personal-view .home-world-actions button{
  justify-content:center;
}
.share-dialog h2{margin:0 32px 12px 0;color:#292c33;font-size:20px}
.share-dialog #share-image-preview{
  display:block;
  width:100%;
  max-height:calc(var(--phone-inner-height,812px) - 210px);
  object-fit:contain;
  border-radius:14px;
}
.share-dialog #share-image-preview[hidden]{display:none}
.share-image-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.share-image-actions button{display:grid;place-items:center;min-height:46px;margin:0;padding:10px;border:2px solid #292c33;border-radius:99px;background:#fffdf7;color:#292c33;font-size:14px;cursor:pointer}
.share-image-actions .primary-button{background:#20231d;color:#fff}
.share-image-actions button:disabled{opacity:.45;cursor:wait}
