/* 浅杏纸页：正式手机版共用的细节层，覆盖旧版较重的卡片样式。 */
body.mobile {
  --nn-soft-edge: #ead8c5;
  --nn-soft-paper: #fffcf7;
  --nn-soft-ink: #503a2d;
  --nn-soft-muted: #846b58;
}

/* 首页恢复文字入口与麦克风并排，保留浅杏色开场。 */
body.mobile #s-home .home-capture {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0 1px;
}
body.mobile #s-home .quick-input {
  order: 1;
  flex: 1 1 auto;
  width: auto;
  height: 54px;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(188, 128, 84, .25);
  border-radius: 16px;
  background: rgba(255, 253, 248, .88);
  box-shadow: 0 5px 15px rgba(133, 79, 43, .065), inset 0 1px 0 #fff;
}
body.mobile #s-home .quick-input .q-icon { color: #c1784b; }
body.mobile #s-home .quick-input .q-placeholder { color: #765744; font-size: 13px; }
body.mobile #s-home .quick-input .q-arrow { color: #ae7d5a; }
body.mobile #s-home .voice-hero {
  order: 2;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
body.mobile #s-home .voice-hero::after,
body.mobile #s-home .voice-hero .v-action-txt { display: none; }
body.mobile #s-home .voice-hero .v-actions {
  width: 54px;
  height: 54px;
  justify-content: center;
}
body.mobile #s-home .voice-hero .v-mic {
  width: 49px;
  height: 49px;
  border-color: rgba(167, 78, 35, .13);
  background: linear-gradient(145deg, #eea270, #dc7c49);
  box-shadow: 0 0 0 4px rgba(225, 145, 91, .12), 0 5px 11px rgba(153, 81, 39, .18), inset 0 1px 0 rgba(255,255,255,.36);
}
body.mobile #s-home .voice-hero .v-mic svg { width: 20px; height: 20px; }
body.mobile #s-home .home-journal::before { display: none; }
body.mobile #s-home .seg-row {
  margin-bottom: 9px;
  border-bottom: 0;
}
body.mobile #s-home .seg-row .seg {
  gap: 4px;
  min-height: 45px;
  padding: 4px;
  border: 1px solid #ebd8c6;
  border-radius: 14px;
  background: #f8ede1;
}
body.mobile #s-home .seg-row .seg-item {
  flex: 1;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  color: #80624c;
  font-size: 13px;
  font-weight: 720;
  text-align: center;
}
body.mobile #s-home .seg-row .seg-item.active {
  border: 0;
  border-radius: 10px;
  background: #fffdf9;
  box-shadow: 0 2px 6px rgba(117, 73, 43, .08);
  color: #ab5c33;
}
body.mobile #s-home #home-count { display: none; }
body.mobile #s-home #home-tl-date { min-height: 42px; margin: 4px 0 4px; }
body.mobile #s-home #home-tl-date .home-search {
  display: inline-flex;
  width: auto;
  min-width: 65px;
  height: 33px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid #ebd9c8;
  border-radius: 10px;
  background: #fff9f1;
  color: #9b7154;
  font-size: 11px;
  font-weight: 650;
}
body.mobile #s-home #home-tl-date .home-search svg { flex: none; }

