@font-face {
  font-family: "KitchenCute";
  src: local("PingFang SC"), local("Microsoft YaHei"), local("Noto Sans CJK SC");
}

* {
  box-sizing: border-box;
}

html {
  background: #fff7e8;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.98) 0%, rgba(255, 243, 228, 0.96) 48%, rgba(255, 234, 221, 0.98) 100%);
  color: #5b3b2d;
  font-family: KitchenCute, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.app-theme-dark {
  background:
    radial-gradient(circle at 12% 8%, rgba(247, 178, 103, 0.14), transparent 20rem),
    radial-gradient(circle at 88% 18%, rgba(158, 216, 189, 0.12), transparent 20rem),
    linear-gradient(180deg, #3a2b25 0%, #231b18 100%);
}

.app-theme-dark .soft-card,
.app-theme-dark .bottom-nav-panel {
  background: rgba(255, 250, 240, 0.90);
}

.app-theme-dark .bg-milk {
  background-color: rgba(255, 250, 240, 0.92);
}

.app-font-small {
  font-size: 14px;
}

.app-font-large {
  font-size: 17px;
}

.app-wallpaper-peach {
  background:
    radial-gradient(circle at 18% 8%, rgba(247, 157, 132, 0.30), transparent 19rem),
    radial-gradient(circle at 88% 18%, rgba(247, 178, 103, 0.24), transparent 18rem),
    linear-gradient(180deg, #fff5eb 0%, #ffe1dc 100%);
}

.app-wallpaper-mint {
  background:
    radial-gradient(circle at 14% 8%, rgba(158, 216, 189, 0.30), transparent 20rem),
    radial-gradient(circle at 90% 18%, rgba(247, 178, 103, 0.18), transparent 18rem),
    linear-gradient(180deg, #f6fff8 0%, #e7f6ef 100%);
}

.app-wallpaper-custom {
  background-repeat: no-repeat;
}

.phone-safe {
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.app-header {
  background: linear-gradient(180deg, rgba(255, 247, 232, 0.96), rgba(255, 247, 232, 0.74) 78%, rgba(255, 247, 232, 0));
}

.app-header-panel {
  background: rgba(255, 250, 240, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 24px rgba(125, 78, 43, 0.055);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.splash-screen {
  align-items: center;
  color: #5b3b2d;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 100vh;
  justify-content: center;
  text-align: center;
}

.splash-screen img {
  height: 6rem;
  width: 6rem;
}

.splash-screen strong {
  font-size: 1.55rem;
}

.splash-screen span {
  color: rgba(91, 59, 45, 0.72);
  max-width: 15rem;
}

.opening-screen {
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 1) 0%, rgba(255, 246, 235, 0.98) 58%, rgba(255, 239, 229, 1) 100%);
}

.opening-content {
  animation: openingFade 1650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.opening-logo {
  animation: logoBreath 1650ms cubic-bezier(0.22, 1, 0.36, 1) both;
  border-radius: 28%;
  filter: drop-shadow(0 18px 28px rgba(114, 72, 38, 0.12));
}

.opening-whisper {
  animation: whisperIn 1650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.paw-pattern {
  background-image:
    radial-gradient(circle at 18px 20px, rgba(187, 90, 90, 0.070) 0 2.6px, transparent 3px),
    radial-gradient(circle at 28px 14px, rgba(187, 90, 90, 0.055) 0 2px, transparent 2.4px),
    radial-gradient(circle at 9px 14px, rgba(187, 90, 90, 0.055) 0 2px, transparent 2.4px);
  background-size: 72px 66px;
}

.soft-card {
  backdrop-filter: blur(20px);
  background: rgba(255, 250, 240, 0.70);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(125, 78, 43, 0.055);
}

.app-light-cards .soft-card {
  background: rgba(255, 250, 240, 0.66);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 18px rgba(125, 78, 43, 0.052);
}

.app-light-cards .profile-hero {
  box-shadow: 0 10px 24px rgba(125, 78, 43, 0.065);
}

.app-light-cards .bottom-nav-panel {
  box-shadow: 0 12px 30px rgba(125, 78, 43, 0.10);
}

.profile-hero {
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.88), rgba(255, 239, 224, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.70);
  box-shadow: 0 12px 30px rgba(125, 78, 43, 0.075);
}

.home-hero,
.space-identity-card {
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.88), rgba(255, 239, 222, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 30px rgba(125, 78, 43, 0.070);
}

.personal-hero {
  box-shadow: 0 14px 34px rgba(125, 78, 43, 0.080);
}

.menu-card {
  background: rgba(255, 250, 240, 0.64);
}

.member-row {
  transition: transform 180ms ease, background-color 180ms ease;
}

.member-row:active {
  transform: scale(0.99);
}

.social-row,
.chat-input-bar,
.message-row,
.menu-dish-row,
.my-stat-card {
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.social-row:active,
.message-row:active,
.menu-dish-row:active,
.my-stat-card:active {
  transform: scale(0.992);
}

.message-row:hover,
.menu-dish-row:hover,
.my-stat-card:hover {
  background: rgba(255, 255, 255, 0.70);
}

.chat-page {
  min-height: 100dvh;
}

.chat-fixed-header {
  background: linear-gradient(180deg, rgba(255, 247, 232, 0.98), rgba(255, 247, 232, 0.86));
  border-bottom: 1px solid rgba(255, 255, 255, 0.64);
  left: 50%;
  max-width: 480px;
  padding: calc(0.75rem + env(safe-area-inset-top)) 1rem 0.75rem;
  position: fixed;
  top: 0;
  transform: translateX(-50%);
  width: 100%;
  z-index: 60;
}

.chat-surface {
  min-height: 100dvh;
  padding-bottom: calc(7.6rem + env(safe-area-inset-bottom));
  padding-top: calc(5.6rem + env(safe-area-inset-top));
}

.chat-surface-panel-open {
  padding-bottom: calc(19rem + env(safe-area-inset-bottom));
}

.chat-selection-open {
  padding-bottom: calc(10rem + env(safe-area-inset-bottom));
}

.chat-input-bar {
  border-radius: 28px 28px 0 0;
  bottom: 0;
  left: 50%;
  max-width: 480px;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  position: fixed;
  transform: translateX(-50%);
  width: 100%;
  z-index: 61;
}

.chat-text-input {
  box-shadow: inset 0 0 0 1px rgba(247, 178, 103, 0.14);
}

.chat-tool-button {
  align-items: center;
  background: rgba(247, 178, 103, 0.16);
  border-radius: 999px;
  color: rgba(91, 59, 45, 0.78);
  display: grid;
  flex-shrink: 0;
  font-size: 1.2rem;
  font-weight: 900;
  height: 2.75rem;
  justify-items: center;
  width: 2.75rem;
}

.chat-tool-button.is-active {
  background: rgba(91, 59, 45, 0.12);
  color: #5b3b2d;
}

.chat-send-button {
  align-items: center;
  border-radius: 999px;
  display: grid;
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 900;
  height: 2.75rem;
  justify-items: center;
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease;
  width: 2.75rem;
}

.chat-send-button.is-ready {
  background: #5b3b2d;
  color: white;
  opacity: 1;
}

.chat-send-button.is-disabled {
  background: rgba(91, 59, 45, 0.10);
  color: rgba(91, 59, 45, 0.28);
  opacity: 1;
}

.chat-action-sheet,
.chat-emoji-panel {
  animation: actionSheetUp 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  touch-action: pan-y;
}

.chat-bottom-panel {
  transform-origin: bottom center;
}

.emoji-choice:hover,
.chat-attach-item:hover .chat-attach-icon {
  background: rgba(255, 255, 255, 0.88);
}

.chat-attach-icon {
  height: 3.35rem;
  width: 3.35rem;
}

.chat-message-row {
  margin-bottom: 0.1rem;
}

.chat-message-row-v73 {
  animation: messageIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  user-select: none;
}

.chat-message-row-v73.is-selected .chat-bubble {
  box-shadow: 0 0 0 2px rgba(247, 178, 103, 0.44), 0 8px 18px rgba(125, 78, 43, 0.10);
}

.chat-message-row-v73.is-context-target .chat-bubble {
  box-shadow: 0 0 0 2px rgba(91, 59, 45, 0.14), 0 10px 22px rgba(125, 78, 43, 0.12);
}

.chat-bubble {
  box-shadow: 0 4px 12px rgba(125, 78, 43, 0.055);
}

.chat-bubble-v73 {
  cursor: default;
  max-width: min(76%, 19rem);
  pointer-events: auto;
}

.chat-bubble-other {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 18px 18px 18px 6px;
}

.chat-bubble-mine {
  background: linear-gradient(135deg, #7a5038, #5b3b2d);
  border-radius: 18px 18px 6px 18px;
}

.chat-quote-preview {
  border-left: 3px solid rgba(255, 255, 255, 0.38);
  margin-bottom: 0.45rem;
  padding-left: 0.55rem;
}

.chat-quote-preview.is-other {
  border-left-color: rgba(247, 178, 103, 0.58);
  color: rgba(91, 59, 45, 0.52);
}

.chat-quote-preview.is-mine {
  color: rgba(255, 255, 255, 0.70);
}

.reply-context,
.selection-bar,
.chat-file-chip {
  animation: softDrop 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-select-dot {
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(247, 178, 103, 0.34);
  border-radius: 999px;
  color: #5b3b2d;
  display: grid;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 900;
  height: 1.35rem;
  place-items: center;
  width: 1.35rem;
}

.chat-select-dot.is-on {
  background: #5b3b2d;
  border-color: #5b3b2d;
  color: white;
}

.chat-recall-line {
  color: rgba(91, 59, 45, 0.38);
  font-size: 0.75rem;
  font-weight: 800;
  margin: 0.45rem auto;
  text-align: center;
}

.message-action-scrim {
  inset: 0;
  pointer-events: auto;
  position: fixed;
  z-index: 74;
}

.message-action-menu {
  animation: actionMenuIn 150ms cubic-bezier(0.22, 1, 0.36, 1) both;
  background: rgba(48, 36, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(76, 48, 30, 0.26);
  display: flex;
  gap: 0.1rem;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  padding: 0.25rem;
  pointer-events: auto;
  position: fixed;
}

.message-action-menu button {
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  font-weight: 900;
  min-width: 3rem;
  padding: 0.55rem 0.7rem;
  pointer-events: auto;
  transition: background-color 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.message-action-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.message-action-menu button:active {
  transform: scale(0.96);
}

.message-action-menu button.is-disabled,
.message-action-menu button:disabled {
  color: rgba(255, 255, 255, 0.34);
}

.today-toolbar {
  position: relative;
}

.today-segment {
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.page-push {
  animation: pagePush 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lift-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.lift-card:hover {
  box-shadow: 0 16px 34px rgba(125, 78, 43, 0.14);
  transform: translateY(-1px);
}

.lift-card:active {
  transform: translateY(1px) scale(0.995);
}

.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.56);
  display: block;
  width: 100%;
  box-shadow: 0 8px 18px rgba(125, 78, 43, 0.052);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.stat-card:hover {
  box-shadow: 0 12px 24px rgba(125, 78, 43, 0.12);
  transform: translateY(-1px);
}

.status-choice {
  min-height: 2.6rem;
}

.gentle-enter {
  animation: gentleEnter 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.floaty {
  animation: floaty 5s ease-in-out infinite;
}

.wag {
  animation: wag 2.4s ease-in-out infinite;
  transform-origin: 70% 72%;
}

.bottom-nav {
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
}

.bottom-nav-panel {
  background: rgba(255, 250, 240, 0.90);
  box-shadow: 0 12px 34px rgba(125, 78, 43, 0.12);
}

.life-pill-peach {
  background: rgba(247, 157, 132, 0.16);
}

.life-pill-blue {
  background: rgba(148, 194, 215, 0.18);
}

.life-pill-mint {
  background: rgba(158, 216, 189, 0.18);
}

.scroll-soft {
  scrollbar-width: none;
}

.scroll-soft::-webkit-scrollbar {
  display: none;
}

.note-paper {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 245, 211, 0.94)),
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(247, 178, 103, 0.15) 28px);
}

.photo-frame {
  background:
    linear-gradient(#fffaf0, #fffaf0) padding-box,
    linear-gradient(135deg, #f7b267, #9ed8bd, #f79d84) border-box;
  border: 3px solid transparent;
}

.photo-uploader {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 250, 240, 0.82)),
    radial-gradient(circle at 18% 22%, rgba(247, 178, 103, 0.18), transparent 28%),
    radial-gradient(circle at 84% 74%, rgba(158, 216, 189, 0.22), transparent 30%);
}

.photo-thumb {
  background: rgba(255, 255, 255, 0.68);
  border: 3px solid rgba(255, 250, 240, 0.92);
}

.photo-thumb:hover {
  box-shadow: 0 14px 28px rgba(125, 78, 43, 0.13);
  transform: translateY(-1px);
}

.photo-modal {
  animation: modalFade 180ms ease both;
}

.tap-bounce {
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease;
}

.tap-bounce:active {
  transform: scale(0.97);
}

@keyframes gentleEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pagePush {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes actionSheetUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes messageIn {
  from { opacity: 0; transform: translateY(6px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes softDrop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes actionMenuIn {
  from { opacity: 0; transform: translateY(4px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wag {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(9deg); }
}

@keyframes openingFade {
  0% { opacity: 0; transform: translateY(4px); }
  24% { opacity: 1; transform: translateY(0); }
  78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-3px); }
}

@keyframes logoBreath {
  0% { transform: scale(0.965); opacity: 0; }
  28% { transform: scale(1); opacity: 1; }
  72% { transform: scale(1.018); opacity: 1; }
  100% { transform: scale(1.01); opacity: 0; }
}

@keyframes whisperIn {
  0%, 18% { opacity: 0; transform: translateY(4px); }
  34%, 76% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-2px); }
}

@media (min-width: 520px) {
  .app-shell {
    border-left: 1px solid rgba(255, 255, 255, 0.78);
    border-right: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 32px 80px rgba(114, 72, 38, 0.16);
    margin: 0 auto;
    max-width: 480px;
  }
}
