﻿/* === AI Phone - 微信应用样式 === */

/* === 微信整体框架 === */
.wechat-app {
  --input-area-height: 56px;
  position: absolute;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.wechat-app.open {
  transform: translateY(0);
}

/* 微信顶部导航 */
.wechat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--wechat-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--divider);
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--app-text);
}

.wechat-header .header-title {
  font-size: 17px;
  font-weight: 600;
}

.wechat-header .header-action {
  font-size: 15px;
  color: var(--app-text);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  background: none;
  border: none;
  font-family: inherit;
}

/* 微信内容区 */
.wechat-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-size: cover;
  background-position: center;
}

/* 微信底部导航（樱花图标） */
.wechat-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 6px));
  background: var(--wechat-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}

.tab-item:active { transform: scale(0.9); }

.tab-item .tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* 樱花图标 SVG */
.cherry-icon {
  width: 22px;
  height: 22px;
}

.cherry-icon .petal {
  fill: none;
  stroke: #999;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}

.tab-item.active .cherry-icon .petal {
  stroke: #333;
  fill: rgba(51, 51, 51, 0.06);
}

[data-theme="dark"] .cherry-icon .petal {
  stroke: #666;
}

[data-theme="dark"] .tab-item.active .cherry-icon .petal {
  stroke: #fff;
  fill: rgba(255, 255, 255, 0.1);
}

.tab-item .tab-label {
  font-size: 10px;
  color: #999;
  transition: color 0.3s ease;
}

.tab-item.active .tab-label {
  color: #333;
}

[data-theme="dark"] .tab-item .tab-label {
  color: #666;
}

[data-theme="dark"] .tab-item.active .tab-label {
  color: #fff;
}

/* 徽标 */
.tab-item .badge {
  position: absolute;
  top: 0;
  right: 6px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* === 聊天列表 === */
.chat-list {
  padding: 0;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--divider);
  transition: background 0.15s;
  gap: 12px;
}

.chat-item:active { background: rgba(128,128,128,0.1); }

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #e0e0e0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-info .chat-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--app-text);
  margin-bottom: 3px;
}

.chat-info .chat-preview {
  font-size: 13px;
  color: var(--app-subtext);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.chat-meta .chat-time {
  font-size: 12px;
  color: var(--app-subtext);
}

.chat-meta .unread-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* === 聊天对话界面 === */
.chat-room {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.chat-room-header {
  display: flex;
  align-items: center;
  padding: 12px 12px;
  background: var(--wechat-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--divider);
  gap: 10px;
  flex-shrink: 0;
}

.chat-room-header .back-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--app-text);
  border-radius: 8px;
}

.chat-room-header .room-info {
  flex: 1;
  text-align: center;
}

.chat-room-header .room-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--app-text);
}

.chat-room-header .room-status {
  font-size: 12px;
  color: var(--app-subtext);
}

/* 消息列表 */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-wrapper {
  display: flex;
  gap: 8px;
  max-width: 80%;
  animation: fadeIn 0.2s ease;
}
.message-wrapper .msg-bubble {
  width: fit-content;
  max-width: 100%;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  flex-shrink: 0;
  background: #e0e0e0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* 群聊发送者名字 */
.msg-sender {
  font-size: 10px;
  color: var(--app-subtext);
  padding: 0 4px;
  margin-bottom: 1px;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  max-width: 100%;
}

.message-wrapper.self .msg-bubble {
  background: var(--bubble-self);
  color: var(--bubble-self-text);
  border-bottom-right-radius: 4px;
}

.message-wrapper.other .msg-bubble {
  background: var(--bubble-other);
  color: var(--bubble-other-text);
  border-bottom-left-radius: 4px;
}

/* 表情消息 */
.msg-bubble.sticker {
  background: transparent !important;
  padding: 4px;
  font-size: 48px;
}

/* 音乐分享卡片 — 网易云风格 */
.msg-bubble.music-card {
  display: flex; align-items: center; gap: 12px;
  background: #1e1e24 !important; color: #fff !important;
  border-radius: 12px !important; padding: 14px !important;
  min-width: 240px; max-width: 300px; cursor: pointer;
  border: 0.5px solid rgba(255,255,255,0.08);
  transition: all 0.15s;
}
.msg-bubble.music-card:active { background: #2a2a32 !important; }
.music-card .mc-cover {
  width: 52px; height: 52px; border-radius: 8px;
  background: #2a2a2f; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.music-card .mc-cover img { width: 100%; height: 100%; object-fit: cover; }
.music-card .mc-info { flex: 1; min-width: 0; }
.music-card .mc-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-card .mc-artist { font-size: 12px; color: #999; margin-top: 3px; }
.music-card .mc-tag { font-size: 9px; color: #777; margin-top: 4px; letter-spacing: 0.5px; }

/* 红包消息 */
.msg-bubble.red-packet {
  background: #f43e3e !important;
  color: #fff !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  padding: 12px 14px;
}

.red-packet .rp-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  color: #fff7e7;
}
.red-packet .rp-icon svg,
.transfer .tf-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.red-packet .rp-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.red-packet .rp-title {
  font-weight: 600;
  font-size: 14px;
}

.red-packet .rp-subtitle {
  font-size: 11px;
  opacity: 0.8;
}
.payment-state { display: block; margin-top: 3px; font-size: 10px; opacity: .72; }

/* 转账消息 */
.msg-bubble.transfer {
  background: #f5f5f7 !important;
  color: #000 !important;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
}

.transfer .tf-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  color: #4f5560;
}

.transfer .tf-info {
  display: flex;
  flex-direction: column;
}

.transfer .tf-title {
  font-size: 14px;
}

.transfer .tf-amount {
  font-size: 18px;
  font-weight: 700;
}
.payment-actions { display: flex; gap: 6px; margin-top: 6px; }
.payment-actions.is-self { justify-content: flex-end; }
.payment-actions.is-other { justify-content: flex-start; }
.payment-action { min-height: 30px; padding: 5px 11px; border: 0; border-radius: 999px; color: var(--app-text); background: rgba(120,120,128,.16); font: inherit; font-size: 12px; cursor: pointer; }
.payment-action--claim, .payment-action--accept { color: #fff; background: #34c759; }

.wechat-call-card { padding: 0 !important; background: transparent !important; box-shadow: none !important; }
.wechat-call-card > button { min-width: 176px; min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid var(--divider); border-radius: 14px; color: var(--app-text); background: var(--card-bg); text-align: left; cursor: pointer; }
.wechat-call-card-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 27px; }
.wechat-call-card-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wechat-call-card-state { display: flex; align-items: center; gap: 6px; color: var(--app-subtext); font-size: 12px; }
.wechat-call-card-state i { width: 17px; height: 17px; display: grid; place-items: center; font-style: normal; }
.wechat-call-card-state svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wechat-call-card-state[data-call-state="ended"] { color: var(--lnyy-success, #18794e); }
.wechat-call-card-state[data-call-state="rejected"], .wechat-call-card-state[data-call-state="cancelled"] { color: var(--lnyy-danger, #b42318); }

/* 通话记录与语音消息保持同一条形气泡，不再呈现独立卡片。 */
.message-wrapper .msg-bubble.wechat-call-card { width: min(var(--voice-width, 224px), 100%); min-width: 0; max-width: 100%; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.message-wrapper .wechat-call-card > button { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; gap: 9px; border: 0; border-radius: 16px; color: inherit; background: transparent; box-shadow: none; }
.message-wrapper.other .wechat-call-card > button { color: var(--wechat-other-text, var(--app-text)); background: var(--wechat-other, #fff); border-radius: 6px 18px 18px 18px; }
.message-wrapper.self .wechat-call-card > button { color: var(--wechat-self-text, #fff); background: var(--wechat-self, #111); border-radius: 18px 18px 6px 18px; }
.wechat-call-card-icon { width: 22px; height: 22px; flex-basis: 22px; }
.wechat-call-card-icon svg { width: 20px; height: 20px; }
.wechat-call-card-state { gap: 5px; font-size: 12px; }
.message-wrapper.self .wechat-call-card-state { color: rgba(255,255,255,.78); }
.message-wrapper.other .wechat-call-card-state { color: var(--app-subtext); }

/* 消息状态（已读/未读 + 时间） */
.msg-meta {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--bubble-read);
  padding: 0 4px;
}
.cherry-read { width: 11px; height: 11px; flex-shrink: 0; }
.cherry-read.unread { opacity: 0.5; }
.cherry-read.read { opacity: 0.9; }

.message-wrapper.self .msg-meta {
  justify-content: flex-end;
}

/* 时间分割 */
.time-divider {
  text-align: center;
  font-size: 11px;
  color: var(--app-subtext);
  padding: 8px 0;
}

.time-divider span {
  background: rgba(128,128,128,0.15);
  padding: 3px 10px;
  border-radius: 4px;
}

/* === 输入区域 === */
.input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 8px));
  background: var(--wechat-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--divider);
  flex-shrink: 0;
}

.input-area .input-extra {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  border-radius: 50%;
  transition: transform 0.2s;
}

.input-area .input-extra:active { transform: scale(0.8); }

.input-area .msg-input {
  flex: 1;
  border: none;
  background: var(--input-bg);
  color: var(--input-text);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  max-height: 100px;
  resize: none;
}

.input-area .send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bubble-self);
  color: var(--bubble-self-text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.input-area .send-btn:active { transform: scale(0.85); }
.input-area .send-btn:disabled { opacity: 0.4; }

/* === 联系人列表 === */
.contact-list { padding: 0; }

.contact-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--divider);
  gap: 12px;
}

.contact-item:active { background: rgba(128,128,128,0.1); }

.contact-item .contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #e0e0e0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.contact-item .contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-item .contact-info {
  flex: 1;
  min-width: 0;
}

.contact-item .contact-name {
  font-size: 16px;
  color: var(--app-text);
  font-weight: 500;
}

.contact-item .contact-remark {
  font-size: 12px;
  color: var(--app-subtext);
  margin-top: 2px;
}

.search-bar {
  padding: 8px 16px;
}

.search-bar input {
  width: 100%;
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

/* === 发现页面 === */
.discover-page {
  padding: 0;
}

.discover-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--divider);
  gap: 12px;
  transition: background 0.15s;
}

.discover-item:active { background: rgba(128,128,128,0.1); }

.discover-item .dis-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.discover-item .dis-info {
  flex: 1;
}

.discover-item .dis-title {
  font-size: 16px;
  color: var(--app-text);
}

.discover-item .dis-arrow {
  color: var(--app-subtext);
  font-size: 14px;
}

/* === 我的页面 === */
.profile-page {
  padding: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  padding: 24px 16px;
  gap: 16px;
  cursor: pointer;
  background: var(--card-bg);
}

.profile-header .profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: #e0e0e0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.profile-header .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header .profile-info {
  flex: 1;
}

.profile-header .profile-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--app-text);
  margin-bottom: 4px;
}

.profile-header .profile-id {
  font-size: 13px;
  color: var(--app-subtext);
}

.profile-header .profile-arrow {
  color: var(--app-subtext);
}

/* === 朋友圈 === */
.moments-page {
  padding: 0;
}

.moment-header {
  position: relative;
  height: 280px;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.moment-header .moment-header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.moment-header .mh-avatar {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  border: 2px solid #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.moment-header .mh-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-header .mh-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}


/* === 角色编辑/创建弹窗 === */
.role-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--app-subtext);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-form input,
.role-form textarea,
.role-form select {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--divider);
  background: var(--input-bg);
  color: var(--input-text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}

.role-form textarea {
  min-height: 80px;
  resize: vertical;
}

.role-form .btn-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.role-form .btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}

.role-form .btn:active { transform: scale(0.97); }

.role-form .btn-primary {
  background: #000;
  color: #fff;
}

.role-form .btn-secondary {
  background: var(--input-bg);
  color: var(--app-text);
}

.role-form .btn-danger {
  background: var(--danger);
  color: #fff;
}

/* === 空状态 === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--app-subtext);
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state .empty-text {
  font-size: 15px;
  margin-bottom: 8px;
}

.empty-state .empty-sub {
  font-size: 13px;
  opacity: 0.6;
}

/* ＋菜单 */
.plus-menu {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--wechat-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--divider);
  flex-shrink: 0;
  animation: fadeIn 0.2s ease;
}
.plus-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  color: var(--app-text);
  transition: transform 0.15s;
  background: rgba(128,128,128,0.05);
}
.plus-menu-item:active { transform: scale(0.9); }
.plus-menu-item .pmi-icon { font-size: 26px; }

/* 加载动画 */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-subtext);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) { animation-delay: 0s; }
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ===== 2026-07-16 Android/PWA 小屏回归：聊天输入区 ===== */
.chat-room {
  min-height: 0;
}

.chat-room-header {
  min-height: 50px;
  box-sizing: border-box;
}

.chat-room-header .room-info {
  min-width: 0;
}

.chat-room-header .room-name,
.chat-room-header .room-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messages-area {
  min-height: 0;
  overscroll-behavior: contain;
  scroll-padding-bottom: 86px;
}

.input-area {
  min-height: 52px;
  box-sizing: border-box;
}

.input-area .msg-input {
  min-width: 0;
  min-height: 36px;
  line-height: 1.35;
  box-sizing: border-box;
}

.input-area .input-extra,
.input-area .send-btn {
  flex: 0 0 auto;
}

.keyboard-open .wechat-app.open .messages-area {
  scroll-padding-bottom: calc(var(--keyboard-inset, 0px) + var(--input-area-height, 56px));
}

.keyboard-open .wechat-app.open .input-area {
  padding-bottom: calc(7px + var(--safe-bottom-inset, 0px));
}