/* 同一套纸面、边线和分组节奏。 */
body.mobile :is(#s-me,#s-settings,#s-base,#s-privacy,#s-person,#s-newperson,#s-onboard,#s-search) .scroll {
  background-image: radial-gradient(ellipse 78% 35% at 100% 0%, rgba(255, 213, 170, .14), transparent 80%);
}
body.mobile #s-me .scroll { padding-top: 21px; }
body.mobile #s-me .profile-card {
  padding: 18px 19px 14px;
  border: 1px solid #ebd3bb;
  border-radius: 20px;
  background: radial-gradient(circle at 91% 10%, rgba(255,255,250,.75), transparent 38%),
              linear-gradient(126deg, #fff4e6, #ffe9d4);
  box-shadow: 0 8px 22px rgba(140, 82, 44, .075), inset 0 1px 0 rgba(255,255,255,.8);
}
body.mobile #s-me .profile-card::after {
  right: -38px;
  top: 39px;
  width: 118px;
  height: 118px;
  border-color: rgba(196, 127, 77, .11);
  box-shadow: 0 0 0 21px rgba(255,255,255,.1);
}
body.mobile #s-me .profile-card-top { height: 11px; }
body.mobile #s-me .profile-card-star { color: #d5905c; font-size: 17px; }
body.mobile #s-me .profile-card-main { margin: 10px 0 13px; }
body.mobile #s-me .me-avatar { width: 58px; height: 58px; border-width: 2px; box-shadow: 0 4px 12px rgba(144,75,44,.12); }
body.mobile #s-me .profile-card .mn { font-size: 19px; }
body.mobile #s-me .profile-card .ms { font-size: 12px; }
body.mobile #s-me .profile-link { min-height: 39px; padding-top: 8px; font-size: 12px; }
body.mobile #s-me .me-sec-t,
body.mobile #s-settings .settings-section-title {
  margin-top: 21px;
  margin-bottom: 9px;
  color: #634a38;
  font: 700 13px/1.35 'PingFang SC','Microsoft YaHei',sans-serif;
  letter-spacing: 0;
}
body.mobile #s-me .me-sec-t::before,
body.mobile #s-settings .settings-section-title::before {
  width: 3px;
  height: 13px;
  background: #d98a57;
}
body.mobile #s-me .me-card-group,
body.mobile #s-settings .settings-card,
body.mobile #s-privacy .me-group {
  border: 1px solid var(--nn-soft-edge);
  border-radius: 18px;
  background: rgba(255,253,248,.91);
  box-shadow: 0 5px 16px rgba(116, 72, 44, .045), inset 0 1px 0 #fff;
}
body.mobile #s-me .me-card { min-height: 64px; }
body.mobile #s-me .me-ico,
body.mobile #s-settings .setting-icon {
  border: 1px solid rgba(181, 130, 92, .13);
  border-radius: 11px;
  background: #fbefe3;
  color: #aa7551;
}
body.mobile #s-me .i-sage,
body.mobile #s-settings .si-cycle,
body.mobile #s-settings .si-privacy { background: #eef1e9; color: #73836b; }
body.mobile #s-me .i-lilac,
body.mobile #s-settings .si-access,
body.mobile #s-settings .si-version { background: #f2edf1; color: #927d8a; }
body.mobile #s-me .i-gold { background: #fbf0dd; color: #a88557; }
body.mobile #s-settings .settings-hero {
  min-height: 0;
  padding: 22px 22px;
  border: 1px solid #ebd4bd;
  border-radius: 19px;
  background: radial-gradient(circle at 90% 10%, rgba(255,255,250,.75), transparent 37%),
              linear-gradient(125deg, #fff3e4, #ffe9d4);
  box-shadow: 0 8px 21px rgba(140, 82, 44, .065), inset 0 1px 0 rgba(255,255,255,.75);
}
body.mobile #s-settings .settings-hero-kicker,
body.mobile #s-settings .settings-hero-title { display: none; }
body.mobile #s-settings .settings-hero-sub {
  max-width: 230px;
  margin: 0;
  color: #674b38;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}
body.mobile #s-settings .settings-hero::after {
  content: '✦';
  top: 12px;
  right: 19px;
  color: rgba(207, 133, 77, .3);
  font-size: 39px;
  transform: rotate(13deg);
}
body.mobile #s-settings .me-row.setting-row { min-height: 65px; padding: 11px 14px; }
body.mobile #s-settings .setting-copy strong { color: var(--nn-soft-ink); font-size: 13.5px; }
body.mobile #s-settings .setting-copy small { color: var(--nn-soft-muted); font-size: 11px; }
body.mobile #s-settings .settings-foot,
body.mobile #s-me .me-foot { padding-bottom: 12px; color: #a78b74; }

/* 信息库与隐私页沿用相同的浅色纸卡。 */
body.mobile #s-base .kb-sum {
  padding: 18px 19px;
  border: 1px solid #e7cfb6;
  border-radius: 18px;
  background: radial-gradient(circle at 95% 0%, rgba(255,255,255,.72), transparent 35%),
              linear-gradient(125deg, #fff3e3, #ffebd6);
  box-shadow: 0 7px 19px rgba(143, 84, 43, .07);
  color: #624631;
}
body.mobile #s-base .kb-sum .lab { color: #936747; opacity: 1; font-weight: 700; }
body.mobile #s-base .kb-sum .n { color: #684430; font-size: 22px; }
body.mobile #s-base .kb-sum .u { color: #94745b; opacity: 1; }
body.mobile #s-base .greet .hi { display: none; }
body.mobile #s-base .greet { margin-bottom: 14px; }
body.mobile #s-base .kb-sec { color: #624a38; font-size: 13px; }
body.mobile #s-base :is(.card,.person-card),
body.mobile #s-person .card,
body.mobile #s-newperson .card,
body.mobile #s-onboard .card,
body.mobile #s-privacy .privacy-note {
  border-color: var(--nn-soft-edge);
  background-color: rgba(255,253,248,.9);
  box-shadow: 0 5px 16px rgba(116,72,44,.04);
}
body.mobile #s-privacy .subpage-intro h2 { display: none; }
body.mobile #s-privacy .subpage-intro { margin-bottom: 10px; padding-bottom: 13px; }
body.mobile #s-privacy .subpage-intro p { color: #7c604d; font-size: 12px; }
body.mobile #s-privacy .privacy-note { color: #796453; line-height: 1.75; }
body.mobile #s-talk .talk-welcome img {
  width: 48px;
  height: 48px;
  border-radius: 0;
  filter: drop-shadow(0 0 6px rgba(255,191,107,.48));
  animation: nn-float-star 3.8s ease-in-out infinite;
}
body.mobile #s-talk .talk-welcome {
  max-width: 360px;
  margin: min(9vh, 70px) auto 20px;
  padding: 10px 8px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body.mobile #s-talk .talk-welcome h2 { margin-top: 15px; font-size: 22px; line-height: 1.4; }
