body #phone #chat-thread-detail-panel [data-official-switch-field] { display:block; padding:0; border:0; }
body #phone #chat-thread-detail-panel [data-official-switch-field] > .list { margin-top:0; margin-bottom:0; }

body #phone #chat-thread-detail-panel.xy-official { position:absolute; inset:0; background:var(--ios-group); }
body #phone #chat-thread-detail-panel > .navbar { position:relative; flex-shrink:0; }
body #phone #chat-thread-detail-panel .navbar button.link { width:auto; }

body #phone #chat-thread-detail-panel .item-input-wrap :is(input,textarea,select) { border-radius:0!important; background:transparent!important; border:0!important; padding:0!important; font:inherit!important; width:100%; color:var(--f7-input-text-color)!important; }

body #phone #chat-thread-detail-panel [data-official-accordion-group] { margin:0; padding:0; border:0; background:none; box-shadow:none; }

body #phone #chat-thread-detail-panel fieldset[data-official-memory] { border:0; padding:0; margin:0; min-width:0; }

body #phone #wardrobe-screen .xy-official .item-input-wrap :is(input,textarea,select) { border-radius:0!important; background:transparent!important; padding:0!important; font:inherit!important; color:var(--f7-input-text-color)!important; width:100%; }
body #phone .xy-weui button.weui-cell { width:100%; border:0; border-radius:0; background:transparent; text-align:left; cursor:pointer; font-family:inherit; }
body #phone .xy-weui .weui-cell__hd i { display:block; margin-right:16px; font-size:24px; }
/* Keep the official sheet inside the simulated device rather than the viewport.
 * Auto height follows the Framework7 custom-height sheet example. */
body #phone .xy-sheet-host.xy-official { position:fixed; inset:0; }
body #phone .xy-sheet-host .sheet-modal { height:auto; max-height:calc(100% - 44px); }
body #phone .xy-sheet-host .sheet-modal-inner { height:auto; max-height:calc(100dvh - 100px); }
body #phone .xy-sheet-host .page-content { max-height:calc(100dvh - 100px); padding-bottom:var(--f7-toolbar-height); overscroll-behavior:contain; }
body #phone :is(#chat-memo-prompt-modal,#chat-memo-range-modal) .page-content { padding-bottom:var(--f7-toolbar-height); }
body #phone .xy-sheet-host .toolbar .link { width:auto; flex:0 0 auto; border:0; border-radius:0; background:none; font:inherit; color:var(--f7-theme-color); cursor:pointer; padding:0 8px; }
body #phone .xy-sheet-host .toolbar-inner > div { flex:1 1 auto; min-width:0; }
body #phone .xy-sheet-host .toolbar-inner :is(h2,h3) { margin:0; font:inherit; white-space:nowrap; }
body #phone [data-official-field] > .xy-official > .list { margin-top:0; margin-bottom:0; }
body #phone [data-official-proxy="toggle"] { display:none!important; }
body #phone .xy-official-toggle-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
body #phone .xy-official-toggle-row .toggle { flex:0 0 auto; }
/* Suppress the retired memory journal decoration; timeline dimensions and
 * surfaces are supplied by the unmodified Framework7 component stylesheet. */
body #phone #chat-memo-timeline.timeline { list-style:none; padding-left:0; }
body #phone #chat-memo-timeline .timeline-item { padding:0; background:none; border:0; box-shadow:none; }
body #phone #chat-memo-timeline .timeline-item::before,
body #phone #chat-memo-timeline .timeline-item::after,
body #phone #chat-memo-timeline .chat-memo-tl-sum::before { content:none; }
body #phone #chat-memo-timeline .chat-memo-tl-head { padding:0; border:0; background:none; }
body #phone #chat-memo-timeline .chat-memo-tl-sum { font:inherit; color:inherit; padding:0; }
body #phone #chat-memo-timeline .chat-memo-tl-body { width:100%; box-sizing:border-box; }

/* Remove the old global input skin inside the retained persona screen. */
body #phone #char-screen .xy-official .item-input-wrap :is(input,textarea,select) { border-radius:0!important; background:transparent!important; border:0!important; box-shadow:none!important; padding:0!important; font:inherit!important; color:var(--f7-input-text-color)!important; }

/* Original field controllers stay; official Lists own switch-row presentation. */


