/* 乌有岛 · 已确认的轻盈奶油 UI。只处理界面，不改变游戏坐标与存档。 */
:root {
  --ui-cream: #fff9ef;
  --ui-paper: #fffdf7;
  --ui-sage: #eaf0df;
  --ui-apricot: #ffe7d2;
  --ui-pink: #f5e3e7;
  --ui-ink: #4d5943;
  --ui-muted: #7c8371;
  --ui-edge: #e8dfcc;
  --ui-primary: #60794f;
  --ui-answer-a: #f8d8ca;
  --ui-answer-b: #dbe9ec;
  --ui-answer-c: #e4eddc;
  --ui-answer-d: #f6e5bd;
  --ui-shadow: inset 0 1px 1px #ffffffbb, 0 3px 0 #b1a08470, 0 5px 9px #65543e26;
  --ui-window-shadow: inset 0 0 0 3px #fffdf88c, 0 5px 0 #c1ad8b8c, 0 10px 28px #483f3338;
  --paper: var(--ui-cream);
  --white: var(--ui-paper);
  --ink: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-edge);
  --green: var(--ui-primary);
  --rose: #ac697d;
}

/* 字体不加载外部服务；中文保持清晰，圆润感来自字重和控件轮廓。 */
body { color: var(--ui-ink); font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
button, input, textarea, a { -webkit-tap-highlight-color: transparent; }
button { transition: background-color .15s, box-shadow .15s, scale .12s; }
button:hover { filter: none; }
button:active:not(:disabled) { filter: none; }
button:disabled { opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #7d9865; outline-offset: 3px;
}
.ui-icon { opacity: .95; }
.resident-tags .berry-tag .ui-icon { filter: none; }
.small-icon { width: 16px; height: 16px; }
.light-icon, .primary-button .ui-icon { filter: brightness(0) invert(1); opacity: 1; }
.asset-loading { background: var(--ui-cream); color: var(--ui-ink); }
.scene-curtain { display: block; overflow: hidden; background: #e8ddc4; z-index: 40; }
.curtain-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.curtain-postcard { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; min-width: 290px; padding: 14px 28px 14px 16px; border: 2px solid #fffdf6; border-radius: 30px; background: #fff9eff2; box-shadow: var(--ui-window-shadow); }
.curtain-destination-icon { width: 70px; height: 70px; object-fit: contain; }
.curtain-postcard>div { display: grid; gap: 6px; }
.curtain-title { font-size: 24px; font-weight: 650; letter-spacing: 1px; }
.curtain-note { font-size: 14px; color: #777c69; white-space: nowrap; }
.curtain-decoration { position: absolute; width: 43px; height: 43px; object-fit: contain; pointer-events: none; }
.curtain-leaf { left: -20px; bottom: -9px; transform: rotate(-15deg); }
.curtain-star { right: -17px; top: -15px; transform: rotate(12deg); }
.scene-curtain[data-kind=loading] .curtain-destination-icon { animation: island-breathe 2.6s ease-in-out infinite; }
.scene-curtain[data-kind=destination] { animation: destination-reveal .7s ease-in-out both; }
.game-frame[data-transitioning=true]>:not(.stage), .game-frame[data-transitioning=true] .stage>:not(#world):not(.scene-curtain) { visibility: hidden; }
@keyframes destination-reveal { 0%,45% { opacity: 1; } 100% { opacity: 0; } }
@keyframes island-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media(prefers-reduced-motion:reduce) { .scene-curtain[data-kind=loading] .curtain-destination-icon { animation: none; } .scene-curtain[data-kind=destination] { animation-duration: .01ms; } }

/* 常驻 HUD：紧凑胶囊，不再使用木框、金边、层叠描边。 */
.game-hud { inset: 18px 20px auto; gap: 8px; align-items: center; }
.brand {
  height: 43px; padding: 3px 15px 3px 5px; gap: 5px; min-width: 0;
  background: #839774; color: var(--ui-paper); border: 1px solid #d9e1ca;
  border-radius: 25px; box-shadow: var(--ui-shadow); text-shadow: none;
  font-size: 21px; font-weight: 650; letter-spacing: 1px;
}
.brand-mark { width: 47px; height: 47px; margin: -4px 0 -4px -4px; background: none; border: 0; box-shadow: none; }
.scene-header, .game-frame[data-scene=cafe] .scene-header {
  height: 38px; min-width: 0; padding: 8px 14px; margin: 0 auto 0 0;
  border: 1px solid #f4e7d2; border-radius: 24px; background: var(--ui-cream);
  color: #71654e; box-shadow: var(--ui-shadow);
}
.scene-header strong { font-size: 15px; font-weight: 600; }
.game-frame:is([data-scene=clothing],[data-scene=furniture],[data-scene=party]) .scene-header { display: none; }
.header-right { gap: 8px; margin-left: auto; }
.wallet { height: 40px; border: 1px solid #f2e7d4; border-radius: 25px; background: var(--ui-cream); padding: 6px 13px; color: var(--ui-ink); font-size: 23px; font-weight: 600; box-shadow: var(--ui-shadow); }
.wallet .ui-icon { width: 23px; height: 23px; }
.game-hud .profile-button, .game-hud .hud-icon {
  width: 42px; height: 42px; padding: 5px; border: 1px solid #f0e8d6;
  border-radius: 50%; background: var(--ui-cream); box-shadow: var(--ui-shadow);
  display: flex; align-items: center; justify-content: center;
}
.profile-button .ui-icon, .hud-icon .ui-icon { width: 23px; height: 23px; }
.shop-cart-button { width: 43px; height: 42px; min-width: 43px; min-height: 42px; border: 1px solid var(--ui-edge); background: var(--ui-cream); box-shadow: var(--ui-shadow); border-radius: 24px; }
.shop-cart-button span:not(:empty) { background: #a67383; border-color: var(--ui-paper); }
.game-toolbar { top: 180px; right: 15px; bottom: auto; gap: 8px; }
.game-toolbar button, .game-toolbar button.camera-launch {
  width: 53px; height: 54px; padding: 5px; gap: 3px; border: 1px solid #f1e6d3;
  background: var(--ui-cream); color: var(--ui-ink); border-radius: 19px;
  box-shadow: var(--ui-shadow); font-weight: 600;
}
.game-toolbar button:nth-child(2) { background: var(--ui-sage); }
.game-toolbar button:nth-child(3) { background: var(--ui-apricot); }
.game-toolbar button:nth-child(4) { background: var(--ui-cream); }
.game-toolbar button>span { font-size: 10px; color: var(--ui-ink); }
.game-toolbar button>.ui-icon, .game-toolbar button.camera-launch>.ui-icon { width: 25px; height: 25px; filter: none; opacity: 1; }
.game-toolbar button:hover { filter: none; background: var(--ui-paper); }
.back-town { top: 83px; left: 20px; width: 103px; height: 43px; min-height: 43px; padding: 5px 10px 5px 5px; gap: 6px; border: 1px solid #d7c8ad; border-radius: 17px; background: linear-gradient(#fffdf4,#f6eddb); box-shadow: var(--ui-shadow); font-size: 13px; font-weight: 600; white-space: nowrap; }
.back-town-arrow { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 12px; background: var(--ui-sage); box-shadow: inset 0 1px 2px #ffffff; }
.back-town-arrow>.ui-icon { width: 21px; height: 21px; }
.cafe-chat-shortcut { top: 83px; right: 20px; width: 43px; height: 43px; padding: 10px; background: var(--ui-sage); border: 1px solid #eef2e5; box-shadow: var(--ui-shadow); }
.cafe-chat-shortcut .ui-icon { width: 22px; height: 22px; }
.game-frame[data-scene=cafe] #chat-button { background: var(--ui-sage); border-color: #eef2e5; }
.game-frame[data-conversing=true] .back-town { top: auto; bottom: 25px; }
.game-hud :is(.profile-button,.hud-icon,.shop-cart-button), .back-town, .cafe-chat-shortcut { position: relative; }
.back-town, .cafe-chat-shortcut { position: absolute; }
.game-hud :is(.profile-button,.hud-icon,.shop-cart-button)::before, .back-town::before, .cafe-chat-shortcut::before { content: ''; position: absolute; inset: -8px; border-radius: inherit; }

/* 主按钮与表单共享同一套圆角、层级和状态。 */
.primary-button, .tool-button, .quiet-button, .text-button {
  border-radius: 23px; min-height: 46px; font-size: 16px; font-weight: 600; padding: 10px 16px;
}
.primary-button { background: var(--ui-primary); color: var(--ui-paper); border: 1px solid #597148; box-shadow: var(--ui-shadow); }
.tool-button, .quiet-button { background: var(--ui-sage); border: 1px solid #dce4ce; color: var(--ui-ink); box-shadow: var(--ui-shadow); }
.text-button { color: var(--ui-primary); border: 0; box-shadow: none; }
.primary-button:hover:not(:disabled) { background: #526c42; }
.tool-button:hover:not(:disabled), .quiet-button:hover:not(:disabled) { background: #e1e9d4; }
.close-button, .modal-header .close-button { width: 43px; height: 43px; min-width: 43px; background: var(--ui-sage); border: 1px solid #e0e6d6; box-shadow: none; padding: 10px; }
.modal-header .close-button>.ui-icon { width: 22px; height: 22px; opacity: .9; }
.modal-header .close-button { position: relative; }
.modal-header .close-button::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.modal-content :is(input,textarea), .resident-chat-form>input {
  border: 1px solid var(--ui-edge); background: var(--ui-paper); color: var(--ui-ink);
  border-radius: 21px; padding: 12px 15px; font-size: 17px; box-shadow: none;
}
.modal-content :is(input,textarea)::placeholder, .resident-chat-form>input::placeholder { color: #9b9c8c; }
.modal-content input[type=checkbox] { accent-color: var(--ui-primary); padding: 0; border-radius: 7px; }
.modal-content label { color: var(--ui-ink); font-size: 16px; }
.modal-content .primary-button, .modal-content .tool-button { min-height: 52px; }
.modal-content p, .panel-card p { color: var(--ui-muted); }
.tag, .resident-tags>span { background: var(--ui-sage); color: #5d714e; border-radius: 20px; }
.tag.pink, .resident-tags>span.berry-tag { background: var(--ui-pink); color: #995e74; }
.tag.gold, .phase-tag { background: var(--ui-apricot); color: #856743; border: 1px solid #f0d9bd; }

/* 所有窗口：单层奶油底，标题不再占一块厚木色横条。 */
dialog { background: #28352259; }
#modal-body { border: 1px solid #f1e7d3; border-radius: 30px; background: var(--ui-cream); box-shadow: var(--ui-window-shadow); }
.modal-header { min-height: 68px; padding: 10px 21px; border-bottom: 1px solid var(--ui-edge); background: transparent; }
.modal-header h2 { font-size: 24px; font-weight: 650; color: var(--ui-ink); margin: 0; }
.modal-content { padding: 16px 21px 20px; scrollbar-color: #c4ceb4 var(--ui-cream); }
.modal-content h3 { color: var(--ui-ink); font-weight: 600; }
.empty { padding: 25px; background: #f0f2e6; color: var(--ui-muted); border-radius: 23px; }
.panel-divider { border-top: 1px solid var(--ui-edge); }
.help-grid section, .party-entry-card { background: var(--ui-sage); border: 1px solid #e1e7d7; border-radius: 25px; }
.game-details { border-top: 1px solid var(--ui-edge); color: var(--ui-muted); }
.game-details summary, .panel-note, .item-detail { color: var(--ui-muted); }

/* 侧边指南、商店选择与直接物品交互。 */
.context-panel { top: 83px; right: 85px; bottom: 24px; width: 272px; border: 1px solid #f1e7d3; border-radius: 28px; background: var(--ui-cream); box-shadow: var(--ui-window-shadow); backdrop-filter: none; }
.context-heading { height: 50px; min-height: 50px; padding: 8px 13px 8px 18px; background: transparent; border-bottom: 1px solid var(--ui-edge); }
.context-heading strong { font-size: 18px; color: var(--ui-ink); }
.side-panel { padding: 13px; scrollbar-color: #c4ceb4 var(--ui-cream); }
.context-footer { background: transparent; border-top: 1px solid var(--ui-edge); }
.menu-tool { background: var(--ui-sage); border-radius: 21px; color: var(--ui-ink); }
.module-link { border-color: var(--ui-edge); padding: 10px 3px; }
.module-link small { color: var(--ui-muted); }
.module-icon { background: var(--ui-sage); }
.product { border: 1px solid var(--ui-edge); border-radius: 19px; background: var(--ui-paper); box-shadow: none; }
.product.selected { border: 1px solid #a1b48a; background: var(--ui-sage); }
.product strong { color: var(--ui-ink); }
.product small, .product .status { color: #78866b; }
.panel-card.featured { background: var(--ui-sage); border-radius: 22px; }
.scene-modes { top: auto; bottom: 20px; left: 180px; transform: none; padding: 0; gap: 8px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.scene-modes button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; min-width: 96px; padding: 10px 12px; gap: 7px; border: 1px solid #d7c8ad; border-radius: 18px; font-size: 15px; font-weight: 650; color: #74674f; background: var(--ui-cream); box-shadow: var(--ui-shadow); }
.scene-modes button.active { background: var(--ui-primary); border-color: #536e46; color: var(--ui-paper); box-shadow: inset 0 1px 2px #aec398,0 3px 0 #425d35,0 5px 9px #4b5b3a30; }
.scene-modes button.active .ui-icon { filter: brightness(0) invert(1); }
.scene-interactions button:is(.scene-object-button,.scene-price-button)::before { background: var(--ui-cream); border: 1px solid #f0e7d6; box-shadow: var(--ui-shadow); backdrop-filter: none; border-radius: 24px; }
.scene-interactions .scene-object-button.in-range::before { background: var(--ui-sage); border-color: #d0ddb9; box-shadow: var(--ui-shadow); }
.scene-interactions .scene-object-button.is-active::before { background: var(--ui-primary); border-color: #597148; }
.scene-interactions .scene-price-button.in-range::before { background: var(--ui-apricot); border-color: #f1d3b6; }
.scene-object-button { color: var(--ui-ink); }
.scene-object-button.is-active { color: var(--ui-paper); }
.scene-object-button.is-active .ui-icon { filter: brightness(0) invert(1); }
.scene-price-button { color: #856743; }
.interaction-hint { background: var(--ui-cream); border: 1px solid #f0e6d4; border-radius: 25px; color: var(--ui-ink); box-shadow: var(--ui-shadow); }
.move-pad { width: 115px; height: 115px; border: 2px solid #fff8e49c; background: #fff9ef38; box-shadow: none; }
.joystick-cap { width: 41px; height: 41px; left: 34px; top: 34px; background: #fff8e5d9; border: 1px solid #fffdf1; box-shadow: var(--ui-shadow); }
.invite-button { background: #a96f82; border: 1px solid #986276; border-radius: 26px; box-shadow: var(--ui-shadow); }
.journey li { border-color: var(--ui-edge); background: #f2ecdf; }
.journey li.done { background: var(--ui-primary); }

/* 咖啡、购物、结算：弱化容器，商品素材承担视觉重点。 */
.drink-card { background: #f6eddc; border: 1px solid #eae0cc; border-radius: 27px; box-shadow: none; }
.drink-card:hover, .drink-card:focus-visible { background: var(--ui-apricot); }
.drink-card strong, .coffee-receipt strong { color: #786a50; }
.cart-item { background: var(--ui-paper); border-color: var(--ui-edge); border-radius: 23px; }
.trial-history { background: var(--ui-sage); border-radius: 23px; }
.shop-checkout-bar { background: var(--ui-cream); }
.shop-checkout-bar strong, .furniture-price, .balance-line strong { color: var(--ui-primary); }
.furniture-preview { background: #f2ecdf; border-radius: 28px; }
.furniture-shop-layout { align-items: stretch; }
.furniture-shop-layout>section { display: flex; flex-direction: column; gap: 8px; }
.furniture-shop-layout>section>.tag { align-self: start; }
.furniture-shop-layout h3 { margin: 4px 0; }
.furniture-shop-layout p { margin: 2px 0; }
.furniture-shop-layout .furniture-price { margin: 7px 0; }
.furniture-shop-layout .action-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 7px; }
.furniture-shop-layout .text-button { min-height: 40px; padding: 6px; font-size: 14px; }
.checkout-items>div { border-color: var(--ui-edge); }
.invite-card { background: var(--ui-sage); border-color: #dce4ce; border-radius: 25px; }
.friend-card { background: var(--ui-paper); border-color: var(--ui-edge); border-radius: 25px; }
.cafe-chat-layout>section { background: var(--ui-sage); border-radius: 25px; }
.cafe-chat-layout>section>.wide+.wide { margin-top: 9px; }
.cafe-messages { background: #f5f0e5; border: 1px solid var(--ui-edge); border-radius: 23px; }
.chat-line { border-radius: 18px 18px 18px 6px; background: var(--ui-paper); }
.chat-line.mine { border-radius: 18px 18px 6px 18px; background: var(--ui-sage); }
.chat-line strong { color: var(--ui-muted); }
.connection-note { background: var(--ui-sage); border-radius: 17px; color: var(--ui-muted); }
.connection-note.error, .offline-banner { background: #f5e1dc; color: #a65c58; }

/* 居民聊天：参考图的肖像、纵向话题、自由输入，正文不再套卡片。 */
.conversation { top: 122px; bottom: 27px; right: 24px; width: 286px; padding: 18px; gap: 12px; background: var(--ui-cream); border: 1px solid #f0e6d4; border-radius: 32px; box-shadow: var(--ui-window-shadow); }
.conversation-heading { min-height: 62px; gap: 10px; color: var(--ui-ink); font-size: 21px; }
.conversation-heading>div { flex: 1; min-width: 0; display: grid; gap: 6px; }
.conversation-heading small { color: var(--ui-muted); font-size: 12px; line-height: 1.5; }
.conversation-avatar { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: #f4e6c8; }
.conversation-portrait { width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); transform-origin: 50% 15%; }
.conversation-goodbye { align-self: start; width: 28px; height: 28px; min-width: 28px; padding: 6px; border: 0; background: var(--ui-sage); box-shadow: none; }
.conversation-goodbye .ui-icon { width: 16px; height: 16px; }
.conversation-goodbye { position: relative; }
.conversation-goodbye::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }
.conversation-line { min-height: 62px; padding: 8px 2px 0; background: transparent; border: 0; border-top: 1px solid var(--ui-edge); border-radius: 0; }
.conversation-line>strong { color: var(--ui-muted); font-size: 12px; font-weight: 500; }
.conversation-line>p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; color: var(--ui-ink); }
.conversation-openers { flex-direction: column; gap: 9px; align-items: stretch; }
.conversation-openers>.tool-button { flex: none; min-height: 46px; gap: 7px; padding: 8px 10px; border: 1px solid #dce3ce; border-radius: 25px; background: var(--ui-sage); color: var(--ui-ink); box-shadow: var(--ui-shadow); font-size: 14px; }
.conversation-openers>.tool-button:nth-child(2) { background: var(--ui-apricot); border-color: #f3d7bd; }
.conversation-openers .ui-icon { width: 21px; height: 21px; }
.conversation-openers .small-icon { width: 14px; height: 14px; margin-left: auto; }
.conversation-openers span { flex: 1; text-align: left; }
.resident-chat-form { gap: 7px; padding-top: 10px; border-top: 1px solid var(--ui-edge); }
.resident-chat-form>input { height: 48px; border-radius: 25px; padding: 10px 12px; font-size: 15px; }
.resident-chat-form>.primary-button { height: 48px; min-height: 48px; min-width: 59px; border-radius: 24px; padding: 8px; font-size: 15px; }

/* 我的装扮与家居布置：保留功能布局，去掉硬木镜框和多层选中边。 */
.dressing-mirror { background: var(--ui-sage); border: 1px solid #d9e2c8; border-radius: 72px 72px 27px 27px; box-shadow: none; }
.dressing-mirror strong { color: var(--ui-ink); }
.dressing-mirror>span, .closet-heading>span { color: var(--ui-muted); }
.owned-outfit { border: 1px solid var(--ui-edge); border-radius: 22px; background: var(--ui-paper); box-shadow: none; }
.owned-outfit.selected { border: 1px solid #a2b789; background: var(--ui-sage); box-shadow: none; }
.owned-outfit small { color: #657c54; }
.edit-home-button { top: 83px; left: 137px; height: 43px; min-height: 43px; padding: 8px 14px; }
.home-inventory { top: 142px; border: 1px solid #f0e6d4; border-radius: 27px; background: var(--ui-cream); box-shadow: var(--ui-window-shadow); }
.home-inventory h2 { color: var(--ui-ink); }
.home-inventory h2 small, .home-owned small, .home-owned-list>p { color: var(--ui-muted); }
.home-owned { border: 1px solid var(--ui-edge); border-radius: 21px; background: var(--ui-paper); }
.home-owned.selected { border: 1px solid #a2b789; background: var(--ui-sage); }
.home-placement-tools { border: 1px solid #f0e6d4; border-radius: 27px; background: var(--ui-cream); box-shadow: var(--ui-shadow); }
.home-placement-tools>span, .home-placement-tools>strong { color: var(--ui-ink); }

/* 新鲜事与主题活动：一层照片容器，色块和留白区分内容。 */
.post-card, .photo-card { border: 1px solid var(--ui-edge); border-radius: 24px; background: var(--ui-paper); box-shadow: none; }
.post-content { padding: 16px; }
.post-author, .post-author-link { color: var(--ui-ink); }
.post-content p { color: var(--ui-ink); }
.post-tools button, .comment-form button { background: var(--ui-sage); border-radius: 23px; color: var(--ui-ink); }
.post-tools button.liked { background: var(--ui-pink); color: #995e74; }
.comments { color: var(--ui-muted); }
.comment-form input { border-radius: 23px; }
dialog[data-view=community] .post-tools button, dialog[data-view=community] .comment-form button { min-height: 48px; }
.community-actions>.primary-button, .community-actions>.tool-button { min-height: 50px; border-radius: 25px; }
.author-avatar { background: var(--ui-sage); }
.theme-banner { border: 1px solid #f0e6d4; border-radius: 27px; }
.theme-banner>div { background: var(--ui-cream); border-radius: 21px; padding: 10px 15px; }
.theme-banner h3 { color: #7c684b; }
.phase-tag { border-radius: 25px; }
.theme-create { background: var(--ui-sage); border-radius: 25px; }
.theme-reward { background: #f1e8f1; border: 1px solid #e9dfea; border-radius: 25px; }
.activity-tabs button { border: 1px solid #e0e5d5; border-radius: 23px; background: #f0f3e7; color: var(--ui-muted); }
.activity-tabs button.active { background: var(--ui-primary); border-color: #597148; color: var(--ui-paper); }
.demo-controls, .game-details .demo-controls { background: var(--ui-sage); border-radius: 22px; }
.demo-controls button { border-radius: 22px; background: #dce5cf; color: var(--ui-ink); }

/* 交友栏保持已选照片留言卡，外壳与其它窗口统一。 */
dialog[data-view=friend-board] #modal-body { background: var(--ui-cream); }
dialog[data-view=friend-board] h2 { color: var(--ui-ink); font-size: 25px; }
dialog[data-view=friend-board] h2 small { color: var(--ui-muted); }
.friend-header-actions .tool-button, .friend-pagination .tool-button { min-height: 52px; background: var(--ui-sage); border: 1px solid #dce4ce; border-radius: 26px; box-shadow: none; }
.friend-header-actions .text-button { min-height: 52px; color: var(--ui-muted); }
.resident-photo-button { border-radius: 11px; }
.resident-photo-button>span { background: #617953e6; border: 1px solid #ecf0e3; border-radius: 19px; }
.resident-name strong { color: var(--ui-ink); }
.modal-content .resident-bio { color: #65715a; }
.polaroid-card .resident-invite { min-height: 52px; background: var(--ui-primary); border: 1px solid #597148; border-radius: 26px; box-shadow: var(--ui-shadow); }
.friend-pagination { min-height: 54px; color: var(--ui-ink); }
.friend-page { color: var(--ui-ink); }
.friend-remaining, .resident-name small { color: var(--ui-muted); }
.resident-detail-photo { border: 5px solid var(--ui-paper); border-radius: 22px; box-shadow: var(--ui-shadow); }
.resident-character { color: #968061; }
.resident-wish { border-color: #d1dcbf; color: var(--ui-ink); }
.resident-detail-actions .primary-button { background: var(--ui-primary); border: 1px solid #597148; }
.resident-detail-actions :is(.primary-button,.tool-button) { min-height: 52px; border-radius: 26px; }
.resident-detail-actions .text-button { min-height: 40px; color: var(--ui-muted); }
.resident-conversation .tool-button, .resident-conversation .primary-button { min-height: 52px; }

/* 相机、大头贴、相册、回收区与发布。相框本身是玩家作品，不换掉。 */
.camera-controls { border: 1px solid #f0e6d4; background: var(--ui-cream); box-shadow: var(--ui-shadow); border-radius: 35px; }
.filter { background: var(--ui-paper); border: 1px solid var(--ui-edge); border-radius: 23px; color: var(--ui-muted); }
.filter.active { background: var(--ui-sage); border: 1px solid #a7bb92; color: #566d47; }
#shutter-button { background: #a56b7d; border: 1px solid #996174; box-shadow: var(--ui-shadow); }
#camera-close { border-radius: 50%; }
.selfie-viewfinder { border: 5px solid var(--ui-paper); border-radius: 28px; box-shadow: var(--ui-shadow); }
.selfie-live { background: var(--ui-cream); border-radius: 25px; color: #996174; }
.selfie-mini { border: 1px dashed #d7cfb9; border-radius: 17px; background: #f6f0e3; }
.selfie-mini.current { border: 1px solid #bf8a9c; background: var(--ui-pink); }
.selfie-choices .tool-button { border-radius: 23px; }
.selfie-choices .selected { border: 1px solid #be8e9d; background: var(--ui-pink); color: #995e74; }
.selfie-frame { border: 1px solid var(--ui-edge); border-radius: 20px; background: var(--ui-paper); }
.selfie-shutter-row>.primary-button { background: #a56b7d; border: 1px solid #996174; }
.preview-photo { border-color: var(--ui-edge); border-radius: 22px; }
dialog[data-view=photo] .preview-photo { border: 5px solid var(--ui-paper); box-shadow: var(--ui-shadow); }
.photo-saved, .album-tools { color: #687d59; }
.photo-card>div { padding: 13px; }
.photo-card .button-row { gap: 6px; }
.photo-card .button-row :is(.primary-button,.tool-button) { min-height: 44px; padding: 8px 13px; font-size: 14px; }
.photo-remove { color: var(--ui-muted); }
.remove-preview { border-radius: 23px; }

/* 人格派对：题目、房间、准备、结果同属一套界面。 */
.question-overlay { border: 1px solid #f1e7d3; background: var(--ui-cream); border-radius: 27px; box-shadow: var(--ui-shadow); color: var(--ui-ink); }
.game-frame[data-scene=party][data-panel=open] .question-overlay { right: 374px; }
.question-overlay .question-meta { color: var(--ui-muted); }
.answers>div { border-radius: 17px; padding: 8px 6px; color: var(--ui-ink); }
.answers>div:nth-child(1) { background: var(--ui-answer-a); }
.answers>div:nth-child(2) { background: var(--ui-answer-b); }
.answers>div:nth-child(3) { background: var(--ui-answer-c); }
.answers>div:nth-child(4) { background: var(--ui-answer-d); }
.room-code { color: var(--ui-primary); }
.player-row { border-radius: 21px; background: #f1f2e7; color: var(--ui-ink); }
.player-row.ready { background: var(--ui-sage); }
.result-card { border: 1px solid var(--ui-edge); background: #f8edd9; border-radius: 26px; }
.result-card p { color: var(--ui-muted); }

/* 开场、恢复存档、消息提示与手机横屏引导。 */
dialog[data-view=welcome] #modal-body { border: 1px solid #f2e7d3; border-radius: 30px; background: url('/assets/toy-town-v2/town.png') center/cover; }
.welcome-brand { background: #fff9efed; border: 1px solid #f0e6d4; border-radius: 35px; color: var(--ui-ink); text-shadow: none; padding: 20px 16px; }
.welcome-brand>img { width: 135px; height: 112px; filter: none; }
.welcome-brand h1 { color: var(--ui-ink); font-weight: 650; font-size: 45px; }
.welcome-brand p { color: var(--ui-muted); }
.welcome-form { background: var(--ui-cream); border: 1px solid #f0e6d4; border-radius: 30px; box-shadow: var(--ui-window-shadow); }
.welcome-form .primary-button, .welcome-form input { border-radius: 25px; }
.welcome-form h2 { color: var(--ui-ink); }
.toast { background: var(--ui-cream); color: var(--ui-ink); border: 1px solid #f0e6d4; border-radius: 25px; box-shadow: var(--ui-shadow); font-size: 16px; }
.modal-header>.toast { position: static; transform: none; max-width: 320px; min-width: 0; padding: 7px 12px; background: var(--ui-sage); border: 0; border-radius: 20px; box-shadow: none; font-size: 13px; line-height: 1.5; flex-shrink: 1; }
.rotate-hint { background: var(--ui-cream); border: 0; color: var(--ui-ink); }
.rotate-hint p { color: var(--ui-muted); }
.rotate-hint button { background: var(--ui-primary); border: 1px solid #597148; border-radius: 27px; box-shadow: var(--ui-shadow); }
/* v13：轻盈不等于扁平。柔和压边、内高光与低矮厚度贯穿所有窗口。 */
.brand { box-shadow: inset 0 1px 2px #bcd0a4,0 3px 0 #596e48,0 5px 12px #423e3230; }
.game-hud :is(.wallet,.hud-icon,.profile-button,.shop-cart-button), .back-town { border-color: #d7c8ad; }
.game-toolbar { right: 14px; gap: 11px; }
.game-toolbar button { border-color: #d7c8ad; border-radius: 18px; }
.game-toolbar button>span { font-size: 11px; font-weight: 650; }
.game-toolbar button:nth-child(1) { background: #fff3df; }
.game-toolbar button:nth-child(2) { background: #e4edda; }
.game-toolbar button:nth-child(3) { background: #ffe2c5; }
.game-toolbar button:nth-child(4) { background: #f7e5e6; }
.primary-button { box-shadow: inset 0 1px 2px #a2b98c,0 3px 0 #415b33,0 5px 10px #42533326; }
.tool-button, .quiet-button, .close-button, .modal-header .close-button { border-color: #cbd4b8; box-shadow: var(--ui-shadow); }
:is(.primary-button,.tool-button,.quiet-button,.scene-modes button,.game-toolbar button,.back-town):active:not(:disabled) { translate: 0 2px; box-shadow: inset 0 1px 3px #5e63411c,0 1px 0 #a99a8170; }
#modal-body, .context-panel, .conversation, .home-inventory { border-color: #d9c8a7; }
.modal-header, .context-heading { background: #f8efde; border-bottom-color: #e1d2b6; }
.modal-header h2, .context-heading strong { color: #6a6049; letter-spacing: .5px; }
.modal-content :is(input,textarea), .resident-chat-form>input { border-color: #ddd0b5; box-shadow: inset 0 2px 4px #70593912; }
.conversation-avatar { border: 3px solid #fff9ee; box-shadow: 0 2px 0 #c7b88f; }
.conversation-goodbye { border: 1px solid #d4debf; box-shadow: var(--ui-shadow); }
.conversation-openers>.tool-button { border-color: #cdd8b9; box-shadow: inset 0 1px 2px #ffffffba,0 3px 0 #b7c39f,0 5px 8px #59623d12; }
.conversation-openers>.tool-button:nth-child(2) { border-color: #ecc8a7; box-shadow: inset 0 1px 2px #fff8ed,0 3px 0 #ddb38e,0 5px 8px #85613d12; }
.resident-chat-form>.primary-button { box-shadow: inset 0 1px 2px #a2b98c,0 3px 0 #415b33; }
.owned-outfit, .home-owned, .drink-card, .product, .post-card, .photo-card, .player-row, .result-card { border-color: #e3d5ba; box-shadow: inset 0 1px 1px #ffffff,0 2px 0 #cdbd9e40; }
.owned-outfit.selected, .home-owned.selected, .product.selected { border-color: #9bae80; box-shadow: inset 0 0 0 2px #e5edd6,0 3px 0 #96aa766b; }
.selfie-frame.selected, .selfie-choices .tool-button.selected, .activity-tabs button.active, .filter.active { box-shadow: inset 0 1px 2px #c0cea3,0 3px 0 #809965; }
.scene-interactions button:is(.scene-object-button,.scene-price-button)::before { border-color: #dacaac; }
.scene-interactions .scene-object-button:not(.has-label)::before { inset: 13px; box-shadow: inset 0 1px 2px #ffffffc4,0 2px 0 #b2a08170,0 3px 6px #65543e20; }
.move-pad { width: 106px; height: 106px; background: #fff9ef29; border-color: #fff8e496; }
.joystick-cap { left: 29.5px; top: 29.5px; }
.ui-icon.game-icon { object-fit: contain; filter: none !important; opacity: 1; }
.game-toolbar button>.ui-icon.game-icon, .game-toolbar button.camera-launch>.ui-icon.game-icon { width: 32px; height: 32px; }
.profile-button .game-icon, .hud-icon .game-icon { width: 30px; height: 30px; }
.wallet .game-icon { width: 28px; height: 28px; }
.scene-modes .game-icon { width: 27px; height: 27px; }
.scene-object-button .game-icon { width: 26px; height: 26px; }
.game-frame .scene-object-button, .game-frame .scene-object-button.has-label, .scene-price-button { width: 52px; min-width: 52px; min-height: 52px; height: 52px; padding: 11px; grid-template-columns: 1fr; gap: 0; }
.game-frame .scene-object-button>.ui-icon { display: block; width: 26px; height: 26px; }
.scene-interactions .scene-object-button::before, .scene-interactions .scene-object-button:not(.has-label)::before, .scene-interactions .scene-price-button::before { inset: 7px; }
.game-frame .scene-object-button strong { position: absolute; left: 44px; top: 50%; transform: translateY(-50%); padding: 7px 10px; border: 1px solid #d6c8ac; border-radius: 16px; background: var(--ui-cream); box-shadow: var(--ui-shadow); color: var(--ui-ink); }
.game-frame .scene-object-button[data-label-side=left] strong { left: auto; right: 44px; }
.game-frame .scene-object-button.is-active strong { background: var(--ui-sage); }
.scene-interactions button[hidden] { display:none!important; }
.scene-price-button span { position: absolute; top: 41px; left: 50%; transform: translateX(-50%); background: var(--ui-cream); padding: 3px 7px; border: 1px solid var(--ui-edge); border-radius: 12px; font-size: 11px; }
#world { touch-action: none; }
.game-frame[data-home-editing=true] #world { cursor: grab; }
.game-frame[data-home-editing=true] #world:active { cursor: grabbing; }
.game-frame[data-home-editing=true] .audio-button { display: none; }
.conversation-openers .game-icon { width: 28px; height: 28px; }
.audio-button { position: absolute; left: 20px; top: 137px; z-index: 7; width: 37px; height: 37px; min-height: 37px; padding: 8px; border: 1px solid #ddcdb1; border-radius: 50%; background: var(--ui-cream); box-shadow: var(--ui-shadow); }
.audio-button .ui-icon { width: 21px; height: 21px; }
.audio-button .audio-off, .audio-button[data-muted=true] .audio-on { display: none; }
.audio-button[data-muted=true] .audio-off { display: block; }
.game-frame[data-scene=town] .audio-button { top: 83px; }
@media(prefers-reduced-motion:reduce) { button { transition: none; } }