body.mobile #s-talk .talk-welcome p { max-width: 285px; margin: 0 auto; line-height: 1.7; }
body.mobile #s-talk .input-dock { padding: 9px 19px calc(17px + env(safe-area-inset-bottom)); }
body.mobile #s-talk .chat-input {
  min-height: 55px;
  border: 1px solid #e8d6c3;
  border-radius: 15px;
  background: #fffdf9;
  box-shadow: 0 5px 16px rgba(116,72,44,.055);
  backdrop-filter: none;
}
body.mobile #s-talk .chat-input input { font-size: 14px; }
body.mobile #s-talk .chat-input .send-btn { border-radius: 13px; }
body.mobile #s-diary .tpl-row { align-items: stretch; }
body.mobile #s-diary .tpl {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 8px !important;
}
body.mobile #s-diary .tpl .tp-name { display: block; margin: 0; font-size: 12px; line-height: 1.35; text-align: center; }
body.mobile #s-diary #summary-share[hidden] { display: none; }

/* 悬浮入口和首页使用同一颗发光星星。 */
body.mobile .float-star {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
body.mobile .float-star::before {
  inset: -13px;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 202, 123, .3), rgba(255, 218, 160, .12) 37%, transparent 70%);
  animation: nn-star-halo 3.8s ease-in-out infinite;
  pointer-events: none;
}
body.mobile .float-star .brand-mark {
  width: 48px;
  height: 48px;
  animation: nn-float-star 3.8s ease-in-out infinite;
}
body.mobile .float-star .brand-mark svg { width: 46px; height: 46px; }
body.mobile .float-star .star-eyes,
body.mobile .float-star .star-mouth {
  fill: none;
  stroke: #aa6842;
  stroke-width: 1.8;
  stroke-linecap: round;
}
body.mobile .float-star .star-eyes {
  fill: #9d6545;
  stroke: none;
  transform-origin: 24px 24.5px;
  animation: nn-star-blink 5.8s linear infinite;
}
body.mobile .float-star .star-eye-shine { fill: #fff9df; }
@keyframes nn-float-star {
  0%,100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 4px rgba(255,187,102,.35)); }
  50% { transform: translateY(-5px) scale(1.07); filter: drop-shadow(0 0 9px rgba(255,185,91,.7)); }
}
@keyframes nn-star-halo {
  0%,100% { opacity: .55; transform: scale(.92); }
  50% { opacity: .95; transform: scale(1.13); }
}
@keyframes nn-star-blink {
  0%,45%,49%,100% { transform: scaleY(1); }
  47% { transform: scaleY(.12); }
}
body.mobile[data-cur="s-ledger"] .float-star,
body.mobile[data-cur="s-diary"] .float-star { width: 48px; height: 48px; right: 12px; bottom: 87px; box-shadow: none; }
body.mobile.ob-force-star .float-star { display: flex !important; }

/* 录入页把文字输入放回视线内，识别状态只在需要时出现。 */
body.mobile #s-voice .voice-hint { margin-bottom: 15px; }
body.mobile #s-voice .wave { margin-bottom: 8px; }
body.mobile #s-voice .voice-mic { margin-top: 9px; }
body.mobile #s-voice .voice-cancel:empty { display: none; }
body.mobile #s-voice .voice-cancel:not(:empty) { margin-top: 17px; }
body.mobile #s-voice .voice-chat-link { margin-top: 19px; text-align: center; }
body.mobile #s-voice #voice-just-talk {
  display: inline-block;
  min-height: 34px;
  padding: 7px 2px;
  border-bottom: 1px solid #d8b69a;
  color: #9d6c4b;
  font-size: 12px;
  cursor: pointer;
}
body.mobile #s-voice .voice-entry {
  width: min(100%,420px) !important;
  max-width: 420px !important;
  min-height: 58px;
  margin: 20px 0 0 !important;
  padding-top: 0;
  gap: 9px;
}
body.mobile #s-voice #voice-input { min-height: 56px; padding: 13px 16px; border-radius: 15px; font-size: 15px; }
body.mobile #s-voice #voice-go { width: 55px; height: 55px; border-radius: 15px; }