/* Layout compatibility only. Component visuals come from Framework7's MIT CSS. */
body #phone .ios-settings-hub { display:block; overflow:visible; background:none; border-radius:0; }
body #phone .xy-official { height:auto; background:transparent; position:static; }
body #phone .xy-official[hidden] { display:none!important; }
body #phone .xy-official [hidden] { display:none!important; }
body #phone .xy-official button.item-content { width:100%; border:0; border-radius:0; background:none; text-align:left; cursor:pointer; }
body #phone .xy-official button.list-button { border:0; background:none; font-family:inherit; cursor:pointer; }
body #phone .xy-official .backup-zip-check-row { display:block; padding:0; border:0; }
body #phone .xy-official .backup-zip-size { display:block; text-align:left; max-width:none; font-size:var(--f7-list-item-footer-font-size); color:var(--f7-list-item-footer-text-color); }
body #phone .xy-official .backup-zip-check-row .item-inner { display:block; }
body #phone #world-book-screen .world-book-body { background-image:none; }
body #phone .xy-official .navbar button.link { flex:0 0 auto; border:0; background:none; color:var(--f7-navbar-link-color,var(--f7-theme-color)); font:inherit; cursor:pointer; box-shadow:none; }
body #phone .xy-official .navbar h3.title { margin:0; }
body #phone .xy-official button.treeview-toggle { border:0; padding:0; background:none; flex-shrink:0; }
body #phone #relation-interact-pane .relation-interact-actions { padding-bottom:var(--f7-toolbar-height); }
body #phone #relation-screen .relation-frame { padding-top:54px; box-sizing:border-box; }
body #phone #relation-screen .navbar .title { margin:0; }
/* Relation sheets are siblings of navbars (z=500); lift the entire overlay. */
body #phone #relation-screen .xy-sheet-host { z-index:1000; }
body #phone #relation-screen .xy-sheet-host .toolbar { background:var(--ios-surface); }
body #phone #relation-screen .xy-sheet-host .toolbar .link { min-height:44px; }
body #phone #relation-screen .xy-sheet-host .toolbar-inner > h3 { flex:1; text-align:left; }
body #phone #relation-screen #relation-link-set-stages.list { display:block; padding:0; }
body #phone #relation-screen .relation-char-picker-item.item-content { width:100%; text-align:left; border:0; border-radius:0; background:none; font:inherit; }
body #phone .xy-official .item-media i { font-size:24px; }
body #phone .xy-official .item-label label { margin:0; font:inherit; color:inherit; }
body #phone .xy-official .item-input-wrap :is(input,textarea,select) { border-radius:0!important; background:transparent!important; border:0!important; box-shadow:none!important; padding:0!important; font-size:var(--f7-input-font-size); color:var(--f7-input-text-color); }

/* Inbox integration: vendor Navbar/Searchbar/Segmented and WeUI cells own visuals.
 * Reset only retained legacy selectors required by delegated event handlers. */
