/* Shared web / App record-chain geometry. The ghost stays above drop controls. */
body .thread-drag-ghost,body .native-record-ghost{z-index:600;pointer-events:none;overflow:visible;display:block;box-sizing:border-box}
.thread-drag-ghost strong{display:block;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-chain-count{display:block;margin-top:5px;font-size:11px;color:var(--muted,#81786c)}
.thread-drag-ghost:has(.record-chain-count):before,.thread-drag-ghost:has(.record-chain-count):after{content:'';position:absolute;inset:3px -4px -4px 3px;border:1px solid #b8b19f;background:#f7f4ec;border-radius:4px;z-index:-1;transform:rotate(2deg)}.thread-drag-ghost:has(.record-chain-count):before{transform:rotate(-3deg);inset:5px -6px -6px 5px}
.record-chain-children{margin:4px 0 4px 14px;padding-left:10px;border-left:1px solid var(--line,#d6d1c5)}.record-chain-node{min-width:0;position:relative}.record-chain-node>.record-followup-reference:before{content:'';position:absolute;left:-10px;top:25px;width:8px;border-top:1px solid var(--line,#d6d1c5)}
.record-chain-flat,.record-chain-flat .record-chain-children{margin-left:0;padding-left:0;border-left:0}.record-chain-flat .record-followup-reference:before{display:none}.record-chain-fold{margin:8px 0 6px 10px}.record-chain-fold>summary{cursor:pointer;min-height:36px;padding:7px 0;color:var(--accent,#8d583f);font:12px/1.7 var(--serif,serif)}.record-chain-level{display:block;color:var(--muted,#81786c);font-size:10px;margin-top:9px}
.record-chain-preview{padding:12px 14px;background:#f3f0e7;border:1px solid #d6d1c5;color:var(--ink,#292a24);font:13px/1.6 var(--serif,serif)}.record-chain-preview>small{color:var(--muted,#81786c);display:block}.record-chain-preview ol{list-style:none;margin:7px 0;padding-left:14px;border-left:1px solid #cec6b8}.record-chain-preview li{margin:4px 0;overflow-wrap:anywhere}.record-chain-preview li>small{display:block;font-size:10px;color:var(--muted,#81786c)}.record-chain-hover-preview{position:fixed;width:min(330px,calc(100vw - 16px));z-index:550;pointer-events:none;box-shadow:0 5px 18px #302c2219}.record-chain-hover-preview>p{margin:0;padding:12px;background:#f7f4ec;border:1px solid #c7b79e;font:13px/1.7 var(--serif,serif)}
@media(max-width:700px){.record-chain-children{margin-left:10px;padding-left:8px}.record-chain-flat,.record-chain-flat .record-chain-children{margin-left:0;padding-left:0}.record-chain-preview{font-size:12px}}
.thread-drag-source+.record-attached-notes,.record-chain-node:has(>.thread-drag-source)>.record-chain-children,.record-chain-node:has(>.thread-drag-source)>.record-chain-fold{opacity:.35}
.record-chain-more{display:block;min-height:40px;padding:9px 0;border:0;background:transparent;color:var(--accent,#8d583f);font:12px/1.7 var(--serif,serif)}
/* The whole linked-record content opens details; menu and drag grip stay separate. */
.record-followup-reference>.record-followup-reading{align-self:stretch;display:flex;align-items:center;flex:1;min-width:0;width:100%;min-height:44px;box-sizing:border-box;text-align:left;cursor:pointer}
.record-followup-reference .record-followup-reading>.record-followup-content{display:block;flex:1;min-width:0;overflow-wrap:anywhere}
.record-followup-reference .record-followup-reading>.record-followup-cards{flex:0 0 auto;min-width:0}
/* Older second-last-span rules must not stretch the thumbnail after arrow removal. */
body .record-followup-reference>.record-followup-reading>:first-child:not(.record-followup-content){flex:0 0 auto!important}
body .record-followup-reference>.record-followup-reading>.record-followup-cards{width:auto!important;max-width:64px}