@media (max-width: 390px) {
  .wechat-header {
    padding: 11px 12px;
  }

  .wechat-header .header-title {
    font-size: 16px;
  }

  .wechat-header .header-action {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 14px;
  }

  .wechat-tabbar {
    padding-top: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 5px));
  }

  .tab-item {
    padding-left: 8px;
    padding-right: 8px;
  }

  .chat-room-header {
    padding: 9px 9px;
    gap: 6px;
  }

  .chat-room-header .back-btn {
    width: 30px;
    height: 30px;
  }

  .chat-room-header .room-name {
    font-size: 15px;
  }

  .chat-room-header .room-status {
    font-size: 10px;
  }

  .messages-area {
    padding: 10px 10px;
    gap: 12px;
  }

  .message-wrapper {
    max-width: 86%;
    gap: 6px;
  }

  .msg-avatar {
    width: 30px;
    height: 30px;
  }

  .msg-bubble {
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.45;
  }

  .msg-bubble.music-card {
    min-width: 0;
    max-width: min(270px, 78vw);
    padding: 11px !important;
    gap: 10px;
  }

  .music-card .mc-cover {
    width: 46px;
    height: 46px;
  }

  .input-area {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .input-area .input-extra {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .input-area .msg-input {
    padding: 9px 13px;
    font-size: 14px;
  }

  .input-area .send-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
}

@media (max-width: 340px) {
  .message-wrapper {
    max-width: 90%;
  }

  .messages-area {
    padding-left: 8px;
    padding-right: 8px;
  }

  .input-area {
    gap: 4px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .input-area .input-extra {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .input-area .msg-input {
    padding-left: 11px;
    padding-right: 11px;
  }

  .input-area .send-btn {
    width: 32px;
    height: 32px;
  }
}

/* ===== Lnyy UI v2：微信外壳与主列表 ===== */
.wechat-app {
  --wechat-shell-bg: #f5f5f7;
  --wechat-surface: #ffffff;
  --wechat-nav-surface: rgba(247, 247, 248, 0.98);
  --wechat-primary: #111113;
  --wechat-secondary: #8a8a8f;
  --wechat-line: rgba(20, 20, 22, 0.09);
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
}

.wechat-header {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  height: 52px;
  min-height: 52px;
  margin-top: calc(28px + var(--safe-top-inset, 0px));
  padding: 0 10px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-nav-surface);
  border-bottom: 0.5px solid var(--wechat-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.wechat-header .header-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  line-height: 1.08;
}

.wechat-header .header-title strong {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-header .header-title small {
  max-width: 100%;
  overflow: hidden;
  color: var(--wechat-secondary);
  font-size: 9.5px;
  font-weight: 450;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-header .header-action {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  color: var(--wechat-primary);
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms ease, background-color 160ms ease;
}

.wechat-header .header-action-right { justify-self: end; }

.wechat-header .header-action svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.wechat-header .header-action.is-exit {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(118, 118, 128, 0.1);
}

.wechat-header .header-action.is-exit svg { width: 16px; height: 16px; }

.wechat-header .header-action.is-add svg { stroke-width: 1.65; }
.wechat-header .header-action.is-more svg { fill: currentColor; stroke: none; }
.wechat-header .header-action:active { transform: scale(0.9); background: rgba(118, 118, 128, 0.14); }
.wechat-header .header-action:focus-visible { outline: 2px solid rgba(215, 151, 164, 0.72); outline-offset: 1px; }
.wechat-header .header-action[hidden] { display: inline-flex !important; visibility: hidden; pointer-events: none; }

.wechat-content {
  min-height: 0;
  color: var(--wechat-primary);
  background-color: var(--wechat-shell-bg);
  overscroll-behavior: contain;
}

.wechat-app[data-view="chat"] .wechat-content,
.wechat-app[data-view="group-chat"] .wechat-content {
  overflow: hidden;
}

.wechat-content > :first-child {
  animation: wechatPageIn 220ms cubic-bezier(0.22, 0.72, 0.22, 1) both;
}

@keyframes wechatPageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.wechat-tabbar {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  min-height: calc(58px + var(--safe-bottom-inset, 0px));
  padding: 5px 3px calc(5px + var(--safe-bottom-inset, 0px));
  box-sizing: border-box;
  color: var(--wechat-secondary);
  background: var(--wechat-nav-surface);
  border-top: 0.5px solid var(--wechat-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.wechat-tabbar .tab-item {
  min-width: 0;
  min-height: 48px;
  padding: 1px 4px 0;
  gap: 3px;
  color: var(--wechat-secondary);
  border-radius: 8px;
  transition: color 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.wechat-tabbar .tab-item:active { transform: scale(0.93); }
.wechat-tabbar .tab-item:focus-visible { outline: 2px solid rgba(215, 151, 164, 0.64); outline-offset: -1px; }

.wechat-tabbar .tab-icon {
  width: 26px;
  height: 26px;
  color: inherit;
}

.wechat-tab-svg {
  width: 23px;
  height: 23px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wechat-tabbar .tab-label {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-tabbar .tab-item.active { color: var(--wechat-primary); }
.wechat-tabbar .tab-item.active .tab-label { color: inherit; font-weight: 600; }

.wechat-list-search {
  height: 34px;
  margin: 8px 12px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  color: #8e8e93;
  background: rgba(118, 118, 128, 0.11);
  border: 0.5px solid rgba(118, 118, 128, 0.05);
  border-radius: 9px;
}

.wechat-list-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.wechat-list-search input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  color: var(--wechat-primary);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 13px;
  appearance: none;
}

.wechat-list-search input::placeholder { color: #8e8e93; }
.chat-list { padding: 0; background: var(--wechat-surface); }

.chat-item {
  position: relative;
  min-height: 70px;
  padding: 9px 14px;
  gap: 11px;
  box-sizing: border-box;
  background: var(--wechat-surface);
  border: 0;
}

.chat-item::after {
  content: "";
  position: absolute;
  left: 73px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--wechat-line);
  transform: scaleY(0.75);
  transform-origin: bottom;
}

.chat-item:last-child::after { display: none; }
.chat-item[hidden] { display: none !important; }
.chat-item:hover { background: #fafafa; }
.chat-item:active { background: #f1f1f3; }

.chat-swipe-row {
  position: relative;
  overflow: hidden;
  background: var(--wechat-surface);
  touch-action: pan-y;
}

.chat-swipe-row[hidden] { display: none !important; }

.chat-swipe-row .chat-item {
  position: relative;
  z-index: 1;
  transition: transform 180ms cubic-bezier(0.22, 0.72, 0.22, 1), background-color 140ms ease;
  will-change: transform;
}

.chat-swipe-row.show-actions .chat-item { transform: translateX(-150px); }
.chat-swipe-row.pinned .chat-item { background: #fbfbfc; }

.chat-row-actions {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 0;
  width: 150px;
  display: flex;
  justify-content: flex-end;
  background: #eeeeef;
  visibility: hidden;
  pointer-events: none;
}

.chat-swipe-row.is-swiping .chat-row-actions,
.chat-swipe-row.show-actions .chat-row-actions {
  visibility: visible;
  pointer-events: auto;
}

.chat-row-action {
  width: 76px;
  padding: 0 8px;
  border: 0;
  color: #fff;
  background: #8e8e93;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.chat-row-action.pin { background: #636366; }
.chat-row-action.danger { width: 74px; background: #e5484d; }
.chat-row-action:active { filter: brightness(0.94); }

.chat-pin-badge {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  color: #8a8a8f;
  background: rgba(118, 118, 128, 0.12);
  font-size: 10px;
  font-weight: 500;
  line-height: 16px;
  vertical-align: 1px;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  color: #4a4a4f;
  background: #e9e9ec;
  border-radius: 7px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chat-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f2f2f4, #dedee2);
}

.chat-info { align-self: center; }
.chat-info .chat-name { margin-bottom: 5px; color: var(--wechat-primary); font-size: 15.5px; font-weight: 560; line-height: 1.15; }
.chat-info .chat-preview { color: var(--wechat-secondary); font-size: 12.5px; line-height: 1.25; }
.chat-meta { min-height: 48px; padding-top: 2px; box-sizing: border-box; gap: 6px; }
.chat-meta .chat-time { color: #b1b1b6; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chat-meta .unread-badge { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; font-weight: 650; line-height: 18px; box-sizing: border-box; }

.wechat-empty-state { min-height: 58%; }
.wechat-empty-symbol { width: 58px; height: 58px; margin: 0 auto 12px; display: grid; place-items: center; color: #a9a9ae; }
.wechat-empty-symbol svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

/* 新版只保留微信全局标题栏，避免聊天页出现两套返回/退出按钮。 */
.chat-room-header { display: none !important; }

[data-theme="dark"] .wechat-app {
  --wechat-shell-bg: #0d0d0f;
  --wechat-surface: #171719;
  --wechat-nav-surface: rgba(22, 22, 24, 0.98);
  --wechat-primary: #f5f5f7;
  --wechat-secondary: #919198;
  --wechat-line: rgba(255, 255, 255, 0.085);
}

[data-theme="dark"] .wechat-list-search { color: #8f8f96; background: rgba(118, 118, 128, 0.22); border-color: rgba(255, 255, 255, 0.025); }
[data-theme="dark"] .wechat-list-search input { color: var(--wechat-primary); }
[data-theme="dark"] .chat-item:hover { background: #1d1d20; }
[data-theme="dark"] .chat-item:active { background: #242427; }
[data-theme="dark"] .chat-swipe-row,
[data-theme="dark"] .chat-swipe-row.pinned .chat-item { background: var(--wechat-surface); }
[data-theme="dark"] .chat-row-actions { background: #2a2a2d; }
[data-theme="dark"] .chat-pin-badge { color: #9a9aa1; background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .chat-avatar { color: #dedee2; background: #2b2b2f; }
[data-theme="dark"] .chat-avatar-fallback { background: linear-gradient(145deg, #343438, #242428); }
[data-theme="dark"] .chat-meta .chat-time { color: #6f6f76; }

[data-reduce-motion="true"] .wechat-content > :first-child,
[data-performance-mode="true"] .wechat-content > :first-child {
  animation: none;
}

@media (max-width: 370px) {
  .wechat-header { grid-template-columns: 36px minmax(0, 1fr) 36px; height: 50px; min-height: 50px; padding: 0 8px; }
  .wechat-header .header-action { width: 32px; height: 32px; min-width: 32px; }
  .wechat-header .header-title strong { font-size: 16px; }
  .wechat-tabbar { min-height: calc(56px + var(--safe-bottom-inset, 0px)); }
  .wechat-list-search { margin-left: 10px; margin-right: 10px; }
  .chat-item { min-height: 66px; padding: 8px 11px; gap: 10px; }
  .chat-item::after { left: 68px; }
  .chat-avatar { width: 46px; height: 46px; }
  .chat-meta { min-height: 46px; }
}

/* ===== Lnyy UI v2：微信聊天输入区与功能菜单 ===== */
.chat-room {
  min-height: 0;
  height: 100%;
  background-color: rgba(245, 245, 247, 0.9);
}

.messages-area {
  padding: 12px 12px 10px;
  scroll-padding-bottom: 76px;
}

.input-area {
  position: relative;
  z-index: 8;
  min-height: 56px;
  flex-wrap: wrap;
  padding: 7px 9px calc(7px + var(--safe-bottom-inset, 0px));
  gap: 7px;
  align-items: flex-end;
  box-sizing: border-box;
  background: var(--wechat-nav-surface);
  border-top: 0.5px solid var(--wechat-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.input-area .input-extra,
.input-area .send-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  color: var(--wechat-primary);
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms ease, background-color 150ms ease, opacity 150ms ease;
}

.input-area .send-btn {
  color: #fff;
  background: #111113;
}

.input-area .input-extra:active,
.input-area .send-btn:active {
  transform: scale(0.9);
}

.input-area .input-extra:active { background: rgba(118, 118, 128, 0.12); }
.input-area .send-btn:disabled { opacity: 0.34; }
.input-area .input-extra:focus-visible,
.input-area .send-btn:focus-visible { outline: 2px solid rgba(215, 151, 164, 0.72); outline-offset: 1px; }

.composer-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  pointer-events: none;
}

.composer-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer-icon svg circle { fill: currentColor; stroke: none; }
.send-btn .composer-icon { width: 19px; height: 19px; }
.send-btn .composer-icon svg { stroke-width: 1.9; }

.input-area .msg-input {
  min-width: 0;
  min-height: 36px;
  max-height: 92px;
  padding: 8px 11px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border: 0.5px solid rgba(20, 20, 22, 0.055);
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.35;
  caret-color: #111113;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.025);
}

.input-area .msg-input::placeholder { color: #b1b1b6; }
.input-area .msg-input:focus { border-color: rgba(20, 20, 22, 0.12); }

.quote-compose-preview {
  flex: 1 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  box-sizing: border-box;
  color: #55555a;
  background: rgba(118, 118, 128, 0.1);
  border-radius: 8px;
}

.quote-compose-preview[hidden] { display: none !important; }

.quote-compose-text {
  min-width: 0;
  flex: 1;
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
  line-height: 1.35;
}

.quote-compose-text b {
  max-width: 76px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #2f2f33;
  font-weight: 600;
}

.quote-compose-text span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quote-compose-cancel {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #8e8e93;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.quote-compose-cancel:active { background: rgba(118, 118, 128, 0.16); }

.plus-menu {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px;
  padding: 16px 12px calc(18px + var(--safe-bottom-inset, 0px));
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
  border-top: 0.5px solid var(--wechat-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: wechatToolTrayIn 190ms cubic-bezier(0.22, 0.72, 0.22, 1) both;
}

.plus-menu[hidden] { display: none !important; }

@keyframes wechatToolTrayIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.plus-menu-item {
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--wechat-primary);
  background: transparent;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 11px;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 150ms ease, opacity 150ms ease;
}

.plus-menu-item .pmi-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: #303034;
  background: var(--wechat-surface);
  border: 0.5px solid var(--wechat-line);
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(17, 17, 19, 0.045);
}

.plus-menu-item .pmi-icon .composer-icon { width: 23px; height: 23px; }
.plus-menu-item:active { transform: scale(0.93); opacity: 0.76; }
.plus-menu-item:focus-visible { outline: 2px solid rgba(215, 151, 164, 0.68); outline-offset: 3px; }

.msg-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #55555a;
  background: linear-gradient(145deg, #f0f0f3, #dcdce1);
  font-size: 13px;
  font-weight: 650;
}

[data-theme="dark"] .chat-room { background-color: rgba(13, 13, 15, 0.92); }
[data-theme="dark"] .input-area .send-btn { color: #111113; background: #f3f3f5; }
[data-theme="dark"] .input-area .msg-input { border-color: rgba(255, 255, 255, 0.055); caret-color: #f3f3f5; box-shadow: none; }
[data-theme="dark"] .input-area .msg-input:focus { border-color: rgba(255, 255, 255, 0.13); }
[data-theme="dark"] .plus-menu-item .pmi-icon { color: #e5e5e8; }
[data-theme="dark"] .msg-avatar-fallback { color: #e4e4e7; background: linear-gradient(145deg, #37373b, #242428); }

.keyboard-open .wechat-app.open .messages-area {
  scroll-padding-bottom: calc(var(--keyboard-inset, 0px) + var(--input-area-height, 56px));
}

.keyboard-open .wechat-app.open .input-area {
  padding-bottom: 7px;
}

[data-reduce-motion="true"] .plus-menu,
[data-performance-mode="true"] .plus-menu { animation: none; }

@media (max-width: 370px) {
  .messages-area { padding-left: 9px; padding-right: 9px; }
  .input-area { gap: 5px; padding-left: 7px; padding-right: 7px; }
  .input-area .input-extra,
  .input-area .send-btn { width: 34px; height: 34px; min-width: 34px; flex-basis: 34px; }
  .input-area .msg-input { min-height: 34px; padding: 7px 9px; font-size: 14px; }
  .composer-icon { width: 22px; height: 22px; }
  .send-btn .composer-icon { width: 18px; height: 18px; }
  .plus-menu { gap: 12px 6px; padding-left: 8px; padding-right: 8px; }
  .plus-menu-item .pmi-icon { width: 46px; height: 46px; border-radius: 13px; }
}

@media (max-width: 330px) {
  .input-area { gap: 4px; padding-left: 5px; padding-right: 5px; }
  .input-area .input-extra,
  .input-area .send-btn { width: 32px; height: 32px; min-width: 32px; flex-basis: 32px; }
  .plus-menu-item .pmi-icon { width: 43px; height: 43px; }
}

/* ===== Lnyy UI v2：微信消息气泡、时间与已读状态 ===== */
.messages-area {
  gap: 12px;
  overflow-x: hidden;
  background: transparent;
}

.message-wrapper {
  width: fit-content;
  max-width: 88%;
  margin: 1px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: wechatBubbleIn 210ms cubic-bezier(0.22, 0.72, 0.22, 1) both;
}

@keyframes wechatBubbleIn {
  from { opacity: 0; transform: translateY(5px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-wrapper.self { align-self: flex-end; flex-direction: row-reverse; }
.message-wrapper.other { align-self: flex-start; }

.msg-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 6px;
  color: #55555a;
  background: #e8e8eb;
  box-shadow: 0 0 0 0.5px rgba(20, 20, 22, 0.07);
}

.msg-body {
  position: relative;
  min-width: 0;
  max-width: min(68vw, 300px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.message-wrapper.self .msg-body { align-items: flex-end; }

.msg-bubble {
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  padding: 9px 12px;
  box-sizing: border-box;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.46;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-shadow: none;
}

.message-wrapper.self .msg-bubble {
  color: #fff;
  background: #111113;
  border: 0.5px solid #111113;
  border-bottom-right-radius: 6px;
}

.message-wrapper.other .msg-bubble {
  color: #171719;
  background: #fff;
  border: 0.5px solid rgba(20, 20, 22, 0.075);
  border-bottom-left-radius: 6px;
  box-shadow: 0 1px 2px rgba(17, 17, 19, 0.035);
}

.msg-bubble p:first-child { margin-top: 0; }
.msg-bubble p:last-child { margin-bottom: 0; }
.msg-bubble a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.msg-bubble code { padding: 1px 4px; color: inherit; background: rgba(128, 128, 128, 0.15); border-radius: 4px; }

/* 引用消息与普通气泡分层显示：字号约为正常消息的一半，避免挤压正文。 */
.msg-quote {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 5px 8px;
  box-sizing: border-box;
  overflow: hidden;
  color: #6f6f76;
  background: rgba(118, 118, 128, 0.12);
  border: 1px solid rgba(118, 118, 128, 0.18);
  border-left: 3px solid rgba(118, 118, 128, 0.38);
  border-radius: 7px;
  font-size: 7.5px !important;
  line-height: 1.28 !important;
}

.msg-quote span,
.msg-quote p {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-quote span {
  margin-bottom: 1px;
  color: #55555a;
  font-size: inherit !important;
  font-weight: 700;
  line-height: inherit !important;
  white-space: nowrap;
}

.msg-quote p {
  margin: 0;
  font-size: inherit !important;
  line-height: inherit !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.wechat-app.wechat-app--chat-glass .msg-quote {
  color: var(--wechat-glass-muted) !important;
  background: var(--wechat-glass-control) !important;
  border-color: var(--wechat-glass-line) !important;
  text-shadow: var(--wechat-glass-text-shadow);
  backdrop-filter: var(--wechat-glass-small-filter);
  -webkit-backdrop-filter: var(--wechat-glass-small-filter);
}

.wechat-app.wechat-app--chat-glass .msg-quote span { color: var(--wechat-glass-text) !important; }

/* 五套柔雾主题的引用消息：跟随对应气泡，但降低一档明度，并用细线标出引用边界。 */
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .msg-quote {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 5px 8px;
  box-sizing: border-box;
  overflow: hidden;
  color: color-mix(in srgb, var(--wechat-primary) 68%, var(--wechat-surface));
  background: color-mix(in srgb, var(--wechat-self-bg) 48%, var(--wechat-surface));
  border: 1px solid color-mix(in srgb, var(--wechat-self-bg) 58%, var(--wechat-line));
  border-left: 3px solid color-mix(in srgb, var(--wechat-self-bg) 78%, var(--wechat-line));
  border-radius: 7px;
  font-size: 7.5px !important;
  line-height: 1.28 !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .message-wrapper.other .msg-quote {
  background: color-mix(in srgb, var(--wechat-other-bg) 72%, var(--wechat-shell-bg));
  border-color: color-mix(in srgb, var(--wechat-line) 78%, var(--wechat-other-bg));
  border-left-color: color-mix(in srgb, var(--wechat-other-bg) 88%, var(--wechat-line));
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .msg-quote span,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .msg-quote p {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .msg-quote span {
  margin-bottom: 1px;
  color: color-mix(in srgb, var(--wechat-primary) 78%, var(--wechat-surface));
  font-size: 7.5px !important;
  font-weight: 700;
  white-space: nowrap;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .msg-quote p {
  margin: 0;
  font-size: 7.5px !important;
  line-height: 1.28 !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.msg-quote-strip,
.msg-inline-result {
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  color: #6f6f76;
  background: rgba(118, 118, 128, 0.1);
  font-size: 12px;
  line-height: 1.4;
}

.msg-quote-strip {
  width: fit-content;
  padding: 6px 8px;
  border-left: 3px solid rgba(118, 118, 128, 0.32);
}

.msg-quote-strip span {
  display: -webkit-box;
  max-width: min(56vw, 236px);
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.msg-inline-result {
  width: fit-content;
  min-width: 128px;
  max-width: min(60vw, 260px);
  margin-top: 4px;
  padding: 7px 9px;
  display: grid;
  gap: 4px;
}

.msg-inline-result b {
  color: #3c3c40;
  font-size: 11px;
  font-weight: 600;
}

.msg-inline-result span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg-inline-result.speech audio {
  width: min(224px, 54vw);
  max-width: 100%;
  height: 32px;
}

.message-wrapper.self .msg-quote-strip,
.message-wrapper.self .msg-inline-result { align-self: flex-end; }
.message-wrapper.other .msg-quote-strip,
.message-wrapper.other .msg-inline-result { align-self: flex-start; }

/* 元数据严格放在气泡外：用户在左、AI 在右。 */
#wechatApp .msg-meta {
  position: static !important;
  height: auto;
  min-height: 13px;
  margin-top: 3px;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  gap: 3px;
  color: #a4a4aa;
  font-size: 9px;
  font-weight: 500;
  line-height: 13px;
  white-space: nowrap;
  opacity: 0.78;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

#wechatApp .message-wrapper.other .msg-meta {
  align-self: flex-start;
  margin-left: 2px;
  left: auto !important;
  right: auto !important;
}

#wechatApp .message-wrapper.self .msg-meta {
  align-self: flex-end;
  left: auto !important;
  right: auto !important;
  justify-content: flex-end;
}

.msg-meta time { display: inline-block; min-width: 27px; }

.cherry-read {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  display: block;
  overflow: visible;
  transition: opacity 180ms ease, transform 220ms ease;
}

.cherry-read.read { opacity: 0.95; transform: scale(1); }
.cherry-read.read ellipse { fill: #e1a0af; }
.cherry-read.read circle { fill: #d47f94; }
.cherry-read.unread { opacity: 0.7; transform: scale(0.92); }
.cherry-read.unread path:first-child { fill: rgba(213, 139, 157, 0.18); stroke: #c98b9a; stroke-width: 1.05; }
.cherry-read.unread .bud-line { fill: none; stroke: #b98290; stroke-width: 0.85; stroke-linecap: round; stroke-linejoin: round; }

.time-divider {
  width: 100%;
  align-self: stretch;
  padding: 5px 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #99999f;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.time-divider span {
  padding: 3px 8px;
  color: inherit;
  background: rgba(118, 118, 128, 0.09);
  border: 0;
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}

.time-divider.date { padding-top: 10px; }
.time-divider.date span { padding-left: 10px; padding-right: 10px; }

.msg-sender {
  max-width: 100%;
  padding: 0 4px;
  margin: 0 0 1px;
  color: #8f8f95;
  font-size: 10px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-empty-state {
  min-height: 58%;
  padding: 38px 24px;
  box-sizing: border-box;
}

.chat-empty-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  color: #aaaab0;
}

.chat-empty-symbol svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msg-bubble.sticker {
  padding: 2px;
  color: inherit;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.sticker-image {
  width: auto;
  max-width: 132px;
  max-height: 132px;
  display: block;
  object-fit: contain;
  border-radius: 12px;
}

.image-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  color: inherit;
  background: rgba(120, 120, 128, 0.14);
  cursor: zoom-in;
  touch-action: manipulation;
}

.image-preview-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 多图消息：默认像实体照片一样错位叠放，展开后再显示完整网格。 */
.wechat-app .msg-bubble.image-stack-bubble {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#wechatApp.wechat-app.wechat-app--chat-glass .msg-bubble.image-stack-bubble::before,
#wechatApp.wechat-app.wechat-app--chat-glass .msg-bubble.image-stack-bubble::after {
  content: none !important;
  display: none !important;
}

.chat-image-stack-shell {
  display: flex;
  align-items: center;
}

.chat-image-stack {
  position: relative;
  width: min(55vw, 218px);
  aspect-ratio: 4 / 5;
  margin: 0 18px 15px 0;
  touch-action: pan-y;
  user-select: none;
}

.chat-image-stack-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 14px;
  background: #dedede;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .13);
  cursor: zoom-in;
  transform-origin: center;
  transition: transform 220ms ease, opacity 180ms ease;
}

.chat-image-stack-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-image-stack-item:nth-child(1) { z-index: 4; }
.chat-image-stack-item[data-stack-offset="0"] { z-index: 4; transform: translate(var(--stack-drag-x, 0px), 0) rotate(0deg); }
.chat-image-stack-item[data-stack-offset="1"] { z-index: 3; transform: translate(9px, 7px) rotate(1deg); }
.chat-image-stack-item[data-stack-offset="2"] { z-index: 2; transform: translate(17px, 14px) rotate(2deg); }
.chat-image-stack-item[data-stack-offset="3"],
.chat-image-stack-item[data-stack-offset="4"],
.chat-image-stack-item[data-stack-offset="5"],
.chat-image-stack-item[data-stack-offset="6"],
.chat-image-stack-item[data-stack-offset="7"],
.chat-image-stack-item[data-stack-offset="8"] { z-index: 1; opacity: 0; pointer-events: none; }
.chat-image-stack.is-dragging .chat-image-stack-item { transition: none; }

.chat-image-stack-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 5;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, .58);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 350px) {
  .chat-image-stack { width: min(52vw, 180px); }
}

[data-reduce-motion="true"] .chat-image-stack-item { transition: none; }

.image-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.92);
  animation: imagePreviewIn 160ms ease-out both;
}

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

.image-preview-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
}

.image-preview-image {
  display: block;
  max-width: min(92vw, 700px);
  max-height: min(82vh, 760px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.image-preview-status {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.image-preview-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
}

.msg-bubble.music-card {
  width: min(270px, 67vw);
  min-width: 0;
  max-width: min(270px, 67vw);
  padding: 11px !important;
  gap: 10px;
  border-radius: 12px !important;
}

.music-card .mc-cover { width: 48px; height: 48px; flex: 0 0 48px; }

.msg-bubble.red-packet,
.msg-bubble.transfer {
  width: min(246px, 66vw);
  min-width: 0;
  max-width: min(246px, 66vw);
  padding: 11px 12px;
  border-radius: 10px !important;
}

.msg-bubble.red-packet { background: #d95d4f !important; border-color: rgba(138, 46, 37, 0.2) !important; }
.msg-bubble.transfer { background: #fff !important; border-color: rgba(20, 20, 22, 0.09) !important; }

.rp-icon,
.tf-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  font-size: 0;
}

.rp-icon svg,
.tf-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.payment-actions { max-width: 100%; }
.payment-actions button { min-height: 28px; padding: 5px 10px !important; font-family: inherit !important; }

.voice-bubble {
  width: min(var(--voice-width, 224px), 80vw);
  min-width: 0 !important;
  max-width: min(280px, 80vw) !important;
}

.voice-bubble audio { max-width: 100%; }

.error-bubble {
  color: #c83b3b !important;
  background: #fff3f3 !important;
  border-color: rgba(200, 59, 59, 0.16) !important;
}

/* 接话选择原因只保留在开发记录，不进入真实聊天界面。 */
.group-reply-reason { display: none !important; }

[data-theme="dark"] .message-wrapper.self .msg-bubble {
  color: #111113;
  background: #f2f2f4;
  border-color: #f2f2f4;
}

[data-theme="dark"] .message-wrapper.other .msg-bubble {
  color: #f4f4f6;
  background: #2c2c2f;
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

[data-theme="dark"] #wechatApp .msg-meta { color: #7f7f87; }
[data-theme="dark"] .quote-compose-preview,
[data-theme="dark"] .msg-quote-strip,
[data-theme="dark"] .msg-inline-result { color: #b1b1b8; background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .quote-compose-text b,
[data-theme="dark"] .msg-inline-result b { color: #efeff2; }
[data-theme="dark"] .quote-compose-cancel { color: #a8a8af; }
[data-theme="dark"] .time-divider { color: #7f7f87; }
[data-theme="dark"] .time-divider span { background: rgba(118, 118, 128, 0.18); }
[data-theme="dark"] .msg-bubble.transfer { color: #f3f3f5 !important; background: #2c2c2f !important; border-color: rgba(255, 255, 255, 0.08) !important; }
[data-theme="dark"] .error-bubble { color: #ff8b8b !important; background: rgba(94, 28, 32, 0.72) !important; border-color: rgba(255, 139, 139, 0.16) !important; }
[data-theme="dark"] .cherry-read.unread path:first-child { fill: rgba(225, 160, 175, 0.2); stroke: #cf91a0; }
[data-theme="dark"] .cherry-read.unread .bud-line { stroke: #c58d9a; }

[data-reduce-motion="true"] .message-wrapper,
[data-performance-mode="true"] .message-wrapper { animation: none; }

@media (max-width: 370px) {
  .message-wrapper { max-width: 91%; gap: 7px; }
  .msg-avatar { width: 35px; height: 35px; flex-basis: 35px; }
  .msg-body { max-width: min(67vw, 272px); }
  .msg-bubble { padding: 8px 11px; font-size: 14.5px; line-height: 1.44; }
  #wechatApp .msg-meta { gap: 3px; font-size: 8.8px; }
  .cherry-read { width: 12px; height: 12px; flex-basis: 12px; }
  .sticker-image { max-width: 116px; max-height: 116px; }
}

@media (max-width: 330px) {
  .message-wrapper { max-width: 93%; gap: 6px; }
  .msg-avatar { width: 33px; height: 33px; flex-basis: 33px; }
  .msg-body { max-width: min(66vw, 218px); }
  .msg-bubble { padding-left: 10px; padding-right: 10px; }
  #wechatApp .msg-meta { font-size: 8.5px; }
}

/* 消息长按菜单：仿微信横向操作条，功能按钮统一 SVG。 */
.msg-context-menu {
  position: fixed;
  z-index: 4000;
  width: max-content;
  max-width: calc(100vw - 20px);
  padding: 6px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(44px, max-content);
  gap: 2px;
  box-sizing: border-box;
  color: #171719;
  background: rgba(250, 250, 252, 0.94);
  border: 0.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(17, 17, 19, 0.2);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  transform-origin: center;
  animation: wechatContextIn 160ms cubic-bezier(0.22, 0.72, 0.22, 1) both;
}

@keyframes wechatContextIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.msg-context-menu .menu-item {
  width: 100%;
  min-width: 44px;
  min-height: 56px;
  padding: 7px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 10.5px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.msg-context-menu .menu-item:hover { background: rgba(118, 118, 128, 0.1); }
.msg-context-menu .menu-item:active { transform: scale(0.97); background: rgba(118, 118, 128, 0.15); }
.msg-context-menu .menu-item.danger { color: #d53f3f; }

.menu-action-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
}

.menu-action-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .msg-context-menu {
  color: #f2f2f4;
  background: rgba(34, 34, 37, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .msg-context-menu .menu-item:hover { background: rgba(118, 118, 128, 0.22); }

[data-reduce-motion="true"] .msg-context-menu,
[data-performance-mode="true"] .msg-context-menu { animation: none; }

.persona-editor-section {
  padding: 14px 18px;
  border-bottom: 0.5px solid rgba(120, 120, 128, 0.18);
}

.persona-editor-title {
  margin-bottom: 7px;
  color: var(--app-text);
  font-size: 14px;
  font-weight: 650;
}

.persona-editor-title span,
.persona-editor-note {
  color: var(--app-subtext);
  font-size: 11px;
  font-weight: 400;
}

.personality-traits-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: var(--app-text);
  background: var(--app-bg);
}

.personality-traits-intro {
  display: grid;
  gap: 4px;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--divider);
  background: var(--card-bg);
}

.personality-traits-intro strong { font-size: 15px; }
.personality-traits-intro span { color: var(--app-subtext); font-size: 11px; line-height: 1.45; }

.personality-traits-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 18px;
}

.personality-trait-group {
  margin: 0 0 10px;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--card-bg);
}

.personality-trait-group h2 {
  margin: 0;
  padding: 11px 16px 8px;
  color: var(--app-subtext);
  font-size: 12px;
  font-weight: 600;
}

.personality-trait-row {
  display: grid;
  gap: 7px;
  padding: 12px 16px 13px;
  border-top: 1px solid var(--divider);
}

.personality-trait-heading,
.personality-trait-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personality-trait-heading strong { min-width: 0; font-size: 14px; }
.personality-trait-heading output { flex: 0 0 auto; color: var(--app-subtext); font-size: 11px; }
.personality-trait-ends { color: var(--app-subtext); font-size: 10px; }

.personality-trait-row input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.personality-trait-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--divider);
}

.personality-trait-row input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .22);
}

.personality-trait-row small {
  color: var(--app-subtext);
  font-size: 10px;
  line-height: 1.45;
}

.personality-traits-actions {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 9px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--divider);
  background: var(--card-bg);
}

.personality-traits-actions .btn { min-width: 0; margin: 0; }

.persona-editor-note {
  margin: -2px 0 9px;
  line-height: 1.45;
}

.persona-profile-textarea,
.persona-avoidance-textarea,
.persona-voice-example input,
.persona-voice-example textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(120, 120, 128, 0.24);
  border-radius: 8px;
  outline: none;
  color: var(--input-text);
  background: var(--input-bg);
  font: inherit;
  font-size: 13px;
}

.persona-profile-textarea { min-height: 150px; padding: 10px; line-height: 1.55; resize: vertical; }
.persona-avoidance-textarea { min-height: 96px; padding: 9px 10px; line-height: 1.5; resize: vertical; }

.persona-voice-example {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
  padding: 9px;
  border: 0.5px solid rgba(120, 120, 128, 0.2);
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.06);
}

.persona-voice-example-head { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 6px; }
.persona-voice-example input { min-height: 34px; padding: 7px 9px; }
.persona-voice-example textarea { min-height: 58px; padding: 8px 9px; line-height: 1.45; resize: vertical; }
.persona-voice-example-head button {
  width: 30px;
  height: 30px;
  align-self: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--app-subtext);
  background: rgba(120, 120, 128, 0.12);
  font-size: 18px;
}

.persona-add-example {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  color: #576b95;
  background: rgba(87, 107, 149, 0.1);
  font: inherit;
  font-size: 12px;
}

[data-theme="dark"] .persona-voice-example { background: rgba(255, 255, 255, 0.035); }

/* ===== Lnyy UI v3：微信通讯录、发现与“我” ===== */
.contacts-page,
.discover-page,
.profile-page,
.profile-edit-page {
  min-height: 100%;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
}

.wechat-section {
  position: relative;
  margin: 0 0 12px;
  overflow: hidden;
  background: var(--wechat-surface);
}

.wechat-section-label {
  min-height: 28px;
  padding: 10px 16px 5px;
  box-sizing: border-box;
  color: var(--wechat-secondary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.wechat-section-label span {
  margin-left: 4px;
  color: #b0b0b5;
  font-variant-numeric: tabular-nums;
}

.wechat-cell {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 8px 14px 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border: 0;
  border-radius: 0;
  outline: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 140ms ease, transform 140ms ease;
}

.wechat-cell:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 62px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--wechat-line);
  transform: scaleY(0.75);
  transform-origin: bottom;
}

.wechat-cell:hover { background: #fafafa; }
.wechat-cell:active { background: #f0f0f2; }
.wechat-cell:focus-visible { box-shadow: inset 0 0 0 2px rgba(206, 139, 154, 0.58); }

.wechat-cell-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: #303034;
  background: #ededf0;
  border: 0.5px solid rgba(20, 20, 24, 0.035);
  border-radius: 9px;
}

.wechat-cell-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wechat-cell-icon.is-moments { color: #242427; background: #e9e9ec; }
.wechat-cell-icon.is-wallet { color: #2f5848; background: #e7efeb; }
.wechat-cell-icon.is-budget { color: #54505f; background: #eceaf0; }

.wechat-cell-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.wechat-cell-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-cell-copy small {
  overflow: hidden;
  color: var(--wechat-secondary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-cell-chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  color: #c2c2c7;
}

.wechat-cell-chevron svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wechat-cell-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  color: #fff;
  background: #d94b4b;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 650;
  line-height: 18px;
  text-align: center;
}

.wechat-avatar {
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #3c3c41;
  background: #e7e7ea;
}

.wechat-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  background: #e7e7ea;
  object-fit: contain;
}

.wechat-avatar-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #f2f2f4, #dcdce0);
  font-size: 16px;
  font-weight: 600;
}

.contacts-page { padding: 0 0 8px; }
.wechat-contact-search { margin-top: 8px; margin-bottom: 10px; }
.contact-actions { margin-top: 0; }
.contact-action { min-height: 62px; }
.contact-list { margin-bottom: 0; padding: 0; }

.contact-item {
  min-height: 60px;
  padding: 8px 14px 8px 16px;
  gap: 12px;
  border: 0;
}

.contact-item[hidden] { display: none !important; }
.contact-item .contact-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 7px;
  font-size: 16px;
}

.contact-item .contact-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.contact-item .contact-name {
  overflow: hidden;
  color: var(--wechat-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-item .contact-remark {
  overflow: hidden;
  margin: 0;
  color: var(--wechat-secondary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-empty-state.compact {
  min-height: 248px;
  padding: 54px 20px 42px;
  box-sizing: border-box;
}

.contact-search-empty {
  padding: 32px 20px;
  color: var(--wechat-secondary);
  font-size: 13px;
  text-align: center;
}

.discover-page { padding: 12px 0 22px; }
.discover-hero {
  position: relative;
  height: 146px;
  margin: 0 12px 16px;
  overflow: hidden;
  display: block;
  width: calc(100% - 24px);
  padding: 0;
  box-sizing: border-box;
  background-color: #dedee2;
  background-position: center;
  background-size: cover;
  border: 0.5px solid rgba(20, 20, 24, 0.05);
  border-radius: 16px;
  cursor: pointer;
  font: inherit;
}

.discover-section {
  display: grid;
  gap: 10px;
  margin: 0 12px 12px;
  overflow: visible;
  background: transparent;
}

.discover-item {
  min-height: 64px;
  padding: 9px 14px;
  overflow: hidden;
  background: var(--wechat-surface);
  border: 0.5px solid var(--wechat-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035);
}

.discover-item::after { content: none !important; }
.discover-item .wechat-cell-copy strong { font-size: 16px; }
.discover-reset {
  display: block;
  margin: 2px auto 0;
  padding: 8px 12px;
  color: var(--wechat-secondary);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.profile-page { padding: 14px 0 22px; }
.identity-switch-page { padding: 14px 0 22px; }
.profile-header {
  width: 100%;
  min-height: 106px;
  padding: 17px 14px 17px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border: 0;
  border-radius: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-header.profile-header--static { cursor: default; }
.profile-header.profile-header--static:hover,
.profile-header.profile-header--static:active { background: var(--wechat-surface); }
.profile-header:hover { background: #fafafa; }
.profile-header:active { background: #f0f0f2; }
.profile-header:focus-visible { box-shadow: inset 0 0 0 2px rgba(206, 139, 154, 0.58); outline: 0; }
.profile-header .profile-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 10px;
  font-size: 20px;
}

.profile-header .profile-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.profile-header .profile-name {
  max-width: 100%;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--wechat-primary);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-header .profile-id,
.profile-header .profile-signature,
.profile-header .profile-hint {
  max-width: 100%;
  overflow: hidden;
  color: var(--wechat-secondary);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-header .profile-signature { margin-top: 2px; }
.profile-header .profile-hint { margin-top: 2px; color: #aaaab0; }
.profile-page .wechat-section-label { padding-top: 13px; }
.profile-page .wechat-cell { min-height: 60px; }

.identity-switch-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 默认 UI 最近页：可改名的聊天分组 */
.wechat-chat-search {
  margin-top: 8px;
  margin-bottom: 12px;
}

/* 默认 UI 最近页：照片卡片替代原搜索栏，颜色继承当前柔雾主题。 */
.wechat-app[data-chat-ui="classic"] .wechat-recent-feature-card {
  margin: 10px 14px 16px;
  overflow: hidden;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border: 1px solid var(--wechat-line);
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .045);
}

.wechat-recent-feature-image {
  width: 100%;
  height: auto;
  aspect-ratio: 11 / 5;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--wechat-secondary);
  background: var(--wechat-control);
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.wechat-recent-feature-image img,
.wechat-recent-feature-editor-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.wechat-recent-feature-footer {
  min-height: 46px;
  padding: 0 13px 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 600;
}

.wechat-recent-feature-footer span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-recent-feature-text {
  min-width: 0;
  padding: 8px 0;
  overflow: hidden;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-recent-feature-dots {
  width: 34px;
  height: 34px;
  padding: 0;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: var(--wechat-secondary);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 2px;
  text-align: center;
  pointer-events: none;
}

.wechat-recent-feature-editor-preview {
  height: 152px;
  margin: 0 2px 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--wechat-secondary);
  background: var(--wechat-control);
  border: 1px solid var(--wechat-line);
  border-radius: 12px;
  font-size: 13px;
}

.wechat-recent-feature-editor-label {
  display: block;
  margin: 0 2px 6px;
  color: var(--wechat-secondary);
  font-size: 12px;
  font-weight: 600;
}

.wechat-recent-feature-editor input[type="text"] {
  width: 100%;
  height: 42px;
  margin-bottom: 10px;
  padding: 0 11px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  background: var(--wechat-control);
  border: 1px solid var(--wechat-line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  outline: 0;
}

.wechat-recent-feature-editor-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.wechat-recent-feature-editor-tools button {
  min-height: 38px;
  color: var(--wechat-primary);
  background: var(--wechat-control);
  border: 1px solid var(--wechat-line);
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
}

.wechat-feature-crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5500;
  padding: calc(18px + var(--safe-top-inset, 0px)) 12px calc(18px + var(--safe-bottom-inset, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.wechat-feature-crop-card {
  width: min(100%, 360px);
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.wechat-feature-crop-head {
  min-height: 48px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 64px 1fr 76px;
  align-items: center;
  border-bottom: 0.5px solid var(--wechat-line);
}

.wechat-feature-crop-head strong { text-align: center; font-size: 15px; font-weight: 650; }
.wechat-feature-crop-head button { min-height: 34px; padding: 0 6px; color: var(--wechat-secondary); background: transparent; border: 0; border-radius: 10px; font: inherit; font-size: 13px; }
.wechat-feature-crop-head button[data-crop-confirm] { color: var(--wechat-surface); background: var(--wechat-primary); font-weight: 650; }

.wechat-feature-crop-body { padding: 18px 16px 20px; display: grid; justify-items: center; gap: 12px; overflow-y: auto; }
.wechat-feature-crop-canvas { width: min(100%, 330px); height: auto; display: block; background: var(--wechat-control); border-radius: 14px; box-shadow: 0 0 0 1px var(--wechat-line), 0 12px 28px rgba(0, 0, 0, .12); touch-action: none; cursor: grab; }
.wechat-feature-crop-canvas:active { cursor: grabbing; }
.wechat-feature-crop-body p { margin: 0; color: var(--wechat-secondary); font-size: 12px; line-height: 1.45; text-align: center; }
.wechat-feature-crop-body input[type="range"] { width: min(100%, 300px); accent-color: var(--wechat-primary); }

.wechat-chat-sections {
  padding-bottom: 10px;
}

.wechat-chat-section {
  margin-bottom: 14px;
}

.wechat-chat-section[hidden] {
  display: none !important;
}

.wechat-chat-section-title {
  min-height: 30px;
  padding: 0 16px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  color: var(--wechat-primary);
  font-size: 12px;
  font-weight: 600;
}

.wechat-chat-section-toggle {
  width: 6px;
  height: 6px;
  margin: -3px 2px 0 2px;
  padding: 0;
  flex: 0 0 auto;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.wechat-chat-section.is-collapsed .wechat-chat-section-toggle {
  margin-top: 0;
  transform: rotate(-45deg);
}

.wechat-chat-section.is-collapsed .wechat-chat-section-card {
  display: none;
}

.wechat-chat-section-name {
  max-width: min(70vw, 240px);
  overflow: hidden;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-chat-section-name:active {
  opacity: .58;
}

.wechat-chat-section-count {
  color: var(--wechat-tertiary, #8e8e93);
  font-size: 11px;
  font-weight: 500;
}

.wechat-chat-section-count::before { content: '('; }
.wechat-chat-section-count::after { content: ')'; }

.wechat-app[data-chat-ui="classic"] .wechat-chat-section-card {
  margin: 0 14px;
  overflow: hidden;
  background: var(--wechat-surface);
  border: 0.5px solid var(--wechat-line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .035);
}

.wechat-chat-search-empty {
  padding: 34px 20px;
  color: var(--wechat-secondary);
  font-size: 13px;
  text-align: center;
}

.wechat-chat-search-empty[hidden] {
  display: none !important;
}

.identity-switch-row {
  min-height: 64px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wechat-surface);
}

.identity-switch-row + .identity-switch-row { border-top: 0.5px solid var(--wechat-line); }
.identity-switch-row.is-active { background: color-mix(in srgb, var(--wechat-self-bg) 4%, var(--wechat-surface)); }

.identity-switch-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
  font-size: 16px;
}

.identity-switch-copy { gap: 2px; }
.identity-switch-copy strong {
  display: flex;
  align-items: center;
  gap: 6px;
}
.identity-switch-copy strong em {
  padding: 0 6px;
  color: #07c160;
  background: rgba(7, 193, 96, 0.08);
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.identity-switch-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity-switch-action {
  min-width: 60px;
  height: 32px;
  padding: 0 14px;
  color: #fff;
  background: #07c160;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(7, 193, 96, 0.16);
}

.identity-switch-action.is-current,
.identity-switch-action:disabled {
  color: var(--wechat-secondary);
  background: var(--wechat-control);
  box-shadow: none;
  cursor: default;
}

.identity-delete-btn {
  min-width: 50px;
  height: 32px;
  padding: 0 12px;
  color: var(--wechat-danger);
  background: rgba(255, 59, 48, 0.08);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}


.proactive-settings-section {
  margin: 12px 0;
  padding: 0 16px 16px;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
}

.proactive-section-heading {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 0.5px solid var(--wechat-line);
}

.proactive-section-heading > div { min-width: 0; }
.proactive-section-heading strong,
.proactive-section-heading span { display: block; }
.proactive-section-heading strong { font-size: 16px; line-height: 1.35; }
.proactive-section-heading > div > span {
  margin-top: 3px;
  color: var(--wechat-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.lnyy-switch {
  position: relative;
  width: 50px;
  height: 44px;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lnyy-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lnyy-switch-track {
  position: relative;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: #c8c8cc;
  transition: background-color 180ms ease;
}

.lnyy-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease;
}

.lnyy-switch input:checked + .lnyy-switch-track { background: #d68f9f; }
.lnyy-switch input:checked + .lnyy-switch-track .lnyy-switch-thumb { transform: translateX(16px); }
.lnyy-switch input:focus-visible + .lnyy-switch-track { outline: 2px solid rgba(214, 143, 159, 0.48); outline-offset: 2px; }

.proactive-policy-body { padding-top: 15px; }
.proactive-field-label {
  margin: 0 0 8px;
  color: var(--wechat-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.proactive-frequency {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.proactive-frequency-btn {
  min-height: 52px;
  padding: 7px 6px;
  border: 1px solid var(--wechat-line);
  border-radius: 12px;
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.proactive-frequency-btn strong,
.proactive-frequency-btn span { display: block; }
.proactive-frequency-btn strong { font-size: 14px; }
.proactive-frequency-btn span { margin-top: 2px; color: var(--wechat-secondary); font-size: 10px; }
.proactive-frequency-btn:active { transform: scale(0.98); }
.proactive-frequency-btn.is-active {
  border-color: rgba(214, 143, 159, 0.72);
  background: rgba(214, 143, 159, 0.11);
  box-shadow: inset 0 0 0 1px rgba(214, 143, 159, 0.12);
}

.proactive-policy-summary {
  margin: 9px 0 14px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--wechat-secondary);
  background: var(--wechat-shell-bg);
  font-size: 11px;
  line-height: 1.45;
}

.proactive-compact-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1.28fr);
  gap: 9px;
  margin-bottom: 16px;
}

.proactive-compact-row > label {
  min-width: 0;
  padding: 9px 10px 10px;
  border: 1px solid var(--wechat-line);
  border-radius: 11px;
  background: var(--wechat-shell-bg);
}

.proactive-compact-row > label > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--wechat-secondary);
  font-size: 11px;
}

.proactive-compact-row select,
.proactive-time-range input {
  min-height: 32px;
  box-sizing: border-box;
  border: 0;
  border-radius: 7px;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.proactive-compact-row select { width: 100%; padding: 0 7px; }
.proactive-time-range { display: flex; align-items: center; gap: 4px; }
.proactive-time-range input { min-width: 0; width: 50%; padding: 0 4px; text-align: center; }
.proactive-time-range i { color: var(--wechat-secondary); font-size: 10px; font-style: normal; }

.proactive-trigger-list {
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--wechat-line);
  border-radius: 12px;
  background: var(--wechat-shell-bg);
}

.proactive-trigger-list label {
  min-height: 54px;
  padding: 8px 11px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 0.5px solid var(--wechat-line);
  cursor: pointer;
}

.proactive-trigger-list label:last-child { border-bottom: 0; }
.proactive-trigger-list label > span { min-width: 0; }
.proactive-trigger-list strong,
.proactive-trigger-list small { display: block; }
.proactive-trigger-list strong { font-size: 13px; line-height: 1.35; }
.proactive-trigger-list small { margin-top: 2px; color: var(--wechat-secondary); font-size: 10px; line-height: 1.35; }
.proactive-trigger-list input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: #d68f9f;
}

.proactive-trace {
  min-height: 44px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--wechat-secondary);
  font-size: 11px;
}

.proactive-trace strong {
  min-width: 0;
  color: var(--wechat-primary);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
}

.proactive-failures {
  margin: 2px 0 13px;
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(194, 105, 124, 0.28);
  border-radius: 13px;
  background: rgba(214, 143, 159, 0.08);
}

.proactive-failure-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.proactive-failure-heading > div { min-width: 0; }
.proactive-failure-heading strong,
.proactive-failure-heading small { display: block; }
.proactive-failure-heading strong { font-size: 12px; line-height: 1.4; }
.proactive-failure-heading small { margin-top: 1px; color: var(--wechat-secondary); font-size: 10px; }
.proactive-failure-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #c2697c;
  font-size: 13px;
  font-weight: 700;
}
.proactive-failure-mark::before { content: "!"; }

.proactive-failure-item {
  padding: 10px;
  border: 1px solid rgba(194, 105, 124, 0.18);
  border-radius: 10px;
  background: var(--wechat-surface);
}

.proactive-failure-item + .proactive-failure-item { margin-top: 8px; }
.proactive-failure-meta,
.proactive-failure-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.proactive-failure-meta { margin-bottom: 5px; color: var(--wechat-secondary); font-size: 9px; }
.proactive-failure-meta time { text-align: right; }
.proactive-failure-item > strong { display: block; font-size: 12px; line-height: 1.4; }
.proactive-failure-item > p {
  margin: 4px 0 9px;
  color: var(--wechat-secondary);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.proactive-failure-actions > span {
  min-width: 0;
  color: var(--wechat-secondary);
  font-size: 9px;
  line-height: 1.35;
}
.proactive-retry-btn {
  min-width: 90px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid rgba(194, 105, 124, 0.35);
  border-radius: 10px;
  color: #944f60;
  background: rgba(214, 143, 159, 0.12);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.proactive-retry-btn:active { transform: scale(0.98); }
.proactive-retry-btn:disabled { cursor: default; opacity: 0.55; }

[data-theme="dark"] .proactive-failures {
  border-color: rgba(224, 153, 169, 0.3);
  background: rgba(214, 143, 159, 0.1);
}
[data-theme="dark"] .proactive-failure-item { border-color: rgba(224, 153, 169, 0.2); }
[data-theme="dark"] .proactive-retry-btn { color: #efb7c4; background: rgba(214, 143, 159, 0.14); }

.proactive-save-btn {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #252527;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.proactive-save-btn:active { transform: scale(0.985); }
.proactive-save-btn:disabled { cursor: default; opacity: 0.7; }
.proactive-save-btn.is-saved { background: #65806c; }
.proactive-settings-note {
  margin: 9px 1px 0;
  color: var(--wechat-secondary);
  font-size: 10px;
  line-height: 1.5;
}

.proactive-settings-section.is-off .proactive-policy-body { opacity: 0.78; }

[data-theme="dark"] .proactive-frequency-btn.is-active {
  border-color: rgba(224, 153, 169, 0.72);
  background: rgba(214, 143, 159, 0.16);
}

[data-theme="dark"] .proactive-save-btn { color: #1a1a1c; background: #f0f0f2; }
[data-theme="dark"] .proactive-save-btn.is-saved { color: #fff; background: #607e68; }

@media (max-width: 370px) {
  .proactive-settings-section { padding-right: 12px; padding-left: 12px; }
  .proactive-compact-row { grid-template-columns: 1fr; }
  .proactive-frequency { gap: 6px; }
  .proactive-frequency-btn { min-height: 48px; padding-right: 3px; padding-left: 3px; }
}

@media (max-height: 620px) {
  .proactive-section-heading { min-height: 64px; }
  .proactive-policy-body { padding-top: 12px; }
  .proactive-trigger-list label { min-height: 50px; }
}

[data-reduce-motion="true"] .lnyy-switch-track,
[data-reduce-motion="true"] .lnyy-switch-thumb,
[data-reduce-motion="true"] .proactive-frequency-btn,
[data-reduce-motion="true"] .proactive-save-btn,
[data-reduce-motion="true"] .proactive-retry-btn,
[data-performance-mode="true"] .lnyy-switch-track,
[data-performance-mode="true"] .lnyy-switch-thumb,
[data-performance-mode="true"] .proactive-frequency-btn,
[data-performance-mode="true"] .proactive-save-btn,
[data-performance-mode="true"] .proactive-retry-btn { transition: none; }

.profile-edit-page { padding: 10px 0 26px; }
.profile-edit-page .wechat-section { margin-bottom: 12px; }
.profile-edit-page .wechat-section-label {
  min-height: 34px;
  padding: 15px 16px 6px;
  font-size: 12px;
  font-weight: 500;
}
.profile-edit-page .wechat-cell {
  min-height: 62px;
  padding: 10px 13px 10px 16px;
  gap: 10px;
}
.profile-edit-page .wechat-cell-copy {
  flex: 0 1 auto;
  min-width: 86px;
  max-width: 44%;
}
.profile-edit-page .wechat-cell-copy strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}
.profile-edit-page .wechat-cell-copy small {
  margin-top: 3px;
  white-space: normal;
}
.profile-edit-avatar-row { min-height: 88px !important; }
.profile-edit-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 10px;
  font-size: 20px;
}

.contact-item .contact-avatar,
.profile-header .profile-avatar,
.profile-edit-avatar {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.profile-edit-avatar-row > .profile-edit-avatar {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  flex: 0 0 64px !important;
  margin-left: auto;
  align-self: center;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
}

.profile-edit-avatar-row > .profile-edit-avatar img {
  width: 64px !important;
  height: 64px !important;
  display: block;
  object-fit: cover !important;
}


.profile-page > div:first-child img {
  object-fit: cover !important;
}.contact-item .contact-avatar img,
.group-detail-avatar img,
.moment-visible-contact .moment-visible-avatar img,
.forest-partner-avatar img {
  object-fit: cover !important;
}

.contact-item .contact-avatar,
.group-detail-avatar,
.moment-visible-contact .moment-visible-avatar,
.forest-partner-avatar {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}.contact-item .contact-avatar {
  flex: 0 0 42px;
  min-width: 42px;
  max-width: 42px;
}

.contact-item .contact-avatar img,
.profile-header .profile-avatar img,
.profile-edit-avatar img,
.group-detail-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  background: #e7e7ea;
  object-fit: contain;
}

.group-detail-avatar {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  border-radius: 8px;
  overflow: hidden;
}
.profile-header .profile-avatar img,
.profile-edit-avatar img,
.moment-header .mh-avatar img,
.moment-composer-avatar img {
  object-fit: cover;
}

.moment-composer-author > .moment-composer-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.user-avatar-crop-overlay {
  position: absolute;
  inset: 0;
  z-index: 5400;
  padding: calc(18px + var(--safe-top-inset, 0px)) 12px calc(18px + var(--safe-bottom-inset, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.user-avatar-crop-card {
  width: min(100%, 360px);
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #171719;
  background: rgba(250, 250, 252, 0.98);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.user-avatar-crop-head {
  min-height: 48px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 64px 1fr 76px;
  align-items: center;
  border-bottom: 0.5px solid rgba(120, 120, 128, 0.18);
}

.user-avatar-crop-head strong {
  text-align: center;
  font-size: 15px;
  font-weight: 650;
}

.user-avatar-crop-head button {
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #66666c;
  font: inherit;
  font-size: 13px;
}

.user-avatar-crop-head button[data-action="confirm"] {
  color: #fff;
  background: #1f1f22;
  font-weight: 650;
}

.user-avatar-crop-body {
  padding: 18px 16px 20px;
  display: grid;
  justify-items: center;
  gap: 12px;
  overflow-y: auto;
}

.user-avatar-crop-canvas {
  width: min(72vw, 236px);
  height: min(72vw, 236px);
  display: block;
  border-radius: 18px;
  background: #e7e7ea;
  box-shadow: 0 0 0 1px rgba(120, 120, 128, 0.18), 0 12px 28px rgba(0, 0, 0, 0.12);
}

.user-avatar-crop-tip {
  max-width: 260px;
  color: #77777e;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.user-avatar-crop-body input[type="range"] {
  width: min(100%, 260px);
  accent-color: #1f1f22;
}

[data-theme="dark"] .user-avatar-crop-card {
  color: #f3f3f5;
  background: rgba(35, 35, 38, 0.98);
}

[data-theme="dark"] .user-avatar-crop-head { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .user-avatar-crop-head button { color: #b6b6bc; }
[data-theme="dark"] .user-avatar-crop-head button[data-action="confirm"] { color: #171719; background: #f1f1f3; }
[data-theme="dark"] .user-avatar-crop-tip { color: #9a9aa1; }
.wechat-profile-edit-value {
  min-width: 0;
  max-width: 58%;
  margin-left: auto;
  overflow: hidden;
  color: var(--wechat-secondary);
  font-size: 14px;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-identity-switch-btn {
  width: calc(100% - 32px);
  min-height: 50px;
  margin: 2px 16px 0;
  display: block;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 0 .5px var(--wechat-line);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}
.profile-identity-switch-btn:active { background: var(--wechat-control-pressed); }

.profile-edit-note {
  margin: 12px 16px 0;
  color: var(--wechat-secondary);
  font-size: 10.5px;
  line-height: 1.55;
}

[data-theme="dark"] .wechat-cell:hover,
[data-theme="dark"] .profile-header:hover { background: #1d1d20; }
[data-theme="dark"] .wechat-cell:active,
[data-theme="dark"] .profile-header:active { background: #252528; }
[data-theme="dark"] .wechat-cell-icon { color: #e4e4e8; background: #2b2b2f; border-color: rgba(255, 255, 255, 0.035); }
[data-theme="dark"] .wechat-cell-icon.is-wallet { color: #bad4c8; background: #26342f; }
[data-theme="dark"] .wechat-cell-icon.is-budget { color: #d0cadc; background: #302d36; }
[data-theme="dark"] .wechat-avatar { color: #ececf0; background: #2b2b2f; }
[data-theme="dark"] .wechat-avatar-initial { background: linear-gradient(145deg, #3a3a3f, #242428); }
[data-theme="dark"] .discover-hero { color: #ededf1; background-color: #2a2a2e; border-color: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .discover-reset { color: #8f8f96; }

@media (max-width: 370px) {
  .wechat-cell { min-height: 55px; padding-left: 12px; padding-right: 10px; gap: 10px; }
  .wechat-cell:not(:last-child)::after { left: 56px; }
  .wechat-cell-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; }
  .wechat-cell-icon svg { width: 19px; height: 19px; }
  .wechat-cell-copy strong { font-size: 14.5px; }
  .wechat-cell-copy small { font-size: 10.5px; }
  .contact-item { padding-left: 12px; }
  .contact-item .contact-avatar { width: 40px; height: 40px; flex: 0 0 40px; min-width: 40px; max-width: 40px; }
  .discover-hero { height: 132px; margin-left: 10px; margin-right: 10px; border-radius: 14px; }
  .profile-header { min-height: 96px; padding-left: 12px; gap: 12px; }
  .profile-header .profile-avatar { width: 50px; height: 50px; flex: 0 0 50px; }
  .profile-header .profile-name { font-size: 18px; }
  .wechat-section-label { padding-left: 12px; }
  .profile-edit-page .wechat-section-label { padding-left: 12px; }
  .profile-edit-page .wechat-cell { padding-left: 12px; padding-right: 10px; gap: 8px; }
  .profile-edit-page .wechat-cell-copy { min-width: 76px; max-width: 42%; }
  .wechat-profile-edit-value { max-width: 54%; font-size: 13px; }
  .profile-edit-avatar-row { min-height: 82px !important; }
  .profile-edit-avatar-row > .profile-edit-avatar {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    flex-basis: 56px !important;
  }
  .profile-edit-avatar-row > .profile-edit-avatar img { width: 56px !important; height: 56px !important; }
  .profile-identity-switch-btn { width: calc(100% - 24px); margin-left: 12px; margin-right: 12px; }
}

@media (max-height: 620px) {
  .profile-page { padding-top: 8px; }
  .profile-header { min-height: 88px; padding-top: 12px; padding-bottom: 12px; }
  .profile-header .profile-avatar { width: 48px; height: 48px; flex: 0 0 48px; }
  .profile-page .wechat-section-label { padding-top: 8px; }
  .profile-page .wechat-cell { min-height: 54px; }
  .discover-hero { height: 118px; margin-bottom: 12px; }
}

[data-reduce-motion="true"] .wechat-cell,
[data-reduce-motion="true"] .profile-header,
[data-performance-mode="true"] .wechat-cell,
[data-performance-mode="true"] .profile-header { transition: none; }

/* 朋友圈与发现页同轮视觉收口 */
.moments-page {
  min-height: 100%;
  padding: 0 0 24px;
  color: var(--wechat-primary);
  background: var(--wechat-surface);
}

.moment-header {
  height: 232px;
  background-color: #2c2c2f;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}
.moment-header:active { filter: brightness(0.96); }

.moment-header .moment-header-overlay {
  min-height: 96px;
  padding: 28px 16px 16px;
  justify-content: flex-end;
  align-items: flex-end;
  box-sizing: border-box;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.5));
}

.moment-header .mh-avatar {
  order: 2;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  color: #28282c;
  background: #e9e9ec;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 9px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
}

.moment-header .mh-name {
  order: 1;
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.moment-toolbar {
  min-height: 48px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  box-sizing: border-box;
  background: var(--wechat-surface);
  border-bottom: 0.5px solid var(--wechat-line);
}

.moment-toolbar-btn {
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--wechat-secondary);
  background: #f0f0f2;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.moment-toolbar-btn.primary { color: #fff; background: #1f1f22; }
.moment-toolbar-btn:active { transform: scale(0.95); }
.moment-toolbar-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#momentsList { background: var(--wechat-surface); }
.moments-empty-state {
  min-height: 300px;
  padding-top: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  text-align: center;
}

.moment-item {
  position: relative;
  padding: 15px 13px 15px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  background: var(--wechat-surface);
  border-bottom: 0.5px solid var(--wechat-line);
}

.moment-item .mi-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 7px;
  color: #404045;
  background: #e8e8eb;
}

.moment-main { min-width: 0; flex: 1; }
.moment-item .mi-name {
  display: block;
  margin: 1px 0 6px;
  color: #4f6488;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.moment-item .mi-content {
  margin: 0 0 9px;
  color: var(--wechat-primary);
  font-size: 14px;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.moment-item .mi-images {
  width: min(100%, 264px);
  max-width: 264px;
  margin: 8px 0 10px;
  display: grid;
  gap: 4px;
}

.moment-item .mi-images img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: #ededf0;
  border-radius: 4px;
  cursor: pointer;
}

.moment-meta-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.moment-meta-left {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.moment-item .mi-time {
  color: #a1a1a7;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.moment-actions { display: flex; align-items: center; gap: 4px; }
.mi-action-btn {
  width: 30px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #626268;
  background: #f1f1f3;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.mi-action-btn:active { transform: scale(0.91); }
.mi-action-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mi-action-btn.is-liked { color: #c74f60; background: #f7e9eb; }
.mi-action-btn.is-liked svg { fill: currentColor; }
.mi-like-count { min-width: 12px; color: var(--wechat-secondary); font-size: 10.5px; text-align: left; }

.moment-source-hint {
  flex: 0 0 auto;
  margin: 0;
  display: inline-flex;
}

.moment-source-detail-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #8b8b92;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.moment-source-detail-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-source-detail-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.moment-source-detail-btn:hover { background: #f4f4f6; }
.moment-source-detail-btn:active { transform: scale(0.94); }
[data-theme="dark"] .moment-source-detail-btn { color: #a7a7ae; }
[data-theme="dark"] .moment-source-detail-btn:hover { background: #29292d; }

.moment-interactions {
  margin-top: 7px !important;
  padding: 7px 9px !important;
  color: var(--wechat-primary);
  background: #f2f2f4 !important;
  border-radius: 5px !important;
  font-size: 11.5px;
  line-height: 1.5;
}

.moment-comment { color: var(--wechat-primary) !important; font-size: 11.5px !important; }
.moment-reply { margin-top: 3px !important; }

.moment-visibility-badge {
  width: fit-content;
  max-width: 100%;
  min-height: 9px;
  margin: -3px 0 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  color: #9a9aa1;
  background: transparent;
  border-radius: 4px;
  font-size: 7px;
  line-height: 1;
}

.moment-visibility-badge.public { color: #7f8794; }
.moment-visibility-badge svg {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  fill: currentColor;
}

.moment-composer-overlay {
  position: absolute;
  inset: 0;
  z-index: 5300;
  padding: calc(18px + var(--safe-top-inset, 0px)) 12px calc(18px + var(--safe-bottom-inset, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.moment-composer-card {
  width: min(100%, 378px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #171719;
  background: rgba(250, 250, 252, 0.72);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  border: 0.5px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: wechatContextIn 170ms cubic-bezier(0.22, 0.72, 0.22, 1) both;
}

.moment-composer-head {
  min-height: 48px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 62px 1fr 62px;
  align-items: center;
  border-bottom: 0.5px solid rgba(120, 120, 128, 0.18);
}

.moment-composer-head strong {
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 650;
}

.moment-composer-plain,
.moment-composer-submit {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.moment-composer-card .moment-composer-plain { color: #000; background: transparent; text-align: left; }
.moment-composer-submit { color: #fff; background: #1f1f22; font-weight: 650; }
.moment-composer-card .moment-composer-submit:disabled { color: #000; background: transparent; opacity: 1; cursor: default; }

.moment-composer-body {
  padding: 14px;
  display: grid;
  gap: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.moment-composer-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moment-composer-avatar,
.moment-visible-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 8px;
  color: #404045;
  background: #e8e8eb;
}

.moment-composer-author b,
.moment-composer-author span { display: block; }
.moment-composer-author b { font-size: 14px; line-height: 1.25; }
.moment-composer-card .moment-composer-author span { margin-top: 2px; color: #000; font-size: 11px; }

.moment-composer-text {
  width: 100%;
  min-height: 116px;
  padding: 12px 0;
  box-sizing: border-box;
  color: #171719;
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  font: inherit;
  font-size: 17px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.moment-composer-card .moment-composer-text::placeholder { color: #000; }

.moment-composer-images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.moment-composer-image,
.moment-composer-card .moment-composer-add-image {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #f0f0f2;
}

.moment-composer-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.moment-composer-image button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #fff;
  background: rgba(17, 17, 19, 0.55);
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  line-height: 20px;
}

.moment-composer-add-image {
  display: grid;
  place-items: center;
  gap: 4px;
  color: #000;
  border: 0.5px dashed rgba(120, 120, 128, 0.42);
  cursor: pointer;
}

.moment-composer-add-image svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.moment-composer-add-image span { font-size: 10px; }

.moment-visibility-panel {
  padding: 11px;
  display: grid;
  gap: 10px;
  background: rgba(245, 245, 247, 0.68);
  border-radius: 14px;
}

.moment-composer-card .moment-visibility-title {
  color: #000;
  font-size: 11px;
  font-weight: 650;
}

.moment-visibility-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.moment-composer-card .moment-visibility-options button {
  min-height: 32px;
  padding: 0 6px;
  color: #000;
  background: rgba(255, 255, 255, 0.74);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.moment-visibility-options button.is-active {
  color: #fff;
  background: #1f1f22;
  font-weight: 650;
}

.moment-visible-picker {
  display: grid;
  gap: 8px;
}

.moment-visible-picker[hidden] { display: none !important; }
.moment-visible-picker input[type="search"] {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  color: #171719;
  background: rgba(255, 255, 255, 0.74);
  border: 0;
  border-radius: 10px;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.moment-visible-list {
  max-height: 176px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
}

.moment-visible-contact {
  position: relative;
  min-height: 82px;
  min-width: 0;
  padding: 9px 5px 7px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 12px;
  box-sizing: border-box;
  cursor: pointer;
}

.moment-visible-contact:active { background: rgba(118, 118, 128, 0.1); }
.moment-visible-contact input {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1f1f22;
}
.moment-visible-contact .moment-visible-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
}
.moment-composer-card .moment-visible-contact .moment-visible-name {
  width: 100%;
  min-width: 0;
  color: #000;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.moment-composer-card .moment-visible-empty {
  grid-column: 1 / -1;
  padding: 8px;
  color: #000;
  font-size: 12px;
  text-align: center;
}

.moment-composer-card .moment-composer-note {
  color: #000;
  font-size: 11px;
  line-height: 1.45;
}
[data-theme="dark"] .moments-page,
[data-theme="dark"] #momentsList,
[data-theme="dark"] .moment-item,
[data-theme="dark"] .moment-toolbar { background: var(--wechat-surface); }
[data-theme="dark"] .moment-toolbar-btn { color: #c8c8cd; background: #2a2a2e; }
[data-theme="dark"] .moment-toolbar-btn.primary { color: #171719; background: #f0f0f3; }
[data-theme="dark"] .moment-item .mi-avatar { color: #ececf0; background: #2b2b2f; }
[data-theme="dark"] .moment-item .mi-name { color: #9eafd0; }
[data-theme="dark"] .mi-action-btn { color: #b7b7bd; background: #2b2b2f; }
[data-theme="dark"] .mi-action-btn.is-liked { color: #e17788; background: #3a292e; }
[data-theme="dark"] .moment-interactions { background: #252529 !important; }
[data-theme="dark"] .moment-visibility-badge { color: #aaaab0; background: transparent; }
[data-theme="dark"] .moment-composer-card { color: #f3f3f5; background: rgba(35, 35, 38, 0.76); border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .moment-composer-head { border-bottom-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .moment-composer-plain { color: #b6b6bc; }
[data-theme="dark"] .moment-composer-submit,
[data-theme="dark"] .moment-visibility-options button.is-active { color: #171719; background: #f1f1f3; }
[data-theme="dark"] .moment-composer-avatar,
[data-theme="dark"] .moment-visible-avatar,
[data-theme="dark"] .moment-composer-image,
[data-theme="dark"] .moment-composer-add-image { color: #ececf0; background: #2b2b2f; }
[data-theme="dark"] .moment-composer-author span,
[data-theme="dark"] .moment-composer-note,
[data-theme="dark"] .moment-visibility-title { color: #9a9aa1; }
[data-theme="dark"] .moment-composer-text { color: #f3f3f5; }
[data-theme="dark"] .moment-composer-text::placeholder { color: #6f6f76; }
[data-theme="dark"] .moment-visibility-panel { background: rgba(41, 41, 45, 0.72); }
[data-theme="dark"] .moment-visibility-options button,
[data-theme="dark"] .moment-visible-picker input[type="search"] { color: #f3f3f5; background: #1f1f22; }
[data-theme="dark"] .moment-visible-contact span { color: #ededf0; }

@media (max-width: 370px) {
  .moment-composer-overlay { padding-left: 9px; padding-right: 9px; }
  .moment-composer-card { border-radius: 19px; }
  .moment-composer-head { grid-template-columns: 56px 1fr 56px; padding-left: 10px; padding-right: 10px; }
  .moment-composer-body { padding: 12px; gap: 10px; }
  .moment-composer-text { min-height: 92px; font-size: 16px; }
  .moment-visible-list { max-height: 132px; }
  .moment-visibility-options button { font-size: 11px; }
}

@media (max-width: 370px) {
  .moment-header { height: 210px; }
  .moment-header .moment-header-overlay { padding-left: 12px; padding-right: 12px; }
  .moment-header .mh-avatar { width: 60px; height: 60px; flex-basis: 60px; }
  .moment-toolbar { padding-left: 10px; padding-right: 10px; }
  .moment-item { padding-left: 11px; padding-right: 10px; gap: 9px; }
  .moment-item .mi-avatar { width: 40px; height: 40px; flex-basis: 40px; }
  .moment-item .mi-images { width: min(100%, 238px); max-width: 238px; }
}

@media (max-height: 620px) {
  .moment-header { height: 184px; }
  .moment-header .mh-avatar { width: 56px; height: 56px; flex-basis: 56px; }
  .moment-toolbar { min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
}

[data-reduce-motion="true"] .moment-toolbar-btn,
[data-reduce-motion="true"] .mi-action-btn,
[data-performance-mode="true"] .moment-toolbar-btn,
[data-performance-mode="true"] .mi-action-btn { transition: none; }

/* 微信发现页小游戏：森林食堂 */
.wechat-cell-icon.is-game { color: #6f4a34; background: #f3dcc9; }
.wechat-content--forest-game { background: #f8eadc !important; }
.game-hub-page,
.forest-kitchen-page { min-height: 100%; padding: 12px 12px 22px; box-sizing: border-box; color: #573c2f; background: #f8eadc; }
.game-hub-hero,
.forest-setup-hero,
.forest-result-card,
.forest-panel,
.game-hub-hero { min-height: 132px; margin-bottom: 12px; padding: 16px; position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; border-radius: 20px; background: linear-gradient(135deg, #fff7ec, #f3d2c4); }
.game-hub-hero strong,
.forest-setup-hero strong { display: block; font-size: 22px; line-height: 1.12; }
.game-hub-hero small,
.forest-setup-hero small { display: block; margin-top: 6px; color: #8a6857; font-size: 12px; line-height: 1.35; }
.game-hub-hero > span { width: 94px; height: 62px; border-radius: 42px 42px 16px 16px; background: #b8d0a4; position: relative; }
.game-hub-hero > span::before { content: ""; position: absolute; left: 17px; top: -18px; width: 58px; height: 34px; border-radius: 50% 50% 12px 12px; background: #d9a574; }
.game-hub-hero > span::after { content: ""; position: absolute; left: 28px; bottom: 12px; width: 36px; height: 24px; border-radius: 10px 10px 3px 3px; background: #fff7ed; }
.forest-card-art { width: 78px; height: 78px; flex: 0 0 78px; border-radius: 20px; background: #d8a06e; position: relative; overflow: hidden; }
.forest-card-art i { position: absolute; left: 13px; bottom: 12px; width: 52px; height: 34px; border-radius: 13px; background: #fff0dc; }
.forest-card-art b { position: absolute; left: 9px; top: 18px; width: 60px; height: 16px; border-radius: 8px; background: repeating-linear-gradient(90deg, #f2b2b8 0 10px, #fff0dc 10px 20px); }
.forest-card-art em { position: absolute; right: 12px; bottom: 12px; width: 12px; height: 12px; border-radius: 50%; background: #c94b68; box-shadow: -18px -3px 0 #d85d75, -8px 12px 0 #b8d0a4; }
.forest-card-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.forest-card-copy small { color: #a0715d; font-size: 10px; font-weight: 650; }
.forest-card-copy strong { color: #4f3427; font-size: 19px; line-height: 1.15; }
.forest-card-copy em,
.forest-card-copy i { color: #836352; font-style: normal; font-size: 11px; line-height: 1.35; }
.forest-card-play { min-width: 54px; min-height: 34px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: #6f4a34; font-size: 12px; font-weight: 700; }
.game-hub-grid { display: grid; gap: 10px; }
.forest-setup-hero { min-height: 126px; margin-bottom: 12px; padding: 16px; position: relative; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #fff9ef, #efc9c0); }
.forest-setup-hero span { color: #a0715d; font-size: 10px; font-weight: 700; }
.forest-setup-hero i { position: absolute; right: 18px; bottom: 15px; width: 82px; height: 52px; border-radius: 28px 28px 14px 14px; background: #b9cf9e; }
.forest-setup-hero i::before { content: ""; position: absolute; left: 18px; top: -17px; width: 46px; height: 30px; border-radius: 24px 24px 7px 7px; background: #cf9264; }
.forest-panel { margin-bottom: 10px; padding: 12px; border-radius: 17px; background: #fff8ee; }
.forest-panel h3 { margin: 0 0 10px; font-size: 13px; color: #6d4a38; }
.forest-partner-list,
.forest-station-grid { display: grid; gap: 8px; }
.forest-partner-row,
.forest-station-card { min-height: 54px; padding: 8px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(126, 82, 52, .12); border-radius: 14px; background: #fffdf7; color: inherit; font: inherit; text-align: left; }
.forest-partner-row.is-active,
.forest-station-card.is-active { border-color: #d0778a; background: #fff1f1; box-shadow: inset 0 0 0 1px rgba(208, 119, 138, .16); }
.forest-partner-avatar { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; }
.forest-partner-row span,
.forest-station-card span { min-width: 0; }
.forest-partner-row strong,
.forest-station-card strong { display: block; font-size: 13px; color: #50362a; }
.forest-partner-row small,
.forest-station-card small { display: block; margin-top: 2px; color: #8a6857; font-size: 11px; line-height: 1.3; }
.forest-primary,
.forest-secondary { width: 100%; min-height: 44px; border: 0; border-radius: 15px; font: inherit; font-weight: 700; cursor: pointer; }
.forest-primary { color: #fff; background: #6f4a34; }
.forest-primary:disabled { opacity: .45; }
.forest-secondary { color: #6f4a34; background: #fff8ee; border: 1px solid rgba(126, 82, 52, .16); }
.forest-empty { padding: 14px; color: #8a6857; font-size: 12px; line-height: 1.45; }
.forest-scorebar { min-height: 42px; margin-bottom: 9px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; color: #6f4a34; }
.forest-scorebar b { font-size: 17px; }
.forest-sound { min-height: 30px; padding: 0 9px; border: 0; border-radius: 10px; color: #6f4a34; background: #fff8ee; font: inherit; font-size: 11px; }
.forest-customer-card,
.forest-partner-panel { margin-bottom: 10px; padding: 11px; display: flex; align-items: center; gap: 10px; border-radius: 17px; background: #fff8ee; border: 1px solid rgba(126, 82, 52, .13); }
.forest-customer-face { width: 54px; height: 54px; flex: 0 0 54px; position: relative; border-radius: 18px; background: #d6b58c; }
.forest-customer-face i,
.forest-customer-face b { position: absolute; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: #5a3a2d; }
.forest-customer-face i { left: 18px; } .forest-customer-face b { right: 18px; }
.forest-customer-face em { position: absolute; left: 19px; bottom: 14px; width: 17px; height: 8px; border-bottom: 2px solid #5a3a2d; border-radius: 50%; }
.forest-customer-card > div:last-child,
.forest-partner-panel > div { min-width: 0; flex: 1; }
.forest-customer-card strong,
.forest-partner-panel strong { display: block; font-size: 14px; }
.forest-customer-card small,
.forest-partner-panel small { display: block; margin-top: 3px; color: #8a6857; font-size: 11px; line-height: 1.35; }
.forest-patience { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #ecd9ca; }
.forest-patience span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #b8cf9e, #e5b3b9); transition: width 220ms ease; }
.forest-workbench { margin-bottom: 10px; padding: 11px; border: 1px dashed rgba(126, 82, 52, .28); border-radius: 18px; background: #fff4e7; transition: transform 160ms ease, background-color 160ms ease; }
.forest-workbench.is-hover { transform: scale(.99); background: #ffeded; }
.forest-tray { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
.forest-tray span { min-height: 26px; display: grid; place-items: center; border-radius: 9px; color: #9a7663; background: #f0ddcd; font-size: 9px; }
.forest-tray span.done { color: #fff; background: #8aa775; }
.forest-tray span.current { color: #fff; background: #d0778a; }
.forest-plate-preview { min-height: 84px; margin: 10px 0 7px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 16px; background: #fffdf7; }
.forest-plate-preview small { color: #b08b78; font-size: 12px; }
.forest-plate-preview i { width: 30px; height: 30px; border-radius: 50%; background: #edd2a5; box-shadow: 0 4px 10px rgba(116,72,44,.12); }
.forest-plate-preview .is-berry { background: #c94b68; }
.forest-plate-preview .is-cream { background: #fff2ef; border: 1px solid #edc5c8; }
.forest-plate-preview .is-oven { background: #c98b5f; }
.forest-plate-preview .is-plate { background: #f9faf7; border: 2px solid #b8cf9e; }
.forest-next-step { color: #6f4a34; font-size: 12px; font-weight: 700; text-align: center; }
.forest-ingredient-grid { margin-bottom: 10px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
.forest-ingredient { min-width: 0; min-height: 70px; padding: 7px 4px; display: grid; place-items: center; gap: 5px; border: 0; border-radius: 14px; color: #684937; background: #fff8ee; font: inherit; font-size: 10px; cursor: grab; box-shadow: 0 7px 16px rgba(116,72,44,.08); }
.forest-ingredient:active { transform: scale(.96); }
.forest-ingredient span { width: 30px; height: 30px; border-radius: 50%; background: #edd2a5; }
.forest-ingredient.is-berry span { background: #c94b68; box-shadow: -8px 5px 0 #d85d75; }
.forest-ingredient.is-cream span { background: #fff2ef; border: 1px solid #edc5c8; }
.forest-ingredient.is-oven span { border-radius: 9px; background: #c98b5f; }
.forest-ingredient.is-plate span { background: #f9faf7; border: 2px solid #b8cf9e; }
.forest-partner-panel button { min-height: 34px; padding: 0 9px; flex: 0 0 auto; border: 0; border-radius: 11px; color: #fff; background: #d0778a; font: inherit; font-size: 11px; font-weight: 700; }
.forest-partner-panel button:disabled { opacity: .45; }
.forest-event-log { min-height: 58px; padding: 10px 12px; border-radius: 15px; color: #7e5e4e; background: rgba(255,248,238,.7); font-size: 11px; line-height: 1.45; }
.forest-event-log p { margin: 0 0 4px; }
.forest-result-card { padding: 18px 14px; border-radius: 22px; background: #fff8ee; text-align: center; }
.forest-result-illustration { width: 120px; height: 92px; margin: 0 auto 10px; position: relative; border-radius: 24px; background: #c98b5f; }
.forest-result-illustration i { position: absolute; left: 25px; top: 30px; width: 70px; height: 38px; border-radius: 18px; background: #fff0dc; }
.forest-result-illustration b,
.forest-result-illustration em { position: absolute; bottom: 17px; width: 18px; height: 18px; border-radius: 50%; background: #c94b68; }
.forest-result-illustration b { left: 38px; } .forest-result-illustration em { right: 38px; background: #d85d75; }
.forest-result-card > span { color: #a0715d; font-size: 10px; font-weight: 700; }
.forest-result-card h2 { margin: 4px 0 8px; font-size: 24px; }
.forest-stars { display: flex; justify-content: center; gap: 7px; margin-bottom: 10px; }
.forest-stars span { width: 18px; height: 18px; clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 92%,50% 70%,21% 92%,32% 57%,2% 35%,39% 35%); background: #e8d1bf; }
.forest-stars span.is-on { background: #d8a24f; }
.forest-result-card p { margin: 0 auto 12px; max-width: 260px; color: #745746; font-size: 12px; line-height: 1.45; }
.forest-result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.forest-result-stats span { padding: 9px 4px; border-radius: 14px; background: #fff0e2; }
.forest-result-stats b,
.forest-result-stats small { display: block; }
.forest-result-stats small { color: #96715f; font-size: 10px; }
.forest-theater { margin: 0; color: #745746; font-size: 12px; line-height: 1.5; }
.forest-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.forest-score-card-preview { padding: 11px 12px; border-radius: 16px; color: #745746; background: rgba(255,248,238,.72); }
.forest-score-card-preview strong,
.forest-score-card-preview small { display: block; }
.forest-score-card-preview small { margin-top: 5px; font-size: 11px; line-height: 1.45; }
[data-reduce-motion="true"] .forest-workbench,
[data-reduce-motion="true"] .forest-ingredient { transition: none; transform: none !important; }
@media (max-width: 370px) {
  .game-hub-page, .forest-kitchen-page { padding-left: 9px; padding-right: 9px; }
  .forest-ingredient-grid { gap: 4px; }
  .forest-ingredient { min-height: 62px; font-size: 9px; }
  .forest-ingredient span { width: 25px; height: 25px; }
  .forest-tray span { font-size: 8px; }
}
@media (max-height: 620px) {
  .game-hub-hero, .forest-setup-hero { min-height: 104px; }
  .forest-customer-card, .forest-workbench, .forest-partner-panel { margin-bottom: 7px; }
  .forest-plate-preview { min-height: 62px; }
  .forest-event-log { min-height: 44px; }
}
/* Lnyy Music v10 微信分享卡片 */
.msg-bubble.music-card.lnyy-music-card{width:min(292px,76vw)!important;max-width:292px!important;padding:13px!important;display:block!important;border-radius:18px!important;color:#24201d!important;background:#f4f1eb!important;border:1px solid rgba(255,255,255,.78)!important;box-shadow:0 14px 34px rgba(34,28,23,.15)!important;overflow:hidden;cursor:pointer}
.lnyy-music-card .mc-kicker{height:18px;display:flex;align-items:center;gap:8px;color:#a17a36;font-size:7px;letter-spacing:.16em}.lnyy-music-card .mc-kicker>i{height:1px;flex:1;background:linear-gradient(90deg,rgba(161,122,54,.65),transparent)}.lnyy-music-card .mc-record-mark{width:15px;height:15px;border:1px solid currentColor;border-radius:50%;position:relative}.lnyy-music-card .mc-record-mark::before,.lnyy-music-card .mc-record-mark::after{content:"";position:absolute;border:1px solid currentColor;border-radius:50%;inset:3px}.lnyy-music-card .mc-record-mark::after{inset:6px;background:currentColor}
.lnyy-music-card .mc-main{min-height:122px;display:grid;grid-template-columns:142px minmax(0,1fr);gap:15px;align-items:center}.lnyy-music-card .mc-artwork{width:142px;height:108px;position:relative;z-index:1;border-radius:14px;background:#d7d1c8}.lnyy-music-card .mc-artwork>img{position:relative;z-index:2;width:100%;height:100%;border-radius:14px;object-fit:cover}.lnyy-music-card .mc-artwork>span{position:relative;z-index:2;width:100%;height:100%;display:grid;place-items:center;font:24px Georgia,serif}.lnyy-music-card .mc-vinyl{position:absolute;z-index:1;width:92px;height:92px;right:-40px;top:8px;border-radius:50%;background:repeating-radial-gradient(circle,#080808 0 2px,#262626 3px 7px);box-shadow:6px 9px 16px rgba(0,0,0,.22)}
.lnyy-music-card .mc-copy{position:relative;z-index:3;min-width:0;padding-left:5px}.lnyy-music-card .mc-copy strong,.lnyy-music-card .mc-copy>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lnyy-music-card .mc-copy strong{font:22px "Songti SC",Georgia,serif}.lnyy-music-card .mc-copy>span{margin-top:6px;font-size:10px;opacity:.58}.lnyy-music-card .mc-play{width:34px;height:34px;margin-top:15px;border:0;border-radius:50%;display:grid;place-items:center;color:#fff;background:#ad8135}.lnyy-music-card .mc-play svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7}.lnyy-music-card .mc-footer{min-height:34px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(125,94,43,.18);display:grid;grid-template-columns:1fr 1px 1.4fr;gap:10px;align-items:center;color:#554c40}.lnyy-music-card .mc-footer>i{height:22px;background:rgba(125,94,43,.24)}.lnyy-music-card .mc-footer b,.lnyy-music-card .mc-footer small{display:block;font-weight:500;font-size:8px;line-height:1.35}.lnyy-music-card .mc-footer small{font-size:6px;opacity:.52;letter-spacing:.05em}.lnyy-music-card .mc-invite-state{margin-top:7px;padding:5px 8px;border-radius:8px;text-align:center;font-size:8px;letter-spacing:.08em;background:rgba(161,122,54,.1);color:#856326}
[data-theme=dark] .msg-bubble.music-card.lnyy-music-card,.dark-mode .msg-bubble.music-card.lnyy-music-card,body.dark .msg-bubble.music-card.lnyy-music-card{color:#f3efe8!important;background:#252525!important;border-color:rgba(255,255,255,.12)!important;box-shadow:0 16px 36px rgba(0,0,0,.32)!important}.dark-mode .lnyy-music-card .mc-footer,[data-theme=dark] .lnyy-music-card .mc-footer{color:#d8d0c4}.dark-mode .lnyy-music-card .mc-play,[data-theme=dark] .lnyy-music-card .mc-play{background:#c59b52}
@media(max-width:350px){.msg-bubble.music-card.lnyy-music-card{width:min(260px,78vw)!important}.lnyy-music-card .mc-main{grid-template-columns:124px minmax(0,1fr)}.lnyy-music-card .mc-artwork{width:124px;height:98px}.lnyy-music-card .mc-copy strong{font-size:19px}.lnyy-music-card .mc-footer{gap:7px}}
/* Forest Kitchen v2: co-op scene and partner */
.forest-service-scene { margin-bottom: 10px; display: grid; grid-template-columns: minmax(0,1.45fr) minmax(118px,.75fr); gap: 8px; align-items: stretch; }
.forest-service-scene .forest-customer-card { margin-bottom: 0; min-width: 0; }
.forest-partner-stage { min-width: 0; padding: 9px 8px; border-radius: 17px; border: 1px solid rgba(126,82,52,.13); background: linear-gradient(180deg,#fffaf0,#fff0e8); display: grid; place-items: center; gap: 4px; text-align: center; box-shadow: 0 10px 22px rgba(116,72,44,.08); }
.forest-partner-stage strong { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: #50362a; }
.forest-partner-stage small { max-width: 100%; color: #8a6857; font-size: 9px; line-height: 1; }
.forest-partner-figure { width: 64px; height: 76px; position: relative; display: grid; place-items: start center; }
.forest-partner-figure .forest-partner-avatar { position: relative; z-index: 3; width: 38px; height: 38px; flex-basis: 38px; border-radius: 14px; box-shadow: 0 6px 12px rgba(73,43,30,.16); }
.forest-partner-figure i { position: absolute; left: 13px; top: 34px; width: 38px; height: 34px; border-radius: 15px 15px 12px 12px; background: #e6a6b5; box-shadow: inset 0 -9px 0 rgba(111,74,52,.12); }
.forest-partner-figure b, .forest-partner-figure em { content: ""; position: absolute; top: 45px; width: 20px; height: 8px; border-radius: 999px; background: #d0778a; }
.forest-partner-figure b { left: 3px; transform: rotate(-25deg); }
.forest-partner-figure em { right: 3px; transform: rotate(25deg); }
.forest-partner-figure.station-front i { background: #b8cf9e; }
.forest-partner-figure.station-kitchen i { background: #c98b5f; }
.forest-partner-figure.mood-happy { animation: forestBuddyBounce 1.6s ease-in-out infinite; }
.forest-partner-figure.mood-tense b { transform: rotate(-8deg); }
.forest-partner-figure.mood-flustered { transform: rotate(-2deg); }
.forest-mood { width: 100%; height: 7px; overflow: hidden; border-radius: 999px; background: #eddccd; }
.forest-mood span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#bed5a5,#eab1bd,#d8a24f); transition: width 220ms ease; }
.forest-partner-panel { align-items: stretch; }
.forest-partner-bubble { min-width: 0; flex: 1; }
.forest-partner-bubble p { margin: 0; color: #684937; font-size: 11px; line-height: 1.45; }
.forest-partner-bubble > div { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.forest-partner-bubble button { min-height: 28px; padding: 0 8px; border-radius: 999px; color: #6f4a34; background: #fff7ed; border: 1px solid rgba(126,82,52,.14); }

/* Forest Kitchen v2: animal customers and order visuals */
.forest-customer-face { overflow: visible; box-shadow: inset 0 -9px 0 rgba(90,58,45,.08), 0 8px 14px rgba(116,72,44,.1); }
.forest-customer-face span { position: absolute; left: 50%; bottom: -5px; width: 24px; height: 7px; border-radius: 50%; background: rgba(90,58,45,.08); transform: translateX(-50%); }
.forest-customer-face::before, .forest-customer-face::after { content: ""; position: absolute; top: -10px; background: inherit; }
.forest-customer-face.is-deer { background: #d6b58c; }
.forest-customer-face.is-deer::before, .forest-customer-face.is-deer::after { width: 8px; height: 26px; border-radius: 999px; background: #8b5f3d; }
.forest-customer-face.is-deer::before { left: 9px; transform: rotate(-25deg); }
.forest-customer-face.is-deer::after { right: 9px; transform: rotate(25deg); }
.forest-customer-face.is-bear { background: #c69162; border-radius: 22px; }
.forest-customer-face.is-bear::before, .forest-customer-face.is-bear::after { top: -5px; width: 18px; height: 18px; border-radius: 50%; background: #b87f52; }
.forest-customer-face.is-bear::before { left: 2px; }
.forest-customer-face.is-bear::after { right: 2px; }
.forest-customer-face.is-squirrel { background: #d99c66; }
.forest-customer-face.is-squirrel::after { right: -8px; top: 16px; width: 16px; height: 30px; border-radius: 14px 14px 20px 8px; background: #c37f4f; }
.forest-customer-face.is-rabbit { background: #e4c7bc; }
.forest-customer-face.is-rabbit::before, .forest-customer-face.is-rabbit::after { top: -24px; width: 13px; height: 34px; border-radius: 999px; background: #e4c7bc; }
.forest-customer-face.is-rabbit::before { left: 12px; transform: rotate(-8deg); }
.forest-customer-face.is-rabbit::after { right: 12px; transform: rotate(8deg); }
.forest-customer-face.is-cat { background: #c8a889; border-radius: 17px 17px 21px 21px; }
.forest-customer-face.is-cat::before, .forest-customer-face.is-cat::after { top: -8px; width: 18px; height: 18px; clip-path: polygon(50% 0,100% 100%,0 100%); background: #c8a889; }
.forest-customer-face.is-cat::before { left: 7px; }
.forest-customer-face.is-cat::after { right: 7px; }
.forest-customer-face.is-beaver { background: #a97958; }
.forest-customer-face.is-beaver span::after { content: ""; position: absolute; left: 4px; top: -22px; width: 16px; height: 7px; border-radius: 2px; background: #fff1d8; box-shadow: inset 7px 0 0 rgba(111,74,52,.14); }
.forest-customer-face.mood-urging i, .forest-customer-face.mood-urging b { width: 7px; height: 4px; border-radius: 999px; }
.forest-customer-face.mood-happy em { width: 18px; height: 9px; border: 0; border-bottom: 3px solid #5a3a2d; border-radius: 0 0 18px 18px; }
.forest-customer-face.mood-surprised em { left: 22px; bottom: 14px; width: 7px; height: 7px; border: 2px solid #5a3a2d; border-radius: 50%; }
.forest-customer-face.mood-disappointed em { top: 39px; bottom: auto; transform: rotate(180deg); }
.forest-order-chips { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.forest-order-chips span { min-height: 20px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: #f3dfd1; color: #694735; font-size: 9px; font-weight: 700; }
.forest-order-chips .is-berry { background: #f2c6cf; color: #713646; }
.forest-order-chips .is-topping { background: #fff0d7; color: #7d5a2e; }
.forest-order-chips .is-bake { background: #d9e5c7; color: #486339; }
.forest-accident { margin: -1px 0 9px; padding: 8px 10px; border-radius: 13px; color: #7b473c; background: #fff0dc; border: 1px solid rgba(208,119,138,.18); font-size: 11px; line-height: 1.35; animation: forestPop 220ms ease; }
.forest-ingredient-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.forest-ingredient.is-strawberry span, .forest-plate-preview .is-strawberry { background: #d85d75; box-shadow: -7px 5px 0 #c94b68, 7px 6px 0 #e2798c; }
.forest-ingredient.is-blueberry span, .forest-plate-preview .is-blueberry { background: #7189c9; box-shadow: -7px 5px 0 #596eae, 7px 6px 0 #92a8df; }
.forest-ingredient.is-raspberry span, .forest-plate-preview .is-raspberry { background: #b94768; box-shadow: -7px 5px 0 #d8758e, 7px 6px 0 #a53d5f; }
.forest-ingredient.is-sugar span, .forest-plate-preview .is-sugar { background: #fff6ed; border: 1px solid #e7c7aa; box-shadow: inset 0 0 0 5px rgba(216,162,79,.18); }
.forest-ingredient.is-starSugar span, .forest-plate-preview .is-starSugar { border-radius: 6px; background: #f4c85d; clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 92%,50% 70%,21% 92%,32% 57%,2% 35%,39% 35%); }
.forest-plate-preview { position: relative; overflow: hidden; }
.forest-plate-preview::before { content: ""; position: absolute; left: 50%; bottom: 12px; width: 92px; height: 18px; border-radius: 50%; background: #eff5e7; border: 2px solid #b8cf9e; transform: translateX(-50%); }
.forest-plate-preview i { position: relative; z-index: 2; }

/* Forest Kitchen v2: result, unlock and diary */
.forest-unlock { margin: 10px auto 0; width: fit-content; max-width: 100%; padding: 7px 10px; border-radius: 999px; color: #6d4a2b; background: #ffe7a8; font-size: 11px; font-weight: 700; }
.forest-result-actions { grid-template-columns: 1fr 1fr 1fr; }
.forest-diary-book { padding: 12px; border-radius: 22px; background: linear-gradient(135deg,#b98a64,#ead0b8 44%,#fff8ee); border: 1px solid rgba(126,82,52,.16); box-shadow: 0 16px 36px rgba(92,55,32,.16); }
.forest-diary-cover { min-height: 116px; padding: 16px; border-radius: 18px; background: #6f4a34; color: #fffaf0; display: grid; align-content: end; gap: 5px; }
.forest-diary-cover span { font-size: 10px; letter-spacing: .12em; opacity: .76; }
.forest-diary-cover strong { font-size: 20px; line-height: 1.2; }
.forest-diary-cover small { font-size: 11px; line-height: 1.35; opacity: .78; }
.forest-diary-paper { margin: 10px 0 0; padding: 18px 16px; min-height: 300px; border-radius: 16px; color: #50362a; background: linear-gradient(#fffaf0,#fffaf0 31px,#f3e7d6 32px); background-size: 100% 32px; box-shadow: inset 0 0 0 1px rgba(126,82,52,.11); }
.forest-diary-paper p { margin: 0; font-size: 14px; line-height: 2.28; white-space: pre-wrap; }
@keyframes forestBuddyBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes forestPop { from { transform: scale(.98); opacity: .3; } to { transform: scale(1); opacity: 1; } }
[data-reduce-motion="true"] .forest-partner-figure, [data-reduce-motion="true"] .forest-accident { animation: none !important; }
@media (max-width: 370px) {
  .forest-service-scene { grid-template-columns: 1fr; }
  .forest-partner-stage { grid-template-columns: auto minmax(0,1fr); justify-items: start; text-align: left; }
  .forest-partner-stage .forest-mood { grid-column: 1 / -1; }
  .forest-partner-figure { width: 58px; height: 68px; }
  .forest-ingredient-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .forest-result-actions { grid-template-columns: 1fr; }
  .forest-diary-paper { min-height: 260px; padding: 14px 13px; }
  .forest-diary-paper p { font-size: 13px; line-height: 2.18; }
}
@media (max-height: 620px) {
  .forest-service-scene { gap: 6px; }
  .forest-partner-figure { width: 58px; height: 64px; }
  .forest-diary-cover { min-height: 90px; }
  .forest-diary-paper { min-height: 230px; }
}

/* Forest Kitchen v2 fixes: portrait partner, calmer motion, bake judgement */
.forest-service-scene { grid-template-columns: minmax(0,1fr) 142px; }
.forest-partner-stage { min-height: 168px; padding: 10px 9px; overflow: hidden; background: linear-gradient(180deg,#fff8ef 0%,#fff0e6 58%,#ecd3bd 100%); }
.forest-partner-figure { width: 108px; height: 132px; place-items: start center; isolation: isolate; }
.forest-partner-figure::before { content: ""; position: absolute; z-index: 0; left: 16px; top: 6px; width: 76px; height: 76px; border-radius: 30px 30px 28px 28px; background: #6f4a34; box-shadow: 0 12px 22px rgba(92,55,32,.16); }
.forest-partner-figure::after { content: ""; position: absolute; z-index: 5; left: 37px; top: -2px; width: 34px; height: 17px; border-radius: 14px 14px 8px 8px; background: #fff7ec; box-shadow: -12px 8px 0 -5px #fff7ec, 12px 8px 0 -5px #fff7ec; }
.forest-partner-figure.palette-1::before { background: #8b6f92; }
.forest-partner-figure.palette-2::before { background: #5f7d73; }
.forest-partner-figure .forest-partner-avatar { width: 58px; height: 58px; flex-basis: 58px; border-radius: 22px; margin-top: 16px; border: 3px solid #fff8ef; }
.forest-partner-figure span { position: absolute; z-index: 1; left: 17px; top: 20px; width: 74px; height: 72px; border-radius: 38px 38px 26px 26px; background: rgba(255,238,220,.95); }
.forest-partner-figure i { z-index: 2; left: 20px; top: 69px; width: 68px; height: 56px; border-radius: 24px 24px 18px 18px; background: #e6a6b5; box-shadow: inset 0 -16px 0 rgba(111,74,52,.12), 0 12px 18px rgba(92,55,32,.12); }
.forest-partner-figure.station-front i { background: #aeca93; }
.forest-partner-figure.station-kitchen i { background: #c98b5f; }
.forest-partner-figure b, .forest-partner-figure em { z-index: 1; top: 84px; width: 36px; height: 13px; background: #d0778a; }
.forest-partner-figure b { left: 0; transform: rotate(-22deg); }
.forest-partner-figure em { right: 0; transform: rotate(22deg); }
.forest-partner-figure u { position: absolute; z-index: 4; left: 31px; top: 80px; width: 46px; height: 42px; border-radius: 10px 10px 18px 18px; background: linear-gradient(180deg,#fff8ef,#f4dfcf); box-shadow: inset 0 -9px 0 rgba(216,162,79,.18); text-decoration: none; }
.forest-partner-figure.mood-happy, .forest-partner-figure.mood-flustered { animation: none !important; transform: none; }
.forest-partner-stage strong { margin-top: -4px; font-size: 13px; }
.forest-bake-slot { min-height: 44px; }
.forest-bake-meter { margin: 6px 0 3px; padding: 7px 9px; border-radius: 13px; background: #fffaf1; border: 1px solid rgba(126,82,52,.12); }
.forest-bake-meter > span, .forest-bake-meter small { display: block; font-size: 10px; color: #765744; }
.forest-bake-meter > span { font-weight: 800; }
.forest-bake-meter small { margin-top: 4px; color: #9a7663; }
.forest-bake-meter > div { position: relative; height: 12px; margin-top: 6px; border-radius: 999px; background: linear-gradient(90deg,#ecd6c5,#ecd6c5); overflow: hidden; }
.forest-bake-meter > div b { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: #9ec582; box-shadow: 0 0 0 999px transparent; }
.forest-bake-meter > div i { position: absolute; z-index: 2; top: -4px; width: 4px; height: 20px; border-radius: 999px; background: #5a3a2d; transform: translateX(-50%); transition: left 260ms linear; }
.forest-bake-meter.is-ready > span { color: #4e723d; }
.forest-bake-meter.is-over > span { color: #9a4b3d; }
.forest-bake-meter.is-early > span { color: #7d6256; }
@media (max-width: 370px) {
  .forest-service-scene { grid-template-columns: 1fr; }
  .forest-partner-stage { min-height: 116px; grid-template-columns: 104px minmax(0,1fr); }
  .forest-partner-stage strong { margin-top: 0; }
}
@media (max-height: 620px) {
  .forest-partner-stage { min-height: 132px; }
  .forest-partner-figure { width: 92px; height: 108px; transform: scale(.86); transform-origin: top center; }
}

/* Forest Kitchen no-flash pass */
.wechat-content--forest-game .forest-kitchen-page.play,
.wechat-content--forest-game .forest-kitchen-page.play * { animation: none !important; transition: none !important; }
.wechat-content--forest-game .forest-accident { animation: none !important; }
.wechat-content--forest-game .forest-bake-meter > div i { transition: none !important; }
.wechat-content--forest-game .forest-patience span,
.wechat-content--forest-game .forest-mood span { transition: none !important; }
.wechat-content--forest-game .forest-workbench.is-hover { transform: none; }
.wechat-content--forest-game .forest-ingredient:active { transform: none; }

/* Forest Kitchen no-flash pass 2: fixed slots */
.wechat-content--forest-game .forest-accident { min-height: 34px; box-sizing: border-box; }
.wechat-content--forest-game .forest-accident.is-empty { visibility: hidden; }
.wechat-content--forest-game .forest-bake-slot.is-empty { visibility: hidden; }

/* Forest Kitchen v3: sweet landscape remake */
.wechat-app[data-view="game-hub"] .wechat-header,
.wechat-app[data-view="forest-kitchen"] .wechat-header { display: none; }
.wechat-app[data-view="game-hub"] .wechat-content,
.wechat-app[data-view="forest-kitchen"] .wechat-content { overflow: hidden; background: #8fbd55 !important; }
.wechat-content--forest-game { background: #8fbd55 !important; }
.game-hub-page.forest-landscape,
.forest-kitchen-page.forest-landscape { min-height: 100%; padding: 8px; display: grid; place-items: center; box-sizing: border-box; color: #6a442b; background: radial-gradient(circle at 10% 10%, rgba(255,238,153,.5), transparent 22%), linear-gradient(135deg,#82b84f,#cce28b 48%,#8dbd59); }
.forest-game-frame { position: relative; width: min(100%, 760px); aspect-ratio: 16 / 9; min-height: 0; overflow: hidden; box-sizing: border-box; border: 3px solid rgba(104,143,54,.62); border-radius: 18px; background: #fff1c9; box-shadow: inset 0 0 0 4px rgba(255,255,255,.45), 0 18px 38px rgba(68,96,35,.25); }
.forest-game-frame::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at 4% 12%, #5f9a3f 0 8%, transparent 9%), radial-gradient(circle at 96% 13%, #6cab45 0 10%, transparent 11%), radial-gradient(circle at 8% 92%, #78ad49 0 8%, transparent 9%), radial-gradient(circle at 92% 90%, #6aa444 0 10%, transparent 11%), linear-gradient(180deg, rgba(141,194,80,.45), transparent 31%); }
.forest-game-frame::after { content: ""; position: absolute; inset: 9px; z-index: 0; pointer-events: none; border: 2px solid rgba(123,164,68,.32); border-radius: 14px; }
.forest-round-btn { width: 34px; height: 34px; border: 2px solid rgba(128,84,41,.22); border-radius: 12px; display: inline-grid; place-items: center; color: #8a5329; background: linear-gradient(#ffe99a,#f7b542); box-shadow: 0 4px 0 #d89029, 0 8px 14px rgba(112,73,26,.16); font: 800 20px/1 inherit; cursor: pointer; }
.forest-back-btn { position: absolute; z-index: 5; left: 12px; top: 12px; }
.forest-primary,
.forest-secondary { min-height: 40px; border-radius: 13px; border: 2px solid rgba(136,86,29,.22); color: #8a5221; background: linear-gradient(#ffe88f,#ffb735); box-shadow: 0 4px 0 #d88b24, 0 10px 18px rgba(118,80,34,.18); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.forest-primary.green { color: #fff; background: linear-gradient(#a8d765,#6fb746); box-shadow: 0 4px 0 #4e8f32, 0 10px 18px rgba(67,108,37,.2); text-shadow: 0 1px 0 rgba(45,91,31,.45); }
.forest-secondary.blue { color: #fff; background: linear-gradient(#96d8ff,#54aede); box-shadow: 0 4px 0 #368ab8, 0 10px 18px rgba(45,106,142,.18); text-shadow: 0 1px 0 rgba(25,84,121,.38); }
.forest-primary:disabled { opacity: .52; filter: grayscale(.2); }
.forest-wood-sign { position: absolute; z-index: 3; left: 50%; top: 30px; min-width: 188px; padding: 10px 28px 13px; transform: translateX(-50%); border-radius: 8px 8px 16px 16px; color: #fff8e9; text-align: center; background: linear-gradient(#b98548,#8c552c); border: 2px solid rgba(83,50,22,.24); box-shadow: inset 0 3px 0 rgba(255,230,159,.28), 0 7px 0 rgba(89,60,30,.2); }
.forest-wood-sign::before,
.forest-wood-sign::after { content: ""; position: absolute; top: -12px; width: 18px; height: 18px; border-radius: 50%; background: #9bc85f; box-shadow: 0 2px 0 rgba(82,109,35,.22); }
.forest-wood-sign::before { left: 18px; }
.forest-wood-sign::after { right: 18px; }
.forest-wood-sign span { display: block; font-size: clamp(22px,4vw,32px); font-weight: 900; letter-spacing: 0; text-shadow: 0 2px 0 rgba(83,45,22,.28); }
.forest-wood-sign.small { top: 14px; min-width: 156px; padding: 8px 24px 10px; }
.forest-wood-sign.small span { font-size: clamp(18px,3vw,26px); }
.forest-home-hud { position: absolute; z-index: 4; left: 16px; top: 14px; right: 14px; display: flex; align-items: center; gap: 10px; }
.forest-home-hud span { min-width: 82px; height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: #7b4d25; background: linear-gradient(90deg,#fff9df,#ffe3a2); box-shadow: inset 0 0 0 2px rgba(184,118,38,.14), 0 4px 10px rgba(95,66,28,.12); font-weight: 850; }
.forest-home-hud b { color: #ef9f25; }
.forest-home-hud .forest-round-btn { margin-left: auto; }
.forest-screen-home { background: linear-gradient(180deg,#bfe59d 0%,#f5e6b8 43%,#b77842 44%,#9b6436 66%,#70a54a 100%); }
.forest-screen-home::before { background: radial-gradient(circle at 14% 11%, #5f9a3f 0 10%, transparent 11%), radial-gradient(circle at 86% 11%, #6cab45 0 12%, transparent 13%), linear-gradient(180deg,rgba(255,248,205,.44),transparent 42%); }
.forest-home-counter { position: absolute; z-index: 2; left: 118px; right: 78px; bottom: 72px; height: 140px; display: flex; align-items: end; justify-content: center; gap: clamp(8px,2vw,18px); border-bottom: 38px solid #8a572d; background: linear-gradient(#b57940,#9a6336); box-shadow: 0 -7px 0 rgba(255,232,162,.34) inset; }
.forest-home-counter::before { content: ""; position: absolute; left: -18px; right: -18px; bottom: 38px; height: 18px; border-radius: 12px 12px 4px 4px; background: #c48648; }
.forest-start-btn { position: absolute; z-index: 5; left: 50%; bottom: 26px; width: 190px; min-height: 52px; transform: translateX(-50%); font-size: 22px; font-weight: 900; }
.forest-home-board { position: absolute; z-index: 4; right: 21px; bottom: 56px; width: 72px; min-height: 66px; padding: 8px 5px; box-sizing: border-box; border-radius: 8px; color: #fff5df; text-align: center; background: #6b4b31; box-shadow: inset 0 0 0 2px rgba(255,226,154,.25); }
.forest-home-board strong,
.forest-home-board span { display: block; font-size: 11px; line-height: 1.35; }
.forest-mascot { position: relative; width: 70px; height: 94px; flex: 0 0 70px; }
.forest-mascot::before { content: ""; position: absolute; left: 9px; top: 4px; width: 52px; height: 52px; border-radius: 50%; background: var(--face,#f6c16a); box-shadow: inset 0 -8px 0 rgba(126,75,39,.08), 0 4px 0 rgba(86,55,26,.08); }
.forest-mascot::after { content: ""; position: absolute; left: 20px; top: 57px; width: 32px; height: 34px; border-radius: 14px 14px 10px 10px; background: var(--body,#86bd4f); box-shadow: inset 0 -8px 0 rgba(82,65,36,.12); }
.forest-mascot i,
.forest-mascot b { position: absolute; z-index: 2; top: 27px; width: 6px; height: 7px; border-radius: 50%; background: #5a3422; }
.forest-mascot i { left: 25px; }
.forest-mascot b { right: 25px; }
.forest-mascot em { position: absolute; z-index: 2; left: 30px; top: 38px; width: 13px; height: 7px; border: 0; border-bottom: 3px solid #5a3422; border-radius: 0 0 12px 12px; }
.forest-mascot.rabbit { --face:#fff5ee; --body:#f0abc0; }
.forest-mascot.rabbit::before { border-radius: 44% 44% 50% 50%; box-shadow: -13px -24px 0 -5px #fff5ee, 13px -24px 0 -5px #fff5ee, inset 0 -8px 0 rgba(126,75,39,.06); }
.forest-mascot.bear { --face:#bc7c3f; --body:#76b84b; }
.forest-mascot.bear::before { box-shadow: -16px -7px 0 -8px #a96c38, 16px -7px 0 -8px #a96c38, inset 0 -8px 0 rgba(126,75,39,.08); }
.forest-mascot.fox { --face:#f4a247; --body:#8bc9e6; }
.forest-mascot.fox::before { border-radius: 44% 44% 54% 54%; clip-path: polygon(0 18%,16% 0,29% 18%,71% 18%,84% 0,100% 18%,100% 100%,0 100%); }
.forest-mascot.chick { --face:#ffd967; --body:#ffc650; width: 58px; flex-basis: 58px; }
.forest-mascot.chick::before { left: 10px; top: 18px; width: 42px; height: 42px; }
.forest-mascot.chick::after { left: 17px; top: 58px; width: 30px; height: 26px; border-radius: 50%; }
.forest-mascot.chick i { left: 25px; top: 34px; }
.forest-mascot.chick b { right: 19px; top: 34px; }
.forest-mascot.chick em { left: 30px; top: 42px; width: 9px; border-color: #a45b1d; }
.forest-mascot.chef::after { box-shadow: inset 0 -8px 0 rgba(82,65,36,.12), 0 -43px 0 -18px #fff8ef; }
.forest-screen-levels { padding: 72px 24px 22px; display: grid; grid-template-columns: minmax(0,1fr) 228px; gap: 18px; background: linear-gradient(180deg,#bfe69c,#fef1c9 28%,#fff2d0); }
.forest-level-map { min-height: 0; padding: 18px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 15px; align-content: center; border-radius: 18px; background: rgba(255,247,222,.82); box-shadow: inset 0 0 0 2px rgba(205,146,66,.18); }
.forest-level-card { position: relative; min-width: 0; min-height: 84px; border: 2px solid #e6bd7a; border-radius: 15px; color: #7e572d; background: linear-gradient(#fff8e7,#ffe0a9); box-shadow: 0 5px 0 #d39a51, 0 12px 18px rgba(112,70,29,.12); font: inherit; cursor: pointer; }
.forest-level-card strong { display: block; font-size: 28px; line-height: 1; }
.forest-level-card.is-active { color: #fff; background: linear-gradient(#9ed56c,#68b449); border-color: #7dbc51; box-shadow: 0 5px 0 #4f9139, 0 12px 18px rgba(58,109,45,.16); }
.forest-level-card.is-locked { filter: saturate(.65); opacity: .82; }
.forest-level-card small { display: block; margin-top: 5px; font-size: 12px; font-weight: 900; }
.forest-level-side { min-width: 0; display: grid; align-content: center; gap: 9px; }
.forest-level-side .forest-panel { margin: 0; max-height: 122px; overflow: auto; border-radius: 16px; background: rgba(255,250,232,.9); }
.forest-level-side .forest-panel h3 { margin-bottom: 7px; color: #7d4f2b; font-size: 12px; }
.forest-level-side .forest-primary { width: 100%; font-size: 16px; font-weight: 900; }
.forest-level-side .forest-partner-list,
.forest-level-side .forest-station-grid { gap: 6px; }
.forest-level-side .forest-partner-row,
.forest-level-side .forest-station-card { min-height: 42px; padding: 6px 8px; border-radius: 12px; background: #fff9e9; }
.forest-level-side .forest-partner-avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
.forest-screen-play { padding: 9px 14px 12px; display: grid; grid-template-rows: 38px 76px minmax(0,1fr) 72px 46px; gap: 7px; background: linear-gradient(180deg,#fff2ca 0%,#ffe8b1 31%,#c2884d 32%,#a96b35 67%,#f6d79a 68%); }
.forest-play-hud { position: relative; z-index: 4; display: grid; grid-template-columns: 36px 78px 92px minmax(120px,1fr) 72px 36px; gap: 8px; align-items: center; }
.forest-hud-pill { height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #8a5329; background: linear-gradient(#fff9df,#ffe1a2); box-shadow: inset 0 0 0 2px rgba(184,118,38,.12); font-size: 13px; font-weight: 900; }
.forest-hud-pill.progress { position: relative; overflow: hidden; justify-content: start; color: #7f552c; }
.forest-hud-pill.progress b { position: absolute; left: 4px; top: 6px; bottom: 6px; border-radius: 999px; background: linear-gradient(90deg,#94d161,#ffc244); }
.forest-hud-pill.progress i { position: relative; z-index: 2; width: 100%; text-align: center; font-style: normal; }
.forest-order-rail { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.forest-order-ticket { min-width: 0; padding: 6px 6px 5px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; column-gap: 6px; border-radius: 14px; background: rgba(255,248,230,.9); box-shadow: inset 0 0 0 2px rgba(218,158,82,.14), 0 6px 12px rgba(95,63,29,.1); }
.forest-order-ticket.is-current { box-shadow: inset 0 0 0 3px #8dc25c, 0 7px 14px rgba(68,117,44,.18); }
.forest-order-ticket .forest-customer-face { width: 40px; height: 40px; flex-basis: 40px; grid-row: span 2; transform: scale(.8); transform-origin: center; }
.forest-order-ticket small { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #7a5739; font-size: 10px; font-weight: 900; }
.forest-order-ticket .forest-order-chips { margin-top: 3px; gap: 2px; }
.forest-order-ticket .forest-order-chips span { min-height: 15px; padding: 0 4px; font-size: 8px; }
.forest-play-scene { position: relative; z-index: 2; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 132px; gap: 10px; }
.forest-kitchen-table { min-height: 0; display: grid; grid-template-rows: 56px 32px minmax(0,1fr); gap: 5px; }
.forest-screen-play .forest-customer-card { min-height: 0; margin: 0; padding: 8px 10px; border-radius: 14px; background: rgba(255,249,230,.94); }
.forest-screen-play .forest-customer-card .forest-customer-face { width: 44px; height: 44px; flex-basis: 44px; transform: scale(.86); }
.forest-screen-play .forest-customer-card strong { font-size: 13px; }
.forest-screen-play .forest-customer-card small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forest-screen-play .forest-accident { min-height: 28px; margin: 0; padding: 6px 10px; border-radius: 12px; font-size: 10px; background: rgba(255,239,205,.95); }
.forest-screen-play .forest-workbench { min-height: 0; margin: 0; padding: 8px; border: 0; border-radius: 15px; background: rgba(255,246,221,.95); box-shadow: inset 0 -12px 0 rgba(188,121,58,.11), 0 7px 14px rgba(84,56,31,.12); }
.forest-screen-play .forest-tray { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; }
.forest-screen-play .forest-tray span { min-height: 22px; font-size: 9px; font-weight: 850; }
.forest-screen-play .forest-plate-preview { min-height: 54px; margin: 6px 0 3px; }
.forest-screen-play .forest-bake-meter { margin: 4px 0 2px; padding: 5px 7px; }
.forest-screen-play .forest-bake-meter > div { height: 9px; margin-top: 4px; }
.forest-screen-play .forest-next-step { font-size: 11px; }
.forest-screen-play .forest-partner-stage { min-height: 0; padding: 7px 7px; border-radius: 16px; background: linear-gradient(#fff8e7,#f9dba1); }
.forest-screen-play .forest-partner-figure { width: 88px; height: 100px; transform: scale(.78); transform-origin: top center; }
.forest-screen-play .forest-partner-stage strong { margin-top: -16px; font-size: 12px; }
.forest-screen-play .forest-partner-stage small { font-size: 9px; }
.forest-screen-play .forest-ingredient-grid { position: relative; z-index: 2; margin: 0; display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 7px; }
.forest-screen-play .forest-ingredient { min-height: 64px; padding: 5px 3px; border: 2px solid rgba(140,84,29,.14); border-radius: 13px; background: linear-gradient(#fff3cf,#e6b46e); box-shadow: 0 5px 0 #b97a3b; font-size: 10px; font-weight: 900; }
.forest-screen-play .forest-ingredient span { width: 28px; height: 28px; }
.forest-screen-play .forest-partner-panel { position: relative; z-index: 3; margin: 0; padding: 7px 9px; min-height: 0; border-radius: 14px; background: rgba(255,249,230,.96); }
.forest-screen-play .forest-partner-bubble p { font-size: 10px; line-height: 1; }
.forest-screen-play .forest-partner-panel button { min-height: 28px; border-radius: 10px; background: linear-gradient(#ffa4b1,#df7487); }
.forest-screen-result { display: grid; align-content: center; justify-items: center; padding: 58px 24px 18px; background: linear-gradient(180deg,#cceaa6,#fff0c8 30%,#fff5d7); }
.forest-ribbon { position: absolute; z-index: 4; left: 50%; top: 18px; min-width: 230px; padding: 11px 30px 14px; transform: translateX(-50%); color: #fff9ef; text-align: center; background: linear-gradient(#ff9c9d,#df6975); border-radius: 12px 12px 20px 20px; box-shadow: inset 0 3px 0 rgba(255,255,255,.28), 0 6px 0 rgba(180,75,82,.22); }
.forest-ribbon span { display: block; font-size: clamp(22px,4vw,34px); font-weight: 950; text-shadow: 0 2px 0 rgba(133,58,55,.3); }
.forest-result-hero { position: relative; z-index: 2; width: min(100%, 610px); display: grid; grid-template-columns: 130px minmax(0,1fr) 112px; align-items: end; gap: 12px; }
.forest-result-copy { min-width: 0; padding: 18px 16px; border-radius: 18px; text-align: center; background: rgba(255,246,221,.76); }
.forest-result-copy p { min-height: 38px; margin: 8px auto 10px; max-width: 300px; color: #805939; font-size: 12px; line-height: 1.45; }
.forest-stars { display: flex; justify-content: center; gap: 4px; }
.forest-stars span { width: 16px; height: 16px; clip-path: polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 92%,50% 70%,21% 92%,32% 57%,2% 35%,39% 35%); background: #e8d1bf; filter: drop-shadow(0 1px 0 rgba(113,78,36,.16)); }
.forest-stars span.is-on { background: linear-gradient(#fff075,#ffb32d); }
.forest-stars.big { gap: 18px; }
.forest-stars.big span { width: 62px; height: 62px; filter: drop-shadow(0 5px 0 #d9871f) drop-shadow(0 10px 14px rgba(144,86,22,.18)); }
.forest-result-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.forest-result-stats span { padding: 8px 4px; border-radius: 14px; background: rgba(255,223,150,.56); }
.forest-result-stats b,
.forest-result-stats small { display: block; }
.forest-result-stats b { color: #7e4c23; font-size: 17px; }
.forest-result-stats small { color: #986638; font-size: 10px; }
.forest-screen-result .forest-mascot { width: 118px; height: 138px; transform: scale(1.08); transform-origin: bottom center; }
.forest-screen-result .forest-mascot.chick { width: 72px; height: 96px; transform: scale(1); }
.forest-result-actions { position: relative; z-index: 4; width: min(100%, 390px); margin: 12px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.forest-result-actions .forest-primary,
.forest-result-actions .forest-secondary { width: 100%; min-height: 42px; font-size: 15px; font-weight: 950; }
.forest-share-link { margin-top: 10px; border: 0; color: #b56936; background: transparent; font: 800 12px/1.2 inherit; text-decoration: underline; }
.forest-unlock { background: #ffe9a9; }
@media (max-width: 480px) {
  .forest-game-frame { aspect-ratio: 4 / 3; }
}
@media (max-width: 370px) {
  .game-hub-page.forest-landscape,
  .forest-kitchen-page.forest-landscape { padding: 5px; }
  .forest-game-frame { border-radius: 14px; }
  .forest-wood-sign { top: 22px; min-width: 150px; padding: 8px 18px 10px; }
  .forest-home-hud { gap: 5px; }
  .forest-home-hud span { min-width: 54px; height: 25px; padding: 0 7px; font-size: 11px; }
  .forest-home-counter { left: 28px; right: 28px; bottom: 58px; gap: 2px; }
  .forest-mascot { transform: scale(.78); transform-origin: bottom center; margin: 0 -8px; }
  .forest-start-btn { width: 146px; min-height: 42px; font-size: 18px; }
  .forest-home-board { display: none; }
  .forest-screen-levels { padding: 56px 10px 10px; grid-template-columns: 1fr 130px; gap: 8px; }
  .forest-level-map { padding: 8px; gap: 7px; }
  .forest-level-card { min-height: 52px; border-radius: 11px; }
  .forest-level-card strong { font-size: 19px; }
  .forest-level-card .forest-stars span { width: 7px; height: 7px; }
  .forest-level-side .forest-panel { max-height: 74px; padding: 7px; }
  .forest-level-side .forest-partner-row,
  .forest-level-side .forest-station-card { min-height: 34px; }
  .forest-level-side .forest-partner-row small,
  .forest-level-side .forest-station-card small { display: none; }
  .forest-screen-play { grid-template-rows: 30px 56px minmax(0,1fr) 58px 38px; padding: 6px; gap: 5px; }
  .forest-play-hud { grid-template-columns: 30px 58px 62px minmax(80px,1fr) 48px 30px; gap: 4px; }
  .forest-round-btn { width: 28px; height: 28px; border-radius: 10px; font-size: 16px; }
  .forest-hud-pill { height: 25px; padding: 0 5px; font-size: 10px; }
  .forest-order-rail { gap: 5px; }
  .forest-order-ticket { padding: 4px; grid-template-columns: 30px minmax(0,1fr); }
  .forest-order-ticket .forest-customer-face { width: 30px; height: 30px; transform: scale(.65); }
  .forest-order-ticket .forest-order-chips span { display: none; }
  .forest-play-scene { grid-template-columns: minmax(0,1fr) 86px; gap: 5px; }
  .forest-kitchen-table { grid-template-rows: 44px 26px minmax(0,1fr); }
  .forest-screen-play .forest-customer-card { padding: 5px; }
  .forest-screen-play .forest-customer-card .forest-customer-face { width: 34px; height: 34px; flex-basis: 34px; transform: scale(.7); }
  .forest-screen-play .forest-customer-card small { display: none; }
  .forest-screen-play .forest-plate-preview { min-height: 36px; }
  .forest-screen-play .forest-partner-figure { transform: scale(.55); margin-top: -12px; }
  .forest-screen-play .forest-partner-stage strong { margin-top: -40px; font-size: 10px; }
  .forest-screen-play .forest-partner-stage small { display: none; }
  .forest-screen-play .forest-ingredient-grid { gap: 4px; }
  .forest-screen-play .forest-ingredient { min-height: 50px; font-size: 8px; }
  .forest-screen-play .forest-ingredient span { width: 21px; height: 21px; }
  .forest-screen-play .forest-partner-bubble p { font-size: 9px; }
  .forest-screen-result { padding: 44px 10px 10px; }
  .forest-ribbon { min-width: 170px; padding: 8px 20px 10px; }
  .forest-result-hero { grid-template-columns: 80px minmax(0,1fr) 52px; gap: 4px; }
  .forest-screen-result .forest-mascot { transform: scale(.72); margin: 0 -22px; }
  .forest-screen-result .forest-mascot.chick { transform: scale(.68); }
  .forest-stars.big { gap: 8px; }
  .forest-stars.big span { width: 34px; height: 34px; }
  .forest-result-copy { padding: 10px; }
  .forest-result-copy p { font-size: 10px; }
}

/* Forest Kitchen v4: tactile knead/press/decorate interaction */
.forest-screen-play .forest-workbench { touch-action: none; user-select: none; cursor: grab; }
.forest-screen-play .forest-workbench.is-pressing { cursor: grabbing; background: rgba(255,241,208,.98); box-shadow: inset 0 -15px 0 rgba(188,121,58,.14), 0 8px 18px rgba(130,83,38,.18); }
.forest-screen-play .forest-plate-preview { isolation: isolate; background: radial-gradient(circle at 50% 52%, #fffdf4 0 38%, #ecf4db 39% 51%, transparent 52%), linear-gradient(#fff8e6,#fff0c9); }
.forest-tactile-food { position: relative; width: 100%; min-height: 72px; display: grid; place-items: center; color: #7b5639; }
.forest-tactile-food i,
.forest-tactile-food b,
.forest-tactile-food em,
.forest-tactile-food u { position: absolute; left: 50%; top: 50%; display: block; transform: translate(-50%,-50%); pointer-events: none; }
.forest-tactile-food i { z-index: 1; width: 104px; height: 58px; border-radius: 48% 52% 44% 56% / 54% 46% 54% 46%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.88) 0 10%, transparent 11%), linear-gradient(180deg,#ffe4b5,#e8b36b); border: 3px solid rgba(145,92,39,.16); box-shadow: inset 0 -9px 0 rgba(169,97,36,.12), 0 9px 16px rgba(110,70,32,.12); transform: translate(-50%,-50%) scale(var(--knead-scale,.55)); }
.forest-tactile-food b { z-index: 2; width: 76px; height: 34px; border-radius: 50%; opacity: var(--press-scale,0); background: radial-gradient(circle at 32% 35%, rgba(255,255,255,.62) 0 10%, transparent 11%), #d85d75; box-shadow: -12px 4px 0 rgba(201,75,104,.55), 13px 6px 0 rgba(226,121,140,.55); transform: translate(-50%,-48%) scale(1); }
.forest-tactile-food.berry-blueberry b { background: radial-gradient(circle at 32% 35%, rgba(255,255,255,.58) 0 10%, transparent 11%), #7189c9; box-shadow: -12px 4px 0 rgba(89,110,174,.55), 13px 6px 0 rgba(146,168,223,.55); }
.forest-tactile-food.berry-raspberry b { background: radial-gradient(circle at 32% 35%, rgba(255,255,255,.58) 0 10%, transparent 11%), #b94768; box-shadow: -12px 4px 0 rgba(216,117,142,.55), 13px 6px 0 rgba(165,61,95,.55); }
.forest-tactile-food em { z-index: 3; width: 92px; height: 42px; opacity: var(--decorate-scale,0); border-radius: 50%; background: radial-gradient(circle at 19% 46%, #fff8ee 0 5px, transparent 6px), radial-gradient(circle at 39% 35%, #fff8ee 0 5px, transparent 6px), radial-gradient(circle at 60% 48%, #fff8ee 0 5px, transparent 6px), radial-gradient(circle at 78% 35%, #fff8ee 0 5px, transparent 6px); border: 0; transform: translate(-50%,-50%) scale(1); }
.forest-tactile-food.topping-sugar em { background: radial-gradient(circle at 18% 42%, #fff6ed 0 4px, transparent 5px), radial-gradient(circle at 36% 56%, #ffe09a 0 3px, transparent 4px), radial-gradient(circle at 58% 38%, #fff6ed 0 4px, transparent 5px), radial-gradient(circle at 78% 55%, #ffe09a 0 3px, transparent 4px); }
.forest-tactile-food.topping-starSugar em { background: radial-gradient(circle at 18% 42%, #ffd75e 0 5px, transparent 6px), radial-gradient(circle at 38% 56%, #fff7b0 0 4px, transparent 5px), radial-gradient(circle at 60% 38%, #ffd75e 0 5px, transparent 6px), radial-gradient(circle at 80% 55%, #fff7b0 0 4px, transparent 5px); }
.forest-tactile-food u { z-index: 4; width: 112px; height: 58px; opacity: var(--decorate-scale,0); text-decoration: none; background: radial-gradient(circle at 12% 18%, #fff4a7 0 3px, transparent 4px), radial-gradient(circle at 86% 30%, #fff4a7 0 3px, transparent 4px), radial-gradient(circle at 70% 78%, #fff 0 2px, transparent 3px); }
.forest-tactile-food small { position: absolute; z-index: 5; left: 50%; bottom: -2px; width: min(96%, 270px); transform: translateX(-50%); color: #9b6f46; font-size: 10px; font-weight: 800; line-height: 1; text-align: center; }
.forest-workbench.is-pressing .forest-tactile-food i { filter: brightness(1.03); }
.forest-tactile-meter { margin: 4px 0 2px; padding: 6px 8px; border-radius: 13px; background: #fff8e7; border: 1px solid rgba(126,82,52,.13); }
.forest-tactile-meter > span,
.forest-tactile-meter small { display: block; color: #765744; font-size: 10px; }
.forest-tactile-meter > span { font-weight: 900; }
.forest-tactile-meter small { margin-top: 4px; color: #9a7663; }
.forest-tactile-meter > div { height: 11px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: #ead5bd; box-shadow: inset 0 1px 2px rgba(111,74,52,.14); }
.forest-tactile-meter > div i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#a4d36d,#ffd35a,#ff9aa7); }
.forest-screen-play .forest-ingredient.is-knead span { border-radius: 45% 55% 44% 56%; background: #f0c37e; box-shadow: inset 0 -7px 0 rgba(154,93,38,.17); }
.forest-screen-play .forest-ingredient.is-press span { background: #d85d75; box-shadow: -8px 5px 0 #c94b68, 8px 6px 0 #e2798c; }
.forest-screen-play .forest-ingredient.is-decorate span { background: #fff6ed; border: 1px solid #e7c7aa; box-shadow: inset 0 0 0 5px rgba(216,162,79,.18), 0 0 0 4px rgba(255,214,95,.18); }
.forest-screen-play .forest-tray span:nth-child(1).current { background: #c78b4b; }
.forest-screen-play .forest-tray span:nth-child(2).current { background: #d85d75; }
.forest-screen-play .forest-tray span:nth-child(3).current { background: #d8a24f; }
@media (max-width: 370px) {
  .forest-tactile-food { min-height: 44px; }
  .forest-tactile-food i { width: 74px; height: 40px; }
  .forest-tactile-food b { width: 54px; height: 24px; }
  .forest-tactile-food em { width: 64px; height: 30px; }
  .forest-tactile-food u { width: 78px; height: 38px; }
  .forest-tactile-food small { display: none; }
  .forest-tactile-meter { padding: 4px 6px; }
  .forest-tactile-meter small { display: none; }
  .forest-tactile-meter > div { height: 8px; }
}

/* Forest Kitchen v5: immersive fullscreen landscape and hand-painted character art */
html.forest-game-immersive-root,
body.forest-game-immersive-root { width: 100%; height: 100%; overflow: hidden !important; background: #8fbd55; }
.phone-container--forest-immersive { position: fixed !important; inset: 0 !important; width: 100vw !important; max-width: none !important; height: 100dvh !important; max-height: none !important; border-radius: 0 !important; box-shadow: none !important; overflow: hidden !important; background: #8fbd55 !important; }
.phone-container--forest-immersive .status-bar,
.phone-container--forest-immersive .dock,
.phone-container--forest-immersive .recent-apps-trigger,
.phone-container--forest-immersive .recent-apps-gesture-zone { opacity: 0 !important; pointer-events: none !important; }
.wechat-app--forest-immersive { position: fixed !important; inset: 0 !important; z-index: 9000 !important; width: 100vw !important; height: 100dvh !important; transform: none !important; border-radius: 0 !important; overflow: hidden !important; background: #8fbd55 !important; }
.wechat-app--forest-immersive .wechat-header,
.wechat-app--forest-immersive .wechat-tabbar { display: none !important; }
.wechat-app--forest-immersive .wechat-content--forest-game { position: fixed !important; left: 0; top: 0; width: 100vw; height: 100dvh; min-height: 0 !important; overflow: hidden !important; transform: none; transform-origin: center center; background: #8fbd55 !important; }
@media (orientation: portrait) {
  .wechat-app--forest-immersive .wechat-content--forest-game { left: 50%; top: 50%; width: 100dvh; height: 100vw; transform: translate(-50%, -50%) rotate(90deg); }
}
.wechat-app--forest-immersive .game-hub-page.forest-landscape,
.wechat-app--forest-immersive .forest-kitchen-page.forest-landscape { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; display: block; overflow: hidden; background: radial-gradient(circle at 9% 12%, rgba(255,241,173,.58), transparent 22%), linear-gradient(135deg,#78ae47,#cce88a 48%,#7fb14c); }
.wechat-app--forest-immersive .forest-game-frame { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.wechat-app--forest-immersive .forest-game-frame::after { inset: clamp(5px, 1.2vmin, 12px); border-radius: clamp(10px, 2vmin, 20px); }
.wechat-app--forest-immersive .forest-round-btn { width: clamp(30px, 6.4vmin, 44px); height: clamp(30px, 6.4vmin, 44px); border-radius: clamp(10px, 2vmin, 15px); font-size: clamp(16px, 3.8vmin, 24px); }
.wechat-app--forest-immersive .forest-back-btn { left: clamp(8px, 1.8vmin, 18px); top: clamp(8px, 1.8vmin, 18px); }
.wechat-app--forest-immersive .forest-wood-sign { top: clamp(15px, 3vmin, 32px); min-width: clamp(170px, 30vmin, 260px); padding: clamp(7px, 1.8vmin, 12px) clamp(20px, 4vmin, 34px) clamp(9px, 2vmin, 15px); }
.wechat-app--forest-immersive .forest-wood-sign span { font-size: clamp(22px, 5vmin, 38px); }
.wechat-app--forest-immersive .forest-wood-sign.small { top: clamp(10px, 2vmin, 20px); }
.wechat-app--forest-immersive .forest-home-hud { left: clamp(50px, 9vmin, 70px); right: clamp(10px, 2vmin, 18px); top: clamp(9px, 1.8vmin, 17px); gap: clamp(6px, 1.5vmin, 12px); }
.wechat-app--forest-immersive .forest-home-hud span { min-width: clamp(68px, 12vmin, 106px); height: clamp(28px, 5.2vmin, 38px); font-size: clamp(11px, 2.3vmin, 15px); }
.wechat-app--forest-immersive .forest-screen-home { background: linear-gradient(180deg,#bfe59d 0%,#f8eabb 43%,#bf8047 44%,#9b6436 67%,#70a54a 100%); }
.wechat-app--forest-immersive .forest-home-counter { left: clamp(86px, 16vmin, 150px); right: clamp(70px, 13vmin, 118px); bottom: clamp(58px, 11vmin, 94px); height: clamp(128px, 28vmin, 210px); gap: clamp(8px, 2.4vmin, 24px); }
.wechat-app--forest-immersive .forest-start-btn { bottom: clamp(16px, 3.6vmin, 34px); width: clamp(168px, 30vmin, 240px); min-height: clamp(44px, 8vmin, 62px); font-size: clamp(19px, 4.3vmin, 28px); }
.wechat-app--forest-immersive .forest-home-board { right: clamp(13px, 3vmin, 28px); bottom: clamp(54px, 10vmin, 90px); width: clamp(70px, 13vmin, 96px); }
.wechat-app--forest-immersive .forest-screen-levels { padding: clamp(58px, 12vmin, 86px) clamp(16px, 4vmin, 34px) clamp(14px, 3vmin, 28px); grid-template-columns: minmax(0,1fr) clamp(190px, 32vmin, 270px); gap: clamp(12px, 2.6vmin, 24px); }
.wechat-app--forest-immersive .forest-level-map { padding: clamp(12px, 3vmin, 24px); gap: clamp(9px, 2vmin, 18px); }
.wechat-app--forest-immersive .forest-level-card { min-height: clamp(66px, 14vmin, 108px); }
.wechat-app--forest-immersive .forest-level-card strong { font-size: clamp(24px, 5vmin, 36px); }
.wechat-app--forest-immersive .forest-level-side .forest-panel { max-height: clamp(98px, 22vmin, 154px); }
.wechat-app--forest-immersive .forest-screen-play { padding: clamp(6px, 1.7vmin, 14px); gap: clamp(5px, 1.2vmin, 10px); grid-template-rows: clamp(34px, 7vmin, 48px) clamp(58px, 11vmin, 82px) minmax(118px,1fr) clamp(58px, 11vmin, 82px) clamp(40px, 7.5vmin, 54px); }
.wechat-app--forest-immersive .forest-play-hud { grid-template-columns: clamp(32px, 6vmin, 44px) clamp(68px, 12vmin, 94px) clamp(78px, 14vmin, 110px) minmax(120px,1fr) clamp(60px, 11vmin, 86px) clamp(32px, 6vmin, 44px); gap: clamp(5px, 1.4vmin, 10px); }
.wechat-app--forest-immersive .forest-hud-pill { height: clamp(28px, 5.5vmin, 38px); padding: 0 clamp(7px, 1.7vmin, 12px); font-size: clamp(11px, 2.2vmin, 15px); }
.wechat-app--forest-immersive .forest-order-rail { gap: clamp(6px, 1.5vmin, 13px); }
.wechat-app--forest-immersive .forest-order-ticket { grid-template-columns: clamp(42px, 8vmin, 64px) minmax(0,1fr); padding: clamp(5px, 1.4vmin, 9px); }
.wechat-app--forest-immersive .forest-order-ticket small { font-size: clamp(9px, 1.8vmin, 12px); }
.wechat-app--forest-immersive .forest-order-ticket .forest-order-chips span { display: inline-grid; font-size: clamp(7px, 1.5vmin, 9px); }
.wechat-app--forest-immersive .forest-play-scene { grid-template-columns: minmax(0,1fr) clamp(140px, 24vmin, 200px); gap: clamp(7px, 1.8vmin, 14px); }
.wechat-app--forest-immersive .forest-kitchen-table { grid-template-rows: clamp(70px, 14vmin, 100px) clamp(26px, 5vmin, 36px) minmax(0,1fr); gap: clamp(5px, 1.1vmin, 8px); }
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card { padding: clamp(6px, 1.5vmin, 11px); gap: clamp(8px, 1.8vmin, 14px); }
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card small { display: block; font-size: clamp(9px, 1.7vmin, 12px); }
.wechat-app--forest-immersive .forest-screen-play .forest-accident { min-height: clamp(25px, 5vmin, 36px); font-size: clamp(9px, 1.7vmin, 12px); }
.wechat-app--forest-immersive .forest-screen-play .forest-workbench { padding: clamp(7px, 1.6vmin, 12px); }
.wechat-app--forest-immersive .forest-screen-play .forest-tray { grid-template-columns: repeat(3,minmax(0,1fr)); }
.wechat-app--forest-immersive .forest-screen-play .forest-tray span { min-height: clamp(21px, 4.2vmin, 30px); font-size: clamp(9px, 1.7vmin, 12px); }
.wechat-app--forest-immersive .forest-screen-play .forest-plate-preview { min-height: clamp(58px, 12vmin, 94px); }
.wechat-app--forest-immersive .forest-screen-play .forest-next-step { font-size: clamp(10px, 1.9vmin, 13px); }
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage { padding: clamp(7px, 1.5vmin, 12px); display: grid; grid-template-rows: minmax(0,1fr) auto auto auto; align-items: center; justify-items: center; }
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage strong { margin-top: 0; font-size: clamp(11px, 2.1vmin, 14px); }
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small { display: block; font-size: clamp(8px, 1.5vmin, 10px); }
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(8px, 1.8vmin, 14px); }
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient { min-height: clamp(54px, 10vmin, 78px); font-size: clamp(10px, 2vmin, 13px); }
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient span { width: clamp(26px, 5vmin, 38px); height: clamp(26px, 5vmin, 38px); }
.wechat-app--forest-immersive .forest-screen-play .forest-partner-panel { padding: clamp(6px, 1.5vmin, 10px) clamp(8px, 1.8vmin, 13px); }
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p { font-size: clamp(9px, 1.7vmin, 12px); line-height: 1; }
.wechat-app--forest-immersive .forest-screen-result { padding: clamp(56px, 11vmin, 92px) clamp(18px, 4vmin, 36px) clamp(14px, 3vmin, 28px); }
.wechat-app--forest-immersive .forest-result-hero { width: min(92%, 780px); grid-template-columns: clamp(110px, 22vmin, 180px) minmax(0,1fr) clamp(88px, 18vmin, 146px); gap: clamp(8px, 2vmin, 18px); }
.wechat-app--forest-immersive .forest-stars.big span { width: clamp(42px, 9vmin, 72px); height: clamp(42px, 9vmin, 72px); }
.wechat-app--forest-immersive .forest-result-actions { width: min(88%, 470px); }
.forest-character-art { background-image: url('../assets/forest-kitchen/forest-characters-career-v1-a.png'); background-repeat: no-repeat; background-size: 400% 100%; background-color: rgba(255,250,230,.78); background-position-y: center; overflow: hidden; }
.forest-character-rabbit { background-position-x: 0%; }
.forest-character-bear { background-position-x: 33.333%; }
.forest-character-fox { background-position-x: 66.666%; }
.forest-character-chick { background-position-x: 100%; }
.forest-character-art::before,
.forest-character-art::after,
.forest-character-art > i,
.forest-character-art > b,
.forest-character-art > em,
.forest-character-art > u,
.forest-character-art > span { display: none !important; }
.forest-home-counter .forest-mascot.forest-character-art { width: clamp(74px, 14vmin, 130px); height: clamp(108px, 24vmin, 190px); flex: 0 0 clamp(74px, 14vmin, 130px); border-radius: clamp(16px, 3vmin, 28px); box-shadow: 0 10px 18px rgba(89,57,29,.18); }
.forest-customer-face.forest-character-art { border-radius: clamp(12px, 2.2vmin, 20px); background-color: #fff6df; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), 0 8px 14px rgba(116,72,44,.12); transform: none !important; }
.forest-order-ticket .forest-customer-face.forest-character-art { width: clamp(42px, 8vmin, 64px); height: clamp(52px, 10vmin, 78px); flex-basis: clamp(42px, 8vmin, 64px); }
.forest-screen-play .forest-customer-card .forest-customer-face.forest-character-art { width: clamp(66px, 12vmin, 96px); height: clamp(70px, 14vmin, 112px); flex: 0 0 clamp(66px, 12vmin, 96px); }
.forest-partner-figure .forest-partner-avatar.forest-character-art { position: static; width: clamp(74px, 14vmin, 116px); height: clamp(90px, 18vmin, 148px); flex-basis: auto; margin: 0; border-radius: clamp(16px, 3vmin, 24px); border: 3px solid rgba(255,248,239,.9); box-shadow: 0 10px 18px rgba(73,43,30,.16); }
.wechat-app--forest-immersive .forest-partner-figure { width: auto; height: auto; transform: none; display: grid; place-items: center; }
.wechat-app--forest-immersive .forest-partner-figure > span,
.wechat-app--forest-immersive .forest-partner-figure > i,
.wechat-app--forest-immersive .forest-partner-figure > b,
.wechat-app--forest-immersive .forest-partner-figure > em,
.wechat-app--forest-immersive .forest-partner-figure > u { display: none !important; }
.forest-screen-result .forest-mascot.forest-character-art { width: clamp(100px, 20vmin, 170px); height: clamp(126px, 25vmin, 220px); flex-basis: clamp(100px, 20vmin, 170px); border-radius: clamp(18px, 3vmin, 30px); transform: none !important; box-shadow: 0 12px 22px rgba(92,55,32,.16); }
.forest-screen-result .forest-mascot.chick.forest-character-art { width: clamp(82px, 16vmin, 140px); height: clamp(104px, 21vmin, 184px); }
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-screen-play { grid-template-rows: 32px 54px minmax(102px,1fr) 54px 38px; padding: 5px; gap: 4px; }
  .wechat-app--forest-immersive .forest-screen-play .forest-plate-preview { min-height: 48px; }
  .wechat-app--forest-immersive .forest-tactile-meter small,
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small { display: none; }
  .wechat-app--forest-immersive .forest-screen-play .forest-ingredient { min-height: 48px; }
}

/* Forest Kitchen v6: paper scrapbook doodle style, 12 portraits, result tabs, drag zones */
.wechat-app--forest-immersive .game-hub-page.forest-landscape,
.wechat-app--forest-immersive .forest-kitchen-page.forest-landscape,
.wechat-content--forest-game {
  --paper-bg: #f6f0e4;
  --paper-ink: #31445a;
  --paper-blue: #7997ad;
  --paper-red: #bd5b4e;
  --paper-cream: #fff8ea;
  --paper-line: rgba(49, 68, 90, .34);
  color: #3f4d5a;
  background:
    radial-gradient(circle at 14% 18%, rgba(189,91,78,.12) 0 1px, transparent 2px),
    radial-gradient(circle at 76% 38%, rgba(121,151,173,.13) 0 1px, transparent 2px),
    repeating-linear-gradient(18deg, rgba(49,68,90,.025) 0 1px, transparent 1px 8px),
    linear-gradient(180deg,#fbf7ee,#eee3d2) !important;
}
.wechat-app--forest-immersive .forest-game-frame { background: var(--paper-bg); }
.wechat-app--forest-immersive .forest-game-frame::before {
  background:
    radial-gradient(circle at 13% 14%, rgba(121,151,173,.18) 0 7%, transparent 8%),
    radial-gradient(circle at 91% 83%, rgba(189,91,78,.14) 0 8%, transparent 9%),
    repeating-linear-gradient(0deg, rgba(49,68,90,.025) 0 1px, transparent 1px 10px) !important;
}
.wechat-app--forest-immersive .forest-game-frame::after { border-color: rgba(49,68,90,.24); border-style: dashed; }
.wechat-app--forest-immersive .forest-wood-sign,
.wechat-app--forest-immersive .forest-ribbon {
  color: #34475b;
  background: rgba(255,248,234,.88);
  border: 2px dashed rgba(49,68,90,.38);
  box-shadow: 5px 7px 0 rgba(121,151,173,.16);
  text-shadow: none;
}
.wechat-app--forest-immersive .forest-wood-sign::before,
.wechat-app--forest-immersive .forest-wood-sign::after { background: var(--paper-blue); box-shadow: none; }
.wechat-app--forest-immersive .forest-ribbon { color: #fff8ea; background: var(--paper-red); border-color: rgba(49,68,90,.3); }
.wechat-app--forest-immersive .forest-primary,
.wechat-app--forest-immersive .forest-secondary,
.wechat-app--forest-immersive .forest-round-btn,
.wechat-app--forest-immersive .forest-level-card,
.wechat-app--forest-immersive .forest-ingredient {
  color: #34475b;
  background: rgba(255,248,234,.9);
  border: 2px solid rgba(49,68,90,.34);
  box-shadow: 3px 4px 0 rgba(121,151,173,.2);
  text-shadow: none;
}
.wechat-app--forest-immersive .forest-primary,
.wechat-app--forest-immersive .forest-level-card.is-active { color: #fff8ea; background: var(--paper-red); }
.wechat-app--forest-immersive .forest-primary.green,
.wechat-app--forest-immersive .forest-secondary.blue { color: #fff8ea; background: var(--paper-blue); box-shadow: 3px 4px 0 rgba(49,68,90,.22); }
.wechat-app--forest-immersive .forest-home-hud span,
.wechat-app--forest-immersive .forest-hud-pill,
.wechat-app--forest-immersive .forest-order-ticket,
.wechat-app--forest-immersive .forest-customer-card,
.wechat-app--forest-immersive .forest-workbench,
.wechat-app--forest-immersive .forest-partner-stage,
.wechat-app--forest-immersive .forest-partner-panel,
.wechat-app--forest-immersive .forest-result-copy,
.wechat-app--forest-immersive .forest-panel {
  background: rgba(255,248,234,.82);
  border: 1.5px solid rgba(49,68,90,.22);
  box-shadow: 4px 5px 0 rgba(49,68,90,.08);
}
.wechat-app--forest-immersive .forest-screen-home,
.wechat-app--forest-immersive .forest-screen-levels,
.wechat-app--forest-immersive .forest-screen-play,
.wechat-app--forest-immersive .forest-screen-result { background: transparent !important; }
.wechat-app--forest-immersive .forest-home-counter {
  background: rgba(255,248,234,.5);
  border-bottom: 4px dashed rgba(49,68,90,.28);
  box-shadow: none;
}
.wechat-app--forest-immersive .forest-home-counter::before { background: rgba(189,91,78,.2); border: 1px dashed rgba(49,68,90,.22); }
.forest-character-art.forest-character-paper-sheet-a { background-image: url('../assets/forest-kitchen/forest-characters-career-v1-a.png'); }
.forest-character-art.forest-character-paper-sheet-b { background-image: url('../assets/forest-kitchen/forest-characters-career-v1-b.png'); }
.forest-character-art.forest-character-paper-sheet-c { background-image: url('../assets/forest-kitchen/forest-characters-career-v1-c.png'); }
.forest-character-art.forest-character-slot-0 { background-position-x: 0%; }
.forest-character-art.forest-character-slot-1 { background-position-x: 33.333%; }
.forest-character-art.forest-character-slot-2 { background-position-x: 66.666%; }
.forest-character-art.forest-character-slot-3 { background-position-x: 100%; }
.forest-character-art { background-size: 400% 100%; background-position-y: center; background-color: rgba(246,240,228,.75); border: 1.5px solid rgba(49,68,90,.2); }
.forest-home-counter .forest-mascot.forest-character-art { width: clamp(62px, 11vmin, 104px); height: clamp(92px, 19vmin, 158px); flex-basis: clamp(62px, 11vmin, 104px); }
.forest-paper-icon,
.wechat-app--forest-immersive .forest-ingredient span,
.wechat-app--forest-immersive .forest-home-hud b,
.wechat-app--forest-immersive .forest-hud-pill.coin::before,
.wechat-app--forest-immersive .forest-hud-pill.diamond::before,
.wechat-app--forest-immersive .forest-hud-pill.timer::before {
  background-image: url('../assets/forest-kitchen/forest-icons-paper-v1.png');
  background-repeat: no-repeat;
  background-size: 800% 100%;
  background-color: transparent !important;
  color: transparent;
  box-shadow: none;
}
.wechat-app--forest-immersive .forest-home-hud b { width: 20px; height: 20px; display: inline-block; overflow: hidden; }
.wechat-app--forest-immersive .forest-home-hud span:nth-child(1) b { background-position-x: 28.571%; }
.wechat-app--forest-immersive .forest-home-hud span:nth-child(2) b { background-position-x: 0%; }
.wechat-app--forest-immersive .forest-home-hud span:nth-child(3) b { background-position-x: 14.285%; }
.wechat-app--forest-immersive .forest-ingredient.is-knead span { background-position-x: 71.428%; }
.wechat-app--forest-immersive .forest-ingredient.is-press span { background-position-x: 42.857%; }
.wechat-app--forest-immersive .forest-ingredient.is-decorate span { background-position-x: 28.571%; }

/* Forest Kitchen v3 character atlas: one 4x3 transparent sheet, preserving
   the existing sheet/slot class contract used by orders and partner avatars. */
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-a,
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-b,
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-c {
  background-image: url('../assets/forest-kitchen/forest-characters-v3-transparent.png') !important;
  background-size: 400% 300% !important;
  filter: saturate(.86) hue-rotate(10deg) sepia(.06);
}
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-a { background-position-y: 0% !important; }
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-b { background-position-y: 50% !important; }
.wechat-app--forest-immersive .forest-character-art.forest-character-paper-sheet-c { background-position-y: 100% !important; }

.wechat-app--forest-immersive .forest-paper-icon,
.wechat-app--forest-immersive .forest-ingredient span,
.wechat-app--forest-immersive .forest-home-hud b,
.wechat-app--forest-immersive .forest-hud-pill.coin::before,
.wechat-app--forest-immersive .forest-hud-pill.diamond::before,
.wechat-app--forest-immersive .forest-hud-pill.timer::before {
  background-image: url('../assets/forest-kitchen/forest-icons-paper-v2-transparent.png') !important;
  filter: saturate(.84) hue-rotate(12deg);
}
.forest-drop-zones { margin: 5px 0 3px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.forest-drop-zones span { min-height: 24px; display: grid; place-items: center; border-radius: 999px; border: 1px dashed rgba(49,68,90,.28); color: rgba(49,68,90,.66); background: rgba(255,248,234,.52); font-size: 10px; font-weight: 850; }
.forest-drop-zones span.current { color: #fff8ea; background: var(--paper-red); border-color: rgba(49,68,90,.38); }
.forest-drop-zones span.done { color: #fff8ea; background: var(--paper-blue); }
.forest-workbench.needs-tool .forest-plate-preview { outline: 2px dashed rgba(189,91,78,.38); outline-offset: -5px; }
.forest-workbench.has-tool .forest-plate-preview { outline: 2px dashed rgba(121,151,173,.45); outline-offset: -5px; }
.forest-result-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 9px; }
.forest-result-tabs button { min-height: 30px; border-radius: 999px; border: 1.5px solid rgba(49,68,90,.3); color: #34475b; background: rgba(255,248,234,.78); font: inherit; font-size: 11px; font-weight: 900; }
.forest-result-tabs button.is-active { color: #fff8ea; background: var(--paper-red); }
.forest-result-tab-panel { min-height: clamp(110px, 22vmin, 168px); display: grid; align-content: center; }
.forest-result-paper { min-height: 112px; padding: 11px 12px; border-radius: 14px; text-align: left; color: #34475b; background: rgba(255,250,240,.78); border: 1px dashed rgba(49,68,90,.28); }
.forest-result-paper strong,
.forest-result-paper small { display: block; }
.forest-result-paper strong { margin-bottom: 5px; color: var(--paper-red); font-size: 14px; }
.forest-result-paper small { margin-bottom: 5px; color: rgba(52,71,91,.72); font-size: 10px; }
.forest-result-paper p { max-height: clamp(74px, 15vmin, 118px); min-height: 0; margin: 0; overflow: auto; color: #34475b; font-size: 11px; line-height: 1.55; }
.forest-result-paper.theater div { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.forest-result-paper.theater span { padding: 3px 6px; border-radius: 999px; color: #fff8ea; background: var(--paper-blue); font-size: 9px; }
.wechat-app--forest-immersive .forest-partner-bubble button { background: rgba(255,248,234,.88); border: 1px solid rgba(49,68,90,.28); color: #34475b; }
@media (max-height: 430px) {
  .forest-result-tabs button { min-height: 24px; font-size: 10px; }
  .forest-result-paper { min-height: 82px; padding: 7px 9px; }
  .forest-result-paper p { max-height: 62px; font-size: 10px; }
  .forest-drop-zones span { min-height: 20px; font-size: 9px; }
}

/* Forest Kitchen v7: career portrait picker */
.forest-portrait-panel { overflow: hidden; }
.forest-portrait-picker {
  max-height: clamp(118px, 25vmin, 190px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: auto;
  padding-right: 2px;
}
.forest-portrait-choice {
  min-width: 0;
  min-height: 70px;
  padding: 5px 4px;
  display: grid;
  grid-template-rows: minmax(34px, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  gap: 2px;
  border-radius: 12px;
  border: 1.4px dashed rgba(49,68,90,.3);
  background: rgba(255,250,240,.74);
  color: #34475b;
  font: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.42);
}
.forest-portrait-choice.is-active {
  border-style: solid;
  border-color: rgba(189,91,78,.74);
  background: rgba(255,239,224,.9);
  box-shadow: 0 5px 12px rgba(189,91,78,.13), inset 0 0 0 2px rgba(255,255,255,.62);
}
.forest-portrait-thumb {
  width: clamp(34px, 7vmin, 54px);
  height: clamp(40px, 8.2vmin, 64px);
  border-radius: 12px;
  background-color: rgba(246,240,228,.72);
}
.forest-portrait-choice strong,
.forest-portrait-choice small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}
.forest-portrait-choice strong { font-size: clamp(9px, 1.7vmin, 11px); font-weight: 900; }
.forest-portrait-choice small { color: rgba(52,71,91,.66); font-size: clamp(7px, 1.25vmin, 9px); }
.wechat-app--forest-immersive .forest-partner-figure::before,
.wechat-app--forest-immersive .forest-partner-figure::after { display: none !important; }
.wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art {
  border-color: rgba(255,250,240,.88);
  background-color: rgba(246,240,228,.72);
}
@media (max-height: 430px) {
  .forest-portrait-picker { max-height: 86px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .forest-portrait-choice { min-height: 54px; padding: 3px; border-radius: 10px; }
  .forest-portrait-thumb { width: 30px; height: 36px; border-radius: 9px; }
  .forest-portrait-choice small { display: none; }
}
/* Forest Kitchen v7 hide legacy chef ornament */
.wechat-app--forest-immersive .forest-mascot.chef::after { display: none !important; }

/* Forest Kitchen v8: 2x2 portrait crop, compact play layout, readable result text */
.forest-character-art {
  background-size: 200% 200% !important;
  background-position-y: 0% !important;
}
.forest-character-art.forest-character-slot-0 { background-position: 0% 0% !important; }
.forest-character-art.forest-character-slot-1 { background-position: 100% 0% !important; }
.forest-character-art.forest-character-slot-2 { background-position: 0% 100% !important; }
.forest-character-art.forest-character-slot-3 { background-position: 100% 100% !important; }
.wechat-app--forest-immersive .forest-play-scene {
  grid-template-columns: minmax(0, 1fr) clamp(112px, 18vmin, 158px);
  gap: clamp(5px, 1.2vmin, 10px);
}
.wechat-app--forest-immersive .forest-service-scene {
  grid-template-columns: minmax(0, 1fr) clamp(100px, 16vmin, 132px);
  gap: clamp(5px, 1.2vmin, 8px);
}
.wechat-app--forest-immersive .forest-order-ticket { grid-template-columns: clamp(34px, 6.2vmin, 48px) minmax(0,1fr); }
.wechat-app--forest-immersive .forest-order-ticket .forest-customer-face.forest-character-art {
  width: clamp(34px, 6.2vmin, 48px);
  height: clamp(34px, 6.2vmin, 48px);
  flex-basis: clamp(34px, 6.2vmin, 48px);
  border-radius: clamp(9px, 1.6vmin, 14px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card .forest-customer-face.forest-character-art {
  width: clamp(46px, 8vmin, 66px);
  height: clamp(46px, 8vmin, 66px);
  flex: 0 0 clamp(46px, 8vmin, 66px);
}
.wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art {
  width: clamp(58px, 10vmin, 82px);
  height: clamp(58px, 10vmin, 82px);
  border-radius: clamp(14px, 2.2vmin, 20px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage {
  grid-template-rows: minmax(58px, 1fr) auto auto auto;
  min-width: 0;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small {
  max-height: 2.5em;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, 1.2vmin, 9px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient {
  min-height: clamp(46px, 8vmin, 62px);
  padding: clamp(3px, .9vmin, 6px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(5px, 1.1vmin, 8px);
  align-items: center;
}
.wechat-app--forest-immersive .forest-partner-bubble > div { gap: 4px; }
.wechat-app--forest-immersive .forest-partner-bubble button { min-height: 24px; padding: 0 7px; font-size: clamp(9px, 1.5vmin, 11px); }
.forest-result-paper.is-readable {
  width: 100%;
  display: block;
  cursor: pointer;
  font: inherit;
}
.forest-result-paper.is-readable em {
  display: inline-grid;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff8ea;
  background: var(--paper-red);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}
.forest-saved-link {
  position: absolute;
  z-index: 4;
  right: clamp(10px, 2vmin, 18px);
  top: clamp(10px, 2vmin, 18px);
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(49,68,90,.26);
  color: #34475b;
  background: rgba(255,248,234,.9);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
}
.forest-text-overlay { position: absolute; inset: 0; z-index: 5600; padding: clamp(12px, 3vmin, 28px); background: rgba(49,68,90,.34); display: grid; place-items: center; }
.forest-text-card {
  width: min(92vw, 720px);
  max-height: min(88vh, 560px);
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  border-radius: 18px;
  border: 2px dashed rgba(49,68,90,.3);
  background: #fff8ea;
  color: #34475b;
  box-shadow: 0 18px 40px rgba(49,68,90,.25);
  overflow: hidden;
}
.forest-text-card header,
.forest-text-card footer { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(246,240,228,.82); }
.forest-text-card header strong { display: block; color: var(--paper-red, #bd5b4e); font-size: 16px; }
.forest-text-card header small { display: block; margin-top: 3px; color: rgba(52,71,91,.68); font-size: 11px; }
.forest-text-card header button { width: 30px; height: 30px; border: 0; border-radius: 999px; color: #fff8ea; background: var(--paper-red, #bd5b4e); font: inherit; font-weight: 900; }
.forest-text-card article { padding: 15px 16px; overflow: auto; white-space: normal; font-size: 13px; line-height: 1.75; }
.forest-text-card footer { justify-content: flex-end; }
.forest-saved-list { padding: 12px; overflow: auto; display: grid; gap: 8px; }
.forest-saved-list > button { padding: 10px 11px; text-align: left; border-radius: 12px; border: 1px dashed rgba(49,68,90,.26); color: #34475b; background: rgba(255,250,240,.86); font: inherit; }
.forest-saved-list strong,
.forest-saved-list small,
.forest-saved-list span { display: block; }
.forest-saved-list small { margin-top: 3px; color: rgba(52,71,91,.64); font-size: 10px; }
.forest-saved-list span { margin-top: 5px; font-size: 11px; line-height: 1.45; }
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-play-scene { grid-template-columns: minmax(0,1fr) 96px; gap: 4px; }
  .wechat-app--forest-immersive .forest-service-scene { grid-template-columns: minmax(0,1fr) 86px; }
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-stage strong { font-size: 10px; }
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small { display: none; }
  .wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art { width: 48px; height: 48px; }
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p { font-size: 9px; }
  .forest-text-card { width: 94vw; max-height: 90vh; }
  .forest-text-card article { padding: 10px 12px; font-size: 11px; line-height: 1.58; }
}
/* Forest Kitchen v9: per-character portrait alignment */
.forest-character-art {
  background-repeat: no-repeat !important;
  background-size: 216% 216% !important;
  background-position: var(--forest-character-pos, 50% 50%) !important;
}
.forest-character-rabbit { --forest-character-pos: 3% 2%; background-size: 230% 230% !important; }
.forest-character-bear { --forest-character-pos: 96% 2%; background-size: 220% 220% !important; }
.forest-character-fox { --forest-character-pos: 4% 97%; background-size: 205% 205% !important; }
.forest-character-chick { --forest-character-pos: 96% 98%; background-size: 214% 214% !important; }
.forest-character-cat { --forest-character-pos: 4% 2%; background-size: 218% 218% !important; }
.forest-character-deer { --forest-character-pos: 96% 2%; background-size: 214% 214% !important; }
.forest-character-squirrel { --forest-character-pos: 4% 97%; background-size: 204% 204% !important; }
.forest-character-beaver { --forest-character-pos: 96% 97%; background-size: 211% 211% !important; }
.forest-character-hedgehog { --forest-character-pos: 5% 3%; background-size: 204% 204% !important; }
.forest-character-penguin { --forest-character-pos: 96% 3%; background-size: 214% 214% !important; }
.forest-character-hamster { --forest-character-pos: 5% 96%; background-size: 211% 211% !important; }
.forest-character-lamb { --forest-character-pos: 96% 97%; background-size: 202% 202% !important; }
.wechat-app--forest-immersive .forest-home-counter {
  align-items: flex-end;
  gap: clamp(12px, 2.2vmin, 22px);
}
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-art,
.forest-home-counter .forest-mascot.forest-character-art {
  width: clamp(74px, 11.5vmin, 112px);
  height: clamp(112px, 19vmin, 164px);
  flex: 0 0 clamp(74px, 11.5vmin, 112px);
  background-color: rgba(246,240,228,.88);
  background-clip: padding-box;
}
.forest-portrait-thumb.forest-character-art {
  background-size: 224% 224% !important;
}
.forest-order-ticket .forest-customer-face.forest-character-art,
.wechat-app--forest-immersive .forest-order-ticket .forest-customer-face.forest-character-art {
  width: clamp(36px, 6.4vmin, 48px);
  height: clamp(40px, 7vmin, 54px);
  flex-basis: clamp(36px, 6.4vmin, 48px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card .forest-customer-face.forest-character-art {
  width: clamp(52px, 8.8vmin, 70px);
  height: clamp(56px, 9.6vmin, 78px);
  flex: 0 0 clamp(52px, 8.8vmin, 70px);
}
.wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art {
  width: clamp(62px, 10.5vmin, 86px);
  height: clamp(68px, 11.5vmin, 96px);
}
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-art {
  width: clamp(94px, 17vmin, 142px);
  height: clamp(118px, 22vmin, 184px);
  flex-basis: clamp(94px, 17vmin, 142px);
}
.wechat-app--forest-immersive .forest-screen-play {
  grid-template-rows: clamp(32px, 6vmin, 44px) clamp(52px, 9.5vmin, 72px) minmax(112px,1fr) clamp(52px, 9vmin, 68px) clamp(38px, 7vmin, 50px);
}
.wechat-app--forest-immersive .forest-play-scene { grid-template-columns: minmax(0,1fr) clamp(104px, 17vmin, 146px); }
.wechat-app--forest-immersive .forest-service-scene { grid-template-columns: minmax(0,1fr) clamp(92px, 15vmin, 124px); }
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-art,
  .forest-home-counter .forest-mascot.forest-character-art { width: 58px; height: 86px; flex-basis: 58px; }
  .wechat-app--forest-immersive .forest-play-scene { grid-template-columns: minmax(0,1fr) 88px; }
  .wechat-app--forest-immersive .forest-service-scene { grid-template-columns: minmax(0,1fr) 78px; }
  .wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art { width: 44px; height: 50px; }
}
/* Forest Kitchen v9b: hard override sprite positions */
.forest-character-art.forest-character-rabbit { background-position: 3% 2% !important; background-size: 230% 230% !important; }
.forest-character-art.forest-character-bear { background-position: 96% 2% !important; background-size: 220% 220% !important; }
.forest-character-art.forest-character-fox { background-position: 4% 97% !important; background-size: 205% 205% !important; }
.forest-character-art.forest-character-chick { background-position: 96% 98% !important; background-size: 214% 214% !important; }
.forest-character-art.forest-character-cat { background-position: 4% 2% !important; background-size: 218% 218% !important; }
.forest-character-art.forest-character-deer { background-position: 96% 2% !important; background-size: 214% 214% !important; }
.forest-character-art.forest-character-squirrel { background-position: 4% 97% !important; background-size: 204% 204% !important; }
.forest-character-art.forest-character-beaver { background-position: 96% 97% !important; background-size: 211% 211% !important; }
.forest-character-art.forest-character-hedgehog { background-position: 5% 3% !important; background-size: 204% 204% !important; }
.forest-character-art.forest-character-penguin { background-position: 96% 3% !important; background-size: 214% 214% !important; }
.forest-character-art.forest-character-hamster { background-position: 5% 96% !important; background-size: 211% 211% !important; }
.forest-character-art.forest-character-lamb { background-position: 96% 97% !important; background-size: 202% 202% !important; }

/* Forest fullscreen reading and tactile restoration */
.forest-reading-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100dvw !important;
  height: 100dvh !important;
  padding: 0 !important;
  display: block !important;
  background: #f6efe2 !important;
  color: #34475b;
}
.forest-reading-overlay .forest-text-card {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  box-shadow: none !important;
}
.forest-reading-overlay .forest-text-card header,
.forest-reading-overlay .forest-text-card footer { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.forest-reading-overlay .forest-text-card article { padding: clamp(20px, 4vmin, 42px) max(22px, env(safe-area-inset-left)) clamp(28px, 5vmin, 52px) max(22px, env(safe-area-inset-right)); font-size: clamp(15px, 2.6vmin, 19px); line-height: 1.9; }
.forest-screen-play .forest-ingredient:focus-visible,
.forest-screen-play .forest-ingredient:active { outline: 3px solid rgba(189,91,78,.35); transform: translateY(2px) scale(.98); }
.forest-screen-play .forest-workbench.has-tool { box-shadow: inset 0 -15px 0 rgba(121,151,173,.16), 0 0 0 3px rgba(121,151,173,.2), 0 8px 18px rgba(130,83,38,.18); }
.forest-screen-play .forest-workbench.needs-tool { animation: forestWorkbenchHint 900ms ease-in-out infinite alternate; }
@keyframes forestWorkbenchHint { from { outline-color: rgba(189,91,78,.24); } to { outline-color: rgba(189,91,78,.52); } }

/* Forest Kitchen result alignment */
.wechat-app--forest-immersive .forest-screen-result {
  row-gap: clamp(8px, 1.8vmin, 14px);
}
.wechat-app--forest-immersive .forest-screen-result .forest-result-hero {
  width: min(86%, 740px);
  grid-template-columns: clamp(92px, 16vmin, 138px) minmax(0, 1fr) clamp(92px, 16vmin, 138px);
  align-items: center;
  justify-items: center;
  gap: clamp(10px, 2vmin, 18px);
}
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-art {
  width: clamp(92px, 15vmin, 136px);
  height: clamp(118px, 20vmin, 174px);
  flex: 0 0 auto;
  margin: 0 !important;
  transform: none !important;
  align-self: center;
  justify-self: center;
  background-size: 200% 200% !important;
  background-color: rgba(246,240,228,.88);
}
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.chick.forest-character-art {
  width: clamp(92px, 15vmin, 136px);
  height: clamp(118px, 20vmin, 174px);
}
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-slot-0 { background-position: 0% 0% !important; }
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-slot-1 { background-position: 100% 0% !important; }
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-slot-2 { background-position: 0% 100% !important; }
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-slot-3 { background-position: 100% 100% !important; }
.wechat-app--forest-immersive .forest-screen-result .forest-result-actions {
  width: min(56%, 360px);
  min-width: 280px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: center;
  margin: clamp(8px, 1.8vmin, 14px) auto 0;
}
@media (max-width: 480px) {
  .wechat-app--forest-immersive .forest-screen-result .forest-result-hero {
    width: min(94%, 620px);
    grid-template-columns: clamp(58px, 18vmin, 82px) minmax(0, 1fr) clamp(58px, 18vmin, 82px);
    gap: 6px;
  }
  .wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-art,
  .wechat-app--forest-immersive .forest-screen-result .forest-mascot.chick.forest-character-art {
    width: clamp(58px, 18vmin, 82px);
    height: clamp(74px, 23vmin, 106px);
  }
  .wechat-app--forest-immersive .forest-screen-result .forest-result-actions {
    width: min(82%, 300px);
    min-width: 220px;
  }
}



/* Forest Kitchen reading page */
.wechat-app--forest-immersive .forest-screen-reading {
  background: #e9ece7 !important;
}
.wechat-app--forest-immersive .forest-screen-reading::before,
.wechat-app--forest-immersive .forest-screen-reading::after {
  display: none;
}
.forest-reading-page {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #303a3f;
  background: #e9ece7;
}
.forest-reading-page::before,
.forest-reading-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.forest-reading-page::before {
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(249,250,247,.74), rgba(224,227,220,.68)),
    repeating-linear-gradient(90deg, rgba(53,67,61,.12) 0 2px, transparent 2px 46px, rgba(74,86,78,.08) 46px 49px, transparent 49px 92px),
    linear-gradient(180deg, #f4f5f1 0%, #e4e7df 52%, #d7ddd5 100%);
  background-size: cover;
  filter: saturate(.6) contrast(.88);
}
.forest-reading-page::after {
  z-index: 1;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.28) 24%, rgba(255,255,255,.68) 56%, rgba(244,246,242,.9) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, rgba(45,55,54,.025) 0 1px, transparent 1px 7px);
  mix-blend-mode: screen;
}
.forest-reading-page.has-custom-bg::before {
  background-image: linear-gradient(180deg, rgba(248,249,246,.2), rgba(221,225,219,.34)), var(--forest-reading-bg);
  background-position: center;
  background-size: cover;
  filter: saturate(.58) contrast(.78) brightness(1.08);
  opacity: .82;
}
.forest-reading-toolbar,
.forest-reading-footer {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: clamp(10px, 2vmin, 18px) clamp(14px, 3vmin, 28px);
  display: grid;
  align-items: center;
  gap: 8px;
}
.forest-reading-toolbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.forest-reading-toolbar > span {
  min-width: 0;
  color: rgba(48,58,63,.68);
  text-align: center;
  font-size: clamp(12px, 2vmin, 15px);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forest-reading-actions,
.forest-reading-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.forest-reading-actions {
  gap: 6px;
  justify-content: flex-end;
}
.forest-reading-footer {
  gap: 10px;
}
.forest-reading-tool {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(48,58,63,.22);
  border-radius: 999px;
  color: rgba(48,58,63,.82);
  background: rgba(250,251,248,.42);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: clamp(10px, 1.8vmin, 12px);
  font-weight: 800;
  box-shadow: none;
}
.forest-reading-tool:active {
  transform: translateY(1px);
  background: rgba(250,251,248,.64);
}
.forest-reading-paper {
  position: relative;
  z-index: 2;
  width: min(76%, 560px);
  max-height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(24px, 5vmin, 52px) clamp(24px, 6vmin, 64px);
  overflow: auto;
  border: 1px solid rgba(73,81,77,.18);
  border-radius: 8px;
  color: #273136;
  text-align: center;
  background:
    repeating-linear-gradient(90deg, rgba(48,58,63,.024) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.34) 0 1px, transparent 1px 8px),
    rgba(250,250,246,.7);
  box-shadow: 0 18px 46px rgba(37,45,43,.14), inset 0 0 0 1px rgba(255,255,255,.55);
  backdrop-filter: blur(13px) saturate(.86);
}
.forest-reading-paper h2 {
  margin: 0;
  color: #253035;
  font-size: clamp(22px, 4.4vmin, 34px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}
.forest-reading-paper small,
.forest-reading-paper em {
  display: block;
  margin: 8px auto 0;
  color: rgba(39,49,54,.56);
  font-style: normal;
  font-size: clamp(10px, 1.7vmin, 12px);
  line-height: 1.55;
}
.forest-reading-paper em {
  max-width: 25em;
}
.forest-reading-mark,
.forest-reading-divider {
  color: rgba(39,49,54,.34);
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
}
.forest-reading-mark {
  margin-bottom: 10px;
}
.forest-reading-divider {
  margin: clamp(14px, 3vmin, 24px) 0;
}
.forest-reading-body {
  margin-top: clamp(22px, 4vmin, 34px);
}
.forest-reading-body p {
  max-width: 34em;
  margin: 0 auto;
  color: rgba(33,42,47,.88);
  font-size: clamp(14px, 2.35vmin, 18px);
  line-height: 2.05;
  word-break: break-word;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .forest-reading-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .forest-reading-actions {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .forest-reading-paper {
    width: min(88%, 440px);
    padding: 22px 22px 30px;
  }
  .forest-reading-tool {
    padding: 0 10px;
  }
}
@media (max-height: 430px) {
  .forest-reading-toolbar,
  .forest-reading-footer {
    padding-top: 7px;
    padding-bottom: 7px;
  }
  .forest-reading-paper {
    width: min(78%, 520px);
    padding: 16px 26px;
  }
  .forest-reading-body {
    margin-top: 14px;
  }
  .forest-reading-body p {
    font-size: 13px;
    line-height: 1.8;
  }
}


/* Forest Kitchen home centered portraits */
.wechat-app--forest-immersive .forest-start-btn,
.forest-start-btn {
  white-space: nowrap;
  overflow: visible;
  text-align: center;
}
.wechat-app--forest-immersive .forest-home-counter {
  align-items: flex-end;
  justify-content: center;
  padding: 0 clamp(12px, 2.4vmin, 22px);
  box-sizing: border-box;
}
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-art,
.forest-home-counter .forest-mascot.forest-character-art {
  width: clamp(78px, 12vmin, 118px);
  height: clamp(118px, 20vmin, 174px);
  flex: 0 0 clamp(78px, 12vmin, 118px);
  margin: 0 !important;
  transform: none !important;
  align-self: flex-end;
  background-size: 200% 200% !important;
  background-color: rgba(246,240,228,.9);
  background-repeat: no-repeat !important;
}
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-slot-0,
.forest-home-counter .forest-mascot.forest-character-slot-0 { background-position: 0% 0% !important; }
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-slot-1,
.forest-home-counter .forest-mascot.forest-character-slot-1 { background-position: 100% 0% !important; }
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-slot-2,
.forest-home-counter .forest-mascot.forest-character-slot-2 { background-position: 0% 100% !important; }
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-slot-3,
.forest-home-counter .forest-mascot.forest-character-slot-3 { background-position: 100% 100% !important; }
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-art,
  .forest-home-counter .forest-mascot.forest-character-art {
    width: 64px;
    height: 92px;
    flex-basis: 64px;
  }
  .wechat-app--forest-immersive .forest-start-btn,
  .forest-start-btn {
    min-width: 172px;
    font-size: 19px;
  }
}


/* Forest Kitchen level side mobile fit */
.wechat-app--forest-immersive .forest-screen-levels {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 34vmin, 390px);
  gap: clamp(10px, 2vmin, 18px);
}
.wechat-app--forest-immersive .forest-level-side {
  min-height: 0;
  height: 100%;
  align-content: stretch;
  grid-template-rows: minmax(0, .9fr) minmax(0, 1.08fr) minmax(0, .92fr) auto;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-level-side .forest-panel {
  min-width: 0;
  min-height: 0;
  max-height: none;
  padding: clamp(7px, 1.5vmin, 12px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(5px, 1vmin, 8px);
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-level-side .forest-panel h3 {
  min-width: 0;
  margin: 0;
  font-size: clamp(11px, 1.8vmin, 13px);
  line-height: 1.2;
  white-space: normal;
}
.wechat-app--forest-immersive .forest-level-side .forest-partner-list,
.wechat-app--forest-immersive .forest-level-side .forest-station-grid,
.wechat-app--forest-immersive .forest-level-side .forest-portrait-picker {
  min-height: 0;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-level-side .forest-partner-row,
.wechat-app--forest-immersive .forest-level-side .forest-station-card {
  min-width: 0;
  min-height: clamp(42px, 7.8vmin, 58px);
  padding: clamp(6px, 1.2vmin, 9px);
  gap: clamp(6px, 1.2vmin, 9px);
}
.wechat-app--forest-immersive .forest-level-side .forest-partner-row > span,
.wechat-app--forest-immersive .forest-level-side .forest-station-card > span {
  min-width: 0;
  overflow: visible;
}
.wechat-app--forest-immersive .forest-level-side .forest-partner-row strong,
.wechat-app--forest-immersive .forest-level-side .forest-station-card strong,
.wechat-app--forest-immersive .forest-level-side .forest-partner-row small,
.wechat-app--forest-immersive .forest-level-side .forest-station-card small {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  line-height: 1;
}
.wechat-app--forest-immersive .forest-level-side .forest-portrait-picker {
  max-height: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-right: 0;
}
.wechat-app--forest-immersive .forest-level-side .forest-portrait-choice {
  min-height: clamp(68px, 12vmin, 86px);
  padding: clamp(4px, .9vmin, 6px);
  grid-template-rows: minmax(36px, 1fr) auto auto;
}
.wechat-app--forest-immersive .forest-level-side .forest-portrait-thumb {
  width: clamp(36px, 6.2vmin, 50px);
  height: clamp(42px, 7.2vmin, 60px);
}
.wechat-app--forest-immersive .forest-level-side .forest-portrait-choice strong,
.wechat-app--forest-immersive .forest-level-side .forest-portrait-choice small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
  line-height: 1.1;
}
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-screen-levels {
    grid-template-columns: minmax(0, 1fr) clamp(286px, 35vmin, 340px);
    padding-right: clamp(8px, 2vmin, 16px);
  }
  .wechat-app--forest-immersive .forest-level-side {
    gap: 6px;
  }
  .wechat-app--forest-immersive .forest-level-side .forest-panel {
    padding: 6px;
    gap: 4px;
  }
  .wechat-app--forest-immersive .forest-level-side .forest-portrait-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .wechat-app--forest-immersive .forest-level-side .forest-portrait-choice {
    min-height: 62px;
  }
  .wechat-app--forest-immersive .forest-level-side .forest-portrait-choice small {
    display: block;
  }
}


/* Forest Kitchen play phone fit */
.wechat-app--forest-immersive .forest-screen-play {
  padding: clamp(5px, 1vmin, 9px);
  gap: clamp(4px, .85vmin, 7px);
  grid-template-rows: clamp(30px, 4.4vmin, 40px) clamp(44px, 6.2vmin, 58px) minmax(0, 1fr) clamp(42px, 6.2vmin, 58px) clamp(64px, 9vmin, 82px);
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-play-hud {
  grid-template-columns: clamp(30px, 4.4vmin, 38px) clamp(64px, 9vmin, 84px) clamp(70px, 10vmin, 94px) minmax(120px, 1fr) clamp(64px, 9vmin, 92px) clamp(30px, 4.4vmin, 38px);
  gap: clamp(4px, .8vmin, 7px);
}
.wechat-app--forest-immersive .forest-hud-pill {
  height: clamp(26px, 4.2vmin, 34px);
  padding: 0 clamp(6px, 1vmin, 10px);
  font-size: clamp(10px, 1.7vmin, 13px);
}
.wechat-app--forest-immersive .forest-order-rail {
  min-height: 0;
  gap: clamp(4px, .9vmin, 7px);
}
.wechat-app--forest-immersive .forest-order-ticket {
  min-height: 0;
  padding: clamp(4px, .75vmin, 6px);
  grid-template-columns: clamp(34px, 5.3vmin, 46px) minmax(0, 1fr);
  column-gap: clamp(4px, .8vmin, 7px);
  align-content: center;
  border-radius: clamp(10px, 1.7vmin, 14px);
}
.wechat-app--forest-immersive .forest-order-ticket .forest-customer-face.forest-character-art {
  width: clamp(32px, 5.2vmin, 44px);
  height: clamp(32px, 5.2vmin, 44px);
  flex-basis: clamp(32px, 5.2vmin, 44px);
  grid-row: span 2;
}
.wechat-app--forest-immersive .forest-order-ticket small {
  font-size: clamp(8px, 1.4vmin, 10px);
  line-height: 1.15;
}
.wechat-app--forest-immersive .forest-order-ticket .forest-order-chips {
  margin-top: 2px;
  max-height: 18px;
  overflow: hidden;
  gap: 2px;
}
.wechat-app--forest-immersive .forest-order-ticket .forest-order-chips span {
  min-height: 15px;
  padding: 0 5px;
  font-size: clamp(7px, 1.15vmin, 8px);
}
.wechat-app--forest-immersive .forest-play-scene {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(98px, 14vmin, 136px);
  gap: clamp(5px, 1vmin, 9px);
}
.wechat-app--forest-immersive .forest-kitchen-table {
  min-height: 0;
  grid-template-rows: clamp(58px, 8.5vmin, 76px) clamp(24px, 3.7vmin, 32px) minmax(0, 1fr);
  gap: clamp(4px, .75vmin, 6px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card {
  min-height: 0;
  padding: clamp(5px, .9vmin, 8px);
  gap: clamp(6px, 1vmin, 9px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card .forest-customer-face.forest-character-art {
  width: clamp(42px, 6.4vmin, 56px);
  height: clamp(42px, 6.4vmin, 56px);
  flex: 0 0 clamp(42px, 6.4vmin, 56px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card strong {
  font-size: clamp(11px, 1.8vmin, 14px);
  line-height: 1.15;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card small {
  max-height: 2.4em;
  font-size: clamp(9px, 1.45vmin, 11px);
  line-height: 1.2;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-accident {
  min-height: 0;
  padding: clamp(4px, .8vmin, 7px) clamp(8px, 1.2vmin, 10px);
  font-size: clamp(9px, 1.45vmin, 11px);
  line-height: 1.2;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-workbench {
  min-height: 0;
  padding: clamp(5px, .9vmin, 8px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 2px;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-tray,
.wechat-app--forest-immersive .forest-screen-play .forest-drop-zones {
  gap: clamp(4px, .8vmin, 6px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-tray span,
.wechat-app--forest-immersive .forest-screen-play .forest-drop-zones span {
  min-height: clamp(18px, 3vmin, 24px);
  font-size: clamp(8px, 1.3vmin, 10px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-plate-preview {
  min-height: clamp(46px, 8vmin, 70px);
  margin: 2px 0;
}
.wechat-app--forest-immersive .forest-screen-play .forest-next-step {
  font-size: clamp(9px, 1.5vmin, 11px);
  line-height: 1.15;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage {
  min-height: 0;
  padding: clamp(5px, .9vmin, 8px);
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  gap: 2px;
}
.wechat-app--forest-immersive .forest-partner-figure .forest-partner-avatar.forest-character-art {
  width: clamp(48px, 7vmin, 64px);
  height: clamp(52px, 7.6vmin, 70px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage strong {
  font-size: clamp(9px, 1.5vmin, 11px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small {
  max-height: 2.3em;
  font-size: clamp(7px, 1.2vmin, 9px);
  line-height: 1.15;
}
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient-grid {
  min-height: 0;
  gap: clamp(5px, 1vmin, 8px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient {
  min-height: 0;
  padding: clamp(4px, .8vmin, 7px);
  grid-template-rows: minmax(18px, 1fr) auto;
  gap: 2px;
  font-size: clamp(9px, 1.55vmin, 12px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-ingredient span {
  width: clamp(22px, 3.6vmin, 32px);
  height: clamp(22px, 3.6vmin, 32px);
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-panel {
  min-height: 0;
  margin: 0;
  padding: clamp(5px, .9vmin, 8px) clamp(8px, 1.2vmin, 12px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(6px, 1vmin, 9px);
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble {
  min-height: 0;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p {
  max-height: 2.6em;
  overflow: auto;
  font-size: clamp(9px, 1.45vmin, 11px);
  line-height: 1.3;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble > div {
  margin-top: 4px;
  gap: 4px;
  max-height: 28px;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble button,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-panel > button {
  min-height: clamp(26px, 4vmin, 34px);
  padding: 0 clamp(8px, 1.2vmin, 12px);
  white-space: nowrap;
  font-size: clamp(9px, 1.45vmin, 11px);
}
@media (max-height: 520px), (max-width: 920px) {
  .wechat-app--forest-immersive .forest-screen-play {
    grid-template-rows: 30px 42px minmax(0, 1fr) 42px 60px;
    padding: 5px;
    gap: 4px;
  }
  .wechat-app--forest-immersive .forest-order-ticket .forest-order-chips span:nth-child(n+3) {
    display: none;
  }
  .wechat-app--forest-immersive .forest-play-scene {
    grid-template-columns: minmax(0, 1fr) 92px;
  }
  .wechat-app--forest-immersive .forest-kitchen-table {
    grid-template-rows: 52px 24px minmax(0, 1fr);
  }
  .wechat-app--forest-immersive .forest-screen-play .forest-ingredient b {
    line-height: 1.1;
  }
}


/* Forest Kitchen v11: real level cards and phone readability */
.wechat-app--forest-immersive .forest-level-card {
  padding: clamp(6px, 1.2vmin, 10px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: 2px;
  overflow: hidden;
}
.wechat-app--forest-immersive .forest-level-card small,
.wechat-app--forest-immersive .forest-level-card em {
  max-width: 100%;
  display: block;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wechat-app--forest-immersive .forest-level-card small {
  margin-top: 0;
  font-size: clamp(9px, 1.55vmin, 12px);
  line-height: 1.1;
}
.wechat-app--forest-immersive .forest-level-card em {
  align-self: start;
  color: rgba(52, 71, 91, .72);
  font-size: clamp(7px, 1.25vmin, 9px);
  font-style: normal;
  line-height: 1.15;
}
.wechat-app--forest-immersive .forest-level-card.is-active em,
.wechat-app--forest-immersive .forest-level-card.is-active small { color: rgba(255, 248, 234, .9); }
.wechat-app--forest-immersive .forest-character-art {
  background-position-y: center !important;
  transform: none !important;
}
.wechat-app--forest-immersive .forest-home-counter .forest-mascot.forest-character-art,
.wechat-app--forest-immersive .forest-customer-face.forest-character-art,
.wechat-app--forest-immersive .forest-partner-avatar.forest-character-art,
.wechat-app--forest-immersive .forest-portrait-thumb.forest-character-art,
.wechat-app--forest-immersive .forest-screen-result .forest-mascot.forest-character-art {
  background-size: 400% 100%;
  background-position-y: center !important;
  background-origin: border-box;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-panel,
.wechat-app--forest-immersive .forest-order-ticket {
  min-width: 0;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card > div,
.wechat-app--forest-immersive .forest-order-ticket,
.wechat-app--forest-immersive .forest-partner-bubble {
  min-width: 0;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card small,
.wechat-app--forest-immersive .forest-screen-play .forest-accident,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p,
.wechat-app--forest-immersive .forest-screen-play .forest-next-step {
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card small {
  max-height: 3.6em;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-screen-play .forest-accident {
  max-height: none;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p {
  max-height: 4.1em;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-order-ticket .forest-order-chips {
  max-height: none;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-order-ticket .forest-order-chips span:nth-child(n+3) {
  display: inline-grid;
}
@media (max-height: 520px), (max-width: 920px) {
  .wechat-app--forest-immersive .forest-screen-play {
    grid-template-rows: 32px 48px minmax(0, 1fr) 46px 64px;
  }
  .wechat-app--forest-immersive .forest-play-scene {
    grid-template-columns: minmax(0, 1fr) clamp(102px, 16vmin, 132px);
  }
  .wechat-app--forest-immersive .forest-kitchen-table {
    grid-template-rows: minmax(58px, 74px) 26px minmax(0, 1fr);
  }
  .wechat-app--forest-immersive .forest-screen-play .forest-customer-card small {
    max-height: 3.4em;
  }
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p {
    max-height: 3.6em;
  }
  .wechat-app--forest-immersive .forest-level-card em {
    white-space: normal;
    max-height: 2.3em;
  }
}
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-screen-play {
    grid-template-rows: 30px 44px minmax(0, 1fr) 42px 58px;
  }
  .wechat-app--forest-immersive .forest-order-ticket .forest-order-chips span:nth-child(n+3) {
    display: inline-grid;
  }
  .wechat-app--forest-immersive .forest-screen-play .forest-customer-card small,
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-bubble p {
    max-height: 3em;
  }
  .wechat-app--forest-immersive .forest-level-card em {
    display: none;
  }
}


/* Forest Kitchen v12: final short-phone anti-crop overrides */
.wechat-app--forest-immersive .forest-screen-play .forest-partner-figure,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-figure .forest-partner-avatar,
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card .forest-customer-face,
.wechat-app--forest-immersive .forest-order-ticket .forest-customer-face,
.wechat-app--forest-immersive .forest-home-counter .forest-mascot,
.wechat-app--forest-immersive .forest-screen-result .forest-mascot {
  transform: none !important;
  margin-top: 0 !important;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage strong,
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small {
  margin-top: 0 !important;
  max-width: 100%;
  text-align: center;
}
.wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small {
  display: block !important;
  max-height: 3.2em;
  overflow: auto;
}
.wechat-app--forest-immersive .forest-screen-play .forest-customer-card small {
  display: block !important;
}
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-stage small {
    display: block !important;
    max-height: 2.4em;
    font-size: clamp(7px, 1.1vmin, 9px);
  }
  .wechat-app--forest-immersive .forest-screen-play .forest-partner-stage strong {
    font-size: clamp(8px, 1.3vmin, 10px);
  }
}


/* Forest Kitchen v13: restore compact explanatory text */
.wechat-app--forest-immersive .forest-level-side .forest-station-card small,
.wechat-app--forest-immersive .forest-level-side .forest-partner-row small,
.wechat-app--forest-immersive .forest-level-side .forest-portrait-choice small,
.wechat-app--forest-immersive .forest-tactile-food small,
.wechat-app--forest-immersive .forest-tactile-meter small {
  display: block !important;
  max-width: 100%;
  overflow: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.wechat-app--forest-immersive .forest-level-side .forest-station-card small,
.wechat-app--forest-immersive .forest-level-side .forest-partner-row small {
  max-height: 2.8em;
}
.wechat-app--forest-immersive .forest-level-side .forest-portrait-choice small {
  max-height: 2.2em;
}
.wechat-app--forest-immersive .forest-tactile-food small,
.wechat-app--forest-immersive .forest-tactile-meter small {
  max-height: 2.6em;
  line-height: 1;
}
@media (max-height: 430px) {
  .wechat-app--forest-immersive .forest-level-side .forest-station-card small,
  .wechat-app--forest-immersive .forest-level-side .forest-partner-row small,
  .wechat-app--forest-immersive .forest-level-side .forest-portrait-choice small {
    max-height: 2em;
    font-size: clamp(7px, 1.1vmin, 9px);
  }
  .wechat-app--forest-immersive .forest-tactile-food small,
  .wechat-app--forest-immersive .forest-tactile-meter small {
    max-height: 2.2em;
    font-size: clamp(7px, 1.1vmin, 9px);
  }
}

/* ===== WeChat create group sheet alignment ===== */
.wechat-create-group-overlay {
  --wechat-sheet-bg: #f5f5f7;
  --wechat-sheet-surface: #fff;
  --wechat-sheet-text: #111113;
  --wechat-sheet-subtext: #8a8a8f;
  --wechat-sheet-line: rgba(20,20,22,.09);
  --wechat-sheet-field: rgba(118,118,128,.11);
  background: rgba(0,0,0,.28) !important;
}
.wechat-create-group-overlay .wechat-create-group-sheet {
  width: 100%;
  max-height: min(86dvh, 640px) !important;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  overflow: hidden !important;
  display: grid;
  grid-template-rows: auto auto auto minmax(0,1fr) auto;
  color: var(--wechat-sheet-text);
  background: var(--wechat-sheet-bg) !important;
  border: 0 !important;
  border-top: 0.5px solid var(--wechat-sheet-line) !important;
  border-radius: 18px 18px 0 0 !important;
  box-shadow: 0 -18px 44px rgba(0,0,0,.2) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.wechat-create-group-overlay .wechat-create-group-sheet::before { display: none !important; }
.wechat-create-group-overlay .sheet-handle {
  width: 48px;
  height: 5px;
  margin: 8px auto 14px;
  background: rgba(128,128,136,.36);
  border-radius: 999px;
}
.wechat-create-group-overlay .sheet-title {
  margin: 0 16px 14px;
  color: var(--wechat-sheet-text);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
}
.wechat-create-group-name.wechat-list-search {
  margin: 0 16px 12px;
  height: 40px;
  background: var(--wechat-sheet-field);
  border-color: transparent;
  color: var(--wechat-sheet-subtext);
}
.wechat-create-group-name input {
  color: var(--wechat-sheet-text) !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  font-size: 15px !important;
}
.wechat-create-member-list.wechat-section {
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  background: var(--wechat-sheet-surface);
  -webkit-overflow-scrolling: touch;
}
.wechat-create-member-list .group-member-select {
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  color: var(--wechat-sheet-text);
  background: var(--wechat-sheet-surface) !important;
  border: 0;
  border-bottom: 0.5px solid var(--wechat-sheet-line);
  border-radius: 0;
  font: inherit;
  text-align: left;
  appearance: none;
}
.wechat-create-member-list .group-member-select:active,
.wechat-create-member-list .group-member-select.is-selected { background: rgba(7,193,96,.08) !important; }
.wechat-create-member-list .contact-name {
  color: var(--wechat-sheet-text);
  font-size: 16px;
  font-weight: 520;
}
.wechat-create-member-list .select-check {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  color: transparent !important;
  border: 1.5px solid rgba(142,142,147,.55);
  border-radius: 50%;
  box-sizing: border-box;
  font-size: 0 !important;
}
.wechat-create-member-list .group-member-select.is-selected .select-check {
  color: #fff !important;
  background: #07c160;
  border-color: #07c160;
}
.wechat-create-member-list .group-member-select.is-selected .select-check::after {
  content: "\2713";
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.wechat-create-footer {
  padding: 10px 16px 0;
  background: var(--wechat-sheet-bg);
  border-top: 0.5px solid var(--wechat-sheet-line);
}
.wechat-create-selected {
  margin-bottom: 9px;
  color: var(--wechat-sheet-subtext);
  font-size: 12px;
  line-height: 1.2;
}
.wechat-create-actions.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.wechat-create-actions .btn {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
}
.wechat-create-actions .btn-secondary { color: var(--wechat-sheet-text); background: var(--wechat-sheet-surface); }
.wechat-create-actions .btn-primary { color: #fff; background: #07c160; }
.wechat-create-actions .btn-primary:disabled { color: rgba(142,142,147,.72); background: rgba(142,142,147,.18); }
[data-theme="dark"] .wechat-create-group-overlay {
  --wechat-sheet-bg: #0d0d0f;
  --wechat-sheet-surface: #171719;
  --wechat-sheet-text: #f5f5f7;
  --wechat-sheet-subtext: #919198;
  --wechat-sheet-line: rgba(255,255,255,.085);
  --wechat-sheet-field: rgba(118,118,128,.22);
  background: rgba(0,0,0,.52) !important;
}
[data-theme="dark"] .wechat-create-actions .btn-secondary { background: #2a2a2e; }
[data-theme="dark"] .wechat-create-actions .btn-primary:disabled { background: #2a2a2e; }
@media (max-width: 370px), (max-height: 650px) {
  .wechat-create-group-overlay .wechat-create-group-sheet { max-height: min(84dvh, 560px) !important; }
  .wechat-create-member-list .group-member-select { min-height: 58px; padding-left: 12px; padding-right: 12px; }
  .wechat-create-group-name.wechat-list-search,
  .wechat-create-group-overlay .sheet-title { margin-left: 12px; margin-right: 12px; }
  .wechat-create-footer { padding-left: 12px; padding-right: 12px; }
}
/* ===== 2026-07-25 WeChat global UI unification ===== */
.wechat-app {
  --wechat-shell-bg: #f2f2f4;
  --wechat-surface: #ffffff;
  --wechat-nav-surface: rgba(247, 247, 248, .98);
  --wechat-primary: #111113;
  --wechat-secondary: #85858c;
  --wechat-tertiary: #b0b0b7;
  --wechat-line: rgba(20, 20, 22, .095);
  --wechat-control: rgba(118, 118, 128, .12);
  --wechat-control-pressed: rgba(118, 118, 128, .18);
  --wechat-avatar-bg: #e7e7eb;
  --wechat-avatar-fg: #3d3d42;
  --wechat-self-bg: #111113;
  --wechat-self-fg: #ffffff;
  --wechat-other-bg: #ffffff;
  --wechat-other-fg: #171719;
  --wechat-danger: #e5484d;
  --wechat-success: #07c160;
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
}

[data-theme="dark"] .wechat-app {
  --wechat-shell-bg: #0d0d0f;
  --wechat-surface: #171719;
  --wechat-nav-surface: rgba(22, 22, 24, .98);
  --wechat-primary: #f5f5f7;
  --wechat-secondary: #95959c;
  --wechat-tertiary: #707078;
  --wechat-line: rgba(255, 255, 255, .085);
  --wechat-control: rgba(118, 118, 128, .24);
  --wechat-control-pressed: rgba(118, 118, 128, .32);
  --wechat-avatar-bg: #2b2b2f;
  --wechat-avatar-fg: #ececf0;
  --wechat-self-bg: #f2f2f4;
  --wechat-self-fg: #111113;
  --wechat-other-bg: #2c2c2f;
  --wechat-other-fg: #f4f4f6;
}

.wechat-app * {
  letter-spacing: 0;
}

.wechat-header,
.wechat-tabbar,
.input-area {
  color: var(--wechat-primary);
  background: var(--wechat-nav-surface);
  border-color: var(--wechat-line);
  box-shadow: none;
}

.wechat-header .header-title strong,
.wechat-header .header-title small,
.wechat-tabbar .tab-label,
.chat-info .chat-name,
.chat-info .chat-preview,
.contact-item .contact-name,
.contact-item .contact-remark,
.wechat-cell-copy strong,
.wechat-cell-copy small,
.profile-header .profile-name,
.profile-header .profile-id,
.profile-header .profile-signature,
.profile-header .profile-hint {
  letter-spacing: 0;
}

.wechat-header .header-action,
.input-area .input-extra {
  color: var(--wechat-primary);
  background: transparent;
}

.wechat-header .header-action.is-exit,
.wechat-header .header-action:active,
.input-area .input-extra:active,
.wechat-list-search,
.time-divider span,
.quote-compose-preview,
.msg-quote-strip,
.msg-inline-result {
  background: var(--wechat-control);
}

.wechat-content,
.chat-room,
.contacts-page,
.discover-page,
.profile-page,
.profile-edit-page,
.moments-page {
  color: var(--wechat-primary);
  background-color: var(--wechat-shell-bg);
}

.chat-list,
.contact-list,
.wechat-section,
.profile-header,
.moment-item,
.moment-toolbar,
.wechat-create-member-list.wechat-section {
  background: var(--wechat-surface);
}

.chat-item,
.contact-item,
.discover-item,
.wechat-cell,
.profile-header {
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border-color: var(--wechat-line);
}

.chat-item::after,
.wechat-cell:not(:last-child)::after {
  background: var(--wechat-line);
}

.chat-item:hover,
.wechat-cell:hover,
.profile-header:hover {
  background: color-mix(in srgb, var(--wechat-surface) 92%, var(--wechat-control));
}

.chat-item:active,
.contact-item:active,
.discover-item:active,
.wechat-cell:active,
.profile-header:active,
.wechat-create-member-list .group-member-select:active {
  background: var(--wechat-control-pressed);
}

.chat-info .chat-name,
.contact-item .contact-name,
.wechat-cell-copy strong,
.profile-header .profile-name,
.moment-item .mi-name {
  color: var(--wechat-primary);
}

.chat-info .chat-preview,
.chat-meta .chat-time,
.contact-item .contact-remark,
.wechat-section-label,
.wechat-cell-copy small,
.wechat-cell-chevron,
.profile-header .profile-id,
.profile-header .profile-signature,
.profile-header .profile-hint,
.moment-visibility-badge,
.moment-source-detail-btn,
#wechatApp .msg-meta,
.time-divider {
  color: var(--wechat-secondary);
}

.chat-avatar,
.msg-avatar,
.contact-item .contact-avatar,
.profile-header .profile-avatar,
.profile-edit-avatar,
.wechat-avatar,
.moment-item .mi-avatar,
.moment-composer-avatar,
.moment-visible-avatar,
.group-detail-avatar {
  color: var(--wechat-avatar-fg);
  background: var(--wechat-avatar-bg);
  border-radius: 7px;
  box-shadow: inset 0 0 0 .5px var(--wechat-line);
}

.profile-header .profile-avatar {
  border-radius: 10px;
}

.chat-avatar-fallback,
.msg-avatar-fallback,
.wechat-avatar-initial {
  color: var(--wechat-avatar-fg);
  background: linear-gradient(145deg, color-mix(in srgb, var(--wechat-avatar-bg) 80%, #fff), var(--wechat-avatar-bg));
}

[data-theme="dark"] .chat-avatar-fallback,
[data-theme="dark"] .msg-avatar-fallback,
[data-theme="dark"] .wechat-avatar-initial {
  background: linear-gradient(145deg, #343438, #242428);
}

.message-wrapper.self .msg-bubble {
  color: var(--wechat-self-fg);
  background: color-mix(in srgb, var(--wechat-self-bg) 68%, transparent);
  border-color: color-mix(in srgb, var(--wechat-self-bg) 58%, rgba(255,255,255,.48));
  backdrop-filter: blur(16px) saturate(1.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.16);
}

.message-wrapper.other .msg-bubble {
  color: var(--wechat-other-fg);
  background: color-mix(in srgb, var(--wechat-other-bg) 64%, transparent);
  border-color: color-mix(in srgb, var(--wechat-line) 72%, rgba(255,255,255,.54));
  backdrop-filter: blur(16px) saturate(1.16);
  -webkit-backdrop-filter: blur(16px) saturate(1.16);
}

[data-theme="dark"] .message-wrapper.self .msg-bubble {
  background: color-mix(in srgb, var(--wechat-self-bg) 76%, transparent);
  border-color: color-mix(in srgb, var(--wechat-self-bg) 48%, rgba(255,255,255,.2));
}

[data-theme="dark"] .message-wrapper.other .msg-bubble {
  background: color-mix(in srgb, var(--wechat-other-bg) 72%, transparent);
  border-color: color-mix(in srgb, var(--wechat-line) 64%, rgba(255,255,255,.14));
}

.input-area .msg-input,
.wechat-list-search input,
.moment-visible-picker input[type="search"],
.moment-composer-text {
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border-color: var(--wechat-line);
  caret-color: var(--wechat-primary);
}

.input-area .msg-input::placeholder,
.wechat-list-search input::placeholder,
.moment-composer-text::placeholder {
  color: var(--wechat-tertiary);
}

.input-area .send-btn,
.moment-composer-submit,
.proactive-save-btn,
.wechat-create-actions .btn-primary {
  color: var(--wechat-self-fg);
  background: var(--wechat-self-bg);
}

.tab-item .badge,
.chat-meta .unread-badge,
.wechat-cell-badge,
.wechat-unread-total {
  color: #fff;
  background: var(--wechat-danger);
}

.wechat-cell-icon {
  color: var(--wechat-primary);
  background: var(--wechat-control);
  border-color: var(--wechat-line);
}

.wechat-cell-icon.is-wallet,
.wechat-cell-icon.is-budget,
.wechat-cell-icon.is-moments,
.wechat-cell-icon.is-game {
  color: var(--wechat-primary);
  background: var(--wechat-control);
}

.plus-menu {
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
  border-color: var(--wechat-line);
}

.plus-menu-item {
  color: var(--wechat-primary);
}

.plus-menu-item .pmi-icon,
.moment-toolbar-btn,
.mi-action-btn,
.moment-composer-add-image,
.moment-composer-image {
  color: var(--wechat-primary);
  background: var(--wechat-surface);
  border-color: var(--wechat-line);
}

.moment-composer-card {
  color: var(--wechat-primary);
  background: color-mix(in srgb, var(--wechat-surface) 88%, transparent);
  border-color: var(--wechat-line);
}

.moment-visibility-panel,
.proactive-policy-summary,
.proactive-frequency-btn,
.proactive-compact-row > label,
.proactive-trigger-list {
  color: var(--wechat-primary);
  background: var(--wechat-shell-bg);
  border-color: var(--wechat-line);
}

.proactive-frequency-btn.is-active {
  border-color: color-mix(in srgb, var(--wechat-primary) 42%, transparent);
  background: var(--wechat-control);
}

/* 当前 UI 仅固定普通气泡为黑白；功能状态色沿用各组件原本配色。 */
.wechat-app[data-chat-ui="classic"] .message-wrapper.self .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: #ffffff;
  background: #111113;
  border-color: #111113;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.wechat-app[data-chat-ui="classic"] .message-wrapper.other .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: #111113;
  background: #ffffff;
  border-color: rgba(17, 17, 19, .12);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

[data-theme="dark"] .wechat-app[data-chat-ui="classic"] .message-wrapper.self .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: #111113;
  background: #ffffff;
  border-color: #ffffff;
}

[data-theme="dark"] .wechat-app[data-chat-ui="classic"] .message-wrapper.other .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: #ffffff;
  background: #111113;
  border-color: rgba(255, 255, 255, .14);
}

/* 当前 UI 配色：五套柔雾色卡仅用于默认 UI 的浅色模式。 */
.wechat-classic-palette-title {
  margin: 2px 2px 8px;
  color: var(--wechat-secondary, var(--app-subtext));
  font-size: 12px;
  font-weight: 600;
}

.wechat-classic-palette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.wechat-classic-palette-button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--wechat-primary, var(--app-text));
  background: var(--wechat-surface, var(--app-card));
  border: 1px solid rgba(120, 120, 128, .18);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.wechat-classic-palette-button.is-active {
  border-color: var(--palette-preview-accent, #111113);
  box-shadow: inset 0 0 0 1px var(--palette-preview-accent, #111113);
}

.wechat-classic-palette-swatch {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border: 1px solid var(--palette-preview-line, rgba(17, 17, 19, .14));
  border-radius: 50%;
  background: linear-gradient(135deg, var(--palette-preview-accent, #111113) 0 49%, var(--palette-preview-surface, #ffffff) 51% 100%);
}

.wechat-classic-palette-button[data-palette="pink"] { --palette-preview-accent: #E7B7C2; --palette-preview-surface: #FFFDFD; --palette-preview-line: #F3D8DE; }
.wechat-classic-palette-button[data-palette="green"] { --palette-preview-accent: #C6D79E; --palette-preview-surface: #FFFFFC; --palette-preview-line: #E1EBC9; }
.wechat-classic-palette-button[data-palette="yellow"] { --palette-preview-accent: #C9BCE5; --palette-preview-surface: #FFFEFF; --palette-preview-line: #E2DAF0; }
.wechat-classic-palette-button[data-palette="gray"] { --palette-preview-accent: #B7BBC1; --palette-preview-surface: #FFFFFF; --palette-preview-line: #DDE0E3; }
.wechat-classic-palette-button[data-palette="blue"] { --palette-preview-accent: #A9D5E3; --palette-preview-surface: #FCFEFF; --palette-preview-line: #D4EAF1; }

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) {
  --classic-page: #FFF4F6;
  --classic-surface: #FFFDFD;
  --classic-control: #FCE7EC;
  --classic-accent: #E7B7C2;
  --classic-self-bg: #FAEAEE;
  --classic-ink: #393336;
  --classic-muted: #85777C;
  --classic-line: #EFD9DE;
  --classic-avatar: #F8E2E7;
  /* 五套浅色主题保留柔雾色阶，不再叠加点阵或细格纹。 */
  --classic-fog-dots: none;
  --classic-fog-grid: none;
  --wechat-shell-bg: var(--classic-page);
  --wechat-surface: var(--classic-surface);
  --wechat-nav-surface: color-mix(in srgb, var(--classic-surface) 89%, var(--classic-page));
  --wechat-primary: var(--classic-ink);
  --wechat-secondary: var(--classic-muted);
  --wechat-tertiary: color-mix(in srgb, var(--classic-muted) 58%, var(--classic-surface));
  --wechat-line: var(--classic-line);
  --wechat-control: var(--classic-control);
  --wechat-control-pressed: color-mix(in srgb, var(--classic-accent) 42%, var(--classic-control));
  --wechat-avatar-bg: var(--classic-avatar);
  --wechat-avatar-fg: var(--classic-ink);
  --wechat-self-bg: var(--classic-self-bg);
  --wechat-self-fg: var(--classic-ink);
  --wechat-other-bg: var(--classic-surface);
  --wechat-other-fg: var(--classic-ink);
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette="green"] { --classic-page: #F7FAEF !important; --classic-surface: #FFFFFC !important; --classic-control: #EDF3D9 !important; --classic-accent: #C6D79E !important; --classic-self-bg: #F0F5E6 !important; --classic-ink: #3D4432 !important; --classic-muted: #788067 !important; --classic-line: #DFE8CA !important; --classic-avatar: #E6EFD1 !important; }
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette="yellow"] { --classic-page: #F8F5FC !important; --classic-surface: #FFFEFF !important; --classic-control: #EEE8F7 !important; --classic-accent: #C9BCE5 !important; --classic-self-bg: #F0ECF9 !important; --classic-ink: #403B4B !important; --classic-muted: #797285 !important; --classic-line: #E2DAF0 !important; --classic-avatar: #E8E0F3 !important; }
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette="gray"] { --classic-page: #F7F7F7 !important; --classic-surface: #FFFFFF !important; --classic-control: #ECEDEF !important; --classic-accent: #B7BBC1 !important; --classic-self-bg: #F1F3F5 !important; --classic-ink: #3C4045 !important; --classic-muted: #74797F !important; --classic-line: #DDE0E3 !important; --classic-avatar: #E6E8EA !important; }
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette="blue"] { --classic-page: #F1FAFD !important; --classic-surface: #FCFEFF !important; --classic-control: #E2F3F8 !important; --classic-accent: #A9D5E3 !important; --classic-self-bg: #E6F4F8 !important; --classic-ink: #33444B !important; --classic-muted: #708087 !important; --classic-line: #D4EAF1 !important; --classic-avatar: #DCEFF5 !important; }

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]),
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-content,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .chat-room,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .contacts-page,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .discover-page,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .profile-page,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .profile-edit-page,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moments-page {
  background-color: var(--classic-page) !important;
  background-image: var(--classic-fog-dots);
  background-size: 38px 38px;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-header,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-tabbar,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .input-area,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .plus-menu {
  color: var(--classic-ink);
  background: var(--wechat-nav-surface) !important;
  border-color: var(--classic-line) !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .chat-list,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .contact-list,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-section,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .profile-header,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-item,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-toolbar,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-chat-section-card {
  background-color: var(--classic-surface) !important;
  background-image: var(--classic-fog-grid);
  background-size: 22px 22px;
  border-color: var(--classic-line) !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .discover-hero {
  color: var(--classic-ink);
  background-color: var(--classic-control);
  border-color: var(--classic-line);
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .input-area .msg-input,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .wechat-list-search input,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-composer-text {
  color: var(--classic-ink);
  background: var(--classic-surface);
  border-color: var(--classic-line);
  caret-color: var(--classic-ink);
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .input-area .send-btn,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-composer-submit,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .proactive-save-btn {
  color: var(--classic-ink) !important;
  background: var(--classic-accent);
}

/* 底部当前页与自发气泡共用同一档浅色，避免导航选中态过重。 */
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .tab-item.active {
  color: var(--classic-ink) !important;
  background: var(--classic-self-bg);
}

/* ===== 移动端键盘：聊天输入栏按键盘上沿真实定位 ===== */
.wechat-app[data-view="chat"] .chat-room {
  position: relative;
  min-height: 0;
}

.wechat-app[data-view="chat"] .messages-area {
  min-height: 0;
  box-sizing: border-box;
  scroll-padding-bottom: var(--input-area-height, 56px);
}

.wechat-app[data-view="chat"] .input-area {
  transition: bottom 180ms ease-out, transform 180ms ease-out;
}

html.keyboard-open .wechat-app.open[data-view="chat"] .messages-area {
  margin-bottom: 0;
  padding-bottom: calc(var(--input-area-height, 56px) + var(--keyboard-inset, 0px));
  scroll-padding-bottom: calc(var(--input-area-height, 56px) + var(--keyboard-inset, 0px));
}

html.keyboard-open .wechat-app.open[data-view="chat"] .input-area {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--keyboard-inset, 0px);
  z-index: 20;
  transform: none;
  box-sizing: border-box;
  padding-bottom: 7px;
  will-change: bottom;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .message-wrapper.self .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: var(--classic-ink) !important;
  background-color: var(--classic-self-bg) !important;
  background-image: var(--classic-fog-grid) !important;
  background-size: 18px 18px !important;
  border-color: color-mix(in srgb, var(--classic-self-bg) 72%, var(--classic-accent)) !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .message-wrapper.other .msg-bubble:not(.sticker):not(.image-bubble):not(.music-card):not(.red-packet):not(.transfer) {
  color: var(--classic-ink) !important;
  background: var(--classic-surface) !important;
  border-color: var(--classic-line) !important;
}

/* 已读和未读樱花完全跟随自发气泡的浅色，显式覆盖 SVG 默认黑色。 */
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .cherry-read {
  color: color-mix(in srgb, var(--classic-self-bg) 58%, var(--classic-accent));
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .cherry-read.read ellipse,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .cherry-read.read circle {
  fill: var(--classic-self-bg) !important;
  stroke: color-mix(in srgb, var(--classic-self-bg) 70%, var(--classic-accent)) !important;
  stroke-width: .7px !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .cherry-read.unread path:first-child {
  fill: var(--classic-self-bg) !important;
  stroke: color-mix(in srgb, var(--classic-self-bg) 70%, var(--classic-accent)) !important;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .cherry-read.unread .bud-line {
  fill: none;
  stroke: color-mix(in srgb, var(--classic-self-bg) 70%, var(--classic-accent)) !important;
}

/* 五套柔雾主题的时间提示直接浮在聊天背景上，不再使用标签底色。 */
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .time-divider span {
  padding: 0;
  color: color-mix(in srgb, var(--classic-muted) 82%, var(--classic-page));
  background: transparent;
  border-color: transparent;
}

/* 朋友圈保留干净的卡片表面，不叠加聊天区使用的细格纹。 */
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-item,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) .moment-toolbar {
  background-image: none;
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) ~ .modal-overlay .modal-sheet {
  color: var(--classic-ink);
  background: var(--classic-surface);
  border-color: var(--classic-line);
}

:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) ~ .modal-overlay .btn-secondary,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) ~ .modal-overlay input,
:root:not([data-theme="dark"]) .wechat-app[data-chat-ui="classic"][data-classic-palette]:not([data-classic-palette="neutral"]) ~ .modal-overlay textarea {
  color: var(--classic-ink);
  background: var(--classic-control);
  border-color: var(--classic-line);
}

@media (max-width: 370px) {
  .wechat-header {
    height: 50px;
    min-height: 50px;
  }

  .wechat-tabbar {
    min-height: calc(56px + var(--safe-bottom-inset, 0px));
  }

  .chat-item {
    min-height: 66px;
  }

  .contact-item,
  .wechat-cell {
    min-height: 55px;
  }
}