body #phone #chat-list-screen .xy-inbox-navbar { flex:0 0 auto; }
body #phone #chat-list-screen .xy-inbox-navbar .navbar { position:relative; }
body #phone #chat-list-screen .navbar .title { margin:0; }
body #phone #chat-list-screen .navbar #chat-list-close { width:auto; min-width:60px; padding:0 8px; white-space:nowrap; }
body #phone #chat-list-screen .navbar .chat-thread-add-actions { display:flex; margin:0; padding:0; gap:0; }
body #phone #chat-list-screen .navbar .chat-thread-add-actions button { margin:0; padding:0 8px; transform:none; box-shadow:none; }
body #phone #chat-list-screen .chat-list-scroll { padding:0!important; }
body #phone #chat-list-screen .ios-inbox-head { padding:0; margin:0; }
body #phone #chat-list-screen .ios-inbox-search { display:block; padding:0; background:none; border-radius:0; }
body #phone #chat-list-screen .searchbar input { box-sizing:border-box; margin:0; border:0!important; border-radius:var(--f7-searchbar-input-border-radius)!important; background:var(--f7-searchbar-input-bg-color)!important; padding:0 28px!important; font:inherit; box-shadow:none!important; }
body #phone #chat-list-screen .input-clear-button { border:0; padding:0; background:none; }
body #phone #chat-list-screen .input-clear-button[hidden] { display:none!important; }
body #phone #chat-list-screen .xy-inbox-filter { padding:8px 16px; }
body #phone #chat-list-screen .chat-list-sec-head[hidden] { display:none!important; }
body #phone #chat-list-screen .chat-thread-list { margin:0; padding:0; list-style:none; }
body #phone #chat-list-screen .chat-thread-li { position:relative; margin:0; padding:0; transform:none!important; border:0; border-radius:0; box-shadow:none; background:var(--ios-surface); }
body #phone #chat-list-screen .chat-thread-li[hidden] { display:none!important; }
body #phone #chat-list-screen .chat-thread-li.is-pinned { background:var(--ios-group); }
body #phone #chat-list-screen .chat-thread-li::before,
body #phone #chat-list-screen .chat-thread-li::after,
body #phone #chat-list-screen .chat-thread-card::before,
body #phone #chat-list-screen .chat-thread-card::after { content:none!important; }
body #phone #chat-list-screen .chat-thread-card.weui-cell { display:flex; width:100%; min-height:76px; padding:12px 48px 12px 16px!important; box-sizing:border-box; border:0; border-radius:0; border-bottom:1px solid var(--ios-line); text-align:left; background:transparent; box-shadow:none; transform:none!important; gap:0; }
body #phone #chat-list-screen .xy-thread-avatar { display:grid; place-items:center; flex:0 0 48px; width:48px; height:48px; margin:0 12px 0 0; border-radius:5px; background:var(--ios-group); color:var(--ios-ink); font-size:22px; overflow:hidden; }
body #phone #chat-list-screen .xy-thread-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
body #phone #chat-list-screen .xy-thread-copy { display:block; min-width:0; }
body #phone #chat-list-screen .chat-thread-card-name { display:block; font:500 17px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ios-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body #phone #chat-list-screen .chat-thread-card-snippet { display:block; margin:4px 0 0; font:400 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ios-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body #phone #chat-list-screen .chat-thread-card-meta { align-self:flex-start; flex:none; margin-left:8px; color:var(--ios-secondary); font-size:11px; }
body #phone #chat-list-screen .chat-thread-bead-wrap { position:absolute; inset:26px 2px auto auto; transform:none; }
body #phone #chat-list-screen .chat-thread-bead { display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:0; background:transparent; box-shadow:none; transform:none; color:var(--ios-secondary); }
body #phone #chat-list-screen .chat-thread-bead i { font-size:22px; }
body #phone #chat-more-drawer .toolbar-inner > h2 { flex:1; text-align:left; }
body #phone #chat-inner-voice-body > .card { min-height:0; padding:0; border:0; background:var(--f7-card-bg-color); box-shadow:var(--f7-card-box-shadow); }
/* Hidden legacy viewers must not override the HTML hidden contract. */
body #phone #chat-forum-share-modal[hidden] { display:none!important; }
body #phone #user-lock-char-sheet { --f7-button-height:44px; }
body #phone #user-lock-char-drawer .toolbar-inner > h2 { flex:1; text-align:left; margin:0; font:inherit; }
body #phone #user-lock-char-drawer > .toolbar { background:var(--ios-surface); }
body #phone #user-lock-char-drawer .user-lock-char-q-block { padding:0; margin:0; border:0; border-radius:0; background:none; box-shadow:none; }
body #phone #user-lock-char-questions { max-height:none; height:auto; overflow:visible; padding:0; }
body #phone #user-lock-char-drawer .user-lock-char-pin-row { display:block; margin:0; }
body #phone #user-lock-char-drawer .user-lock-char-actions,
body #phone #user-lock-char-drawer .chat-offline-prose-actions { display:block; padding:0; margin:16px; }
body #phone #user-lock-char-drawer .item-input-wrap :is(input,textarea) { width:100%; max-width:100%; box-sizing:border-box; font:inherit!important; color:var(--f7-input-text-color)!important; background:none!important; border:0!important; border-radius:0!important; box-shadow:none!important; padding:0!important; }
body #phone #chat-memo-screen.xy-official { position:absolute; inset:0; background:var(--ios-group); }
body #phone #chat-memo-screen > .navbar { position:relative; flex:none; }
body #phone .xy-sheet-host .toolbar-inner > h2 { flex:1; text-align:left; }
body #phone .xy-sheet-host .xy-sheet-heading h2 { margin:0; font:inherit; color:inherit; }
body #phone .xy-sheet-host .xy-sheet-heading .auth-kicker { display:none; }
body #phone .xy-sheet-host .button { box-shadow:none; transform:none; letter-spacing:normal; font-family:inherit; font-style:normal; }
body #phone .xy-sheet-host .item-input-wrap :is(input,textarea,select) { font:inherit!important; width:100%; box-sizing:border-box; background:transparent!important; color:var(--f7-input-text-color)!important; border:0!important; border-radius:0!important; box-shadow:none!important; padding:0!important; }
body #phone .xy-sheet-host :is(.redpack-actions,.chat-offline-prose-actions) { padding:16px; margin:0; display:flex; flex-wrap:wrap; gap:12px; }
body #phone .xy-sheet-host :is(.redpack-actions,.chat-offline-prose-actions) > .button { flex:1 1 120px; }
body #phone .xy-sheet-host .chat-offline-more-menu-list { display:block; margin:0; padding:0; background:none; border:0; }
body #phone #chat-photo-viewer.xy-official { position:absolute; inset:0; }
body #phone #chat-photo-viewer .popup { position:absolute; inset:0; width:100%; height:100%; margin:0; border:0; border-radius:0; }
body #phone #chat-photo-viewer .navbar .link { width:auto; border:0; background:none; color:var(--f7-theme-color); font:inherit; }
body #phone #chat-photo-viewer .chat-photo-viewer-actions { display:flex; flex-wrap:wrap; gap:12px; padding:16px; }
body #phone #chat-photo-viewer .chat-photo-viewer-img-wrap { background:transparent; border:0; border-radius:0; box-shadow:none; }
body #phone #chat-offline-screen .chat-offline-inner { padding-top:var(--ios-status-h,54px); }
body #phone #chat-offline-screen .xy-official > .navbar { position:relative; }
body #phone #chat-offline-screen .navbar .link { width:auto; border:0; background:none; color:var(--f7-theme-color); font:inherit; }
