.case-reply,#bundle-dialog button,#bundle-return {font:inherit}
.case-reply {flex:none;min-height:2.75rem;padding:.4rem .8rem;background:var(--paper);color:var(--ink);border:1px solid var(--field-line);border-radius:var(--control-radius);font-size:.85rem;font-weight:600}
.case-reply:not([hidden]) {display:inline-flex;align-items:center;gap:.55rem;color:var(--blue-deep);border-color:var(--blue-deep)}
.case-reply .ui-icon {width:1rem;height:1rem}
.case-reply:hover {background:var(--accent-soft)}
#bundle-dialog [hidden],#bundle-return[hidden] {display:none !important}
html:has(#bundle-dialog[open]) {overflow:hidden}
#bundle-dialog {width:min(46rem,calc(100% - 2rem));max-width:none;max-height:calc(100% - 2rem);max-height:calc(100dvh - 2rem);margin:auto;padding:0;border:1px solid var(--line);border-radius:var(--panel-radius);background:var(--paper);color:var(--ink);box-shadow:0 1.8rem 5rem #09271d4d;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
#bundle-dialog::backdrop {background:#10284c90;backdrop-filter:blur(4px)}
.bundle-frame {--dialog-gutter:clamp(1.1rem,3.8vw,2rem)}
.bundle-header {position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:var(--paper);border-bottom:1px solid var(--line);padding:1.05rem var(--dialog-gutter)}
.bundle-header h2 {font:650 clamp(1.75rem,4.1vw,2.55rem)/1.13 var(--display);letter-spacing:-.032em;margin:0}
#bundle-dialog .bundle-close {flex:none;display:grid;place-items:center;width:2.75rem;height:2.75rem;background:transparent;color:var(--blue-deep);border:1px solid var(--line);border-radius:50%;font-size:1.55rem;line-height:1}
#bundle-dialog .bundle-close:hover {background:var(--accent-soft)}
.bundle-body {padding:1.15rem var(--dialog-gutter) 1.45rem}
.bundle-letter {background:var(--wash);padding:clamp(.85rem,2vw,1.2rem);border-radius:.55rem;border-inline-start:3px solid var(--blue)}
.bundle-letter-top {display:flex;align-items:center;justify-content:space-between;gap:.5rem .85rem;flex-wrap:wrap}
.bundle-letter h3 {display:flex;align-items:center;gap:.45rem;color:var(--blue-deep);font-size:.89rem;font-weight:650;margin:0}
.bundle-select {display:flex;gap:.65rem;align-items:center;font-size:.9rem;color:var(--muted);font-weight:550}
.bundle-select select {border:1px solid var(--field-line);border-radius:var(--control-radius);background:var(--paper);color:var(--ink);padding:.3rem .5rem;min-height:2.75rem;font:600 .95rem/1.5 var(--mono)}
.bundle-letter blockquote {margin:.45rem 0 0;max-width:37rem;color:var(--ink);font-size:clamp(1rem,2.1vw,1.18rem);line-height:1.45;font-weight:500;white-space:pre-line}
.bundle-docs-title {font-size:1.03rem;letter-spacing:-.015em;margin:1.05rem 0 .5rem}
.bundle-records {display:grid;grid-template-columns:1fr 1fr;gap:.7rem}
.bundle-record {min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:.48rem;padding:.85rem .9rem}
.bundle-record-head {display:flex;flex-direction:column;align-items:flex-start;gap:.35rem}
.bundle-record h4 {font-size:1.01rem;line-height:1.3;margin:0;font-weight:650}
.bundle-record [data-bundle-status] {padding:.16rem .42rem;border-radius:.25rem;background:#eef1ea;color:#344b3a;font-size:.79rem;line-height:1.4;font-weight:600}
.bundle-record[data-state=ready] [data-bundle-status] {background:var(--lime);color:var(--pine)}
.bundle-record[data-state=review] [data-bundle-status] {background:#fbefd6;color:#684819}
.bundle-record[data-state=missing] [data-bundle-status] {background:#f0e8e2;color:#654435}
.bundle-record p {margin:.5rem 0 .65rem;line-height:1.45;font-size:.91rem;color:#43554a}
.bundle-file-line {display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:.08rem .45rem;margin-top:auto;border-top:1px solid var(--line);padding-top:.4rem}
.bundle-file-line [data-bundle-file] {font-size:.8rem;color:#4b5e50;overflow-wrap:anywhere}
#bundle-dialog [data-bundle-source] {min-height:2.45rem;background:none;border:0;color:var(--blue-deep);padding:.2rem 0;font-size:.84rem;font-weight:600;text-decoration:underline;text-underline-offset:.2rem}
#bundle-dialog .bundle-primary,#bundle-return {display:inline-flex;min-height:2.75rem;align-items:center;justify-content:center;color:var(--paper);background:var(--blue);border:0;border-radius:.4rem;padding:.57rem 1rem;font-weight:600;font-size:.91rem}
#bundle-dialog .bundle-primary:hover,#bundle-return:hover {background:var(--blue-deep)}
#bundle-dialog button:disabled {opacity:.55;cursor:default}
.bundle-evidence {margin-top:1rem;border-block:1px solid var(--line)}
.bundle-evidence > summary {display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:2.9rem;cursor:pointer;list-style:none;color:var(--blue-deep);font-size:.94rem;font-weight:600}
.bundle-evidence > summary::-webkit-details-marker {display:none}
.bundle-evidence > summary::after {content:"";width:.5rem;height:.5rem;margin-inline-end:.2rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);transition:transform .18s ease-out}
.bundle-evidence[open] > summary::after {transform:rotate(225deg)}
.bundle-evidence[open] {padding-bottom:1rem}
#bundle-compose {margin-top:1rem}
#bundle-editor {margin-top:1rem}
#bundle-editor label {display:block;font-weight:650;margin-bottom:.4rem}
#bundle-draft {display:block;width:100%;height:clamp(11.25rem,28dvh,16rem);min-height:8.6rem;padding:.75rem .85rem;background:#fff;border:1px solid var(--field-line);border-radius:.4rem;color:var(--ink);font:400 1rem/1.5 var(--sans);resize:vertical}
@supports (field-sizing: content) {
  #bundle-draft {field-sizing:content;height:auto;max-height:min(26rem,50dvh)}
}
.bundle-copy-line {display:flex;gap:.4rem .8rem;align-items:center;flex-wrap:wrap;margin-top:.55rem}
#bundle-copy {gap:.5rem}
#bundle-copy .ui-icon {width:1rem;height:1rem}
.bundle-copy-line small,#bundle-feedback {color:#43594a;font-size:.84rem}
#bundle-feedback {margin:.55rem 0 0}
#bundle-feedback:empty {display:none}
#bundle-editor details {margin-top:.7rem;font-size:.89rem}
#bundle-editor summary {cursor:pointer;font-weight:550}
#bundle-editor details p {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit}
#bundle-return {position:fixed;z-index:8;bottom:max(1rem,env(safe-area-inset-bottom));right:max(1rem,env(safe-area-inset-right));border:1px solid #dce9cd;border-radius:2rem;box-shadow:0 3px 18px #18392c40}
@media(max-width:34rem) {
  #bundle-dialog {width:calc(100% - .75rem);max-height:calc(100% - .75rem);max-height:calc(100dvh - .75rem);border-radius:.72rem}
  .bundle-frame {--dialog-gutter:.85rem}
  .bundle-header {padding-block:.75rem}
  .bundle-header h2 {font-size:clamp(1.25rem,5.5vw,1.7rem)}
  .bundle-body {padding-block:.75rem 1rem}
  .bundle-records {grid-template-columns:1fr;gap:.42rem}
  .bundle-record {padding:.58rem .7rem}
  .bundle-record-head {flex-direction:row;align-items:baseline;flex-wrap:wrap;justify-content:space-between;gap:.15rem .55rem}
  .bundle-record p {margin:.25rem 0 .3rem}
  .bundle-file-line {padding-top:.06rem}
  #bundle-dialog [data-bundle-source] {min-height:2.5rem}
  .bundle-select select {font-size:1rem}
  .case-reply {min-height:2.75rem;padding:.35rem .64rem}
}