body.mobile .profile-edit-form input {
  font-family: 'PingFang SC','Microsoft YaHei',sans-serif;
  font-size: 14px;
  font-weight: 400;
}

/* 登录页使用一张完整的表单纸卡，和正式页面的色阶一致。 */
body.mobile #s-auth,
body.mobile #s-auth .auth-scroll {
  background-color: #fff9f1;
  background-image: radial-gradient(ellipse 80% 35% at 100% 0%, rgba(255, 218, 178, .37), transparent 78%),
                    radial-gradient(ellipse 70% 34% at 0% 100%, rgba(239, 194, 150, .14), transparent 75%);
}
body.mobile #s-auth .auth-scroll {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: 38px 19px calc(36px + env(safe-area-inset-bottom));
}
body.mobile #s-auth .auth-shell { width: 100%; max-width: 420px; margin: 0 auto; }
body.mobile #s-auth .auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
body.mobile #s-auth .auth-star {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(225, 179, 128, .35);
  border-radius: 26px;
  background: radial-gradient(circle at 35% 25%, #fffdf3, #ffeccf 76%);
  box-shadow: 0 0 0 8px rgba(255,246,232,.65), 0 10px 26px rgba(148, 89, 48, .11);
}
body.mobile #s-auth .auth-star svg { width: 53px; height: 53px; }
body.mobile #s-auth .auth-brand-name { margin-top: 20px; color: #4d392c; font: 700 25px/1.25 'Songti SC','STSong',serif; letter-spacing: 3px; }
body.mobile #s-auth .auth-brand-line { margin-top: 7px; color: #91745f; font-size: 12px; }
body.mobile #s-auth .auth-panel {
  margin-top: 30px;
  padding: 21px 20px 18px !important;
  border: 1px solid #ebd8c4;
  border-radius: 20px;
  background: rgba(255,253,248,.94);
  box-shadow: 0 12px 29px rgba(118, 75, 43, .075), inset 0 1px 0 #fff;
}
body.mobile #s-auth .auth-field { margin-bottom: 13px; }
body.mobile #s-auth .auth-field label { display: block; margin: 0 0 7px 3px; color: #694e3a; font-size: 12px; font-weight: 700; }
body.mobile #s-auth .auth-field input {
  min-height: 47px;
  padding: 10px 13px;
  border: 1px solid #e9d9c8;
  border-radius: 11px;
  background: #fffdf9;
  color: #503b2c;
  font-size: 14px;
}
body.mobile #s-auth .auth-field input::placeholder { color: #a38c78; }
body.mobile #s-auth .auth-field input:focus {
  outline: none;
  border-color: #db9363;
  background: #fffaf2;
  box-shadow: 0 0 0 3px rgba(222, 143, 91, .14);
  caret-color: #a75630;
}
body.mobile #s-auth .auth-field input::selection { background: #f7cfaa; color: #523a2b; }
body.mobile #s-auth .auth-field input:-webkit-autofill,
body.mobile #s-auth .auth-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fffaf2 inset;
  -webkit-text-fill-color: #503b2c;
  box-shadow: 0 0 0 1000px #fffaf2 inset;
}
body.mobile #s-auth #auth-go {
  width: 100%;
  min-height: 47px;
  margin-top: 4px;
  padding: 11px 14px;
  border-radius: 11px;
  background: linear-gradient(110deg, #e99a66, #dc7f4c);
  box-shadow: 0 5px 12px rgba(189, 100, 52, .14), inset 0 1px 0 rgba(255,255,255,.3);
  font-size: 14px;
}
body.mobile #s-auth .auth-switch-row { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; color: #8f7968; font-size: 12px; }
body.mobile #s-auth #auth-switch { min-height: 32px; padding: 4px; border: 0; background: none; color: #b6643d; font-size: 12px; font-weight: 700; cursor: pointer; }
body.mobile #s-auth .auth-methods { margin-top: 16px; padding-top: 16px; }
body.mobile #s-auth .auth-method { min-height: 45px; border-color: #ebdac8; background: #fff9f0; color: #765947; }
body.mobile #s-auth .auth-method small { color: #a18c7b; }
body.mobile #s-auth #auth-msg { margin-top: 13px; padding: 10px 12px; border-radius: 10px; background: #fff1e8; color: #a25036; font-size: 12px; line-height: 1.5; text-align: center; }
@media (max-width: 370px) {
  body.mobile #s-home .home-capture { gap: 8px; }
  body.mobile #s-home .quick-input { padding: 0 11px; }
  body.mobile #s-auth .auth-scroll { padding-left: 16px; padding-right: 16px; }
  body.mobile #s-auth .auth-panel { padding-left: 16px !important; padding-right: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.mobile .float-star .brand-mark,
  body.mobile .float-star::before,
  body.mobile .float-star .star-eyes,
  body.mobile #s-auth .auth-star { animation: none; }
}
