.partner-lines{border:1px solid var(--line,#ddd5ce);background:var(--paper,#fff);color:var(--ink,#25211e);border-radius:10px;padding:10px;margin:10px 0;font-size:11px;line-height:1.4;min-width:0;grid-column:1 / -1;box-sizing:border-box}
.pl-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pl-head h2{font-size:15px;line-height:1.25;margin:0}.pl-head p{font-size:10px;color:var(--muted,#786d64);margin:3px 0}.partner-lines button,.partner-lines select{font:inherit;min-height:27px;padding:4px 7px;border:1px solid var(--line,#ddd5ce);border-radius:6px;background:var(--paper,#fff);color:inherit;cursor:pointer;min-width:0;max-width:100%}.pl-choose{max-width:320px;flex:1;min-width:190px}.pl-choose select{width:100%}.pl-status{color:var(--muted,#786d64);margin:7px 0;font-size:10px}.pl-status:empty{display:none}.pl-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0}.pl-grid article{min-width:0;border:1px solid var(--line,#ddd5ce);border-radius:7px;padding:8px;background:var(--surface,#faf8f5)}.pl-grid strong{display:block;font-size:12px}.pl-grid b{display:block;font-size:16px;margin:4px 0}.pl-grid small,.pl-grid span{display:block;font-size:10px;line-height:1.4;color:var(--muted,#786d64)}.pl-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.pl-tabs button[aria-selected=true]{background:#b94b21;color:#fff;border-color:#b94b21}.pl-table-wrap{max-width:100%;overflow:auto}.partner-lines table{border-collapse:collapse;width:100%;font:inherit}.partner-lines th,.partner-lines td{padding:5px 6px;border-bottom:1px solid var(--line,#ddd5ce);text-align:left;vertical-align:top;font-size:10px;line-height:1.35}.partner-lines th{color:var(--muted,#786d64);font-weight:600}.partner-lines td small{display:block;font-size:9px;color:var(--muted,#786d64)}.partner-lines summary{cursor:pointer;font-size:11px}.partner-lines details{margin:7px 0}.pl-note{font-size:10px;color:var(--muted,#786d64);margin:6px 0;line-height:1.5}.pl-chain{margin:4px 0;padding-left:15px}.pl-chain li{margin:5px 0;font-size:11px}.pl-chain li>b{font-size:11px}.pl-chain li>small{font-size:9px;margin-left:5px;color:var(--muted,#786d64)}.pl-warn{color:#a44d18!important}.pl-pagination{display:flex;gap:6px;justify-content:flex-end;align-items:center;margin-top:7px;font-size:10px}.partner-lines [hidden]{display:none!important}
@media(max-width:760px){html body #app-main .partner-lines{padding:8px;margin:8px 0}html body #app-main .partner-lines h2{font-size:14px!important}.pl-grid{gap:4px}.pl-grid article{padding:6px}.pl-grid b{font-size:13px;overflow-wrap:anywhere}.pl-grid strong{font-size:11px}.pl-grid :is(small,span){font-size:9px}html body #app-main .partner-lines :is(button,select){min-height:28px!important;height:auto!important;font-size:11px!important;padding:4px 6px!important}.partner-lines .pl-choose select:focus{font-size:16px!important}.pl-table-wrap{overflow:visible}.partner-lines table.pl-records thead{display:none}.partner-lines table.pl-records tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line,#ddd5ce);border-radius:7px;padding:5px;margin:5px 0}.partner-lines table.pl-records td{display:block;min-width:0;font-size:11px;padding:3px 5px;border:0;overflow-wrap:anywhere}.partner-lines table.pl-records td:before{display:block;content:attr(data-label);font-size:9px;color:var(--muted,#786d64);margin-bottom:2px}.pl-refs td{overflow-wrap:anywhere;padding:4px;font-size:10px}.pl-refs th{padding:4px;font-size:9px}}

.pl-chain{list-style:none;padding-left:10px}.pl-chain details{border-left:2px solid var(--line,#ded6d0);padding-left:6px}.pl-chain summary{display:flex;gap:5px;flex-wrap:wrap;align-items:center;list-style:none}.pl-line-badge{display:inline-block;font-size:9px!important;white-space:nowrap;background:#fff0e7;color:#a54118;padding:2px 4px;border-radius:4px}.pl-expand{font-size:13px;width:14px;text-align:center}.pl-chain details[open]>summary>.pl-expand{font-size:0}.pl-chain details[open]>summary>.pl-expand:after{content:'−';font-size:13px}.pl-editor{font-size:11px;max-width:100%}.pl-editor label{display:grid;gap:4px;margin:7px 0;font-size:11px}.pl-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 9px}.pl-editor input,.pl-editor select,.pl-editor textarea{box-sizing:border-box;min-width:0;width:100%;padding:5px 6px;border:1px solid var(--line,#d9d2cb);border-radius:5px;background:var(--paper,#fff);color:inherit;font:inherit;min-height:28px}.pl-editor textarea{min-height:52px}.pl-editor-status{font-size:11px;color:#a84018}.pl-history-item{border-top:1px solid var(--line,#ddd);padding:6px 0;font-size:10px}.pl-history-item p{margin:3px 0}[data-pl-card-partner] p{font-size:10px;line-height:1.4;margin:5px 0}.partner-lines td button{display:block;margin-top:5px;font-size:10px!important;min-height:24px!important;padding:3px 5px!important}@media(max-width:760px){.pl-editor :is(input,select,textarea){font-size:13px;min-height:30px}.pl-editor :is(input,select,textarea):focus{font-size:16px}.pl-date-grid{gap:4px 6px}.pl-editor .modal-actions{gap:5px;flex-wrap:wrap}.pl-editor label{font-size:11px!important}}

/* Compact registry heading; no empty name reserve. */
html body #app-main .partner-lines{padding:5px 7px;margin:5px 0;border-radius:7px;font-size:10px;line-height:1.25}
html body #app-main .partner-lines .pl-head{gap:4px 8px;flex-wrap:nowrap}
html body #app-main .partner-lines .pl-head h2{font-size:11px!important;line-height:1.2;margin:0}
html body #app-main .partner-lines .pl-head p:empty{display:none}
html body #app-main .partner-lines .pl-head p{font-size:9px;line-height:1.2;margin:2px 0 0}
html body #app-main .partner-lines .pl-choose{display:flex;align-items:center;gap:5px;min-width:170px;max-width:320px;font-size:9px;line-height:1.2}
html body #app-main .partner-lines .pl-choose select{flex:1;width:0;min-width:0}
html body #app-main .partner-lines .pl-head :is(button,select){font-size:9px!important;min-height:22px!important;padding:2px 5px!important;border-radius:4px;line-height:1.2}
@media(max-width:700px){html body #app-main .partner-lines .pl-head{flex-wrap:wrap;gap:4px}html body #app-main .partner-lines .pl-head>div{flex:1 1 calc(100% - 75px)}html body #app-main .partner-lines .pl-head>button{order:1}html body #app-main .partner-lines .pl-choose{order:2;flex:1 1 100%;max-width:none;min-width:0}html body #app-main .partner-lines .pl-head :is(button,select){min-height:28px!important;font-size:11px!important;padding:3px 5px!important}html body #app-main .partner-lines .pl-choose select:focus{font-size:16px!important}}

/* Search shares the existing partner ID and change event. */
html body #app-main .partner-lines .pl-partner-search{position:relative;display:block;flex:1;min-width:0;width:0;text-align:left}
html body #app-main.workspace .partner-lines .pl-choose .pl-partner-search>input[role=combobox]{box-sizing:border-box;width:100%;min-width:0;min-height:24px;height:24px;padding:3px 6px!important;border:1px solid var(--line,#ddd5ce);border-radius:4px;background:var(--paper,#fff);color:var(--ink,#25211e);font-size:10px!important;line-height:1.2;font-family:inherit}
.pl-partner-search>input:focus{outline:2px solid #bc643e;outline-offset:1px}.pl-partner-search>input:disabled{opacity:.6}
.pl-search-popup{position:absolute;display:block;top:calc(100% + 3px);left:0;right:0;z-index:60;min-width:0;padding:3px;border:1px solid var(--line,#d8c8ba);border-radius:5px;background:var(--paper,#fff);color:var(--ink,#25211e);box-shadow:0 5px 14px #0002}
.pl-search-popup [role=listbox]{display:block;max-height:216px;overflow-y:auto;overscroll-behavior:contain}
.pl-search-popup [role=option]{display:block;padding:5px 6px;min-height:24px;box-sizing:border-box;font-size:10px;line-height:1.3;cursor:pointer;overflow-wrap:anywhere;white-space:normal;border-radius:3px}
.pl-search-popup [role=option]:hover,.pl-search-popup .pl-search-active{background:#fce7d9;color:#753414}.pl-search-popup [aria-selected=true]{font-weight:700}
.pl-search-note{display:block;font-size:9px;line-height:1.25;padding:4px 6px;color:var(--muted,#786d64)}
[data-theme=dark] .pl-search-popup [role=option]:hover,[data-theme=dark] .pl-search-popup .pl-search-active{background:#593b2b;color:#ffd7bb}
@media(max-width:700px){html body #app-main.workspace .partner-lines .pl-choose .pl-partner-search>input[role=combobox]{font-size:16px!important;min-height:34px!important;height:34px!important;padding:4px 6px!important}.pl-search-popup [role=listbox]{max-height:204px}.pl-search-popup [role=option]{font-size:12px;min-height:34px;padding:8px 6px}.pl-search-note{font-size:10px}}

/* Compact registry records: edit actions stay inline with their values. */
html body #app-main .partner-lines table.pl-records{table-layout:fixed}
html body #app-main .partner-lines .pl-records :is(th,td){padding:3px 6px;font-size:11px;line-height:1.2;vertical-align:top}
html body #app-main .partner-lines .pl-records th:nth-child(1){width:33%}
html body #app-main .partner-lines .pl-records th:nth-child(2){width:6%}
html body #app-main .partner-lines .pl-records th:nth-child(3){width:16%}
html body #app-main .partner-lines .pl-records th:nth-child(4){width:12%}
html body #app-main .partner-lines .pl-records th:nth-child(5){width:18%}
html body #app-main .partner-lines .pl-records th:nth-child(6){width:15%}
html body #app-main .partner-lines .pl-records td small{font-size:9px;line-height:1.15;margin:0;color:var(--muted,#786d64)}
.pl-record-buyer,.pl-record-date{display:flex;align-items:center;gap:4px;min-width:0;min-height:20px}
.pl-record-buyer>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-record-date{white-space:nowrap}
html body #app-main .partner-lines table.pl-records button.pl-record-edit{display:inline-flex!important;align-items:center;justify-content:center;flex:none;width:20px!important;height:20px!important;min-height:20px!important;min-width:20px!important;padding:2px!important;margin:0!important;border:0!important;border-radius:3px;background:transparent;color:var(--accent,#b84c25);line-height:1}
.pl-record-edit svg{display:block;width:12px;height:12px;pointer-events:none}
html body #app-main .partner-lines table.pl-records button.pl-record-edit:hover{background:var(--surface,#fff0e7)}
html body #app-main .partner-lines table.pl-records button.pl-record-edit:focus-visible{outline:2px solid #ba572e;outline-offset:1px}
html body #app-main .partner-lines .pl-records details{margin:0}
html body #app-main .partner-lines .pl-records summary{font-size:10px;line-height:20px}
html body #app-main .partner-lines .pl-records .pl-note{margin:3px 0;font-size:10px;line-height:1.25}
@media(max-width:760px){html body #app-main .partner-lines .pl-records :is(th,td){padding:2px 4px}html body #app-main .partner-lines table.pl-records tr{gap:2px 5px;padding:4px;margin:4px 0}html body #app-main .partner-lines table.pl-records button.pl-record-edit{width:28px!important;height:28px!important;min-height:28px!important;min-width:28px!important}.pl-record-buyer>b{white-space:normal;overflow-wrap:anywhere}.pl-record-date{gap:3px}html body #app-main .partner-lines .pl-records td:before{margin-bottom:1px}}

html[data-theme=dark] body #app-main .partner-lines table.pl-records button.pl-record-edit{color:#ffb58b}html[data-theme=dark] body #app-main .partner-lines table.pl-records button.pl-record-edit:hover{background:#493226}
