@import url("https://fonts.googleapis.com/css2?family=Schoolbell&display=swap");

:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.09);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.7);
  --line: rgba(255,255,255,0.12);
  --accent: #71d7ff;
  --accent2: #a8ff7a;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei";
  background: #ffffff;
  color: var(--text);
  overflow-x: hidden;
}

.topbar{
  position: relative;
  padding: 18px 22px;
  padding-right: 120px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.15);
}
.langBar{
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  z-index: 10;
}
.langBtn{
  appearance: none;
  min-width: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.langBtn:hover{
  background: rgba(255,255,255,0.1);
  color: var(--text);
}
.langBtn.active{
  border-color: rgba(113,215,255,0.45);
  background: rgba(113,215,255,0.12);
  color: var(--text);
}
.title{
  font-weight: 800;
  letter-spacing: 0.2px;
}
.hint{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.layout{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px;
}

.player{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 340px;
}
.player h2{
  margin: 0 0 10px 0;
  font-size: 18px;
}
.panel{
  padding: 10px 12px;
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  color: var(--muted);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.controls{
  margin-top: 12px;
}
.row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.maskInfo{
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(0,0,0,0.1);
}

.btnRow{
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.07);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover{
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
}
.btn:active{ transform: translateY(1px); }
.btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary{
  border-color: rgba(113,215,255,0.5);
  background: rgba(113,215,255,0.14);
}
.btn.ghost{
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--muted);
}

.editorWrap{
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(0,0,0,0.1);
  padding: 10px;
}
.editorCanvas{
  width: 320px;
  height: 320px;
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

.sliderGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.sliderLabel{
  color: var(--muted);
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.08);
  border-radius: 12px;
}
.sliderLabel input{ width: 100%; margin-top: 8px; }

.previewWrap{
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 12px;
}
.previewHeader{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
}
.previewCanvas{
  width: 320px;
  height: 320px;
  max-width: 100%;
  display: block;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(0,0,0,0.1);
}

.playerWorkArea{
  position: relative;
  margin-top: 10px;
  /* 与 icon/裁切预览边框.svg 的 viewBox、主圆角 rx 一致；换图时请同步 */
  --crop-frame-svg-w: 359;
  --crop-frame-svg-h: 485;
  --crop-frame-rx: 40;
}

/* 裁切页：无外层圆角卡片；滑轨/滑块为独立 SVG */
.playerWorkArea .playerCropScreen{
  width: 100%;
  max-width: min(520px, 100%);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.playerWorkArea .playerCropEditorPanel{
  border-radius: 0;
  border: none;
  background: #ffffff;
  padding: 0;
  box-shadow: none;
}
/* 裁切 / 预览：操作区与裁切预览边框.svg 同宽高比，叠层等比铺满不变形；rx=40 对应椭圆圆角裁剪 */
.playerWorkArea .playerCropFrameBox{
  position: relative;
  box-sizing: border-box;
  width: min(
    100%,
    96vw,
    398px,
    calc((100vh - 220px) * var(--crop-frame-svg-w) / var(--crop-frame-svg-h))
  );
  width: min(
    100%,
    96vw,
    398px,
    calc((100dvh - 220px) * var(--crop-frame-svg-w) / var(--crop-frame-svg-h))
  );
  max-width: 100%;
  aspect-ratio: var(--crop-frame-svg-w) / var(--crop-frame-svg-h);
  margin: 0 auto;
  line-height: 0;
  background: #ffffff;
  overflow: hidden;
  border-radius: calc(var(--crop-frame-rx) / var(--crop-frame-svg-w) * 100%)
    / calc(var(--crop-frame-rx) / var(--crop-frame-svg-h) * 100%);
  contain: paint;
}
.playerWorkArea .playerCropFrameBox .editorCanvas,
.playerWorkArea .playerCropFrameBox .previewCanvas{
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: none;
  border-radius: inherit;
  box-sizing: border-box;
}
.playerWorkArea .playerCropFrameEdge{
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  border-radius: inherit;
}
.playerWorkArea .cropSliderStack{
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.playerWorkArea .cropSliderRow{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}
.playerWorkArea .cropSliderCaption{
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  padding-left: 2px;
}
.playerWorkArea .cropSliderTrackWrap{
  width: 100%;
  padding: 0 2px;
  box-sizing: border-box;
}
.playerWorkArea .cropSliderInput{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.playerWorkArea .cropSliderInput:focus{
  outline: none;
}
.playerWorkArea .cropSliderInput:focus-visible{
  outline: 2px solid rgba(113, 215, 255, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}
.playerWorkArea .cropSliderInput--scale::-webkit-slider-runnable-track,
.playerWorkArea .cropSliderInput--rotate::-webkit-slider-runnable-track{
  height: 15px;
  border: none;
  border-radius: 3px;
}
.playerWorkArea .cropSliderInput--scale::-webkit-slider-runnable-track{
  background: url("./icon/调整图片大小滑轨.svg") center / 100% 100% no-repeat;
}
.playerWorkArea .cropSliderInput--rotate::-webkit-slider-runnable-track{
  background: url("./icon/调整图片旋转滑轨.svg") center / 100% 100% no-repeat;
}
.playerWorkArea .cropSliderInput::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -1px;
  border: none;
  border-radius: 0;
  background: url("./icon/调整图片滑块.svg") center / contain no-repeat;
  cursor: pointer;
  box-shadow: none;
}
.playerWorkArea .cropSliderInput--scale::-moz-range-track,
.playerWorkArea .cropSliderInput--rotate::-moz-range-track{
  height: 15px;
  border: none;
  border-radius: 3px;
}
.playerWorkArea .cropSliderInput--scale::-moz-range-track{
  background: url("./icon/调整图片大小滑轨.svg") center / 100% 100% no-repeat;
}
.playerWorkArea .cropSliderInput--rotate::-moz-range-track{
  background: url("./icon/调整图片旋转滑轨.svg") center / 100% 100% no-repeat;
}
.playerWorkArea .cropSliderInput::-moz-range-thumb{
  width: 17px;
  height: 17px;
  border: none;
  border-radius: 0;
  background: url("./icon/调整图片滑块.svg") center / contain no-repeat;
  cursor: pointer;
}
.playerWorkArea .cropSliderInput::-moz-range-progress{
  background: transparent;
}
.playerWorkArea .cropActionRow .btn{
  border-color: #333333;
}
.playerWorkArea .playerCropPreview{
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 51, 51, 0.18);
}
.playerWorkArea .playerCropPreview .previewHeader{
  color: #333333;
}
.playerWorkArea .playerCropPreview .btn.ghost{
  border-color: rgba(51, 51, 51, 0.35);
  color: #333333;
}
.playerWorkArea .playerCropPreview .playerCropFrameBox{
  margin-top: 0;
}
.playerWorkArea .playerCropPreview .previewCanvas{
  background: #ffffff;
}
.playerWorkArea .playerCropPlantBar{
  margin-top: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.playerWorkArea .btnRow--plant{
  justify-content: center;
  margin-top: 0;
}
.playerWorkArea .plantConfirmBtn{
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
  margin-inline: auto;
  border-radius: 0;
}
.playerWorkArea .plantConfirmBtn:hover{
  background: transparent;
  border: none;
}
.playerWorkArea .plantConfirmBtn:focus,
.playerWorkArea .plantConfirmBtn:focus-visible{
  outline: none;
}
.playerWorkArea .plantConfirmBtn:focus-visible{
  box-shadow: 0 0 0 2px rgba(113, 215, 255, 0.65);
}
.playerWorkArea .plantConfirmBtn:disabled{
  opacity: 0.45;
}
.playerWorkArea .plantConfirmBtnImg{
  display: block;
  width: 100%;
  max-width: min(372px, 100%);
  height: auto;
}
.playerWorkArea .playerCropCancelBtn{
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 0;
  width: auto;
}
.playerWorkArea .playerCropCancelIcon{
  width: min(100%, 208px);
  height: auto;
  display: block;
}

/* 完整照片揭晓：挂在 phoneOverlay 内，相对整屏手机居中（勿放在可滚动的 playerWorkArea 内） */
.unlockModalRoot{
  position: absolute;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  max-height: 100%;
}
.unlockModalRoot[hidden]{
  display: none !important;
}
.unlockModalBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.unlockModalDialog{
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(92%, 520px);
  max-height: min(96%, 780px);
  aspect-ratio: 357 / 636;
  height: auto;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: url("./icon/%E8%A7%A3%E9%94%81%E7%85%A7%E7%89%87%E5%BC%B9%E7%AA%97.svg?v=2");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 4.8% 3.8% 4.2%;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.unlockModalTitle{
  text-align: center;
  font-size: clamp(13px, 3.5vw, 15px);
  line-height: 1.25;
  margin: 0 0 0.28em;
  color: #222;
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
}
.unlockModalClose{
  position: absolute;
  top: 3%;
  right: 5.5%;
  width: 11%;
  min-width: 36px;
  max-width: 44px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: block;
  padding: 0;
}
.unlockModalClose:hover{
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
}
.unlockModalClose:focus-visible{
  outline: 2px solid #333;
  outline-offset: 2px;
  border-radius: 8px;
}
.unlockModalCanvas{
  display: block;
  width: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  aspect-ratio: 320 / 420;
  margin: 0 auto;
  transform: none;
  border-radius: 0;
  border: 0;
  background: transparent;
}

/* 首页点选未解锁植物：模糊全图 + 清晰碎片 + Unlock now */
.checkLockedModalRoot{
  position: absolute;
  inset: 0;
  /* 须高于 .mfTabsGlobal(220) 与 .phoneShell::before(300) 以下，避免弹窗被底栏挡住 */
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.checkLockedModalRoot[hidden]{
  display: none !important;
}
.checkLockedBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.checkLockedDialog{
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(92%, 520px);
  max-height: min(96%, 780px);
  aspect-ratio: 357 / 636;
  height: auto;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-image: url("./icon/%E8%A7%A3%E9%94%81%E7%85%A7%E7%89%87%E5%BC%B9%E7%AA%97.svg?v=2");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  padding: 4.8% 3.8% 4.2%;
  overflow: hidden;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.checkLockedTitle{
  text-align: center;
  font-size: clamp(13px, 3.5vw, 15px);
  line-height: 1.25;
  margin: 0 0 0.28em;
  color: #222;
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
}
.checkLockedClose{
  position: absolute;
  top: 3%;
  right: 5.5%;
  width: 11%;
  min-width: 36px;
  max-width: 44px;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: block;
  padding: 0;
}
.checkLockedClose:hover{
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
}
.checkLockedClose:focus-visible{
  outline: 2px solid #333;
  outline-offset: 2px;
  border-radius: 8px;
}
.checkLockedCanvas{
  display: block;
  width: 100%;
  max-width: 100%;
  flex: 1;
  min-height: 0;
  aspect-ratio: 320 / 420;
  margin: 0 auto;
  border-radius: 0;
  border: 0;
  background: transparent;
}
.checkLockedUnlockBtn{
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.checkLockedUnlockBtn:active{
  opacity: 0.92;
}
.checkLockedUnlockImg{
  display: block;
  width: 100%;
  height: auto;
}

.spaceWrap{
  padding: 0 14px 14px 14px;
}
.spaceWrap h2{
  margin: 12px 0 8px 0;
}
.spaceCanvas{
  width: 100%;
  height: min(52vh, 520px);
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b1220;
  display: block;
  touch-action: none;
  cursor: grab;
}
.spaceCanvas:active{
  cursor: grabbing;
}

.unlockWrap{
  padding: 0 14px 30px 14px;
}
.unlockWrap h2{
  margin: 12px 0 8px 0;
}
.unlockHintGlobal{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.08);
  border-radius: 14px;
  max-width: 900px;
}
.unlockHintGlobal strong{
  color: rgba(255,255,255,0.88);
}

.targetPick{
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px;
}
.targetTitle{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.targets{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: min(42vh, 380px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.target{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.08s ease;
}
.target:hover{ transform: translateY(-1px); }
.target.selected{
  border-color: rgba(113,215,255,0.55);
}
.targetLabel{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}
.targetCanvas{
  width: 110px;
  height: 110px;
  border-radius: 10px;
  display: block;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.1);
}

.footer{
  padding: 0 14px 24px 14px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

/* 留言板：固定右下角，可收起 */
.messageBoard{
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: min(300px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  z-index: 1000;
  padding: 12px;
  border-radius: 14px;
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  transition: max-height 0.2s ease, padding 0.2s ease, width 0.2s ease;
}
.messageBoard.collapsed{
  max-height: none;
  width: auto;
  min-width: min(200px, calc(100vw - 32px));
  max-width: min(300px, calc(100vw - 32px));
  padding: 8px 12px;
  /* 收起时不挡住背后操作区，仅保留展开按钮可点 */
  pointer-events: none;
}
.messageBoard.collapsed .msgBoardToggle{
  pointer-events: auto;
}
.messageBoard.collapsed .messageBoardBody{
  display: none;
}
.messageBoardHeaderRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.messageBoard.collapsed .messageBoardHeaderRow{
  margin-bottom: 0;
}
.messageBoardHeader{
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
  flex: 1;
  min-width: 0;
}
.msgBoardToggle{
  flex-shrink: 0;
  appearance: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.msgBoardToggle:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(113,215,255,0.35);
}
.messageBoardBody{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.messageBoardRow{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.msgIdentity{
  flex: 0 0 auto;
  max-width: 42%;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.msgInput{
  flex: 1 1 120px;
  min-width: 0;
  padding: 7px 12px;
  border-radius: 20px;
  border: none;
  background: rgba(255,255,255,0.95);
  color: #0b1220;
  font-size: 13px;
}
.msgInput::placeholder{
  color: rgba(11,18,32,0.45);
}
.msgImageBtn,
.msgSendBtn{
  flex: 0 0 auto;
  border: none;
  border-radius: 20px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.08s ease;
}
.msgImageBtn:hover,
.msgSendBtn:hover{ filter: brightness(1.08); }
.msgImageBtn:active,
.msgSendBtn:active{ transform: scale(0.98); }
.msgImageBtn{
  background: #3b82f6;
  color: #fff;
}
.msgSendBtn{
  background: #10b981;
  color: #fff;
}
.msgPendingBar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(113,215,255,0.1);
  border: 1px solid rgba(113,215,255,0.25);
  font-size: 11px;
  color: var(--muted);
}
.msgClearPendingBtn{
  flex-shrink: 0;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.msgList{
  flex: 1;
  min-height: 80px;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 12px;
  line-height: 1.45;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.msgListEmpty{
  color: var(--muted);
  padding: 12px 8px;
  text-align: center;
}
.msgItem{
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.2);
}
.msgItem--me{
  border-left: 3px solid rgba(113,215,255,0.65);
}
.msgItem--friend{
  border-left: 3px solid rgba(168,255,122,0.55);
}
.msgMeta{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
}
.msgWho{ font-weight: 600; color: rgba(255,255,255,0.82); }
.msgTime{ opacity: 0.85; white-space: nowrap; }
.msgTextBody{
  color: rgba(255,255,255,0.9);
  word-break: break-word;
  white-space: pre-wrap;
}
.msgImg{
  display: block;
  max-width: 100%;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

/* Dual phone layout */
.phoneStage{
  display: flex;
  gap: 150px;
  align-items: flex-start;
  justify-content: center;
  padding: 18px 14px;
  flex-wrap: wrap;
}
.phoneShell{
  width: 393px;
  height: 852px;
  padding: 0;
  border-radius: 36px;
  background: #d9d9dc;
  box-shadow: 0 16px 44px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}
.phoneScreen{
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: #ffffff;
  overflow: hidden;
}
.phoneOverlay{
  position: absolute;
  inset: 0;
  z-index: 120;
}
.playerInPhone{
  margin: 0;
  border-radius: 22px;
  min-width: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  height: 100%;
  overflow: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.playerInPhone::-webkit-scrollbar{ width: 0; height: 0; }

/* 手机内裁切页：Schoolbell + 英文 UI 用色 #333 */
.playerInPhone,
.playerInPhone h1,
.playerInPhone h2,
.playerInPhone h3,
.playerInPhone input,
.playerInPhone label,
.playerInPhone button,
.playerInPhone select,
.playerInPhone textarea{
  font-family: "Schoolbell", cursive, system-ui, sans-serif;
  color: #333333;
}
.playerInPhone .btn{
  color: #333333;
  border-color: rgba(51, 51, 51, 0.42);
}
.playerInPhone .btn.primary{
  color: #333333;
  border-color: #333333;
  background: rgba(183, 229, 243, 0.4);
}
.playerInPhone .btn.ghost{
  color: #333333;
  border-color: rgba(51, 51, 51, 0.35);
}
.playerInPhone .btn:hover{
  color: #333333;
}
.playerInPhone .targetPick{
  border-color: #333333;
  background: rgba(255, 255, 255, 0.96);
}
.playerInPhone .targetTitle{
  color: #333333;
}
.playerInPhone .target{
  border-color: rgba(51, 51, 51, 0.45);
  color: #333333;
}
.playerInPhone .targetLabel{
  color: #333333;
}

.phoneHomeOverlay{
  position: absolute;
  inset: 0;
  z-index: 120;
  background: #ffffff;
  color: #232323;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 18px 104px;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
/* HTML hidden 属性：须压过本类的 display:flex，否则切换聊天/首页无效 */
.phoneHomeOverlay[hidden]{
  display: none !important;
}
.phoneHomeOverlay.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mfTitle{
  margin-top: 50px;
  font-size: 42px;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 1px;
}
.mfCard{
  margin-top: 14px;
  width: 100%;
  flex: 1;
  border-radius: 32px;
  background: rgba(0,0,0,0.07);
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden;
  min-height: 0;
  position: relative;
  z-index: 2;
}
.mfIslandCanvas{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  background: linear-gradient(145deg, #1a2238, #0f1522);
  touch-action: none;
  cursor: grab;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
.mfIslandCanvas:active{ cursor: grabbing; }
.phoneHomeOverlay .mfTitle{
  pointer-events: none;
}
.mfGoPlantBtn{
  margin-top: 12px;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  appearance: none;
}
.mfTabs{
  width: 100%;
  border-radius: 999px;
  background: rgba(0,0,0,0.07);
  padding: 10px;
  display: flex;
  gap: 8px;
}
.mfTabsFixed{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin-top: 0;
  z-index: 5;
}
.mfTab{
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 10px 8px;
  color: #4f4f50;
  font-size: 18px;
  font-family: Georgia, "Times New Roman", serif;
}
.mfTab.active{
  background: rgba(255,255,255,0.56);
}
.phoneLandsPage{
  position: absolute;
  inset: 0;
  z-index: 121;
  background: #ffffff;
  padding: 18px 14px 96px;
}
.phoneLandsPage[hidden]{
  display: none !important;
}
.phoneLandsDeck{
  position: relative;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}
.phoneLandsTitle{
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: min(18%, 69px);
  z-index: 6;
  pointer-events: none;
}
.phoneLandsTitle img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.phoneLandsRule{
  position: absolute;
  left: 50%;
  bottom: 114px;
  transform: translateX(-50%);
  width: min(94%, 350px);
  z-index: 6;
  pointer-events: none;
}
.phoneLandsRule img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.phoneLandCard{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  opacity: 0;
  transform: translateY(18px) scale(0.93);
  transition: transform 260ms ease, opacity 260ms ease;
  pointer-events: none;
  will-change: transform, opacity;
}
.phoneLandCard.landStateCurrent{
  opacity: 1;
  transform: translateY(0) scale(1);
  z-index: 3;
  pointer-events: auto;
}
.phoneLandCard.landStatePrev,
.phoneLandCard.landStateNext{
  opacity: 0.42;
  z-index: 2;
}
.phoneLandCard.landStatePrev{
  transform: translateY(-58px) scale(0.92);
}
.phoneLandCard.landStateNext{
  transform: translateY(58px) scale(0.92);
}
.phoneLandCard.landStateFar{
  opacity: 0;
  transform: translateY(24px) scale(0.9);
  z-index: 1;
}
.phoneLandCard img{
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100% - 16px);
  object-fit: contain;
}
.landGoCheckBtn{
  position: absolute;
  left: 50%;
  bottom: 22%;
  transform: translateX(-50%);
  width: 72%;
  height: 9.5%;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  z-index: 10;
}
.phonePhotosPage{
  position: absolute;
  inset: 0;
  z-index: 121;
  background: #ffffff;
  padding: 18px 14px calc(138px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phonePhotosPage[hidden]{
  display: none !important;
}
.phonePhotosTitle{
  text-align: center;
  font-family: "Schoolbell", "Comic Sans MS", cursive;
  font-size: 26px;
  line-height: 1.05;
  color: #2f2f2f;
  -webkit-text-stroke: 1px #333333;
  paint-order: stroke fill;
  margin: 34px 0 16px;
}
.phonePhotosContent{
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 12px;
}
.phoneAlbumSection{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.phoneAlbumSectionHeader{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2d2d2d;
  font-family: "Schoolbell", "Comic Sans MS", cursive;
  font-size: 18px;
  line-height: 1;
}
.phoneAlbumSectionIcon{
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}
.phoneAlbumGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.phoneAlbumPhotoCard{
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  aspect-ratio: 127 / 128;
}
.phoneAlbumPhotoMedia{
  position: absolute;
  inset: 8px;
  z-index: 1;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  border-radius: 14px;
  overflow: hidden;
  background: #f7f7f7;
}
img.phoneAlbumPhotoMedia{
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.phoneAlbumPhotoFrame{
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.phoneAlbumEmpty{
  min-height: 10px;
}

/* Photos：单张图聊天预览（参考 UI/Album page-chat.png） */
.phoneAlbumChatRoot{
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px 88px;
  box-sizing: border-box;
}
.phoneAlbumChatRoot[hidden]{
  display: none !important;
}
.phoneAlbumChatBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  cursor: pointer;
}
.phoneAlbumChatBody{
  position: relative;
  z-index: 1;
  width: min(94%, 340px);
  max-height: min(78vh, 560px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
}
.phoneAlbumChatPhotoShell{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(68vh, 480px);
  margin: 0 auto;
  border-radius: 20px;
  border: 3px solid #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  background: #1a1a1a;
  pointer-events: auto;
}
.phoneAlbumChatPhotoCanvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.phoneAlbumChatCornerBtn{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: auto;
  height: auto;
  padding: 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
}
.phoneAlbumChatCornerBtn:active{
  opacity: 0.85;
}
.phoneAlbumChatCornerIconImg{
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
}
.phoneAlbumChatOverlay--collapsed{
  display: none !important;
}
.phoneAlbumChatOverlay{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  pointer-events: none;
}
.phoneAlbumChatMessages{
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 10px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: none;
}
.phoneAlbumChatMessages:not([hidden]){
  pointer-events: auto;
}
.phoneAlbumChatRow{
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 6px;
  max-width: 100%;
}
.phoneAlbumChatRow--in{
  justify-content: flex-start;
}
.phoneAlbumChatRow--out{
  justify-content: flex-end;
}
.phoneAlbumChatBubble{
  max-width: 82%;
  padding: 10px 12px 12px;
  font-family: "Schoolbell", "Comic Sans MS", cursive;
  font-size: 15px;
  line-height: 1.28;
  color: #1e1e1e;
  border: 2px solid #2a2a2a;
  border-radius: 18px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  position: relative;
}
.phoneAlbumChatBubble--in{
  background: #c9e8ff;
  border-bottom-left-radius: 6px;
}
.phoneAlbumChatBubble--out{
  background: #d8f5a8;
  border-bottom-right-radius: 6px;
}
.phoneAlbumChatAvatarImg{
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.phoneAlbumChatInputBar{
  flex: 0 0 auto;
  padding: 4px 8px 10px;
  pointer-events: auto;
}
.phoneAlbumChatInputWrap{
  position: relative;
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
}
.phoneAlbumChatInputSvg{
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}
.phoneAlbumChatInputOverlay{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 5px 6px 5px 2px;
  box-sizing: border-box;
  gap: 2px;
  z-index: 2;
  pointer-events: auto;
}
.phoneAlbumChatFieldSlot{
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 30px;
}
.phoneAlbumChatPlaceholderSvg{
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  max-width: calc(100% - 16px);
  height: auto;
  max-height: 15px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.phoneAlbumChatFieldSlot--hasText .phoneAlbumChatPlaceholderSvg,
.phoneAlbumChatFieldSlot--focused .phoneAlbumChatPlaceholderSvg{
  opacity: 0;
  visibility: hidden;
}
.phoneAlbumChatSmileyBtn{
  flex: 0 0 12.5%;
  min-width: 34px;
  max-width: 42px;
  width: 12.5%;
  aspect-ratio: 1;
  align-self: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
}
.phoneAlbumChatSmileyBtn:focus-visible{
  outline: 2px solid rgba(0, 120, 255, 0.55);
  outline-offset: 2px;
}
.phoneAlbumChatField{
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  background: transparent;
  font-family: "Schoolbell", "Comic Sans MS", cursive;
  font-size: 15px;
  color: #1e1e1e;
  outline: none;
  padding: 4px 6px;
  position: relative;
  z-index: 1;
  -webkit-appearance: none;
  appearance: none;
}

.phoneChatPage{
  position: absolute;
  inset: 0;
  z-index: 121;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #232323;
  padding: 16px 14px 96px;
  overflow: hidden;
}
.phoneChatPage[hidden]{
  display: none !important;
}

/* Go Plant：全屏拍摄（布局参考 UI/camera.svg：上栏 / 取景 / 底栏 + 快门） */
.phoneCameraPage{
  position: absolute;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  background: #333;
  color: #fff;
}
.phoneCameraPage[hidden]{
  display: none !important;
}
.phoneCameraTopBar{
  flex: 0 0 auto;
  min-height: 48px;
  padding: 10px 12px 8px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.phoneCameraCloseBtn{
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  appearance: none;
}
.phoneCameraPreviewWrap{
  flex: 1;
  min-height: 0;
  position: relative;
  background: #000;
}
.phoneCameraVideo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.phoneCameraGrid{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background:
    linear-gradient(to right, transparent calc(100% / 3 - 0.5px), rgba(255,255,255,0.5) calc(100% / 3), transparent calc(100% / 3 + 0.5px)),
    linear-gradient(to right, transparent calc(200% / 3 - 0.5px), rgba(255,255,255,0.5) calc(200% / 3), transparent calc(200% / 3 + 0.5px)),
    linear-gradient(to bottom, transparent calc(100% / 3 - 0.5px), rgba(255,255,255,0.5) calc(100% / 3), transparent calc(100% / 3 + 0.5px)),
    linear-gradient(to bottom, transparent calc(200% / 3 - 0.5px), rgba(255,255,255,0.5) calc(200% / 3), transparent calc(200% / 3 + 0.5px));
}
.phoneCameraBottomBar{
  flex: 0 0 auto;
  min-height: 148px;
  padding: 12px 16px 24px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
/* 底栏按钮仅承载资源图标：上传照片按钮.svg / 拍摄按钮.svg / 反转相机.svg */
.phoneCameraGalleryBtn,
.phoneCameraFlipBtn{
  width: 57px;
  height: 57px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  flex-shrink: 0;
}
.phoneCameraShutterBtn{
  width: 97px;
  height: 97px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phoneCameraBarIcon{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.phoneCameraGalleryBtn:active,
.phoneCameraFlipBtn:active,
.phoneCameraShutterBtn:active{
  opacity: 0.88;
}

/* Go Plant：选裁切形状 */
.phoneShapePickPage{
  position: absolute;
  inset: 0;
  z-index: 132;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #222;
  padding: 26px 18px 22px;
  overflow: hidden;
}
.phoneShapePickPage[hidden]{
  display: none !important;
}
.phoneShapePickHero{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 18px;
  flex-shrink: 0;
  width: 100%;
}
.phoneShapePickHeroImg{
  width: min(92%, 268px);
  height: auto;
  display: block;
  object-fit: contain;
}
.phoneShapePickGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 12px;
  flex: 1;
  align-content: start;
}
.phoneShapePickGrid--plants{
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 10px 12px;
  margin-top: 6px;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  align-self: center;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.phoneShapePickGrid--plants::-webkit-scrollbar{
  width: 0;
  height: 0;
}
.phoneShapePickGrid--plants .phoneShapePickOption{
  position: relative;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  appearance: none;
  color: inherit;
}
.phoneShapePickGrid--plants .phoneShapePickOption:active{
  background: transparent;
  opacity: 0.94;
}
.phoneShapePickGrid--plants .phoneShapePickOption--selected{
  border: none;
  box-shadow: none;
  background: transparent;
}
.phoneShapePickOptionMain{
  position: relative;
  width: min(100%, 152px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.phoneShapePickFrameWrap{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.phoneShapePickFrame{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.16s ease;
}
.phoneShapePickFrame--default{
  opacity: 1;
}
.phoneShapePickFrame--selected{
  opacity: 0;
}
.phoneShapePickOption--selected .phoneShapePickFrame--default{
  opacity: 0;
}
.phoneShapePickOption--selected .phoneShapePickFrame--selected{
  opacity: 1;
}
.phoneShapePickGrid--plants .phoneShapePickThumb{
  position: relative;
  z-index: 1;
  width: 56%;
  max-width: 86px;
  height: auto;
  object-fit: contain;
  display: block;
}
/* 植物蒙版6：选择卡内略缩小，避免视觉偏大 */
.phoneShapePickGrid--plants .phoneShapePickOption[data-shape-id="plant6"] .phoneShapePickThumb{
  width: 50%;
  max-width: 76px;
}
.phoneShapePickFooter{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px 0 0;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  margin-top: 22px;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.phoneShapePickNextBtn,
.phoneShapePickCancelBtn{
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  appearance: none;
}
.phoneShapePickNextBtn:disabled{
  opacity: 0.42;
  cursor: not-allowed;
}
.phoneShapePickNextIcon{
  width: min(100%, 320px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.phoneShapePickCancelIcon{
  width: min(18%, 36px);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.phoneChatHeader{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.phoneBackBtn{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.7);
  cursor: pointer;
}
.phoneChatTitle{
  font-size: 20px;
  font-weight: 700;
}
.phoneChatMount{
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
}
.messageBoardFloatingHidden{
  opacity: 0;
  pointer-events: none;
}
.messageBoard.embedded{
  position: static;
  width: 100%;
  height: 100%;
  max-height: none;
  min-width: 0;
  max-width: none;
  border-radius: 18px;
  padding: 10px;
  opacity: 1;
  pointer-events: auto;
}
.messageBoard.embedded .messageBoardBody{
  display: flex !important;
}
.messageBoard.embedded .msgList{
  scrollbar-width: none;
}
.messageBoard.embedded .msgList::-webkit-scrollbar{
  width: 0;
  height: 0;
}

@media (max-width: 980px){
  .phoneShell{
    width: min(393px, calc(100vw - 28px));
    height: 82vh;
  }
}

/* Figma Forest home style (P1 first, mirrored to P2) */
.phoneShell{
  background: #2f2f31;
  border-radius: 46px;
  padding: 12px;
}
.phoneShell::before{
  content: "";
  position: absolute;
  width: 110px;
  height: 30px;
  border-radius: 0 0 18px 18px;
  background: #2f2f31;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 300;
}
.phoneScreen{
  border-radius: 40px;
  background: #ffffff;
}
.phoneHomeOverlay{
  background: #ffffff;
  color: #222;
  padding: 28px 20px 106px;
}
.mfTopRow{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}
.mfIconBtn{
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  padding: 0;
  appearance: none;
}
.mfTopIcon{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.mfTitle{
  margin-top: 50px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0 2px;
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
  /* 一行显示：在约 353px 内容区内适配 "Our Memory Forest" */
  font-size: clamp(28px, 7.4vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333333;
  /* 仅下移字形靠近地块，不改变 .mfCard 在文档流中的位置 */
  transform: translateY(10px);
}
.mfCard{
  margin-top: 12px;
  border-radius: 0;
  background: transparent;
  border: 0;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 2;
}
.mfIslandCanvas{
  border-radius: 0;
  background: transparent;
  border: 0;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: none;
}
.phoneHomeOverlay .mfTitle{
  pointer-events: none;
}
.mfStats{
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  gap: 56px;
  transform: translateY(-24px);
  position: relative;
  z-index: 3;
  /* 叠在 3D 卡片上方仅作装饰，勿拦截点击（否则 canvas 收不到 pointerup，无法点选植物） */
  pointer-events: none;
}
.mfStat{
  text-align: center;
}
.mfStatValue{
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
  font-size: 60px;
  color: #fcfaa7;
  line-height: 1;
  text-shadow: none;
  -webkit-text-stroke: 2px #333333;
  paint-order: stroke fill;
}
.mfStatValueBlue{
  color: #b7e5f3;
  -webkit-text-stroke: 2px #333333;
  paint-order: stroke fill;
}
.mfStatLabel{
  margin-top: 2px;
  color: #313131;
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
  font-size: 18px;
}
.mfGoPlantBtn{
  margin-top: 26px;
  margin-bottom: 36px;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: inherit;
  background: transparent;
  appearance: none;
}
.mfGoPlantIcon{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.mfTabs{
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  justify-items: center;
}
.mfTabsFixed{
  width: 100%;
  left: 0;
  right: 0;
  transform: none;
  padding: 0 12px;
  box-sizing: border-box;
  bottom: 14px;
}
.mfTabsGlobal{
  position: absolute;
  z-index: 220;
  pointer-events: auto;
}
.phoneScreen.phoneScreen--plantCropFlow .mfTabsGlobal{
  display: none !important;
  pointer-events: none;
}
.mfTab{
  border: 0;
  border-radius: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-family: "Schoolbell", ui-rounded, "Comic Sans MS", cursive;
  color: #505050;
  font-size: 0;
  background: transparent;
}
.mfTabWithIcon{
  padding: 0;
}
.mfTab.active{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.mfTabIcon{
  width: 121px;
  height: 75px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}
.mfTabIconActive{
  display: none;
}
.mfTab.active .mfTabIconActive{
  display: block;
}
.mfTab.active .mfTabIconInactive{
  display: none;
}

