/* 宅居聊天浮层只使用房间自己的坐标，不移动房间/天气栏。 */
.thm-root { position:absolute; inset:0; z-index:34; pointer-events:none; color:#55493f; font:14px/1.45 system-ui,sans-serif; }
.thm-root [hidden] { display:none !important; }
.thm-root *, .thm-root *::before, .thm-root *::after { box-sizing:border-box; }
.thm-root button, .thm-root select, .thm-root textarea, .thm-root input { font:inherit; color:inherit; }
.thm-root button { border:0; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.thm-root button:focus-visible, .thm-root textarea:focus-visible, .thm-root select:focus-visible { outline:2px solid #b87863; outline-offset:-2px; }
.thm-root button:disabled { opacity:.5; cursor:default; }
.thm-tab { position:absolute; left:0; top:42%; width:36px; min-height:72px; padding:12px 7px; border-radius:0 15px 15px 0; background:#fcf7eef2; box-shadow:2px 3px 14px #32291c22; writing-mode:vertical-rl; letter-spacing:4px; pointer-events:auto; transition:opacity .6s; touch-action:manipulation; }
.thm-tab.is-idle { opacity:.38; }
.thm-tab:focus-visible, .thm-tab:hover { opacity:1; }
.thm-tab.has-unread::after { content:''; display:block; width:6px; height:6px; margin-top:7px; border-radius:50%; background:#b9715c; }
/* The courtyard and onsen borrow the residence's existing conversation panel. */
.thg-root > .thm-root, .tho-root > .thm-root { z-index:34; }
.thg-root > .thm-root .thm-tab, .tho-root > .thm-root .thm-tab { min-width:40px; background:#fcf7ee; }
.thm-panel { position:absolute; display:flex; flex-direction:column; width:min(360px,calc(100% - 16px)); height:48%; max-height:50%; min-height:0; overflow:hidden; pointer-events:auto; border:1px solid #f9eee4; border-radius:18px; background:#faf6effa; box-shadow:0 10px 35px #28201c33; isolation:isolate; }
.thm-head { display:flex; align-items:center; flex-shrink:0; min-height:43px; padding:0 7px 0 13px; gap:4px; border-bottom:1px solid #ded1c355; background:#f0e8dd; }
.thm-handle { display:flex; align-items:center; gap:7px; flex:1; align-self:stretch; min-width:0; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.thm-handle::before { content:'⠿'; opacity:.4; font-size:18px; }
.thm-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
.thm-head button { min-height:40px; padding:0 7px; background:transparent; font-size:12px; white-space:nowrap; }
.thm-head .thm-close { min-width:32px; font-size:21px; }
.thm-panel.is-dragging { box-shadow:0 13px 35px #28201c55; }
.thm-panel.is-dragging .thm-handle { cursor:grabbing; }
.thm-conversation { flex:1; min-height:0; display:flex; flex-direction:column; }
.thm-log { flex:1; min-height:0; overflow:auto; padding:10px; overscroll-behavior:contain; scrollbar-width:thin; -webkit-overflow-scrolling:touch; contain:layout style; }
.thm-message { display:flex; flex-direction:column; align-items:flex-start; margin:0 0 10px; }
.thm-message.is-user { align-items:flex-end; }
.thm-message time { font-size:10px; opacity:.5; margin:2px 4px 0; }
.thm-bubble { max-width:91%; min-width:30px; border:1px solid #e4dbce; padding:7px 10px; border-radius:12px 12px 12px 3px; background:#fffdfa; overflow-wrap:anywhere; white-space:pre-wrap; user-select:text; }
/* The shared voice template contains formatting whitespace, not message text. */
.thm-bubble:has(> .chat-message-bubble--voice) { white-space:normal; }
.thm-bubble > .chat-message-bubble--voice { min-width:136px; max-width:100%; margin:0; padding:0 !important; border:0; border-radius:0 !important; background:transparent; box-shadow:none; white-space:normal; }
.thm-message.is-user .thm-bubble { background:#e6ece0; border-color:#d6dfce; border-radius:12px 12px 3px 12px; }
.thm-sticker { display:block; width:auto; height:auto; max-width:90px; max-height:90px; object-fit:contain; }
.thm-translation { border-top:1px dashed #d2c5b6; margin-top:6px; padding-top:6px; color:#847565; font-size:12px; }
.thm-translate { display:block; margin:4px 0 0 auto; padding:1px 6px; min-width:29px; min-height:25px; border-radius:7px; background:#eee6da; font-size:12px !important; }
.thm-empty { padding:14px 9px; margin:auto; color:#8c8175; text-align:center; font-size:12px; }
.thm-empty button, .thm-more { display:block; border-radius:10px; padding:8px 12px; margin:6px auto; background:#ece2d5; }
.thm-status { flex-shrink:0; padding:2px 10px; font-size:11px; line-height:16px; color:#938574; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thm-status.is-error { color:#a74233; white-space:normal; max-height:48px; overflow:auto; }
.thm-composer { flex-shrink:0; display:flex; align-items:flex-end; gap:5px; padding:6px 8px 8px; border-top:1px solid #ded1c355; }
.thm-composer textarea { resize:none; min-width:0; flex:1; height:37px; max-height:68px; padding:8px; border:1px solid #dfd1c2; border-radius:10px; background:#fffdfa; font-size:16px !important; line-height:20px; overscroll-behavior:contain; }
.thm-composer button { flex-shrink:0; border-radius:9px; height:37px; padding:0 8px; font-size:12px; background:#ede3d7; }
.thm-composer .thm-send { background:#b98570; color:white; }
.thm-composer .thm-emoji-button { width:31px; padding:0; font-size:23px; background:transparent; }
.thm-stickers { flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; padding:7px; }
.thm-categories { display:flex; gap:4px; overflow-x:auto; flex-shrink:0; margin-bottom:6px; }
.thm-categories button { border-radius:8px; background:#eee5d8; padding:5px 8px; white-space:nowrap; font-size:12px; }
.thm-categories button[aria-pressed=true] { background:#cfaf9c; }
.thm-sticker-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(52px,1fr)); gap:6px; overflow:auto; overscroll-behavior:contain; min-height:0; align-content:start; }
.thm-sticker-grid button { padding:4px; min-height:65px; background:#fffaf3; border-radius:8px; overflow:hidden; }
.thm-sticker-grid img { display:block; width:44px; height:44px; margin:auto; object-fit:contain; }
.thm-sticker-grid small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.thm-settings { flex:1; min-height:0; display:flex; flex-direction:column; }
.thm-settings-scroll { flex:1; min-height:0; overflow:auto; padding:5px 13px 12px; overscroll-behavior:contain; }
.thm-setting { display:flex; align-items:center; gap:10px; flex-wrap:wrap; border-bottom:1px solid #e5dacd; padding:10px 0; }
.thm-setting label { flex:1; font-size:13px; }
.thm-setting small { display:block; width:100%; color:#958676; font-size:11px; margin-top:-5px; }
.thm-setting select, .thm-setting input[type=number] { min-height:34px; border:1px solid #dacec0; border-radius:7px; padding:4px 6px; background:#fffdfa; font-size:16px; max-width:170px; }
.thm-setting input[type=number] { width:65px; }
.thm-setting input[type=checkbox] { accent-color:#b98570; width:20px; height:20px; }
.thm-settings-footer { flex-shrink:0; padding:7px 10px; display:flex; gap:7px; border-top:1px solid #e5dacd; }
.thm-settings-footer button { flex:1; padding:8px; border-radius:9px; background:#eaded0; }
.thm-settings-footer .thm-save { background:#b98570; color:#fff; }
.thm-summary-state { margin:10px 0; color:#8d7a66; font-size:11px; white-space:pre-wrap; }
.thm-sync-state { color:#8d7a66; font-size:11px; }
.thm-panel.is-compact .thm-head { min-height:34px; }
.thm-panel.is-compact .thm-head button { min-height:32px; }
.thm-panel.is-compact .thm-log { padding:5px 8px; }
.thm-panel.is-compact .thm-composer { padding:4px 6px; }
/* 同一个输入节点切换快捷输入与历史，保留草稿、光标与中文合成状态。 */
.thm-panel.is-composer-only { border-radius:16px; }
.thm-panel.is-composer-only .thm-conversation { justify-content:flex-end; }
.thm-panel.is-composer-only .thm-composer { padding:6px 8px 8px; }
.thm-panel.is-composer-only .thm-status { padding-top:3px; }
.thm-panel.is-composer-only .thm-stickers { flex:1; }
/* 微信底层线下悬浮球不应遮住宿居消息或“是否返回微信”确认。 */
body.tiny-home-open #offline-float-btn:not([data-tiny-home-offline=active]) { display:none !important; pointer-events:none !important; }
/* 宅居长文停靠在手机下半屏；收起后仍保留进行中的会话。 */
.thm-panel.is-offline { width:100%; height:50%; border-radius:18px 18px 0 0; background:#f8f5f0fa; }
.thm-panel.is-offline .thm-handle { flex:0 1 auto; cursor:default; touch-action:manipulation; }
.thm-panel.is-offline .thm-handle::before { display:none; }
.thm-panel.is-offline .thm-head { min-height:43px; gap:2px; }
.thm-panel.is-offline .thm-title { font-size:13px; }
.thm-panel.is-offline .thm-head .thm-heartbeat { min-width:30px; width:30px; margin-right:auto; padding:3px; color:#b66572; }
.thm-heartbeat svg { display:block; width:26px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.thm-panel.is-offline .thm-log { padding:12px 17px; }
.thm-long-message { align-items:stretch !important; display:block; margin:0 0 22px; }
.thm-long-speaker { font-size:10px; color:#998775; letter-spacing:.08em; margin:0 0 7px; }
.thm-long-message.is-user .thm-long-speaker { color:#7c8774; }
.thm-root .thm-long-message .chat-message-bubble { display:block; width:100%; max-width:100%; padding:0 4px; margin:0; border:0; border-radius:0; box-shadow:none; background:transparent; color:inherit; white-space:pre-wrap; overflow-wrap:anywhere; cursor:text; }
.thm-long-message .chat-message-segment { display:block; width:100%; text-align:left; text-indent:0; font-family:'LoveMiOfflineNarration','Songti SC','Noto Serif SC',serif; font-size:14.5px; line-height:1.9; letter-spacing:.035em; font-style:normal; }
.thm-long-message .chat-message-segment--dialogue, .thm-long-message .offline-dialogue-inline { font-family:'LoveMiOfflineDialogue','Songti SC','Noto Serif SC',serif; font-size:13.5px; font-weight:600; line-height:1.72; color:#302a26; font-style:normal; }
.thm-long-message .offline-dialogue-inline, .thm-long-message .offline-narration-inline { display:inline; }
.thm-long-message .offline-voice-line-translation { font-family:'LoveMiOfflineDialogue','Songti SC','Noto Serif SC',serif; }
.thm-long-message .chat-message-linebreak { min-height:1.08em; }
.thm-long-message .chat-message-segment--narration + .chat-message-segment--narration { margin-top:.55em; }
.thm-long-message .chat-message-segment--dialogue + .chat-message-segment--narration, .thm-long-message .chat-message-segment--narration + .chat-message-segment--dialogue { margin-top:.42em; }
.thm-long-message time { display:block; margin-top:8px; }
.thm-panel.is-offline .thm-composer { padding-bottom:max(8px,env(safe-area-inset-bottom,0px)); }
.thm-composer .thm-end { color:#98584e; background:#efe0d7; }
.thm-ticket-entry { margin:8px 0 13px; }
.thm-root .thm-ticket { position:relative; display:flex; align-items:center; width:100%; min-height:112px; padding:15px 19% 15px 28%; color:#4f473e; border-radius:3px; background:transparent url('assets/tiny-home-offline-ticket.png') center/100% 100% no-repeat; filter:drop-shadow(0 3px 3px #473d2b12); text-align:left; overflow:hidden; }
.thm-ticket-stamp { position:absolute; right:4.5%; width:10%; top:50%; transform:translateY(-50%); font-family:'Songti SC',serif; font-size:10px; letter-spacing:.15em; line-height:1.8; text-align:center; color:#84725e; }
.thm-ticket-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:3px; }
.thm-ticket-copy strong { font-family:'Songti SC','Noto Serif SC',serif; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.thm-ticket-copy > span { font-size:10px; line-height:1.4; opacity:.75; }
.thm-ticket-copy small { font-size:10px; letter-spacing:.05em; }
.thm-ticket-record { padding:15px 7px 0; border:1px dashed #c9b79e; border-top:0; border-radius:0 0 10px 10px; }
@media(max-width:340px) { .thm-head { padding-left:9px; gap:1px; } .thm-head button { padding:0 4px; } .thm-panel.is-offline .thm-log { padding:10px; } .thm-composer { gap:4px; } }
html[data-appearance=dark] .thm-panel { background:#302d2bf7; color:#eee1d4; border-color:#625246; }
html[data-appearance=dark] .thm-head { background:#443c35; }
html[data-appearance=dark] .thm-bubble { background:#413b36; border-color:#62564a; }
html[data-appearance=dark] .thm-message.is-user .thm-bubble { background:#454e40; }
html[data-appearance=dark] .thm-composer textarea, html[data-appearance=dark] .thm-setting select, html[data-appearance=dark] .thm-setting input { background:#40382f; color:#eee1d4; }
html[data-appearance=dark] .thm-long-message .chat-message-segment--dialogue, html[data-appearance=dark] .thm-long-message .offline-dialogue-inline { color:#f1e5d8; }
@media(prefers-reduced-motion:reduce) { .thm-tab { transition:none; } }
/* 消息操作始终落在原来的半屏面板内，触摸滚动与长按操作分开处理。 */
.thm-message { position:relative; -webkit-touch-callout:none; }
.thm-message .thm-bubble, .thm-message .chat-message-bubble { -webkit-user-select:none; user-select:none; }
.thm-message:focus-visible { outline:1px solid #bb9984; outline-offset:3px; }
.thm-menu-shade { position:absolute; inset:0; z-index:12; background:#46352414; }
.thm-message-menu { position:absolute; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); padding:7px; gap:3px; max-height:calc(100% - 16px); overflow:auto; border-radius:15px; color:#584a40; background:#fffaf3; border:1px solid #e2d2c2; box-shadow:0 5px 22px #37271a35; }
.thm-message-menu button { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; min-height:52px; padding:5px 8px; border-radius:9px; background:transparent; font-size:12px; touch-action:manipulation; }
.thm-message-menu button:hover:not(:disabled) { background:#eaded0; }
.thm-message-menu button > span { font-size:20px; height:25px; line-height:25px; }
.thm-message-menu small { grid-column:1 / -1; padding:5px 6px 2px; color:#927c68; font-size:10px; text-align:center; }
.thm-dialog-backdrop { position:absolute; inset:0; z-index:14; display:flex; background:#f8f3ecf8; padding:8px; }
.thm-action-dialog { display:flex; flex-direction:column; width:100%; min-height:0; }
.thm-action-dialog header, .thm-action-dialog footer { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.thm-action-dialog header { min-height:30px; justify-content:space-between; }
.thm-action-dialog header button { font-size:22px; padding:0 8px; background:transparent; }
.thm-action-dialog footer { padding-top:8px; }
.thm-action-dialog footer button { flex:1; min-height:36px; border-radius:9px; background:#eaded0; }
.thm-action-dialog footer [type=submit] { background:#b98570; color:#fff; }
.thm-dialog-body { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.thm-dialog-body p { margin:5px 0 9px; font-size:11px; color:#907968; white-space:pre-wrap; }
.thm-dialog-body label { display:block; margin:6px 0; font-size:11px; }
.thm-dialog-body textarea { display:block; width:100%; min-height:80px; padding:8px; margin-top:4px; border:1px solid #dbc8b5; border-radius:9px; resize:vertical; font-size:16px; background:#fffdfa; user-select:text; -webkit-user-select:text; }
.thm-dialog-body .thm-dialog-translation { min-height:56px; }
.thm-dialog-body .thm-dialog-error { color:#a14136; }
.thm-edit-formats { min-width:0; margin:5px 0 10px; padding:0; border:0; }
.thm-edit-formats legend { padding:0; font-size:11px; color:#907968; }
.thm-edit-formats > div { display:flex; gap:8px; margin-top:7px; }
.thm-edit-formats label { position:relative; margin:0; }
.thm-edit-format { position:absolute; width:1px; height:1px; opacity:0; }
.thm-edit-formats span { display:block; min-width:64px; padding:7px 15px; border:1px solid #c5cbdf; border-radius:7px; text-align:center; font-size:13px; font-weight:600; color:#556cb0; background:#f4f6ff; }
.thm-edit-format:checked + span { color:#fff; background:#526bb4; border-color:#526bb4; }
.thm-edit-format[value=repair]:checked + span { background:#a56b10; border-color:#a56b10; }
.thm-edit-format:focus-visible + span { outline:2px solid #526bb4; outline-offset:2px; }
.thm-edit-format:disabled + span { opacity:.6; }
.thm-format-editor .thm-dialog-text { min-height:130px; line-height:1.65; border-radius:7px; }
.thm-dialog-body .thm-dialog-progress { color:#776040; }
.thm-quote-preview { display:flex; flex-shrink:0; gap:6px; align-items:center; margin:0 8px; padding:5px 8px; background:#eae2d7; border-left:3px solid #bfa58d; border-radius:6px; }
.thm-quote-preview > span { min-width:0; flex:1; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; font-size:11px; }
.thm-quote-preview button { background:transparent; font-size:19px; }
.thm-message-quote { display:block; max-width:100%; margin:0 0 7px; padding:7px 9px; border-left:3px solid #bea88f !important; border-radius:6px; text-align:left; font-size:11px !important; background:#e8e0d66b; white-space:pre-wrap; overflow-wrap:anywhere; }
.thm-message-quote > span { display:block; font-size:10px; color:#8d7661; }
.thm-selection-bar { display:flex; align-items:center; flex-wrap:wrap; gap:5px; flex-shrink:0; padding:7px 8px; border-top:1px solid #daccbb; font-size:11px; background:#f0e6d9; }
.thm-selection-bar > span { flex:1; white-space:nowrap; }
.thm-selection-bar button { min-height:32px; padding:3px 7px; background:#fff8ed; border-radius:7px; }
.thm-panel.is-selecting .thm-composer, .thm-panel.is-selecting .thm-quote-preview { display:none; }
.thm-message.is-selected { background:#ccb49a2e; outline:1px solid #bfab94; border-radius:9px; }
.thm-select-check { display:block; margin:0 0 5px; min-width:25px; height:25px; border-radius:50%; background:#e2d4c3; }
.thm-thinking-toggle { position:relative; display:block; width:100%; min-height:28px; margin:5px 0 10px; padding:0; background:transparent; color:#8d91aa !important; }
.thm-thinking-toggle svg { position:absolute; inset:0; width:100%; height:26px; fill:none; stroke:currentColor; stroke-width:1; opacity:.6; }
.thm-thinking-toggle > span { position:relative; padding:2px 10px; border:1px solid #a8aabb70; border-radius:20px; font-size:10px; letter-spacing:1px; background:#fffdfa; }
.thm-thinking-toggle[aria-expanded=true] > span { border-color:#7fb98299; color:#5a8b5e; }
.thm-thinking { margin:0 4% 14px; padding:10px 12px; border:1px dashed #8d91aa8c; border-radius:12px; font:11px/1.65 'Courier New',monospace; color:#4a4f63; background:#fdfdfa; box-shadow:0 6px 18px #505a7819; text-align:left; }
.thm-thinking header { display:flex; flex-wrap:wrap; align-items:baseline; gap:7px; padding-bottom:6px; margin-bottom:8px; border-bottom:1px dashed #8d91aa66; }
.thm-thinking header strong { font-size:12px; letter-spacing:2px; color:#5a5f78; }
.thm-thinking header > span { font-size:8px; letter-spacing:1px; color:#9aa0b8; }
.thm-thinking header small { margin-left:auto; font-size:9px; color:#9aa0b8; }
.thm-thinking-body { max-height:220px; overflow:auto; overscroll-behavior:contain; white-space:pre-wrap; overflow-wrap:anywhere; -webkit-user-select:text; user-select:text; }
.thm-thinking footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; padding-top:8px; border-top:1px dashed #8d91aa66; }
.thm-thinking-barcode { display:block; flex:0 1 46%; height:16px; opacity:.5; background:repeating-linear-gradient(90deg,#4a4f63 0 1px,transparent 1px 3px,#4a4f63 3px 5px,transparent 5px 6px,#4a4f63 6px 7px,transparent 7px 10px); }
.thm-thinking footer > span:last-child { padding:2px 5px; border:1px solid #7fb98299; border-radius:4px; color:#689c6b; font-size:9px; letter-spacing:1px; transform:rotate(-3deg); }
body.tiny-home-messages-overlay #offline-float-btn { visibility:hidden; pointer-events:none; }
html[data-appearance=dark] .thm-message-menu, html[data-appearance=dark] .thm-dialog-backdrop { background:#37302b; color:#eee1d4; }
html[data-appearance=dark] .thm-dialog-body textarea { background:#453b32; color:#eee1d4; }
html[data-appearance=dark] .thm-thinking, html[data-appearance=dark] .thm-thinking-toggle > span { background:#35363f; color:#e3e4ee; }
html[data-appearance=dark] .thm-thinking header strong { color:#d7d9eb; }

/* 纸面缩至线下消息面板面积的一半以内；长诗仅在中栏纵向滚动。 */
#tiny-home-heartbeat.thm-heartbeat-backdrop { position:absolute; inset:0; z-index:10020; display:flex; align-items:center; justify-content:center; background:#212b348c; pointer-events:auto; }
/* 素材上下留有透明画布；160% 居中显示完整纸边，不能以 cover/190% 裁切。 */
#tiny-home-heartbeat .thm-heartbeat-bookmark { position:relative; display:grid; grid-template-rows:32px minmax(0,1fr); gap:4px; flex:none; width:min(560px,calc(100% - 24px)); height:min(240px,24%); min-width:0; min-height:0; padding:clamp(22px,4dvh,46px) clamp(38px,10%,56px) 16px; color:#344859; background:url('assets/tiny-home-heartbeat-bookmark-horizontal.png') center / 100% 160% no-repeat; filter:drop-shadow(0 7px 13px #17263355); }
#tiny-home-heartbeat .thm-heartbeat-header { display:grid; grid-template-columns:28px minmax(0,1fr) 28px; align-items:center; gap:5px; min-width:0; padding-bottom:4px; border-bottom:1px solid #778fa568; }
#tiny-home-heartbeat .thm-heartbeat-kicker { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; text-align:center; font:600 12px/1.25 'Songti SC','Noto Serif SC',serif; color:#4c6679; }
#tiny-home-heartbeat .thm-heartbeat-refresh, #tiny-home-heartbeat .thm-heartbeat-close { width:27px; height:27px; padding:0; border:1px solid #8499a9aa; border-radius:50%; color:#385365; background:#f7f3e9d9; font-size:15px; line-height:25px; text-align:center; cursor:pointer; touch-action:manipulation; }
#tiny-home-heartbeat .thm-heartbeat-close { font-size:19px; }
#tiny-home-heartbeat .thm-heartbeat-refresh:disabled { opacity:.5; cursor:wait; }
#tiny-home-heartbeat .thm-heartbeat-refresh:focus-visible, #tiny-home-heartbeat .thm-heartbeat-close:focus-visible { outline:2px solid #466e87; outline-offset:2px; }
#tiny-home-heartbeat .thm-heartbeat-main { display:grid; grid-template-columns:43px minmax(0,1fr) 58px; gap:6px; min-width:0; min-height:0; }
#tiny-home-heartbeat .thm-heartbeat-affection { display:flex; align-items:center; justify-content:center; gap:3px; min-width:0; min-height:0; overflow:hidden; padding-right:4px; border-right:1px solid #778fa568; writing-mode:vertical-rl; text-orientation:upright; font:10px/1.15 'Songti SC','Noto Serif SC',serif; }
#tiny-home-heartbeat .thm-heartbeat-label { color:#587286; }
#tiny-home-heartbeat .thm-heartbeat-affection strong { display:inline-flex; align-items:center; gap:2px; color:#395b72; }
#tiny-home-heartbeat [data-affection] { font:600 19px/1.05 'Songti SC','Noto Serif SC',serif; }
#tiny-home-heartbeat .thm-heartbeat-outof { font-size:9px; font-weight:400; color:#6d8393; text-combine-upright:all; }
#tiny-home-heartbeat .thm-heartbeat-poem { min-width:0; min-height:0; overflow-x:hidden; overflow-y:auto; padding:5px 2px; writing-mode:horizontal-tb; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; text-align:left; font:13px/1.6 'LoveMiOfflineNarration','Songti SC','Noto Serif SC',serif; color:#35495a; scrollbar-width:thin; scrollbar-color:#8299a488 transparent; overscroll-behavior:contain; user-select:text; }
#tiny-home-heartbeat .thm-heartbeat-poem.is-empty { display:flex; align-items:center; justify-content:center; text-align:center; font-size:12px; }
#tiny-home-heartbeat .thm-heartbeat-footer { display:grid; grid-template-columns:1fr 1fr; gap:2px; min-width:0; min-height:0; padding-left:4px; border-left:1px solid #778fa568; font:10px/1.1 'Songti SC','Noto Serif SC',serif; }
#tiny-home-heartbeat .thm-heartbeat-footer > div { display:flex; align-items:center; justify-content:center; gap:3px; min-width:0; min-height:0; overflow:auto; writing-mode:vertical-rl; text-orientation:upright; scrollbar-width:none; }
#tiny-home-heartbeat .thm-heartbeat-footer > div::-webkit-scrollbar { display:none; }
#tiny-home-heartbeat .thm-heartbeat-footer strong { font-size:14px; color:#395b72; overflow-wrap:anywhere; }
#tiny-home-heartbeat .thm-heartbeat-status:not([hidden]) { position:absolute; left:25%; right:22%; bottom:13px; z-index:2; max-height:50%; overflow:auto; padding:4px 6px; border:1px solid #b4a39b; border-radius:4px; background:#f9f2e4f5; font:11px/1.4 'Songti SC','Noto Serif SC',serif; text-align:center; }
body.tiny-home-heartbeat-open #offline-float-btn { visibility:hidden; pointer-events:none; }
@media(max-width:350px), (max-height:650px) {
    #tiny-home-heartbeat .thm-heartbeat-bookmark { grid-template-rows:24px minmax(0,1fr); gap:1px; padding:clamp(20px,4dvh,46px) 38px 12px; }
    #tiny-home-heartbeat .thm-heartbeat-main { grid-template-columns:36px minmax(0,1fr) 48px; gap:4px; }
    #tiny-home-heartbeat .thm-heartbeat-poem { padding:2px 1px; font-size:11.5px; line-height:1.35; }
    #tiny-home-heartbeat [data-affection] { font-size:17px; }
    #tiny-home-heartbeat .thm-heartbeat-footer strong { font-size:12px; }
}
@media (orientation:landscape) and (max-height:600px) {
    #tiny-home-heartbeat .thm-heartbeat-bookmark { width:min(400px,54%); height:min(180px,45%); }
}
