
:root{font:14px "Segoe UI",Arial,sans-serif;color:#e7edf7;background:#0f1115;color-scheme:dark;--muted:#97a4b7;--line:#2b3442;--panel:#1c2430;--accent:#8ab4ff}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit;color:inherit}button{cursor:pointer;background:#202a38;border:1px solid var(--line);border-radius:6px;padding:9px 13px;text-align:left}button:hover{border-color:var(--accent);background:#273548}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input,select{background:#121820;border:1px solid var(--line);border-radius:5px;padding:10px;min-width:0;width:100%}input[type=checkbox]{width:auto;accent-color:var(--accent)}a{color:var(--accent)}.top{min-height:66px;padding:16px 28px;display:flex;align-items:center;gap:28px;border-bottom:1px solid var(--line);background:#151a23}.brand{color:#e7edf7;text-decoration:none;font-size:25px;font-weight:800;letter-spacing:-1px}.brand span{color:var(--accent)}.workspace{color:var(--muted);font-size:12px}.demo{margin-left:auto;padding:6px 9px;border:1px solid #5d5032;color:#e8cc88;background:#2b271c;border-radius:4px;font-size:10px;letter-spacing:.4px;font-weight:700}.layout{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:calc(100dvh - 66px)}aside{padding:27px 14px;border-right:1px solid var(--line);display:flex;flex-direction:column;background:#131821}.aside-label{font-size:10px;letter-spacing:1.3px;color:var(--muted);padding:0 12px 18px}nav{display:grid;gap:6px}nav button{border-color:transparent;background:transparent;color:#a8b5c8;padding:11px 12px}nav button[aria-current=page]{background:#25334a;color:#c6dbff;border-color:#374a68}.aside-note{margin-top:50px;padding:14px 10px;color:#c2cddd;font-size:12px;line-height:1.8}.aside-note small{color:var(--muted);font-size:11px}.status-dot{display:inline-block;background:#e8cc88;width:6px;height:6px;border-radius:50%;margin-right:7px}main{padding:30px;min-width:0;max-width:1600px;width:100%}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted)}h1{font-size:27px;letter-spacing:-.6px;margin:7px 0 8px}h2{font-size:20px;margin:0}h3{font-size:15px;margin:0 0 16px}p{line-height:1.6}.page-head p{font-size:12px;color:var(--muted);margin:0}.primary{background:#aecbff;color:#101b2c;border-color:#aecbff;font-weight:600}.primary:hover{background:#c4d9ff;color:#101b2c}.toolbar{display:flex;align-items:end;gap:12px;padding:16px;background:#171e29;border:1px solid var(--line);border-radius:8px;margin-bottom:14px;flex-wrap:wrap}.toolbar label{display:grid;gap:6px;color:var(--muted);font-size:11px;flex:1;min-width:170px}.toolbar button{white-space:nowrap}.muted{color:var(--muted);font-size:12px}.notice{background:#1b2637;border:1px solid #33455e;border-radius:6px;padding:12px;font-size:12px;line-height:1.6;margin:12px 0}.list-head{display:flex;justify-content:space-between;align-items:center;margin:19px 0 11px;font-size:12px;color:var(--muted)}.card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.card{display:grid;grid-template-columns:54px minmax(0,1fr) auto;gap:14px;align-items:center;padding:19px;background:var(--panel);border:1px solid var(--line);border-radius:8px;width:100%}.card:hover{transform:translateY(-1px)}.monogram{display:grid;place-items:center;width:52px;height:65px;border:1px solid #44566d;background:linear-gradient(135deg,#263b57,#172330);color:#99b7e3;font-size:17px;font-weight:600;border-radius:4px}.card strong{display:block;font-size:14px;margin-bottom:7px;overflow-wrap:anywhere}.card small{color:var(--muted);display:block;font-size:11px;line-height:1.8}.card-id{color:var(--muted);font-size:11px}.pager,.actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-top:16px;flex-wrap:wrap}.pager span{font-size:12px;color:var(--muted)}.panel{background:#171e29;border:1px solid var(--line);border-radius:8px;padding:18px;margin:13px 0;min-width:0}.empty{padding:40px 18px;text-align:center;border:1px dashed #354052;border-radius:8px;color:var(--muted);line-height:1.9}.loading{padding:30px;color:var(--accent)}#message,.error{background:#332329;color:#ffbdc5;border:1px solid #70434e;border-radius:5px;padding:12px;margin:12px 0;font-size:13px;white-space:pre-wrap}footer{display:flex;justify-content:space-between;gap:12px;color:#728198;font-size:10px;border-top:1px solid var(--line);margin-top:32px;padding-top:16px}dialog{color:#e7edf7;background:#171e29;border:1px solid #46546a;border-radius:10px;width:min(950px,calc(100% - 32px));max-height:90dvh;padding:24px;overflow:auto}dialog::backdrop{background:#080b12cc}#confirm{width:min(450px,calc(100% - 32px))}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.dialog-head button{font-size:21px;padding:2px 10px}.dialog-head h2{overflow-wrap:anywhere}.detail-meta{display:flex;gap:12px;flex-wrap:wrap;color:var(--muted);font-size:12px}.value-line{font-size:30px;color:#c1d6fc;margin:14px 0 5px}.tabs{display:flex;gap:7px;flex-wrap:wrap;margin:21px 0 13px}.tabs button[aria-selected=true]{border-color:var(--accent);background:#2b3e5a}.table-wrap{overflow:auto;max-height:330px}table{width:100%;border-collapse:collapse;font-size:12px}th,td{padding:11px 7px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}th{font-weight:400;color:var(--muted)}td button{font-size:11px;padding:6px 8px;margin:2px}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:7px;font-size:12px;color:var(--muted)}.field-check{display:flex;align-items:center;gap:10px}.row-actions{display:flex;gap:6px;flex-wrap:wrap}.success{color:#7bdcb6}.badge{display:inline-block;padding:3px 7px;background:#27364c;border-radius:4px;font-size:11px;color:#b2cdf3}.event-row{display:flex;gap:12px;align-items:start;padding:14px 0;border-bottom:1px solid var(--line)}.event-row input{margin-top:5px}.event-row strong{font-size:13px}.event-row p{margin:5px 0;font-size:12px;color:var(--muted)}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;color:#b6c5d8}#form-error{white-space:pre-wrap}.snapshot{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid var(--line)}
/* Collection layout follows collection_ui.py: header, controls and vertical cards. */
.layout{display:block;min-height:calc(100dvh - 48px)}.top{min-height:48px;padding:9px 18px}.brand{font-size:18px;letter-spacing:0}main{padding:16px;max-width:none}.page-head{margin-bottom:12px}h1{font-size:21px;margin:0 0 5px}.page-head p{font-size:12px}nav{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:14px}nav button{padding:7px 10px}.card-grid{grid-template-columns:repeat(auto-fill,minmax(195px,1fr));gap:12px}.card{display:flex;flex-direction:column;gap:8px;padding:12px;text-align:center;min-width:0;align-items:stretch}.card:hover{transform:none}.card strong{margin-bottom:4px}.photo-placeholder{display:grid;place-items:center;min-height:180px;border:1px solid #415066;background:#121820;color:var(--muted);font-size:12px}.card-id{font-size:11px}.toolbar{padding:12px}.panel{padding:14px}.value-line{font-size:24px}
@media(max-width:900px){main{padding:14px}.top{padding:10px 14px}}
@media(max-width:600px){.top{padding:12px 14px;gap:8px;flex-wrap:wrap}.demo{font-size:9px}.brand{font-size:22px}.layout{display:block}aside{border-right:0;border-bottom:1px solid var(--line);padding:10px}.aside-label,.aside-note{display:none}nav{display:flex;overflow:auto;gap:3px}nav button{white-space:nowrap;font-size:11px;padding:9px}.page-head{align-items:start;flex-direction:column;gap:13px}main{padding:20px 14px}h1{font-size:24px}.toolbar{padding:12px;gap:10px}.toolbar label{min-width:130px}.card{padding:15px;grid-template-columns:42px minmax(0,1fr) auto;gap:11px}.monogram{width:40px;height:54px}.fields{grid-template-columns:1fr}dialog{padding:18px;width:calc(100% - 20px);max-height:94dvh}.snapshot{align-items:start;flex-direction:column}footer{flex-direction:column;gap:7px}.actions{justify-content:start}td,th{padding:8px 5px}.table-wrap{max-height:300px}}
figure{margin:14px 0;min-width:0}figure svg{display:block;width:100%;height:auto;max-height:190px}figcaption{font-size:12px;color:var(--muted)}.card-value{margin-top:6px;color:var(--accent);font-weight:600}

.archive-photo{display:grid;place-items:center;min-height:180px;max-height:330px;background:#11161d;border:1px solid var(--line);color:var(--muted)}.archive-photo img{max-width:100%;max-height:320px;object-fit:contain}
.trading-table table{min-width:960px}.trading-table th,.trading-table td{white-space:nowrap}.mobile-table-note{display:none}@media(max-width:600px){.mobile-table-note{display:block}}
.portfolio-metrics{display:flex;gap:10px 20px;flex-wrap:wrap;font-size:13px}.portfolio-header figure{max-width:720px}.portfolio-header details{font-size:12px;color:var(--muted)}.portfolio-header summary{cursor:pointer;padding:8px 0}.error-text{color:#ffbdc5}
.portfolio-header figure{margin:8px 0}.portfolio-header figure p{margin:5px 0}.portfolio-header>p{margin:6px 0;font-size:11px}.portfolio-header figure svg{max-height:160px}

.collection-selector{min-width:170px;max-width:100%;font-size:12px}.collection-selector summary{cursor:pointer;padding:10px;border:1px solid var(--line);border-radius:5px}.collection-selector[open]{max-height:240px;overflow:auto}.collection-selector label{display:flex;align-items:center;gap:8px;padding:5px;min-width:0;overflow-wrap:anywhere}

.photo-placeholder img{width:100%;height:100%;max-height:220px;object-fit:contain}.active-photo-preview{display:grid;place-items:center;min-height:180px;margin:12px 0}.active-photo-preview img{max-width:100%;max-height:420px;object-fit:contain}.active-photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.photo-tile{display:grid;align-content:start;gap:8px;min-width:0}.photo-thumbnail{height:140px;display:grid;place-items:center;padding:6px}.photo-thumbnail img{max-width:100%;max-height:125px;object-fit:contain}.photo-upload{display:flex;gap:10px;flex-wrap:wrap}.photo-upload input{flex:1;min-width:160px}

.incoming-card-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0;border:1px solid var(--line);min-width:0}.incoming-card-editor .field{display:grid;gap:5px}.incoming-card-editor .row-actions,.incoming-card-editor p{grid-column:1/-1}.incoming-card-editor input[type=checkbox]{width:auto}.incoming-card-editor .row-actions .field{display:flex;align-items:center}@media(max-width:600px){.incoming-card-editor{grid-template-columns:minmax(0,1fr)}}

.suggestion-field{position:relative;min-width:0}.suggestion-field>input{width:100%;min-width:0}.suggestion-list{position:absolute;top:100%;left:0;right:0;z-index:10;max-height:180px;overflow:auto;background:#1c2430;border:1px solid #60738c;border-radius:4px;box-shadow:0 5px 14px #0008}.suggestion-list [role=option]{padding:9px 10px;color:#e7edf7;cursor:pointer;overflow-wrap:anywhere}.suggestion-list [role=option]:hover,.suggestion-list [aria-selected=true]{background:#334d70}.suggestion-field>small{display:block;margin-top:5px}.suggestion-field [hidden]{display:none}

.trade-detail-table table{min-width:760px}.trade-detail-table th,.trade-detail-table td{white-space:nowrap}
/* Coordinates and typography from the mapped collection_ui.py reference. */
body.desktop-collection{font:13.333px 'Segoe UI',sans-serif;background:#0f1115;overflow:hidden}
.desktop-collection>.top,.desktop-collection .page-head,.desktop-collection nav,.desktop-collection footer{display:none}
.desktop-collection .layout{min-height:100dvh}.desktop-collection main{padding:0;max-width:none}.desktop-collection #message{position:fixed;bottom:8px;left:20px;right:20px;z-index:12}.desktop-collection #message[hidden]{display:none}
.collection-window{position:fixed;inset:0;border:1px solid #2b3442;background:#0f1115;color:#e7edf7}
.collection-titlebar{height:43px;background:#1c2430;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 11px}
.collection-titlebar h1{font-size:14.666px;font-weight:700;margin:0;line-height:26px}
.collection-window button{border-radius:0;background:#1c2430;border:2px solid #e7edf7;padding:3px 9px;font:13.333px 'Segoe UI';height:29px;text-align:center;color:#e7edf7}
.collection-window button:hover{background:#263242}.collection-window .collection-close{border:0;font-size:11px;padding:0;width:19px;height:22px}
.collection-header-surface{position:absolute;left:16px;right:16px;top:56px;background:#1c2430;border:2px solid #2b3442;padding:12px 14px}
.collection-summary-row{display:flex;justify-content:space-between;align-items:center;min-height:176px;gap:18px}
.collection-summary{min-width:0}.collection-metric-line{display:flex;align-items:center;gap:18px;white-space:nowrap;height:23px;line-height:23px}
.collection-metric-line strong{font-size:13.333px;margin-left:6px}.collection-metric-line .positive{color:#34d399}.collection-metric-line .negative{color:#e06c75}
.collection-summary>button{display:block;width:101px;margin-top:10px}
.collection-controls{margin:0;background:#11161d;border:2px solid #2b3442;padding:8px 10px;width:356px;min-width:356px;display:flex;flex-direction:column;gap:7px;position:relative}
.collection-controls-title{height:21px;font-size:12px;color:#9aa4b2;line-height:21px;margin-bottom:-1px}
.collection-window input,.collection-window select{height:25px;border-radius:0;border:2px solid #2b3442;background:#1c2430;padding:1px 4px;font:12px 'Segoe UI';color:#e7edf7;outline-offset:0}
.collection-search-sort{display:grid;grid-template-columns:164px 141px;gap:12px}.collection-classifiers{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.collection-multiselect{position:relative;height:29px}.collection-multiselect summary{height:29px;border:2px solid #e7edf7;text-align:center;font-size:12px;line-height:25px;list-style:none;cursor:pointer}.collection-multiselect summary::-webkit-details-marker{display:none}
.collection-checks{position:absolute;top:29px;left:0;right:0;background:#1c2430;border:1px solid #9aa4b2;z-index:8;max-height:220px;overflow:auto}.collection-checks label{display:flex;align-items:center;gap:8px;padding:4px 8px}.collection-window input[type=checkbox]{width:13px;height:13px;margin:0;accent-color:#8ab4ff}
.collection-window .collection-add{width:45px;height:29px;align-self:flex-end;font-size:16px;padding:0}
.collection-history{display:block;width:680px;height:150px;max-width:100%;margin:8px auto 0;font-family:'Segoe UI'}
.collection-grid-viewport{position:absolute;left:16px;right:16px;top:438px;bottom:14px;background:#11161d;overflow-y:scroll;overflow-x:hidden}
.collection-grid-viewport::-webkit-scrollbar{width:14px}.collection-grid-viewport::-webkit-scrollbar-track{background:#29323e;border:1px solid #5f6c7e}.collection-grid-viewport::-webkit-scrollbar-thumb{background:#69788c;border:1px solid #a8b6c8}
.collection-grid{display:grid;grid-template-columns:repeat(var(--columns,5),var(--card-width,236px));grid-auto-rows:var(--card-height,290px);gap:8px;padding:8px;align-content:start;justify-content:start}
.collection-window .desktop-card{position:relative;display:block;width:var(--card-width,236px);height:var(--card-height,290px);padding:0;gap:0;border:1px solid #2b3442;border-radius:0;background:#1c2430;cursor:pointer;overflow:hidden;text-align:center;outline-offset:-2px}
.desktop-card-name{position:absolute;top:7px;left:11px;right:11px;height:20px;display:flex;align-items:center;justify-content:center;gap:3px;font-size:14.666px;font-weight:700;white-space:nowrap}
.desktop-card-base{min-width:0;overflow:hidden;text-overflow:ellipsis}.desktop-card-edition{color:#c792ff;max-width:60%;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}
.desktop-card-collection{position:absolute;top:31px;left:10px;right:10px;font-size:12px;color:#9aa4b2;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-card-price{position:absolute;top:53px;left:8px;right:8px;font-size:13.333px;font-weight:bold;color:#8ab4ff;line-height:18px}
.desktop-card .photo-placeholder{position:absolute;left:7px;right:7px;top:75px;bottom:9px;display:flex;align-items:center;justify-content:center;min-height:0;padding:4px;border:1px solid #2b3442;background:#1c2430}
.desktop-card .photo-placeholder img{width:100%;height:100%;max-height:none;object-fit:contain;pointer-events:none}
.desktop-card-grade{position:absolute;right:8px;top:28px;background:#fff;color:#d71920;border:1px solid #d71920;font-size:10px;padding:2px}
.desktop-card-overlay{position:absolute;left:7px;right:7px;bottom:9px;height:178px;background:#1c2430;border-top:1px solid #2b3442;text-align:left;padding:28px 9px 42px;z-index:2;font-size:12px}
.collection-window .card-overlay-close{position:absolute;right:4px;top:5px;height:20px;border:0;padding:0;font-size:10.666px;color:#9aa4b2}
.card-overlay-line{height:18px;line-height:18px;white-space:nowrap}.collection-window .card-overlay-lots{position:absolute;left:9px;right:9px;bottom:9px;height:30px;border:1px solid #8ab4ff;color:#8ab4ff;font-size:12px;font-weight:bold;padding:2px}
.desktop-context-menu{position:fixed;width:190px;background:#1c2430;border:1px solid #9aa4b2;padding:2px;z-index:30;box-shadow:2px 2px 6px #0008}.collection-window .desktop-context-menu button{display:block;width:100%;height:26px;border:0;text-align:left;padding:2px 14px}
.collection-paging{display:flex;justify-content:flex-end;gap:8px;padding:8px}
@media(max-width:1100px){.collection-metric-line{display:block;height:69px}.collection-metric-line>span{display:block}.collection-summary{height:108px}}
@media(max-height:650px){.collection-controls-title{display:none}.collection-controls{padding-top:4px;padding-bottom:4px}.collection-summary-row{min-height:142px}.collection-history{height:120px}.collection-grid-viewport{top:373px}}
@media(min-width:1500px){.collection-header-surface{display:grid;grid-template-columns:minmax(300px,1fr) minmax(240px,680px) 356px;align-items:center;gap:18px}.collection-summary-row{display:contents}.collection-summary{grid-column:1;grid-row:1;height:108px}.collection-metric-line{display:block;height:69px}.collection-metric-line>span{display:block}.collection-controls{grid-column:3;grid-row:1}.collection-history{grid-column:2;grid-row:1;width:100%;height:184px;margin:0}.collection-grid-viewport{top:290px}}
@media(max-width:600px){body.desktop-collection{overflow:auto}.collection-window{position:relative;min-height:100dvh}.collection-header-surface{position:relative;left:auto;right:auto;top:auto;margin:14px 12px;padding:12px}.collection-summary-row{display:flex;flex-direction:column;align-items:stretch}.collection-summary{height:108px}.collection-controls{width:100%;min-width:0}.collection-search-sort{grid-template-columns:1fr 1fr;gap:10px}.collection-grid-viewport{position:relative;left:auto;right:auto;top:auto;bottom:auto;margin:18px 12px 14px;min-height:380px;height:calc(100dvh - 240px)}.collection-history{height:auto;width:100%}}
.collection-header-surface{left:17px;right:17px;top:57px}.collection-grid-viewport{left:17px;right:17px;top:439px}.collection-metric-line>span{padding:0 2px}.collection-metric-line strong{padding:0 2px}
@media(max-height:650px){.collection-grid-viewport{top:374px}}
@media(min-width:1500px){.collection-grid-viewport{top:290px}}
@media(max-width:600px){.collection-header-surface,.collection-grid-viewport{left:auto;right:auto;top:auto}}
.collection-grid-viewport{scrollbar-gutter:stable}

.collection-titlebar h1{letter-spacing:normal}.collection-grid-viewport{bottom:15px}

/* Quick Analysis: geometry follows the native 980x560 in-window dialog. */
dialog.research-dialog{position:fixed;inset:0;margin:auto;padding:0;width:980px;max-width:calc(100vw - 16px);height:560px;max-height:calc(100dvh - 16px);border:2px solid #2b3442;border-radius:0;background:#0f1115;color:#e7edf7;font:13.333px 'Segoe UI';overflow:hidden;box-shadow:none}
.research-dialog::backdrop{background:transparent}.research-dialog-title{height:42px;background:#1c2430;display:flex;align-items:center;justify-content:space-between;padding:0 8px 0 11px}.research-dialog-title h2{font-size:14.666px;font-weight:700;margin:0;line-height:26px}.research-dialog button{border-radius:0;border:2px solid #e7edf7;background:#1c2430;color:#e7edf7;padding:3px 9px;font:13.333px 'Segoe UI';height:29px;text-align:center}.research-dialog-title button{border:0;padding:0;width:19px;height:22px;font-size:11px}
.research-analysis-shell{position:absolute;left:12px;right:12px;top:54px;bottom:12px;background:#171b22;border:1px solid #2b3442;padding:12px 14px 14px;display:flex;flex-direction:column}
.research-analysis-heading{height:25px;flex-shrink:0;color:#9aa4b2;line-height:25px;padding:0 2px;margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.research-analysis-content{display:grid;grid-template-columns:336px minmax(0,1fr);gap:12px;flex:1;min-height:0}
.research-analysis-stats{background:#11161d;border:1px solid #2b3442;overflow-y:scroll;scrollbar-gutter:stable;padding:12px}.research-analysis-stats h3,.research-analysis-chart h3{font-size:13.333px;height:23px;line-height:23px;font-weight:700;margin:0 0 8px;padding:0 2px}
.research-analysis-stat{margin-bottom:8px}.research-stat-label{font-size:12px;color:#9aa4b2;height:21px;line-height:21px;padding:0 2px}.research-stat-value{font-size:13.333px;min-height:23px;line-height:23px;padding:0 2px;margin-top:1px;overflow-wrap:anywhere}
.research-analysis-chart{border:1px solid #2b3442;background:#11161d;padding:12px;display:flex;flex-direction:column;min-width:0}.research-analysis-chart h3{flex-shrink:0;margin-bottom:8px}
.research-sales-chart{position:relative;flex:1;min-height:0;overflow:hidden;background:#141922}.research-sales-chart svg{display:block;width:100%;height:100%;font-family:'Segoe UI'}.research-sales-chart circle{cursor:pointer}.research-chart-tooltip{position:absolute;padding:6px 9px;background:#202733;color:#e7edf7;white-space:pre-line;border:1px solid #2b3442;pointer-events:none;font-size:12px;z-index:2}
.research-analysis-buttons{display:flex;gap:8px;margin-top:10px;flex-shrink:0}.research-analysis-buttons button:first-child{width:136px}.research-analysis-buttons button:nth-child(2){width:122px}
dialog.research-lots{height:620px}.research-lots-shell{position:absolute;left:12px;right:12px;top:54px;bottom:12px;padding:12px 14px 14px;background:#171b22;border:1px solid #2b3442;display:flex;flex-direction:column}.research-lots-heading{margin-bottom:8px}.research-lots-heading h3{font-size:14.666px;margin:0;line-height:26px}.research-lots-heading div{color:#9aa4b2;line-height:23px;margin-top:2px}.research-lots-table{flex:1;overflow:auto;min-height:0;border:1px solid #11161d}.research-lots-table table{table-layout:fixed;width:100%;font-size:13.333px}.research-lots-table th,.research-lots-table td{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:28px;padding:2px 5px}.research-lots-table th{background:#1c2430;color:#e7edf7}.research-lots-table th:first-child{width:auto}.research-lots-table th:nth-child(2){width:112px}.research-lots-table th:nth-child(3){width:132px}.research-lots-table th:nth-child(4){width:118px}.research-lots-table th:nth-child(5){width:78px}.research-lots-table th button{height:24px;border:0;padding:0}.research-lots-hint{margin-top:10px;color:#9aa4b2;font-size:12px;line-height:23px}
.research-selection-bar{display:flex;gap:8px;align-items:center;margin:12px 0}.research-analysis-error{color:#ffb4ae}.research-mark{display:inline-flex;gap:6px;align-items:center;cursor:pointer}
@media(max-width:700px){.research-analysis-content{grid-template-columns:1fr;overflow:auto;grid-template-rows:auto minmax(260px,1fr)}.research-analysis-stats{overflow:visible}.research-analysis-chart{min-height:300px}.research-analysis-shell{left:6px;right:6px;padding:8px}.research-analysis-heading{font-size:12px}.research-lots-table table{min-width:800px}}

@media(max-width:700px){dialog.research-analysis{height:calc(100dvh - 16px)}}

.research-lots-heading{padding:0 2px}.research-lots-table{background:#1c2430;border:2px solid #2b3442;overflow-y:scroll;scrollbar-gutter:stable}.research-lots-table th{height:38px;background:#11161d;font-weight:700}.research-lots-table tbody tr,.research-lots-table tbody tr:nth-child(even){background:#1c2430}.research-lots-table td{border-bottom:0}.research-lots-table th button{background:#11161d;font-weight:700}.research-lots-table tbody tr:focus-visible{background:#25334a}

/* Original Research "Add to collection" dialog. */
dialog.research-import{height:640px}.research-import-body{position:absolute;left:14px;right:14px;top:54px;bottom:12px;display:flex;flex-direction:column;min-height:0}
.research-import-lots{flex:1;min-height:150px;border:2px solid #2b3442;background:#1c2430;overflow:auto}.research-import-lots table{table-layout:fixed;width:100%;font-size:13.333px}.research-import-lots th{height:36px;background:#11161d;font-weight:700;color:#e7edf7}.research-import-lots th,.research-import-lots td{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:clip;padding:2px 5px}.research-import-lots td{height:28px;border:0}.research-import-lots tbody tr,.research-import-lots tbody tr:nth-child(even){background:#1c2430}.research-import-lots th:first-child{width:64px}.research-import-lots th:nth-child(3){width:120px}.research-import-lots th:nth-child(4){width:150px}.research-import-lots th:nth-child(5){width:110px}.research-import-lots td:nth-child(2){text-align:left}.research-import-body>hr{width:100%;border:0;height:1px;flex-shrink:0;background:#9aa4b2;margin:13px 0 10px}
.research-import-existing{height:29px;display:grid;grid-template-columns:133px minmax(0,1fr) 164px;gap:8px;align-items:center;flex-shrink:0}.research-import-existing>span{font-size:13.333px}.research-import select,.research-import input[type=text]{height:25px;min-height:25px;background:#1c2430;color:#e7edf7;border:2px solid #2b3442;border-radius:0;font:12px 'Segoe UI';padding:1px 7px;width:100%}.research-import-existing button{padding:3px 6px}
.research-import-create{margin-top:10px;flex-shrink:0}.research-import-create>h3{height:21px;line-height:21px;font-size:13.333px;margin:0;font-weight:700}
.research-import-form{display:grid;grid-template-columns:71px minmax(0,1fr) 143px;column-gap:10px;row-gap:6px;background:#171b22;border:2px solid #2b3442;padding:8px 10px;margin:0}.research-import-form>label{grid-column:1;line-height:25px;font-size:13.333px}.research-import-form>input,.research-import-form>.suggestion-field{grid-column:2;min-width:0;height:25px}.research-import-form>.suggestion-field>input{height:25px}.research-import-numbering,.research-import-traits{grid-column:2;display:flex;align-items:center;min-width:0}.research-import-numbering{height:25px;font-size:13.333px}.research-import-numbering input:first-of-type{width:80px;margin:0 14px 0 4px}.research-import-numbering input:last-of-type{width:116px;margin-left:4px}
.research-import-traits{min-height:19px;align-items:flex-start;gap:14px;font-size:13.333px;flex-wrap:wrap}.research-import-traits>label{display:flex;align-items:center;gap:3px;height:19px;white-space:nowrap}.research-import input[type=checkbox]{width:11px;height:11px;margin:0;accent-color:#8ab4ff}.research-import-grade{display:grid;grid-template-columns:auto 80px auto 100px;gap:3px;align-items:center}.research-import-grade[hidden]{display:none}.research-import-grade span:nth-of-type(2){grid-column:1}.research-import-grade input{width:100%}
.research-import-form>.research-import-submit{grid-column:3;grid-row:1 / span 5;align-self:center;height:36px;padding:7px 8px;white-space:nowrap;font-size:12px;background:#29465d;border:1px solid #6486a0;color:#f0f5fa;text-align:center;font-weight:600}.research-import-error{position:absolute;bottom:0;left:0;right:0;z-index:20;padding:8px;background:#38202a;border:1px solid #e06c75;color:#ffc7ce;max-height:120px;overflow:auto}.research-import-error[hidden]{display:none}
dialog.research-duplicate{width:560px;height:240px}.research-duplicate-body{padding:14px}.research-duplicate-body p{font-size:13.333px}.research-duplicate-body>div{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){dialog.research-import{height:calc(100dvh - 16px)}.research-import-body{left:8px;right:8px;overflow:auto}.research-import-lots{min-height:170px;flex:1 0 170px}.research-import-lots table{min-width:800px}.research-import-existing{height:auto;grid-template-columns:1fr;gap:5px}.research-import-existing button{width:100%}.research-import-form{grid-template-columns:71px minmax(0,1fr)}.research-import-form>.research-import-submit{grid-column:1 / span 2;grid-row:7;height:29px}.research-import-traits{flex-wrap:wrap}.research-import-numbering{flex-wrap:wrap;height:auto;gap:4px}.research-import-numbering input:last-of-type{width:90px}.research-import-create{padding-bottom:6px}.research-import-grade{grid-template-columns:62px 60px 24px minmax(45px,1fr);font-size:12px}.research-import-grade>input{min-width:0}}

/* Ordinary Research source layout; mode selector intentionally removed. */
body.desktop-research{overflow:hidden}.desktop-research .top,.desktop-research .page-head,.desktop-research main>nav,.desktop-research main>footer{display:none}.desktop-research .layout{display:block;min-height:0}.desktop-research main{padding:0;max-width:none}.research-root{position:fixed;inset:0;padding:12px;display:grid;grid-template-rows:52px 128px 40px minmax(0,1fr) 29px;gap:8px;background:#d9d9d9;color:#e7edf7;font:12px 'Segoe UI'}
.research-root button{border:2px solid #e7edf7;border-radius:0;height:27px;background:#1c2430;color:#e7edf7;font:12px 'Segoe UI';padding:2px 8px;text-align:center;white-space:nowrap}.research-root button:disabled{border-color:#69788c;color:#69788c;opacity:1;cursor:default}.research-root input[type=checkbox]{width:11px;height:11px;margin:0;accent-color:#8ab4ff}
.research-search{margin:0;border:1px solid #2b3442;background:#171b22;padding:9px 12px 11px;display:grid;grid-template-columns:minmax(0,1fr) 126px 122px 45px;gap:8px;align-items:center}.research-search input{height:25px;background:#1c2430;border:2px solid #2b3442;border-radius:0;font:12px 'Segoe UI';padding:1px 8px;margin-right:2px;width:calc(100% - 2px)}.research-root .research-search-primary{background:#4f8cff;font-weight:700}
.research-groups{border:1px solid #2b3442;background:#1c2430;position:relative}.research-groups>span{position:absolute;left:10px;top:8px;color:#9aa4b2;line-height:19px}.research-groups-list{position:absolute;left:64px;right:28px;top:8px;bottom:8px;border:1px solid #2b3442;background:#1c2430}.research-groups:after{content:'';position:absolute;right:8px;top:8px;bottom:8px;width:14px;background:#69788c;border:1px solid #a8b6c8}
.research-result-filters{border:1px solid #2b3442;background:#171b22;padding:4px 10px;display:flex;align-items:center;gap:8px;white-space:nowrap}.research-result-filters>label{display:flex;align-items:center;gap:4px;height:19px}.research-result-filters>label:nth-child(2){margin-left:2px}.research-result-filters>button:first-of-type{width:164px;margin-left:8px}.research-result-filters>button:nth-of-type(2){width:122px}.research-result-filters>input{height:29px;width:130px;background:#1c2430;border:1px solid #2b3442;border-radius:0;font:12px 'Segoe UI';padding:2px 7px}.research-result-count{margin-left:4px;color:#9aa4b2}
.research-results-shell{border:1px solid #2b3442;background:#171b22;position:relative;min-height:0}.research-table-scroll{position:absolute;left:8px;right:8px;top:6px;bottom:8px;overflow:scroll;scrollbar-gutter:stable}.research-table-scroll::-webkit-scrollbar{width:20px;height:20px}.research-table-scroll::-webkit-scrollbar-track{background:#29323e;border-left:6px solid #171b22;border-top:6px solid #171b22}.research-table-scroll::-webkit-scrollbar-thumb{background:#69788c;border-left:6px solid #171b22;border-top:6px solid #171b22}.research-table-surface{min-height:100%;min-width:903px;width:100%;border:2px solid #2b3442;background:#1c2430}.research-result-table{table-layout:fixed;width:899px;font-size:13.333px;border-collapse:collapse}.research-result-table th{height:38px;background:#11161d;color:#e7edf7;font-weight:700;padding:0 4px;text-align:center;border:0;overflow:hidden;white-space:nowrap}.research-root .research-result-table th button{width:100%;height:36px;border:0;background:#11161d;font-size:13.333px;font-weight:700;padding:0}.research-result-table td{height:28px;padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:clip;border:0;text-align:left}.research-result-table td:nth-child(1),.research-result-table td:nth-child(2),.research-result-table td:last-child{text-align:center}.research-result-table tbody tr,.research-result-table tbody tr:nth-child(even){background:#1c2430}.research-result-table tbody tr:focus-visible{background:#31435e}.research-result-marks input:first-child{margin-right:6px;accent-color:#d6aa41}.research-result-marks input:last-child{accent-color:#34d399}
.research-result-footer{display:flex;align-items:center;gap:8px;padding:4px 10px;border:1px solid #2b3442;background:#171b22;color:#9aa4b2;font-size:12px}.research-result-footer>span:first-child{margin-right:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.research-result-footer label{display:flex;align-items:center;gap:4px;white-space:nowrap;color:#e7edf7}.research-result-paging{display:flex;align-items:center;gap:4px}.research-root .research-result-paging button{height:20px;padding:0 4px}.research-result-error{position:absolute;left:20px;right:20px;top:30px;padding:12px;background:#38202a;border:1px solid #e06c75;color:#ffc7ce}.research-result-error[hidden]{display:none}.research-service-menu{position:absolute;right:20px;top:54px;z-index:30;background:#1c2430;padding:4px;border:1px solid #9aa4b2;display:grid;gap:4px}
@media(max-width:850px){.research-root{grid-template-rows:82px 100px auto minmax(180px,1fr) 40px;overflow:auto}.research-search{grid-template-columns:minmax(0,1fr) 126px 45px;gap:5px}.research-search input{grid-column:1 / -1}.research-search>button:nth-of-type(2){grid-column:1;grid-row:2;justify-self:start}.research-search>button:first-of-type{grid-column:2;grid-row:2}.research-search>button:last-of-type{grid-column:3;grid-row:2}.research-result-filters{flex-wrap:wrap;gap:7px}.research-result-filters>button:first-of-type{margin-left:0}.research-result-footer>span:first-child{max-width:150px}.research-result-footer>span:nth-last-child(2),.research-result-footer>label{display:none}}
.research-table-scroll{bottom:28px;overflow-x:hidden}.research-horizontal-scroll{position:absolute;left:8px;right:28px;bottom:8px;height:14px;overflow-x:scroll;overflow-y:hidden;background:#29323e}.research-horizontal-scroll>div{height:1px}.research-horizontal-scroll::-webkit-scrollbar{height:14px}.research-horizontal-scroll::-webkit-scrollbar-thumb{background:#69788c}.research-horizontal-scroll::-webkit-scrollbar-track{background:#29323e}
.research-result-filters>label{width:auto;flex:0 0 auto;white-space:nowrap}.research-root .research-result-filters>label>input[type=checkbox]{flex:0 0 13px;width:13px;height:13px;appearance:auto;opacity:1;position:static}.research-result-table{margin-top:2px}

.research-photo-preview{position:fixed;z-index:40;pointer-events:none;background:#111827;overflow:hidden;}
.research-photo-preview img{display:block;width:100%;height:100%;}
[data-photo-url]:focus-visible{outline:1px solid #60a5fa;outline-offset:-2px;}

.research-period-menu{position:fixed;z-index:60;min-width:160px;padding:2px;background:#1c2430;color:#e7edf7;border:1px solid #475569;box-shadow:2px 2px 2px #0005;}
.research-root .research-period-menu button{display:block;width:100%;height:23px;background:transparent;border:0;text-align:left;padding:0 12px 0 30px;font:12px 'Segoe UI';position:relative;}
.research-root .research-period-menu button[aria-checked=true]:before{content:'●';position:absolute;left:10px;color:#4f8cff;}
.research-root .research-period-menu button:hover,.research-root .research-period-menu button:focus-visible{background:#263244;outline:none;}
.research-period-menu hr{margin:3px 1px;border:0;border-top:1px solid #475569;}

.research-period-menu{width:95px;min-width:95px;padding:2px;border:2px solid #b8bec8;box-sizing:border-box;}
.research-root .research-period-menu button{height:17px;line-height:17px;padding:0 4px 0 17px;font:11px 'Segoe UI';}
.research-root .research-period-menu button[aria-checked=true]:before{content:'✓';left:3px;}
.research-period-menu hr{height:7px;margin:0;border-top:1px solid #9098a5;box-sizing:border-box;}

.research-progress{position:absolute;z-index:65;left:50%;top:calc(50% - 18.5px);transform:translate(-50%,-50%);width:520px;height:152px;max-width:calc(100% - 36px);box-sizing:border-box;border:1px solid #2b3442;background:#222c3a;color:#e7edf7;font:12px 'Segoe UI';}
.research-progress-header{display:flex;justify-content:space-between;align-items:center;margin:10px 12px 2px;height:20px;}
.research-progress-header strong:first-child{font-size:13.333px;}
.research-progress-message{padding:0 12px;color:#9aa4b2;line-height:16px;min-height:16px;}
.research-progress progress{appearance:none;display:block;border:0;border-radius:0;width:calc(100% - 24px);height:10px;margin:10px 12px 8px;background:#171b22;}
.research-progress progress::-webkit-progress-bar{background:#171b22;}
.research-progress progress::-webkit-progress-value{background:#4f8cff;}
.research-progress-actions{display:flex;justify-content:flex-end;margin:0 12px 12px;}
.research-root .research-progress-actions button{width:100px;height:29px;}

.research-progress{left:calc(50% + 12px);top:calc(50% + 12px);background:#1c2430;}
.research-progress-header{height:26px;}
.research-progress-header strong:first-child{font-size:14.667px;padding:0 3px;line-height:26px;}
.research-progress-header strong:last-child{font-size:13.333px;padding:0 3px;line-height:23px;}
.research-progress-message{height:21px;line-height:21px;min-height:21px;padding:0 14px;font-size:13.333px;}
.research-progress progress{height:18px;}
.research-root .research-progress-actions button{width:122px;height:27px;}
@media(max-width:850px){.research-progress{left:50%;}}

.research-progress progress{border:1px solid #2b3442;padding:1px;box-sizing:border-box;}
.research-search input:disabled{background:#11161d;color:#9aa4b2;}

.research-period-menu{padding:1px 2px;}

.research-root{grid-template-rows:52px 40px minmax(0,1fr) 29px;}
@media(max-width:850px){.research-root{grid-template-rows:82px auto minmax(180px,1fr) 40px;}}

.research-native-menu{position:fixed;z-index:60;min-width:120px;padding:1px 2px;border:2px solid #b8bec8;background:#171b22;color:#e7edf7;box-shadow:2px 2px 2px #0005;}
.research-root .research-native-menu button{display:block;width:100%;height:17px;line-height:17px;border:0;background:transparent;text-align:left;padding:0 12px 0 18px;font:11px 'Segoe UI';}
.research-root .research-native-menu button:hover,.research-root .research-native-menu button:focus-visible{background:#263244;outline:none;}
.research-root .research-native-menu button:disabled{color:#69788c;}
.research-native-menu hr{height:7px;margin:0;border:0;border-top:1px solid #9098a5;box-sizing:border-box;}

.research-native-menu{width:195px;min-width:195px;box-sizing:border-box;}
.research-native-menu-single{width:112px;min-width:112px;}
.research-native-radio-menu{width:66px;min-width:66px;}
.research-root .research-native-radio-menu button{position:relative;}
.research-native-radio-menu button[aria-checked=true]:before{content:'\2022';position:absolute;left:7px;}
.research-root .research-native-menu button{height:19px;line-height:19px;padding:0 11px 0 21px;font:12px 'Segoe UI';white-space:nowrap;}
.research-native-menu hr{height:9px;}

.research-copy-notice{position:fixed;inset:0;margin:auto;width:320px;height:174px;max-width:calc(100vw - 16px);padding:0;border:4px double #747475;border-radius:0;background:#1c2430;color:#e7edf7;font:13.333px 'Segoe UI';box-shadow:none;}
.research-copy-notice::backdrop{background:transparent;}
.research-copy-icon{position:absolute;left:22px;top:18px;font-size:24px;font-weight:700;line-height:38px;}
.research-copy-notice>strong{position:absolute;left:67px;top:18px;font-size:14.667px;line-height:26px;}
.research-copy-notice>p{position:absolute;left:67px;top:61px;margin:0;line-height:21px;}
.research-copy-notice>button{position:absolute;right:14px;bottom:12px;width:101px;height:29px;border:2px solid #e7edf7;border-radius:0;background:#1c2430;color:#e7edf7;font:13.333px 'Segoe UI';}
.research-copy-notice>button:focus-visible{outline:1px dashed #e7edf7;outline-offset:-4px;}

.research-copy-icon{left:24px;top:27px;width:23px;height:22px;border:2px solid #e7edf7;font:700 18px/18px 'Segoe UI';text-align:center;}
.research-copy-notice>p{top:63px;}
.research-copy-notice>button{padding:0;text-align:center;}
.research-copy-notice>button:focus{outline:1px dashed #e7edf7;outline-offset:-4px;}

.readonly-choices{display:block;position:relative;min-width:0;height:25px;}
.readonly-choices:after{content:'\25be';position:absolute;right:2px;top:2px;bottom:2px;width:10px;background:#2b3442;color:#a8b6c8;font-size:11px;line-height:21px;text-align:center;pointer-events:none;}
.research-import .readonly-choices select{padding-right:12px;}
.readonly-choices-list{position:fixed;z-index:80;box-sizing:border-box;background:#1c2430;border:1px solid #a8b6c8;padding:1px;font:12px 'Segoe UI';color:#e7edf7;}
.readonly-choices-list>[role=option]{height:16px;line-height:16px;white-space:nowrap;padding:0;cursor:default;}
.readonly-choices-list>[aria-selected=true]{background:#263244;color:#fff;}
.readonly-choices-list{overflow-y:auto;scrollbar-width:thin;}
.research-import-existing>.readonly-choices{min-width:0;width:100%;}
.research-import-message{position:fixed;inset:0;margin:auto;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:0;border:4px double #747475;border-radius:0;background:#1c2430;color:#e7edf7;font:13.333px 'Segoe UI';box-shadow:none;overflow:auto;}
.research-import-message::backdrop{background:transparent;}
.research-import-message-icon{position:absolute;left:18px;top:16px;font:700 24px/38px 'Segoe UI';}
.research-import-message>strong{position:absolute;left:49px;top:16px;right:18px;font-size:14.667px;line-height:26px;}
.research-import-message>p{position:absolute;left:49px;top:50px;right:18px;bottom:69px;margin:0;display:flex;align-items:safe center;white-space:pre-wrap;font-size:13.333px;line-height:17px;overflow-wrap:anywhere;overflow:auto;}
.research-import-message-actions{position:absolute;right:14px;bottom:12px;display:flex;gap:8px;}
.research-import-message-actions>button{width:101px;height:29px;padding:0;text-align:center;border:2px solid #e7edf7;border-radius:0;background:#1c2430;color:#e7edf7;font:13.333px 'Segoe UI';}
.research-import-message-actions>button:focus{outline:1px dashed #e7edf7;outline-offset:-4px;}
.research-import-message-info>strong,.research-import-message-info>p{left:67px;}
.research-import-message-warning>strong,.research-import-message-warning>p{left:72px;}
.research-import-message-warning>.research-import-message-icon{left:24px;font-family:'Segoe UI Symbol';font-variant-emoji:text;}
.research-import-message-info>.research-import-message-icon{left:23px;top:27px;width:23px;height:22px;border:2px solid #e7edf7;font:700 18px/18px 'Segoe UI';text-align:center;}
@media(max-width:480px){.research-import-message{min-height:242px;}.research-import-message>p{bottom:76px;}.research-import-message-actions{left:10px;right:10px;}.research-import-message-actions>button{flex:1;min-width:0;width:101px;}}
.research-import-traits{gap:0;align-items:center;}
.research-import-traits>label:nth-child(1){width:77px;margin-right:14px;}
.research-import-traits>label:nth-child(2){width:48px;margin-right:14px;}
.research-import-traits>label:nth-child(3){width:55px;}
.research-import-grade{display:grid;grid-template-columns:68px 87px 30px 80px;grid-template-rows:25px 25px;row-gap:3px;column-gap:0;}
.research-import-grade>.grade-label-grader{grid-row:1;grid-column:1;padding-left:8px;}
.research-import .research-import-grade>.readonly-choices{grid-row:1;grid-column:2;width:87px;}
.research-import .research-import-grade>input[name=custom_grader]{grid-row:1;grid-column:3 / span 2;margin-left:6px;width:92px;}
.research-import-grade>.grade-label-value{grid-row:2;grid-column:1;padding-left:8px;}
.research-import .research-import-grade>input[name=grade_value]{grid-row:2;grid-column:2;width:44px;text-align:center;}
.research-import-grade>.grade-label-certificate{grid-row:2;grid-column:3;padding-left:8px;}
.research-import .research-import-grade>input[name=grade_cert_id]{grid-row:2;grid-column:4;width:80px;text-align:center;}
.research-import-photo-status{position:absolute;left:0;right:0;bottom:0;background:#1c2430;border:1px solid #9aa4b2;padding:6px;z-index:20;color:#e7edf7;font-size:12px;}
.research-import-photo-status[hidden]{display:none;}
/* Import Treeview uses centered vertical alignment and default west anchors.
   Keep the 28px rows and column widths from the original Tk dialog. */
.research-import-lots th,.research-import-lots td{vertical-align:middle;padding:0 7px;}
.research-import-lots th{height:36px;}
.research-import-lots td{height:28px;text-align:left;padding-left:4px;padding-right:4px;}
.research-import-lots td:nth-child(2){padding-left:7px;}
.research-import-lots td:first-child{text-align:center;}
.research-import-lots td.lot-thumbnail-cell,.collection-lots-table td.lot-thumbnail-cell{height:88px;padding:4px;white-space:normal;text-align:center;}
.lot-thumbnail-cell img{display:block;width:56px;height:80px;object-fit:contain;margin:auto;}
.lot-thumbnail-cell.photo-unavailable{font-size:11px;}
/* clam's small white square and cross, independent of browser dark controls. */
.research-import input[type=checkbox]{appearance:none;flex-shrink:0;padding:0;border:1px solid #9e9e9e;border-radius:0;background:#fff;position:relative;}
.research-import input[type=checkbox]:checked::after{content:'';position:absolute;inset:1px;background:linear-gradient(45deg,transparent 41%,#000 42% 58%,transparent 59%),linear-gradient(-45deg,transparent 41%,#000 42% 58%,transparent 59%);}
.research-import-traits>label{padding-left:4px;gap:4px;}
.research-import-numbering input:first-of-type{margin-left:7px;}
.research-import-numbering input:last-of-type{margin-left:7px;}
.research-import input[type=checkbox]:disabled{background:#d9d9d9;}
/* Tk entries indicate focus at their border; the browser outer halo moves
   beyond the native field and can cover adjacent labels. */
.research-import input:focus-visible,.research-import select:focus-visible{outline:none;border-color:#6aa6cc;}
.research-import input[type=checkbox]:focus-visible{outline:1px dotted #e7edf7;outline-offset:2px;}
.research-import button:focus-visible{outline:1px dotted #e7edf7;outline-offset:-4px;}
/* collection_ui._canvas_prompt_price, 380 x 209 at 1280 x 800. */
dialog.research-collection-price{width:380px;height:209px;background:#1c2430;overflow:auto;}
.collection-price-form{padding:20px 18px 16px;}
.collection-price-form label{display:block;font-size:13.333px;line-height:18px;}
.collection-price-form input{display:block;margin:7px 0 10px;height:25px;padding:1px 7px;border:2px solid #2b3442;border-radius:0;background:#1c2430;text-align:center;font:12px 'Segoe UI';}
.collection-price-form input:focus-visible{outline:none;border-color:#6aa6cc;}
.collection-price-form p{font-size:12px;line-height:17px;margin:0;color:#9aa4b2;}
.collection-price-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;}
.collection-price-actions button{width:101px;flex-shrink:0;}
.collection-price-form .collection-price-error{color:#ffc7ce;white-space:pre-wrap;margin-top:8px;}
.research-collection-price:has(.collection-price-error:not([hidden])){height:fit-content;min-height:209px;}
.collection-price-actions button:focus-visible{outline:1px dotted #e7edf7;outline-offset:-4px;}
/* Separate metadata/manual forms from collection_ui, keeping their own field order. */
dialog.research-collection-editor,dialog.research-collection-create{height:fit-content;overflow:auto;background:#1c2430;}
dialog.research-collection-editor{width:470px;}
dialog.research-collection-create{width:620px;}
.collection-editor-form{padding:14px 16px;}
dialog.research-collection-lots{height:620px;}
.collection-lots-shell{display:flex;flex-direction:column;margin:12px;border:1px solid #2b3442;background:#1c2430;height:calc(100% - 66px);padding:12px 14px 14px;gap:10px;}
.collection-lots-heading{padding-bottom:14px;}
.collection-lots-heading h3{margin:0 0 2px;font-size:14.666px;}
.collection-lots-heading>div{font-size:12px;color:#9aa4b2;}
.collection-lots-table{flex:1;min-height:0;overflow:auto;border:1px solid #2b3442;background:#1c2430;}
.collection-lots-table table{table-layout:fixed;min-width:700px;width:100%;border-collapse:collapse;font-size:12px;}
.collection-lots-table th,.collection-lots-table td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;padding:0 4px;vertical-align:middle;}
.collection-lots-table th{height:36px;background:#11161d;color:#e7edf7;font-weight:700;}
.collection-lots-table td{height:28px;border-bottom:0;font-weight:400;}
.collection-lots-table th:nth-child(1){width:68px;}.collection-lots-table th:nth-child(3){width:112px;}.collection-lots-table th:nth-child(4){width:132px;}.collection-lots-table th:nth-child(5){width:118px;}
.collection-lots-table th button{height:32px;width:100%;padding:0;border:0;background:transparent;}
.collection-lots-table tr[aria-selected=true]{background:#263244;}.collection-lots-table tbody tr:focus{outline:1px solid #8ab4ff;outline-offset:-1px;}
.collection-lots-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}.collection-lots-actions>button{width:101px;flex-shrink:0;}
.collection-lots-actions>span{flex:1;min-width:180px;margin-left:4px;font-size:12px;color:#9aa4b2;white-space:pre-wrap;}
.research-collection-lots .research-native-menu{min-width:160px;width:max-content;max-width:calc(100vw - 8px);}
.research-collection-lots .research-native-menu button{display:block;width:100%;border:0;background:transparent;font:12px 'Segoe UI';text-align:left;height:19px;padding:0 21px;}
.research-collection-lots .research-native-menu button:hover,.research-collection-lots .research-native-menu button:focus-visible{background:#263244;outline:none;}
.overlay-positive{color:#39e0b5;}.overlay-negative{color:#ff929e;}.overlay-warning{color:#e8cc88;}.overlay-muted{color:#9aa4b2;}.overlay-link{color:#8ab4ff;}
.collection-multiselect>button{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.collection-selector-popup{position:fixed;z-index:45;background:#1c2430;border:1px solid #2b3442;display:flex;flex-direction:column;padding:4px;gap:4px;min-height:80px;}
.collection-selector-popup[hidden]{display:none;}
.collection-selector-popup>[role=listbox]{flex:1;min-height:0;overflow:auto;font:12px 'Segoe UI';outline:none;}
.collection-selector-popup [role=option]{height:20px;line-height:20px;white-space:nowrap;cursor:default;}
.collection-selector-popup .collection-selector-active{background:#263244;}
.collection-selector-popup>button{flex-shrink:0;width:100%;}
.collection-window .research-native-menu{width:max-content;max-width:calc(100vw - 8px);min-width:140px;}
.collection-window .research-native-menu-single{min-width:112px;}
.collection-window .research-native-menu button{display:block;width:100%;height:19px;line-height:19px;border:0;background:transparent;text-align:left;padding:0 21px;font:12px 'Segoe UI';white-space:nowrap;}
.collection-window .research-native-menu button:hover,.collection-window .research-native-menu button:focus-visible{background:#263244;outline:none;}
.research-menu-arrow{float:right;margin-left:14px;}
.collection-window select{padding-right:14px;}
dialog.research-metadata-rename{width:460px;height:170px;background:#1c2430;overflow:auto;}
.metadata-rename-form{padding:14px 16px;}
.metadata-rename-form label{font-size:13.333px;font-weight:400;display:block;}
.metadata-rename-form input{height:25px;display:block;margin-top:6px;background:#1c2430;border:2px solid #2b3442;border-radius:0;padding:1px 7px;font:12px 'Segoe UI';}
.metadata-rename-form input:focus-visible{outline:none;border-color:#6aa6cc;}
.metadata-rename-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;}
.metadata-rename-actions button{min-width:101px;}
.metadata-rename-note{font-size:12px;color:#ffc7ce;white-space:pre-wrap;}
.research-metadata-rename:has(.metadata-rename-note:not([hidden])){height:fit-content;min-height:170px;}
.research-collection-create .collection-editor-form{padding:16px 18px;}
.collection-editor-row{display:grid;grid-template-columns:106px minmax(0,1fr);align-items:center;gap:10px;margin-bottom:6px;min-height:25px;}
.research-collection-create .collection-editor-row{grid-template-columns:104px minmax(0,1fr);margin-bottom:8px;}
.collection-editor-form input:not([type=checkbox]),.collection-editor-form select{height:25px;padding:1px 7px;border:2px solid #2b3442;border-radius:0;background:#1c2430;font:12px 'Segoe UI';}
.collection-editor-form input:focus-visible,.collection-editor-form select:focus-visible{outline:none;border-color:#6aa6cc;}
.collection-editor-form .suggestion-field{width:100%;min-width:0;}
.collection-editor-grader{display:flex;align-items:center;gap:6px;min-width:0;}
.collection-editor-grader .readonly-choices{width:106px;flex-shrink:0;}
.collection-editor-grader select{padding-right:12px;}
.collection-editor-grader input{flex:1;width:0;}
.collection-editor-numbering{display:flex;align-items:center;gap:6px;}
.collection-editor-numbering input:first-child{width:100px;}
.collection-editor-numbering input:last-child{flex:1;width:0;}
.collection-editor-numbering span{white-space:nowrap;color:#9aa4b2;margin-left:12px;}
.collection-editor-traits{display:flex;justify-content:center;gap:16px;margin:8px 0 10px;}
.collection-editor-traits label{display:flex;align-items:center;gap:4px;white-space:nowrap;}
.collection-editor-traits input{width:14px;height:14px;margin:0;}
.research-collection-create .collection-editor-traits{margin:0;justify-content:flex-start;}
.collection-editor-grade{display:flex;gap:5px;align-items:flex-start;flex-wrap:wrap;margin:0 0 8px 114px;}
.collection-editor-grade>label:first-child{display:flex;align-items:flex-start;gap:5px;}
.collection-editor-grade .collection-editor-grader{flex-wrap:wrap;width:106px;}
.collection-editor-grade .collection-editor-grader input{flex:auto;width:106px;}
.collection-editor-grade input[name=grade_value]{width:44px;text-align:center;}
.collection-editor-grade input[name=grade_cert_id]{width:90px;text-align:center;}
.collection-editor-grade>label:not(:first-child){margin-left:6px;}
.collection-editor-grade[hidden],.collection-editor-form [hidden]{display:none;}
.collection-editor-hint{font-size:12px;color:#9aa4b2;margin:16px 0 0;line-height:17px;}
.collection-editor-status{white-space:pre-wrap;color:#ffc7ce;font-size:12px;}
.collection-editor-actions{display:flex;justify-content:center;gap:10px;margin-top:10px;}
.research-collection-create .collection-editor-actions{justify-content:flex-end;margin-top:16px;}
.collection-editor-form .collection-editor-actions button{min-width:101px;}
@media(max-width:600px){.collection-editor-row,.research-collection-create .collection-editor-row{grid-template-columns:92px minmax(0,1fr);gap:8px;}.collection-editor-numbering{flex-wrap:wrap;}.collection-editor-numbering span{margin-left:0;}.collection-editor-numbering input:last-child{width:80px;flex:auto;}.collection-editor-grade{margin-left:100px;}.collection-editor-grade>label:first-child{flex-wrap:wrap;}.collection-editor-traits{gap:10px;}.collection-editor-grader{flex-wrap:wrap;}.collection-editor-grader input{width:100%;flex:auto;}.collection-editor-hint{overflow-wrap:anywhere;}}
@media(max-width:700px){.research-import-traits{grid-column:1 / span 2;row-gap:6px;}.research-import-grade{font-size:13.333px;}.research-import .research-import-grade>input[name=custom_grader]{max-width:92px;}}


/* Native trading window hierarchy; monetary labels and sorting come from Python. */
.research-trade-sale{width:430px;height:290px}.research-trade-exchange{width:1050px;height:620px}.research-trade-picker{width:880px;height:560px}.research-trade-received{width:650px;min-height:480px}
.research-trade-sale,.research-trade-exchange,.research-trade-picker,.research-trade-received{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:0;overflow:auto}
.trade-editor-form{padding:18px;display:flex;flex-direction:column;gap:12px;min-height:0;height:calc(100% - 42px);box-sizing:border-box}.trade-editor-form h3,.trade-editor-form h4{margin:0}.trade-editor-form footer{display:flex;justify-content:flex-end;gap:10px;margin-top:auto;flex-shrink:0}.trade-editor-form input,.trade-editor-form select{min-width:0;width:100%;box-sizing:border-box}.trade-field{display:grid;grid-template-columns:155px minmax(0,1fr);align-items:center;gap:8px}.trade-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;min-height:0;flex:1}.trade-columns>section{display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}.trade-table{overflow:auto;border:1px solid #344255;flex:1;min-height:120px}.trade-table table{min-width:440px;width:100%;table-layout:fixed}.trade-table th,.trade-table td{padding:7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trade-table th button{padding:0;background:transparent;border:0;color:inherit}.trade-table tr[aria-selected=true]{background:#284f7d}.trade-buttons{display:flex;gap:6px;flex-wrap:wrap}.trade-status{color:#e9b970;white-space:pre-wrap}.trade-status:empty{display:none}.trade-summary{font-size:13px}.trade-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}.trade-filters .trade-field{grid-template-columns:auto minmax(0,1fr)}.trade-list{display:flex;flex:1;min-height:0}.trade-list .trade-table{width:100%}.trade-pair,.trade-grades{display:grid;grid-template-columns:1fr 1fr;gap:10px}.trade-grades{grid-template-columns:1fr 1fr 1fr}.trade-pair .trade-field,.trade-grades .trade-field{grid-template-columns:auto;gap:4px}.trade-traits{display:flex;gap:24px}.trade-traits label{display:flex;gap:6px;align-items:center}.trade-traits input{width:auto}.research-trade-sale .trade-columns{display:flex;flex-direction:column;gap:14px}.trade-sale-card{font-weight:600}.research-trade-sale input{text-align:right}
@media(max-width:650px){.trade-columns{grid-template-columns:1fr;overflow:auto}.trade-columns>section{min-height:210px}.trade-field{grid-template-columns:120px minmax(0,1fr)}.trade-editor-form{padding:12px}.trade-filters{grid-template-columns:1fr}.trade-grades{grid-template-columns:1fr 1fr}.trade-traits{gap:12px}.research-trade-exchange{height:calc(100dvh - 16px)}}
/* Override the generic research modal dimensions for native trade forms. */
.research-dialog.research-trade-sale{width:430px;height:245px}.research-dialog.research-trade-exchange{width:1154px;height:692px}.research-dialog.research-trade-picker{width:880px;height:560px}.research-dialog.research-trade-received{width:650px;height:480px}
.research-dialog[class*=research-trade-]{max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);background:#1c2531}.research-trade-exchange .trade-editor-form{background:#0f1116}.trade-editor-form input,.trade-editor-form select{height:25px;padding:2px 7px;border:1px solid #34404e;border-radius:0;background:#1c2531;font-size:13px;font-weight:400}.trade-editor-form label{font-size:13px;font-weight:400}.trade-editor-form button{padding:5px 10px;border-radius:0;font-weight:400}.trade-editor-form footer{padding:0;border:0}.trade-table{background:#1c2531}.trade-table td{font-weight:400;font-size:12px}.trade-table th{background:#10161e}.research-trade-received .trade-editor-form{gap:8px}.research-trade-received .trade-grades{margin-left:163px}.research-trade-received .trade-grades .trade-field{grid-template-columns:auto}.research-trade-received .trade-grades span{font-size:11px}.research-trade-received .trade-traits{margin-left:163px}.research-trade-received .trade-pair .trade-field{grid-template-columns:auto minmax(0,1fr)}.research-trade-received .trade-pair{grid-template-columns:1fr 1fr}.trade-editor-form small{font-size:12px;color:#9aa4b2}
@media(max-width:650px){.research-trade-received .trade-grades,.research-trade-received .trade-traits{margin-left:0}.research-dialog.research-trade-exchange{height:calc(100dvh - 16px)}.research-dialog.research-trade-received{height:auto;min-height:480px}.research-trade-received .trade-pair{grid-template-columns:1fr}.research-trade-received .trade-grades{grid-template-columns:1fr 1fr 1fr}}

.research-trade-received .trade-grades,.research-trade-received .trade-traits{margin-left:0}.research-trade-received .trade-grades .trade-field>span{display:none}.research-trade-received .trade-grades{grid-template-columns:90px 65px 100px;gap:8px}.research-trade-received .trade-pair{grid-template-columns:110px minmax(0,1fr)}.research-trade-received .trade-pair>.trade-field:first-child{display:block}.research-trade-received .trade-field{grid-template-columns:175px minmax(0,1fr)}.research-trade-received .trade-pair .trade-field{grid-template-columns:auto minmax(0,1fr)}
@media(min-width:651px){.research-trade-received .trade-editor-form footer{margin-top:10px}.research-trade-sale .trade-field{grid-template-columns:115px minmax(0,1fr)}}
@media(max-width:650px){.research-trade-received .trade-field{grid-template-columns:110px minmax(0,1fr)}.research-trade-received .trade-grades{grid-template-columns:1fr 1fr 1fr}.research-trade-received .trade-pair{grid-template-columns:1fr}.research-trade-received .trade-traits{flex-wrap:wrap;gap:6px}}
/* Package 5: native journal (table, totals, lower two detail panes) and split archive. */
.trading-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#1c2531;padding:10px 12px;font-size:12px}
.trading-summary>button{margin-left:auto}.trading-search{display:flex;gap:10px;align-items:center;margin:12px 0;font-size:13px}.trading-search input{width:min(280px,100%);padding:5px 8px}
.trading-table{max-height:310px;border:1px solid #34404e}.trading-table table,.trading-totals table{min-width:1050px}.trading-table th,.trading-table td,.trading-totals td{padding:7px 6px;white-space:nowrap;vertical-align:middle}
.trading-table tbody tr,.archive-list tbody tr{cursor:pointer}.trading-table tbody tr[aria-selected=true],.archive-list tbody tr[aria-selected=true]{background:#284f7d}
.trading-table tbody tr:focus-visible,.archive-list tbody tr:focus-visible{outline:1px solid #9ebbd8;outline-offset:-2px}
.trading-totals{max-height:none}.trading-totals td{font-weight:bold}.trading-details{margin-top:12px}.trading-detail-caption{margin:0 0 8px;color:#a7b4c5;font-size:12px}
.trading-lower-details{display:grid;grid-template-columns:1fr 1fr;gap:14px}.trading-detail-column{min-width:0}.trading-detail-column h3{margin:3px 0 7px;font-size:13px}
.trading-lower-table{min-height:190px;max-height:230px;border:1px solid #34404e}.trading-lower-table table{min-width:520px}.trading-lower-table td,.trading-lower-table th{padding:7px 5px;white-space:nowrap}
.trading-detail-actions{display:flex;gap:8px;flex-wrap:wrap;margin:9px 0}.trading-detail-actions button{border-radius:0;padding:5px 11px}
.archive-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,1fr);gap:12px;min-height:500px}.archive-list,.archive-details{min-width:0}
.archive-list .table-wrap{max-height:520px}.archive-list table{min-width:580px}.archive-list th,.archive-list td{padding:8px 6px}.archive-details{background:#1c2531;padding:12px;max-height:600px;overflow:auto}
.archive-details .archive-photo{height:260px;min-height:260px}.archive-info{white-space:normal;overflow-wrap:anywhere;font-size:12px}.archive-info p{margin:7px 0;line-height:1.35}
.archive-lot{border-top:1px solid #34404e;margin-top:10px;padding-top:8px}.archive-photo-choices{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}.archive-photo-choices button{padding:5px 9px;font-size:11px}
@media(max-width:650px){.trading-lower-details,.archive-layout{grid-template-columns:minmax(0,1fr)}.archive-details{max-height:none}.trading-summary>button{margin-left:0}}

.trading-table .research-native-menu button{display:block;width:100%;min-height:20px;border:0;border-radius:0;padding:2px 10px;text-align:left;font-size:12px}
.trading-table .research-native-menu button:hover,.trading-table .research-native-menu button:focus-visible{background:#284f7d}

/* Journal/archive are owned windows, using the same palette and hierarchy as Tk. */
dialog.native-trading-window{padding:0;border:1px solid #2b3442;border-radius:0;box-sizing:border-box;background:#0f1115;color:#e7edf7;font:13.333px 'Segoe UI',sans-serif;overflow:hidden;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
dialog.native-trading-window::backdrop{background:transparent}
.native-trading{width:1160px;height:784px}
.native-archive{width:1104px;height:752px}
.native-trading-title{height:42px;background:#1c2430;display:flex;align-items:center;justify-content:space-between;padding:0 10px;flex:none}
.native-trading-title h2{margin:0;font:700 14.666px 'Segoe UI',sans-serif}
.native-trading-window button{border-radius:0;background:#1c2430;border:1px solid #e7edf7;color:#e7edf7;font:12px 'Segoe UI',sans-serif;padding:3px 9px;min-height:25px}
.native-trading-title>button{border:0;min-height:22px;width:22px;padding:0}
.native-trading-window .research-native-menu button{display:block;width:100%;border:0;min-height:20px;padding:2px 10px;text-align:left;font-size:12px}
.native-trading-window .research-native-menu button:hover,.native-trading-window .research-native-menu button:focus-visible{background:#284f7d}
.native-trading-body{height:calc(100% - 42px);padding:12px 14px;box-sizing:border-box;min-height:0;overflow:auto}
.native-trading>.native-trading-body{display:flex;flex-direction:column}
.native-trading .trading-summary{flex:none;border:1px solid #34404e;flex-wrap:nowrap;gap:6px;padding:10px 12px;font-size:12px}
.native-trading .trading-search{flex:none;margin:10px 0;font-size:13px}
.native-trading .trading-search input{height:25px;width:250px;padding:2px 7px;border:1px solid #34404e;border-radius:0;background:#1c2531}
.native-trading .trading-table{flex:1 1 auto;min-height:130px;max-height:none;background:#1c2531;overflow:auto}
.native-trading .trading-table table,.native-trading .trading-totals table{table-layout:fixed;min-width:1050px}
.native-trading .trading-table th,.native-trading .trading-table td,.native-trading .trading-totals td{height:25px;padding:3px 6px;text-align:center;font-size:12px;border-bottom:0}
.native-trading .trading-table th{font-weight:700;color:#e7edf7;background:#10161e}
.native-trading .trading-table th:nth-child(1),.native-trading .trading-totals td:nth-child(1){width:145px}
.native-trading .trading-table th:nth-child(2),.native-trading .trading-totals td:nth-child(2){width:95px}
.native-trading .trading-table th:nth-child(3),.native-trading .trading-table th:nth-child(4),.native-trading .trading-totals td:nth-child(3),.native-trading .trading-totals td:nth-child(4){width:96px}
.native-trading .trading-table th:nth-child(5),.native-trading .trading-totals td:nth-child(5){width:130px}
.native-trading .trading-table th:nth-child(6),.native-trading .trading-totals td:nth-child(6){width:135px}
.native-trading .trading-table th:nth-child(7),.native-trading .trading-totals td:nth-child(7){width:160px}
.native-trading .trading-table th:nth-child(8),.native-trading .trading-totals td:nth-child(8){width:250px}
.native-trading .trading-table td button{font:inherit;border:0;background:transparent;padding:0;margin:0;min-height:0}
.native-trading .trading-totals{flex:none;margin:4px 0 0;border-top:1px solid #9aa4b2;border-inline:1px solid transparent;overflow-x:auto}
.native-trading .trading-details{flex:none;margin:8px 0 0;min-height:205px}
.native-trading .trading-detail-caption{display:none}
.native-trading .trading-lower-details{gap:14px}
.native-trading .trading-lower-table{background:#1c2531;min-height:160px;max-height:160px}
.native-trading .trading-lower-table th{background:#10161e;font-weight:700;color:#e7edf7}
.native-trading .trading-lower-table td,.native-trading .trading-lower-table th{font-size:12px;font-weight:400;padding:4px 6px;border:0}
.native-trading .trading-lower-table th{font-weight:700;text-align:center}
.native-trading .journal-photo-name button{border:0;padding:0;min-height:0;background:transparent;font-weight:400}
.native-trading .trading-details>p.muted{display:none}
.native-trading .trading-detail-actions{margin:7px 0 0}
.native-trading .trading-pager{flex:none;margin:5px 0 0;font-size:11px}
.native-trading .trading-pager button{min-height:22px;padding:1px 6px}
.native-archive .archive-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1.6fr) minmax(340px,1fr);gap:12px}
.native-archive .archive-list{display:flex;flex-direction:column;min-height:0}
.native-archive .archive-list>.table-wrap{flex:1;max-height:none;background:#1c2531;border:1px solid #34404e}
.native-archive .archive-list th,.native-archive .archive-list td{height:25px;padding:4px 6px;border:0;font-size:12px}
.native-archive .archive-list th{font-weight:700;background:#10161e;color:#e7edf7}
.native-archive .archive-list table{min-width:580px}
.native-archive .archive-details{display:flex;flex-direction:column;max-height:none;padding:12px;min-height:0;overflow:hidden}
.native-archive .archive-photo{flex:none;height:260px;min-height:260px;border:0}
.native-archive .archive-photo img{max-height:260px}
.native-archive .archive-info{flex:1;min-height:0;overflow:auto;background:#0f1115;padding:6px;margin-top:10px;font:12px 'Consolas',monospace}
.native-archive .archive-info p{margin:0;line-height:1.3}
.native-archive .archive-photo-choices{flex:none;margin:4px 0 0}
@media(max-width:650px){
  .native-trading,.native-archive{width:calc(100vw - 16px);height:calc(100dvh - 16px)}
  .native-trading-body{padding:10px;overflow:auto}
  .native-trading .trading-summary{flex-wrap:wrap}
  .native-trading .trading-table{flex:none;height:220px}
  .native-trading .trading-details{flex:none}
  .native-trading .trading-lower-details{grid-template-columns:minmax(0,1fr)}
  .native-trading .trading-lower-table{min-height:140px;max-height:180px}
  .native-archive .archive-layout{height:auto;grid-template-columns:minmax(0,1fr)}
  .native-archive .archive-list>.table-wrap{flex:none;max-height:300px}
  .native-archive .archive-details{overflow:visible;min-height:500px}
  .native-archive .archive-info{max-height:300px;flex:auto}
}

/* Package 6: photo controls share the native journal and archive layout. */
.journal-photo-name { display:flex; align-items:center; gap:6px; }
.journal-photo-trigger { cursor:zoom-in; padding:3px; border-radius:4px; }
.journal-photo-trigger:focus-visible { outline:2px solid currentColor; }
.archive-photo { cursor:zoom-in; }
.archive-photo.archive-photo-full { cursor:zoom-out; max-height:80vh; overflow:auto; }
.archive-photo.archive-photo-full img { max-height:none; max-width:100%; object-fit:contain; }

/* Native Research has two fixed halves with stable folder/dollar glyphs. */
.research-result-table td.research-result-marks{padding:0;height:28px;overflow:hidden;white-space:nowrap;font-size:0}
.research-mark-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:50%;height:28px;background:#1c2430;vertical-align:top;cursor:pointer}
.research-root .research-mark-toggle input[type=checkbox]{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:inherit}
.research-mark-toggle>span{pointer-events:none;font:21.333px 'Segoe UI Symbol','Segoe UI',sans-serif;font-variant-emoji:text;line-height:28px;color:#e7edf7}
.research-mark-toggle:has(input:focus-visible){outline:1px solid #9ebbd8;outline-offset:-1px}
.research-mark-collection:has(input:checked){background:#ffd34d}
.research-mark-analysis:has(input:checked){background:#34d399}
.research-mark-collection[data-linked=true]{background:#2b6ea6}
.research-mark-collection[data-linked=true]:has(input:checked){background:#d58b35}
.research-mark-toggle:has(input:checked)>span{color:#111111}
.research-mark-collection[data-linked=true]:not(:has(input:checked))>span{color:#f5f7fb}
.research-mark-collection[data-linked=true]:has(input:checked)>span{color:#f5f7fb}
.research-mark-toggle:has(input:disabled){cursor:default;opacity:.55}
.photo-upload select { max-width:220px; }
/* Package 7: native-style collection currency and card-history hover. */
.collection-window .collection-metric-line [role=button]{cursor:context-menu;outline-offset:2px}
.collection-currency-warning{position:absolute;left:14px;bottom:150px;margin:0;color:#ffc979;font-size:11px;max-width:550px;white-space:pre-line;pointer-events:none}
.collection-card-tooltip{position:fixed;z-index:45;width:290px;max-height:250px;overflow:hidden;padding:9px 11px;background:#202936;border:1px solid #7890b0;color:#e7edf7;box-shadow:0 5px 20px #000b;pointer-events:none;text-align:left;font-size:11px}
.collection-card-tooltip p{margin:3px 0;font-size:11px}
.collection-card-tooltip figure{margin:3px 0;font-size:10px}
.collection-card-tooltip svg{height:95px;width:100%}
.collection-history{cursor:crosshair}
@media (max-width:600px){.collection-currency-warning{bottom:150px;left:10px;max-width:70%;font-size:10px}.collection-card-tooltip{width:min(290px,calc(100vw - 16px))}}
.collection-window .collection-history{pointer-events:all}

/* Package 8: settings_ui.py window hierarchy (without database operations). */
.rscard-settings{width:500px;height:470px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:0;color:#e7edf7;background:#1c2531;border:1px solid #6c7d94;overflow:hidden}
.rscard-settings::backdrop{background:#000a}
.rscard-settings-title{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:#141b25;border-bottom:1px solid #34404e}
.rscard-settings-close{width:30px;height:27px;display:grid;place-items:center;border:0;background:transparent;color:inherit;font-size:20px}
.rscard-settings-body{padding:16px 18px;height:calc(100% - 38px);overflow:auto;box-sizing:border-box}
.rscard-settings-section{padding:0 0 15px;margin:0 0 14px;border-bottom:1px solid #3b4654}
.rscard-settings-section:last-child{border:0}
.rscard-settings-section h3{margin:0 0 9px;font-size:14px}
.rscard-settings-section button{display:block;padding:5px 10px;border-radius:0;font-size:12px}
.rscard-settings-section button:disabled{opacity:.5;cursor:not-allowed}
.rscard-settings-help{margin:7px 0 0;color:#a7b4c5;line-height:1.45;font-size:12px;white-space:normal}
@media(max-width:550px){.rscard-settings{height:min(470px,calc(100dvh - 16px))}.rscard-settings-body{padding:12px}}

/* Package 12: long lists and explicitly selected duplicate physical IDs. */
.readonly-choices-list>[role=option]{overflow:hidden;text-overflow:ellipsis;}
.collection-multiselect>button{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.research-import-message-with-choice>p{bottom:113px;}
.research-message-choice{position:absolute;left:49px;right:18px;bottom:69px;display:flex;gap:8px;align-items:center;font:12px 'Segoe UI';}
.research-message-choice select{flex:1;min-width:0;height:25px;color:#e7edf7;background:#1c2430;border:1px solid #a8b6c8;}
@media(max-width:480px){.research-import-message-with-choice>p{bottom:126px}.research-message-choice{left:14px;right:14px;bottom:89px;}}
.research-message-choice select{font:12px 'Segoe UI',sans-serif;text-overflow:ellipsis;appearance:auto;}
.research-message-choice select option{color:#e7edf7;background:#1c2430;}

.research-message-choice-current{position:absolute;top:28px;left:0;right:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d4e2f4;font:11px 'Segoe UI',sans-serif;}

/* Package 13: filter the original physical-ID selector; preserve its desktop action. */
.research-import-card-filter{display:flex;gap:8px;align-items:center;flex-shrink:0;min-width:0}
.research-import-card-filter label{display:flex;align-items:center;gap:8px;flex:1;min-width:0;font-size:12px}
.research-import-card-filter input{min-width:0;flex:1;width:auto}
.research-import-card-count{font-size:11px;color:#aab9cd;white-space:nowrap}
.suggestion-list [role=option]{overflow-wrap:anywhere}
@media(max-width:700px){.research-import-card-filter{flex-wrap:wrap}.research-import-card-filter label{width:100%;flex-basis:100%}.research-import-card-count{margin-left:auto}}
/* Native manual-photo form; original-only is the explicit non-AI mode. */
dialog.research-manual-photo{width:680px;height:275px}
.manual-photo-body{position:relative;height:229px;background:#171b22;font:13.333px 'Segoe UI',sans-serif}
.manual-photo-card{position:absolute;left:16px;right:16px;top:16px;height:21px;line-height:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.manual-photo-path-row{position:absolute;left:16px;right:16px;top:45px;height:29px;display:flex;gap:8px;align-items:center}
.manual-photo-path-row input:not([type=file]){min-width:0;flex:1;height:25px;padding:1px 4px;border-radius:0;background:#1c2430;border:2px solid #2b3442;color:#e7edf7;font:inherit}
.manual-photo-body button{font:inherit;height:29px;padding:2px 12px;border-radius:0}
.manual-photo-path-row button{width:101px;flex-shrink:0}
.manual-photo-corners{position:absolute;left:16px;right:16px;top:84px;height:21px;display:flex;gap:8px;align-items:center}
.manual-photo-corners select{width:165px;height:21px;padding:0 12px 0 4px;border-radius:0;background:#1c2430;color:#e7edf7;border:2px solid #2b3442;font:inherit}
.manual-photo-corners .readonly-choices{height:21px}
.manual-photo-corners .readonly-choices:after{line-height:17px}
.manual-photo-status{position:absolute;left:16px;right:16px;top:115px;margin:0;min-height:19px;line-height:19px;color:#9aa4b2}
.manual-photo-actions{position:absolute;right:16px;top:142px;display:flex;gap:8px}
.manual-photo-actions button{width:101px}
.manual-photo-path-row input:focus-visible,.manual-photo-corners select:focus-visible{outline:none;border-color:#6aa6cc}
@media(max-width:680px){dialog.research-manual-photo{width:calc(100vw - 16px);height:310px}.manual-photo-body{height:264px}.manual-photo-actions{top:180px}}

/* Existing Windows/Tk glyph atlas: fixed native28px halves, independent of emoji fallback. */
.research-mark-toggle>span{font-size:0;width:28px;height:28px;background-image:url('./native-research-glyphs.png');background-repeat:no-repeat;flex:none}
.research-mark-collection>span{background-position:0 0}
.research-mark-collection:has(input:checked)>span{background-position:-28px 0}
.research-mark-collection[data-linked=true]>span{background-position:-56px 0}
.research-mark-collection[data-linked=true]:has(input:checked)>span{background-position:-84px 0}
.research-mark-analysis>span{background-position:-112px 0}
.research-mark-analysis:has(input:checked)>span{background-position:-140px 0}

/* Match the reference Tk/Windows14px scrollbar geometry and palette. */
.research-table-scroll::-webkit-scrollbar{width:14px;height:14px}
.research-table-scroll::-webkit-scrollbar-track,.research-horizontal-scroll::-webkit-scrollbar-track{background:#f0f0f0;border:0}
.research-table-scroll::-webkit-scrollbar-thumb,.research-horizontal-scroll::-webkit-scrollbar-thumb{background:#c1c1c1;border:1px solid #f0f0f0;min-height:16px;min-width:16px}
.research-table-scroll::-webkit-scrollbar-corner{background:#f0f0f0}
.research-horizontal-scroll{right:22px;background:#f0f0f0}
.research-table-scroll::-webkit-scrollbar-button:single-button,.research-horizontal-scroll::-webkit-scrollbar-button:single-button{display:block;width:14px;height:14px;background-color:#f0f0f0;background-position:center;background-repeat:no-repeat}
.research-table-scroll::-webkit-scrollbar-button:vertical:decrement{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M1 5L4 2L7 5Z' fill='%23505050'/%3E%3C/svg%3E")}
.research-table-scroll::-webkit-scrollbar-button:vertical:increment{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M1 2L4 5L7 2Z' fill='%23505050'/%3E%3C/svg%3E")}
.research-horizontal-scroll::-webkit-scrollbar-button:horizontal:decrement{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M5 1L2 4L5 7Z' fill='%23505050'/%3E%3C/svg%3E")}
.research-horizontal-scroll::-webkit-scrollbar-button:horizontal:increment{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2 1L5 4L2 7Z' fill='%23505050'/%3E%3C/svg%3E")}

.collection-card-tooltip{pointer-events:auto}
.collection-spark-popup{width:min(420px,calc(100vw - 16px));max-height:280px}
.collection-spark-popup svg{height:160px}
.collection-overlay-price{cursor:pointer}

.collection-spark-popup{width:min(680px,calc(100vw - 16px));max-height:350px}
.collection-spark-popup>strong{display:block;text-align:left}
.collection-sale-chart{display:grid;grid-template-columns:minmax(0,1fr) 175px;gap:14px;align-items:start}
.collection-sale-chart figure{min-width:0;margin:0}
.collection-sale-chart svg{height:225px}
.collection-recent-sales{max-height:275px;overflow:auto;border-left:1px solid #344253;padding-left:9px;font-size:11px}
.collection-recent-sale{display:flex;justify-content:space-between;gap:6px;padding-top:5px;white-space:nowrap}
.collection-recent-sales>strong{display:block;white-space:nowrap;margin-bottom:7px}
.collection-recent-sales{scrollbar-gutter:stable}
.collection-recent-sale time{color:#aebaca}
.collection-recent-sale span{text-align:right;font-variant-numeric:tabular-nums}
@media(max-width:600px){.collection-sale-chart{grid-template-columns:minmax(0,1fr) 125px;gap:6px}.collection-recent-sales{font-size:10px;padding-left:5px}.collection-sale-chart svg{height:180px}}

/* Preserve the picker column headings while the long card list scrolls. */
.trade-list .trade-table thead{position:sticky;top:0;z-index:1;background:var(--panel)}

.trading-currency{cursor:pointer}.trade-journal-preview{display:inline-flex;align-items:center;justify-content:center;min-height:24px;white-space:nowrap;vertical-align:middle}.trade-journal-sheet{display:inline-flex;align-items:center;height:24px}.trade-journal-sheet img{display:block;max-height:24px;width:auto}.trade-deal-large-preview{position:fixed;z-index:80;pointer-events:none;background:var(--panel);border:1px solid var(--line);padding:0}.trade-deal-large-preview img{display:block;max-width:100%;height:auto}

/* Shared shell: content slots leave room for future side rails. Dark theme only. */
:root{font-family:'Segoe UI Variable','Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums;--workspace-width:1480px}
body.desktop-collection,body.desktop-research{overflow:auto}
body>.top,body.desktop-collection>.top,body.desktop-research>.top{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:10px 20px 0;min-height:80px;background:#10151d;border-bottom:1px solid #2b3442;position:relative;z-index:20}
.identity-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:30px;width:100%}.brand{font-size:23px;font-weight:750;letter-spacing:-.8px}.beta{font-size:11px;color:#97a4b7;letter-spacing:.4px}#auth-controls{display:flex;align-items:center;gap:9px}.text-button{background:transparent;border:0;padding:3px 5px;font-size:12px}.registration{font-size:12px;padding:4px 9px}.identity-row .demo{margin-left:0;padding:3px 6px;font-size:10px}
.top .primary-nav{display:flex;align-items:center;gap:12px;margin:0;overflow:visible;flex-wrap:wrap}.primary-nav>button{background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;color:#c1cad7;padding:7px 0 9px;font-size:13px;white-space:nowrap}.primary-nav>button[aria-current=page]{background:transparent;color:#fff;border-bottom-color:#a9caff}.utility-nav,.profile-menu{position:relative;font-size:12px}.utility-nav summary,.profile-menu summary{cursor:pointer;padding:6px;list-style:none}.utility-nav>div,.profile-menu>div{position:absolute;left:0;top:100%;min-width:180px;padding:6px;background:#1c2430;border:1px solid #46546a;box-shadow:0 10px 25px #0008;z-index:40}.utility-nav button,.profile-menu button{display:block;width:100%;font-size:12px;padding:8px}
.layout,body.desktop-collection .layout,body.desktop-research .layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,var(--workspace-width)) minmax(0,1fr);min-height:calc(100dvh - 80px)}
.layout>main,body.desktop-collection main,body.desktop-research main{grid-column:2;width:100%;max-width:none;padding:16px;min-width:0}
body.desktop-collection .page-head,body.desktop-research .page-head{display:none}body.desktop-collection main>footer,body.desktop-research main>footer{display:flex;margin-top:12px}#content{min-width:0}
.collection-window{position:relative;inset:auto;min-height:calc(100dvh - 150px);display:flex;flex-direction:column;border-radius:7px;overflow:visible}.collection-titlebar{border-radius:7px 7px 0 0}.collection-header-surface{position:relative;inset:auto!important;margin:12px;padding:12px}.collection-summary-row{min-height:150px}.collection-metric-line{white-space:normal;height:auto;line-height:1.6;flex-wrap:wrap;gap:6px 18px}.collection-summary{height:auto;min-width:0}.collection-controls{flex-shrink:0;min-width:0;max-width:100%}.collection-search-sort{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.collection-grid-viewport{position:relative;inset:auto!important;margin:0 12px 12px;min-height:300px;max-height:64dvh;overflow:auto;scrollbar-gutter:stable;flex:1}.collection-grid{content-visibility:auto;contain-intrinsic-size:auto 650px}.collection-window .desktop-card{border-radius:5px}.collection-window .desktop-card-name{height:auto;min-height:20px;font-size:14px}.desktop-card-price{font-size:14px;font-weight:650}.desktop-card-overlay{height:auto;min-height:178px;max-height:calc(100% - 35px);overflow:auto}.card-overlay-line{height:auto;min-height:18px;white-space:normal;overflow-wrap:anywhere}.collection-history text{font-family:'Segoe UI',Arial,sans-serif;font-variant-numeric:tabular-nums}.collection-history{width:100%;max-width:680px}.collection-window button{border-radius:4px;border-width:1px}
.research-root{position:relative;inset:auto;min-height:calc(100dvh - 150px);height:calc(100dvh - 130px);background:#0f1115;border-radius:7px}.research-result-filters{flex-wrap:wrap;white-space:normal;min-width:0;height:auto}.research-result-count{white-space:normal}.research-result-footer{flex-wrap:wrap;height:auto}.research-root{grid-template-rows:auto auto minmax(240px,1fr) auto}.research-search{min-width:0}.research-results-shell{min-height:240px}.research-root input{min-width:0}
.auth-dialog{width:min(440px,calc(100% - 24px));padding:22px}.auth-dialog p{font-size:13px;color:#a8b5c8}.auth-dialog .auth-providers{display:grid;gap:8px;margin:16px 0}.auth-dialog .auth-providers button{text-align:center}.auth-dialog label:has(input[type=checkbox]){display:flex;gap:8px;align-items:center;font-size:12px}.auth-dialog input[type=checkbox]{width:auto}
@media(min-width:1500px){.collection-header-surface{grid-template-columns:minmax(210px,1fr) minmax(260px,600px) minmax(280px,356px);gap:12px}.collection-summary{height:auto}.collection-controls{width:100%;min-width:0}}
@media(max-width:800px){.collection-summary-row{flex-direction:column;align-items:stretch;gap:12px}.collection-controls{width:100%}.collection-metric-line{display:flex}.collection-metric-line>span{display:block}.collection-summary{height:auto}.collection-history{height:auto;min-height:120px}.research-search{grid-template-columns:minmax(0,1fr) auto auto}.research-search input{grid-column:1/-1}.research-result-filters>input{width:120px}.research-result-filters>button:first-of-type{margin-left:0}.research-result-footer>span:first-child{white-space:normal}}
@media(max-width:600px){body>.top,body.desktop-collection>.top,body.desktop-research>.top{padding:8px 12px 0}.identity-row{gap:6px 8px}.identity-row .demo{width:100%;border:0;background:transparent;padding:0 0 3px}.top .primary-nav{gap:12px}.primary-nav>button{font-size:12px}.layout>main,body.desktop-collection main,body.desktop-research main{padding:8px}.collection-window{min-height:0}.collection-header-surface{margin:8px;padding:10px}.collection-grid-viewport{margin:0 8px 8px;height:60dvh;max-height:none}.research-root{height:auto;min-height:calc(100dvh - 145px);padding:5px;gap:6px;grid-template-rows:auto auto minmax(340px,60dvh) auto}.research-result-filters{gap:8px;padding:8px}.research-result-filters>button:first-of-type,.research-result-filters>button:nth-of-type(2){width:auto}.research-result-footer{padding:6px;gap:8px}.page-head{margin-bottom:12px}footer{overflow-wrap:anywhere}}
.photo-zoom{width:min(1200px,calc(100% - 16px));height:94dvh;padding:12px}.photo-zoom>button{position:sticky;top:0;z-index:1}.photo-zoom>img{display:block;max-width:100%;height:auto;margin:auto}.archive-photo img{max-width:100%;object-fit:contain}
/* Optional connector status occupies its own compact grid row. */
.research-root:has(>.connector-status){grid-template-rows:auto auto auto minmax(240px,1fr) auto}.research-root>.research-search{min-height:52px}.research-root>.research-result-filters{align-content:center;min-height:40px}.research-root>.connector-status{min-height:0}.research-result-footer>span:first-child{max-width:none}
@media(max-width:600px){.research-root:has(>.connector-status){grid-template-rows:auto auto auto minmax(340px,60dvh) auto}.research-root>.research-search{min-height:82px}.research-root>.research-result-filters{align-items:center;align-content:start}.research-root .research-result-footer>span{display:inline}.research-result-footer>span:first-child{flex-basis:100%}}
/* Important card metadata remains readable with long names and narrow cells. */
.collection-window .desktop-card-name{top:6px;min-height:36px;max-height:42px;flex-wrap:wrap;align-content:center;line-height:18px;overflow:auto;white-space:normal;gap:0 4px}.desktop-card-base,.desktop-card-edition{overflow:visible;white-space:normal;overflow-wrap:anywhere;max-width:100%;flex-shrink:1}.desktop-card-collection{top:50px;white-space:normal;max-height:32px;line-height:16px;overflow:auto;overflow-wrap:anywhere}.desktop-card-price{top:86px}.desktop-card .photo-placeholder{top:110px}.desktop-card-grade{top:83px}.collection-window .desktop-card{min-height:300px}
/* Completed journal now lives inside its own section, without a modal owner. */
body.desktop-trading{overflow:auto}.desktop-trading .page-head{display:none}.desktop-trading .layout>main{padding:16px}.retained-section[hidden]{display:none!important}
section.native-trading-window{position:relative;inset:auto;margin:0;width:100%;height:auto;min-height:calc(100dvh - 150px);max-width:none;max-height:none;border-radius:6px;overflow:visible}
section.native-trading-window .native-trading-body{height:auto;min-height:calc(100dvh - 155px);overflow:visible;padding:14px}
section.native-trading-window .trading-table{flex:none;max-height:340px;min-height:180px;overflow:auto}section.native-trading-window .trading-details{min-height:220px;flex:1}.desktop-trading>.top{display:flex!important}.desktop-trading main>footer{display:flex!important}
@media(min-width:651px){section.native-trading-window .native-trading-body{height:calc(100dvh - 125px);min-height:620px}section.native-trading-window .trading-table{flex:1 1 auto;max-height:none}section.native-trading-window .trading-details{flex:0 0 auto}}
@media(max-width:600px){.desktop-trading .layout>main{padding:8px}section.native-trading-window .native-trading-body{padding:10px}.trading-lower-details{grid-template-columns:minmax(0,1fr)}}
.research-result-footer>span:first-child:empty{display:none}.research-result-footer:has(>span:first-child:empty):not(:has(button)){min-height:0;padding:0;border:0}
.collection-spark-popup,.collection-recent-sales,.collection-history{font-family:Arial,'Segoe UI',sans-serif;font-variant-numeric:tabular-nums;font-stretch:normal;font-weight:400;letter-spacing:normal}
.collection-sale-chart svg text{font-family:Arial,'Segoe UI',sans-serif;font-weight:400;font-stretch:normal;letter-spacing:normal}.collection-recent-sales{font-size:12px;line-height:1.5}.collection-spark-popup figcaption,.collection-spark-popup .muted{font-family:Arial,'Segoe UI',sans-serif;font-size:12px}.collection-overlay-value{display:inline-block;cursor:pointer}.collection-overlay-value:focus-visible{outline:1px solid #8ab4ff;outline-offset:2px}.collection-history{height:190px}
@media(max-width:600px){.collection-sale-chart{grid-template-columns:minmax(0,1fr)}.collection-recent-sales{max-height:135px;border-left:0;border-top:1px solid #344253;padding:8px 0 0;font-size:12px}.collection-spark-popup{max-height:min(550px,85dvh);overflow:auto}.collection-sale-chart svg{height:auto;min-height:140px}}
/* Align both header rows with the centered workspace on every section. */
body>.top,body.desktop-collection>.top,body.desktop-research>.top{padding-inline:0}
.top>.identity-row,.top>.primary-nav{width:min(100%,var(--workspace-width));margin-inline:auto;padding-inline:16px}
@media(max-width:600px){.top>.identity-row,.top>.primary-nav{padding-inline:8px}}
.research-root>.research-search{grid-template-columns:minmax(0,1fr) 126px;min-height:52px;width:60%;justify-self:center}
@media(max-width:800px){.research-root>.research-search{width:100%}}
.research-root>.research-search>input,.research-root>.research-search>button{grid-column:auto;grid-row:auto}
.connector-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:26px}
.connector-lamp{display:inline-block;flex:0 0 14px;width:14px;color:#929ba8;font-size:16px;font-weight:700;line-height:18px}
.connector-status[data-connected=true] .connector-lamp{color:#61db91}
.connector-summary,.connector-meta{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}.connector-status{flex-direction:column;gap:3px}.connector-meta{font-size:11px;color:#a8b5c8}.connector-meta a{display:inline-block;padding:2px 7px;border:1px solid #69788c;border-radius:3px;text-decoration:none}
.connector-status>[hidden]{display:none}
.research-result-table{width:100%;min-width:899px}
.research-result-table col:nth-child(3){width:auto!important}
.research-result-filters{justify-content:center}
.top>.primary-nav,.connector-status{justify-content:center}
.top>.identity-row{justify-content:center}
.research-result-table{min-width:992px}
.research-table-surface{min-width:996px}
.research-result-table col:first-child{width:156px!important}
.research-result-table td.research-lot-photo{height:190px;padding:5px 8px;vertical-align:middle}
.research-lot-photo img{display:block;width:140px;height:180px;object-fit:contain;margin:auto}
.research-lot-photo.photo-unavailable{font-size:11px;color:var(--muted);white-space:normal}
.research-result-table td{vertical-align:middle}
.research-result-table col:nth-child(4){width:140px!important}
.research-result-table col:nth-child(5){width:160px!important}
.research-result-table col:nth-child(6){width:130px!important}
.research-result-table col:nth-child(7){width:100px!important}
.research-result-table td:nth-child(3){font-size:16px;line-height:1.45;white-space:normal;overflow-wrap:anywhere;padding:8px 12px}
.research-result-table td:nth-child(n+4){font-size:14px}
/* Research results: calm row structure, persistent headings and clear values. */
.research-result-table thead th{position:sticky;top:0;z-index:3;box-shadow:0 1px 0 #394657}
.research-result-table tbody tr[data-item-url] td{border-bottom:1px solid #344050}
.research-result-table tbody tr[data-item-url]:nth-child(even){background:#1e2835}
.research-result-table tbody tr[data-item-url]:hover{background:#263448}
.research-result-table tbody tr[data-item-url]:has(input:checked){background:#273b53}
.research-result-table td:nth-child(4){border-left:1px solid #344050;text-align:right;padding:8px 16px 8px 10px;font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;color:#e6efff;white-space:normal;overflow-wrap:anywhere}
.research-result-table td:nth-child(5){padding:8px 12px;font-size:12px;color:#a7b4c7;white-space:nowrap}
.research-result-table td:nth-child(6),.research-result-table td:nth-child(7){padding:8px;text-align:center;font-size:12px}
.research-type-badge,.research-grade-badge{display:inline-block;padding:4px 8px;border-radius:4px;line-height:1.3;white-space:nowrap}
.research-type-badge{color:#b9c6d9;background:#263140;border:1px solid #3a4759}
.research-type-badge.is-auction{color:#adceff;background:#233651;border-color:#385578}
.research-grade-badge{color:#efd49b;background:#393326;border:1px solid #5c5035;font-weight:600}
.research-empty-value{color:#68768a}
.research-result-table td:nth-child(n+4){text-align:center;padding:8px 10px}
/* Center lot information against the photograph. */
.identity-row>#connection{display:none}
.research-result-table thead th{vertical-align:middle}
.research-result-table tbody tr[data-item-url] td:not(.research-lot-photo){vertical-align:middle}
.research-result-table tbody tr[data-item-url] td.research-result-marks{padding-top:0}
.research-result-table tbody tr[data-item-url] .research-mark-toggle{vertical-align:top}
.research-result-table tbody tr[data-item-url] .research-type-badge,.research-result-table tbody tr[data-item-url] .research-grade-badge{vertical-align:top}
/* Unmarked atlas tiles follow the row highlight instead of leaving dark blocks. */
.research-mark-toggle:not(:has(input:checked)):not([data-linked=true]){background:transparent}
.research-mark-toggle:not(:has(input:checked)):not([data-linked=true])>span{mix-blend-mode:lighten}
/* Card metadata uses its actual line count, without reserved empty lines. */
.collection-window .desktop-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr);align-items:stretch;align-content:stretch}
.collection-window .desktop-card-name{position:static;height:auto;min-height:18px;max-height:36px;margin:8px 11px 0;align-content:start}
.collection-window .desktop-card-collection{position:static;margin:3px 10px 0;max-height:32px}
.collection-window .desktop-card-price{position:relative;top:auto;left:auto;right:auto;margin:4px 8px 0;min-height:18px}
.collection-window .desktop-card .photo-placeholder{position:relative;inset:auto;margin:6px 7px 9px;min-height:0;overflow:hidden}
.collection-window .desktop-card-price .desktop-card-grade{top:0;right:0}
.collection-window .desktop-card-price:has(.desktop-card-grade){padding-inline:46px}
.collection-overlay-value{cursor:default}
.collection-window button.collection-overlay-chart{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:2px;margin:0 0 0 5px;vertical-align:middle;background:transparent;border:0;color:var(--accent)}
.collection-window button.collection-overlay-chart:hover{background:#273548}
body.desktop-collection .retained-section>.loading{text-align:center;display:grid;place-items:center;min-height:calc(100dvh - 160px)}
.collection-window button.collection-overlay-chart[aria-pressed=true]{color:#34d399;background:#173d36}
.overlay-purchase{position:relative;display:inline-block;cursor:help}
.overlay-purchase:hover::after,.overlay-purchase:focus-visible::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);white-space:nowrap;pointer-events:none;background:#263242;color:#e7edf7;border:1px solid #60738c;padding:4px 7px;z-index:5;font-size:12px}
dialog.research-manual-photo.manual-perspective{width:min(680px,calc(100vw - 24px));height:fit-content;min-height:0;max-height:94dvh;overflow:auto}
dialog.research-manual-photo.manual-perspective:has(.perspective-source:not([hidden])){width:min(900px,calc(100vw - 24px))}
dialog.research-manual-photo.manual-perspective:has(.perspective-result:not([hidden])){width:min(1100px,calc(100vw - 24px))}
.manual-perspective .perspective-body{padding:14px;display:grid;gap:10px;min-height:0}
.manual-perspective .perspective-body{text-align:center}.perspective-card-title{font-size:17px;font-weight:700;line-height:24px;overflow-wrap:anywhere}.manual-perspective .perspective-lot{text-align:center;display:grid;grid-template-columns:44px minmax(0,1fr) 44px}.perspective-lot>span{text-align:center;grid-column:2;grid-row:1}.perspective-lot>img{grid-column:1;grid-row:1}.perspective-lot::after{content:'';grid-column:3;grid-row:1}.manual-perspective .perspective-lots h3{text-align:center}.manual-perspective .perspective-controls input{text-align:center}.manual-perspective .perspective-result img{display:block;margin-inline:auto}.manual-perspective .perspective-result>p{margin:0 0 6px}
.manual-perspective .research-dialog-title{position:sticky;top:0;z-index:3;flex-shrink:0}.manual-perspective .perspective-actions{position:sticky;bottom:0;z-index:2;background:#0f1115;padding:8px 0}.manual-perspective .perspective-lot{height:auto;min-height:72px;text-align:center}.manual-perspective .perspective-lot-list{grid-auto-rows:minmax(72px,auto);flex-shrink:0}
.perspective-lots{min-width:0}.perspective-lots h3{font-size:13px;margin:0 0 8px}.perspective-lot-list{max-height:180px;overflow:auto;display:grid;gap:6px}.perspective-lot{display:flex;align-items:center;gap:10px;width:100%;min-width:0;text-align:left}.perspective-lot img{width:44px;height:58px;object-fit:contain;flex-shrink:0}.perspective-lot>span{min-width:0;overflow-wrap:anywhere}.perspective-lot small{display:block;margin-top:4px;color:var(--muted)}.perspective-lot[aria-pressed=true]{border-color:var(--accent);background:#263b57}
.perspective-controls,.perspective-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:center}.perspective-controls input{flex:1 0 100%;min-width:0}.perspective-actions button{min-width:100px;text-align:center}.perspective-source[hidden],.perspective-result[hidden]{display:none}.perspective-workspace:has(.perspective-source[hidden]):has(.perspective-result[hidden]){display:none}
.perspective-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}.perspective-workspace:has(.perspective-result:not([hidden])){grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.perspective-source{position:relative;justify-self:center;max-width:100%;width:fit-content;min-height:0}.perspective-source img{display:block;max-width:100%;max-height:62dvh;width:auto;height:auto}.perspective-source svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;overflow:visible}.perspective-source circle{fill:#fff;stroke:#1986ff;stroke-width:3;vector-effect:non-scaling-stroke;cursor:grab}.perspective-outline{fill:#4f8cff33;stroke:#1986ff;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.perspective-result img{max-width:100%;max-height:62dvh;object-fit:contain}.perspective-status{margin:0;min-height:24px}
@media(max-width:600px){.perspective-workspace:has(.perspective-result:not([hidden])){grid-template-columns:minmax(0,1fr)}.perspective-source img{max-height:55dvh}}
.collection-editor-grade{align-items:flex-start}.collection-editor-grade>label{height:25px;line-height:25px;display:inline-flex;align-items:center}.collection-editor-grade>label:first-child{height:auto;align-items:flex-start;line-height:25px}.collection-editor-grade input:not([type=checkbox]){line-height:21px;padding-block:0}
.collection-editor-form .readonly-choices,.collection-editor-form .readonly-choices>button{min-height:25px;height:25px;line-height:21px}.collection-editor-form .readonly-choices>button{padding-block:0;display:flex;align-items:center}
.trade-journal-preview{min-height:64px}.trade-journal-sheet{height:64px}.trade-journal-sheet img{max-height:64px}
.trading-item-thumbnail{display:block;width:44px;height:60px;object-fit:contain}.native-trading .trading-lower-table th,.native-trading .trading-lower-table td{text-align:left;vertical-align:middle}.native-trading .trading-lower-table td:not(:first-child),.native-trading .trading-lower-table th:not(:first-child){text-align:center}.journal-photo-name{justify-content:flex-start}.journal-photo-trigger{flex-shrink:0}
.trade-result-positive{color:#34d399}.trade-result-negative{color:#ff6b7b}.trade-result-neutral{color:inherit}
.native-trading .trading-summary{display:flex;flex-wrap:wrap;gap:16px;padding:16px 18px;align-items:center}
.trading-summary-counts,.trading-summary-money{display:flex;gap:24px;align-items:stretch;flex-wrap:wrap}.trading-summary-counts{padding-right:24px;border-right:1px solid #3c4858}.trading-summary-metric{display:grid;gap:6px;min-width:100px;text-align:left}.trading-summary-metric>span:first-child{font-size:12px;color:#aebaca}.trading-summary-metric>strong{font-size:28px;font-weight:700;line-height:1.1}.trading-summary-money .trade-result{font-size:22px;line-height:1.25;font-weight:650}.native-trading .trading-summary>button{margin-left:auto;align-self:center}
@media(max-width:650px){.trading-summary-counts{border-right:0;border-bottom:1px solid #3c4858;padding:0 0 12px;width:100%;gap:12px}.trading-summary-metric{min-width:80px}.trading-summary-money{gap:16px}.trading-summary-metric>strong{font-size:25px}}
.collection-header-surface>.collection-history{display:block;position:relative;inset:auto;grid-column:1/-1;justify-self:center;margin-inline:auto}
.collection-window .desktop-card-name{max-height:none;overflow:visible}
.collection-window .desktop-card-collection{max-height:none;overflow:visible}
.card-overlay-line.has-chart{display:flex;align-items:center;gap:4px}.collection-overlay-text{flex:1;min-width:0}.collection-window button.collection-overlay-chart{flex:0 0 22px;margin-left:0}.overlay-purchase{color:#e6c176}.overlay-normal{color:#e7edf7}
.collection-editor-grade>label{gap:5px;flex-shrink:0}
.research-result-table col:nth-child(2){width:76px!important}
.research-result-table td.research-result-marks{padding-inline:4px}
.research-result-marks .research-mark-toggle{width:30px;height:30px;margin:0 2px;border:1px solid #48586b;border-radius:0;transition:border-color .12s,background-color .12s}
.research-result-marks .research-mark-toggle:not(:has(input:checked)):not([data-linked=true]){background:#273446}
.research-result-marks .research-mark-toggle:hover{border-color:#9ab2d1;box-shadow:0 0 0 1px #667c9933}
.research-result-marks .research-mark-toggle:has(input:checked){border-color:transparent}
.collection-window .desktop-card-overlay{display:flex;flex-direction:column;padding-bottom:9px}
.card-overlay-information{flex:1;min-height:0;overflow:auto;padding-top:24px;margin-top:-24px}
.collection-window .card-overlay-lots{position:static;flex:0 0 30px;width:100%;margin-top:8px}

/* Headings belong to the full width of each deal side. */
.trading-detail-column > h3{text-align:center}

.trading-lower-table .journal-photo-cell{display:flex;align-items:center;justify-content:center;margin-inline:auto;width:max-content}

/* Compact, centered trading overview. */
.native-trading .trading-summary{justify-content:center;padding:10px 12px}
.trading-summary-counts,.trading-summary-money{justify-content:center}
.trading-summary-metric{text-align:center;justify-items:center;gap:4px}
.trading-summary-metric>span:first-child{font-size:11px}
.trading-summary-metric>strong{font-size:18px}
.trading-summary-money .trade-result{font-size:16px}
.native-trading .trading-summary>button{margin-left:0}

/* Align card names and their heading with the other deal columns. */
.native-trading .trading-lower-table th:first-child,
.native-trading .trading-lower-table td:first-child{text-align:center}
.trading-lower-table .journal-photo-name{justify-content:center}

.native-trading .trading-search{justify-content:center}

/* Balance collection totals and filters around the centered chart. */
@media(min-width:1200px){
 .collection-header-surface{display:grid;grid-template-columns:minmax(280px,1fr) minmax(280px,680px) minmax(280px,1fr);gap:14px;align-items:center}
 .collection-summary-row{display:contents}
 .collection-summary{grid-column:1;grid-row:1;height:auto;align-self:center}
 .collection-metric-line{display:flex;flex-direction:column;align-items:flex-start;gap:0;height:auto;white-space:normal}
 .collection-metric-line>span{display:block}
 .collection-controls{grid-column:3;grid-row:1;width:100%;min-width:0;box-sizing:border-box;align-self:center}
 .collection-search-sort{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
 .collection-header-surface>.collection-history{grid-column:2;grid-row:1;width:100%;height:190px;margin:0}
}

#confirm.compact-confirm{width:340px;max-width:calc(100vw - 24px);height:auto;min-height:0;padding:16px}
#confirm.compact-confirm h2,#confirm.compact-confirm #confirm-note{display:none}
#confirm.compact-confirm #confirm-text{margin:0 0 16px;font-size:15px}
#confirm.compact-confirm .actions{margin:0;justify-content:flex-end}
.research-import-form>.research-import-submit:hover{background:#355a75;border-color:#89a7bd}

/* Shared notifications: content determines height, icons align with the message. */
.research-import-message.message-balanced{width:400px;height:auto;min-height:0;padding:20px;overflow:auto;}
.research-import-message.message-balanced[open]{display:grid;grid-template-columns:28px minmax(0,1fr);gap:12px 16px;align-items:center;}
.message-balanced>.research-import-message-icon{position:static;grid-column:1;grid-row:1 / span 2;width:26px;height:26px;margin:0;border:2px solid currentColor;font:700 19px/22px 'Segoe UI';text-align:center;align-self:center;}
.research-import-message-question.message-balanced>.research-import-message-icon{grid-row:1;align-self:start;}
.message-balanced>strong{position:static;grid-column:2;text-align:center;font-size:15px;line-height:22px;}
.message-balanced>p{position:static;grid-column:2;margin:0;display:block;text-align:center;white-space:pre-wrap;font-size:14px;line-height:21px;max-height:55dvh;overflow:auto;}
.message-balanced>.research-import-message-actions{position:static;grid-column:1 / -1;display:flex;justify-content:center;gap:10px;margin-top:6px;}
.message-balanced>.research-message-choice{position:static;grid-column:1 / -1;display:flex;flex-wrap:wrap;}
.message-balanced .research-message-choice-current{position:static;flex-basis:100%;white-space:normal;}
.confirmation-icon{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:2px solid currentColor;font-weight:700;float:left;margin-right:12px;}
#confirm.compact-confirm[open]{display:grid;grid-template-columns:26px minmax(0,1fr);gap:16px 12px;align-items:center;}
#confirm.compact-confirm .confirmation-icon{margin:0;grid-column:1;grid-row:1;align-self:start;}
#confirm.compact-confirm #confirm-text{margin:0;grid-column:2;grid-row:1;text-align:center;}
#confirm.compact-confirm .actions{grid-column:1 / -1;justify-content:center;}

/* Compact information rows; chart stays beside the value, never at the edge. */
.card-overlay-line.has-chart{display:flex;align-items:center;justify-content:flex-start;gap:3px;flex-wrap:nowrap;}
.collection-overlay-text{flex:0 1 auto;min-width:0;}
.collection-overlay-value{display:inline;}
.overlay-purchase:hover::after,.overlay-purchase:focus-visible::after{display:none;}
.card-overlay-information{padding-top:0;margin-top:0;overflow-x:hidden;}
.research-dialog-title{position:relative;justify-content:center!important;}
.research-dialog-title h2{width:100%;text-align:center;padding-inline:32px;}
.research-dialog-title>button{position:absolute;right:8px;top:50%;transform:translateY(-50%);}
.collection-lots-heading,.collection-lots-heading h3{text-align:center;}
.dialog-head{position:relative;justify-content:center;}
.dialog-head h2{width:100%;text-align:center;padding-inline:32px;}
.dialog-head>button{position:absolute;right:0;}
.collection-controls h3,.collection-controls legend,.collection-controls select,.collection-controls button{text-align:center;}
.collection-controls select{text-align-last:center;}
.research-import-form>.research-import-submit{grid-row:1 / span 7;}
@media(max-width:700px){.research-import-form>.research-import-submit{grid-column:1 / -1;grid-row:8;}}

#confirm.compact-confirm,.research-import-message.message-balanced{height:fit-content;}

.collection-controls-title{text-align:center;}
body>.site-footer{display:block!important;text-align:center;padding:24px 16px;color:var(--muted);font-size:12px;}

.card-overlay-line.has-chart{display:block;}
.collection-overlay-text{display:inline;}
.collection-overlay-tail{display:inline-block;white-space:nowrap;vertical-align:top;line-height:18px;}
.collection-window button.collection-overlay-chart{margin:1px 0 0 3px;width:18px;height:16px;min-height:0;padding:0;vertical-align:top;}

.research-trade-sale .trade-sale-card{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;width:100%;font-size:15px}.research-trade-sale input{text-align:center}

/* Numbered dialog review: shared geometry, centered copy and compact actions. */
.collection-price-form label,.metadata-rename-form label,.metadata-rename-form input{text-align:center}
.collection-price-actions,.metadata-rename-actions{justify-content:center}
dialog.research-collection-price{height:fit-content;min-height:175px}
.research-trade-sale .trade-columns{text-align:center}
.perspective-controls{display:flex;justify-content:center}
.manual-perspective .perspective-controls input[hidden]{display:none}
.perspective-file-button{min-width:150px;text-align:center}
.trade-table th,.trade-table td,.trade-table th button,.trade-columns>section>h4{text-align:center}
.trade-table th button{width:100%;text-align:center}
.trade-field>span,.trade-field>input{text-align:center}
.research-import-lots th,.research-import-lots td,.research-import-lots td:nth-child(2){text-align:center;padding:4px 7px;vertical-align:middle}
.collection-lots-table th,.collection-lots-table td,.collection-lots-table th button{text-align:center}
#confirm,.research-import-message.message-balanced,.research-copy-notice{width:400px;max-width:calc(100vw - 24px);height:fit-content!important;min-height:0;padding:20px;border:4px double #747475;border-radius:0;background:#1c2430;color:#e7edf7;box-shadow:none;overflow:auto}
#confirm[open],#confirm.compact-confirm[open],.research-import-message.message-balanced[open],.research-copy-notice[open]{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:center;justify-items:center}
#confirm>h2,#confirm-note{display:none!important}
#confirm .confirmation-icon,.message-balanced>.research-import-message-icon,.research-copy-notice>.research-copy-icon{position:static;grid-column:1;grid-row:auto;float:none;margin:0;align-self:center;justify-self:center;width:26px;height:26px;line-height:22px;text-align:center}
#confirm #confirm-text,#confirm.compact-confirm #confirm-text,.message-balanced>p,.research-copy-notice>p{position:static;grid-column:1;grid-row:auto;display:block;width:100%;margin:0;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.5 'Segoe UI'}
.message-balanced>strong,.research-copy-notice>strong{position:static;grid-column:1;grid-row:auto;width:100%;text-align:center;margin:0;font-size:15px}
#confirm .actions,#confirm.compact-confirm .actions,.message-balanced>.research-import-message-actions{position:static;grid-column:1;grid-row:auto;display:flex;justify-content:center;flex-wrap:wrap;gap:10px;width:100%;margin:0}
#confirm button,.research-copy-notice>button,.message-balanced>.research-import-message-actions>button{position:static;min-width:101px;width:auto;min-height:29px;padding:3px 14px;text-align:center;border:2px solid #e7edf7;border-radius:0;background:#1c2430;color:#e7edf7;font:13.333px 'Segoe UI'}
#confirm button:focus-visible,.research-copy-notice>button:focus-visible{outline:1px dashed #e7edf7;outline-offset:-4px}
#dialog.decision-window{width:620px;max-width:calc(100vw - 24px);padding:0;border:4px double #747475;border-radius:0;background:#1c2430;box-shadow:none}
.decision-window .dialog-head{padding:10px 14px;background:#1c2430;border-bottom:1px solid #34404e;justify-content:center;position:relative}
.decision-window .dialog-head h2{font-size:15px;text-align:center}
.decision-window .dialog-head button{position:absolute;right:8px;padding:0 5px;border:0;background:transparent;border-radius:0}
.decision-window #dialog-body{padding:18px;text-align:center}
.decision-window #dialog-body h3{margin:0 0 16px;font-size:14px}
.decision-window #dialog-body p{margin:12px 0;line-height:1.5}
.decision-window .actions{justify-content:center;gap:10px;flex-wrap:wrap}
.decision-window .actions button{min-height:29px;border:2px solid #e7edf7;border-radius:0;background:#1c2430;padding:4px 12px;text-align:center;font-weight:400}
@media(max-width:480px){#confirm,.research-import-message.message-balanced,.research-copy-notice{padding:16px}.decision-window .actions{flex-direction:column}.decision-window .actions button{width:100%}}

.collection-window .desktop-card > .desktop-card-grade{position:absolute;top:auto;bottom:16px;right:12px;z-index:2;min-width:56px;padding:5px 8px;cursor:pointer;box-shadow:0 1px 5px #0009}

/* Selected logo #10: retain full asset; frame its compact wordmark in the header. */
.top .brand{display:block;position:relative;flex:0 0 150px;width:150px;height:38px;overflow:hidden;line-height:0}
.top .brand img{position:absolute;width:208px;height:auto;max-width:none;left:-29px;top:-15px}

/* Keep the primary query field about half its former desktop width. */
.research-root>.research-search{width:calc(30% + 80px);min-width:min(100%,420px)}
@media(max-width:800px){.research-root>.research-search{width:100%;min-width:0}}

/* Crop panels form one centered pair; empty lot text does not reserve a tile row. */
.manual-perspective .perspective-body{align-content:start}
.manual-perspective .perspective-controls select{width:170px;max-width:100%;text-align:center;text-align-last:center}
.manual-perspective .perspective-lot-list.is-empty{display:block;min-height:0;max-height:none;line-height:20px}
.manual-perspective .perspective-workspace{display:flex;justify-content:center;align-items:flex-start;gap:20px;min-width:0}
.manual-perspective .perspective-original,.manual-perspective .perspective-result{flex:0 1 auto;min-width:0;max-width:calc(50% - 10px);width:fit-content;text-align:center}
.manual-perspective .perspective-workspace:has(.perspective-result[hidden]) .perspective-original{max-width:100%}
.manual-perspective .perspective-original:has(.perspective-source[hidden]){display:none}
.manual-perspective .perspective-original>p,.manual-perspective .perspective-result>p{margin:0 0 6px;line-height:20px;text-align:center}
.manual-perspective .perspective-source{margin-inline:auto}
@media(max-width:600px){.manual-perspective .perspective-workspace{flex-direction:column;align-items:center;gap:12px}.manual-perspective .perspective-original,.manual-perspective .perspective-result{max-width:100%}.manual-perspective .perspective-controls select{width:150px}}

.research-grade-badge[data-grader=psa]{background:#fff;color:#bd152b;border:2px solid #d52035}.research-grade-badge[data-grader=cgc]{background:#153b64;color:#fff;border:2px solid #70a5d6}.research-grade-badge[data-grader=bgs]{background:#24211b;color:#edd18b;border:2px solid #bfa463}.research-grade-badge[data-grader=sgc]{background:#111;color:#fff;border:2px solid #ddd}.research-result-filters>.research-clear{width:auto;min-width:82px;margin-left:8px}
/* Shared collection controls: same cards and labels in owner/public views. */
.collection-view-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 12px 10px;padding:8px;border:1px solid var(--border,#2b3442)}
.collection-view-modes,.public-card-statuses,.collection-size-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.collection-view-modes{margin-left:auto}.collection-size-control{font-size:12px}.collection-size-control input{width:135px;min-width:80px;padding:0}.collection-view-mode{width:34px;height:30px;font-size:20px}.collection-view-tools button[aria-pressed=true]{border-color:var(--accent,#8ab4ff);background:#273548}
.collection-window[data-view=list] .collection-grid{display:flex;flex-direction:column;gap:8px}.collection-window[data-view=list] .desktop-card{width:100%;height:150px;min-height:150px;grid-template-columns:110px minmax(0,1fr) 140px;grid-template-rows:1fr 1fr;position:relative}.collection-window[data-view=list] .desktop-card .photo-placeholder{grid-column:1;grid-row:1/3;height:130px;margin:8px}.collection-window[data-view=list] .desktop-card-name{grid-column:2;grid-row:1;align-self:end;text-align:left}.collection-window[data-view=list] .desktop-card-collection{grid-column:2;grid-row:2;text-align:left}.collection-window[data-view=list] .desktop-card-price{grid-column:3;grid-row:1/3;align-self:center}.collection-window[data-view=list] .desktop-card>.desktop-card-grade{bottom:10px}.public-profile-summary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-width:190px;padding:12px;text-align:center}.public-profile-summary h2,.public-profile-summary p{margin:0;overflow-wrap:anywhere}.public-profile-summary h2{font-size:20px}.public-profile-avatar{display:grid;place-items:center;width:90px;height:90px;border:1px solid var(--border,#2b3442);border-radius:5px;font-size:36px;background:var(--surface,#1c2430);overflow:hidden}.public-profile-avatar img{width:100%;height:100%;object-fit:cover}.public-collection .collection-summary-row{display:grid;grid-template-columns:210px minmax(0,1fr) 280px;min-height:215px}.public-collection .public-profile-summary{grid-column:1;grid-row:1}.public-collection .collection-controls{grid-column:3;grid-row:1;width:100%}.public-collection .collection-header-surface>.collection-history{position:absolute;left:230px;top:20px;width:calc(100% - 550px);height:190px;max-width:none}.public-card-status{position:absolute;left:12px;bottom:16px;border:1px solid var(--border,#2b3442);background:var(--surface,#1c2430);border-radius:4px;padding:3px 6px;font-size:11px}.public-collection .photo-placeholder img{width:100%;height:100%;object-fit:contain}.public-collection .desktop-card-price{cursor:default}
@media(max-width:1000px){.public-collection .collection-summary-row{grid-template-columns:190px minmax(0,1fr)}.public-collection .collection-controls{grid-column:2}.public-collection .collection-header-surface>.collection-history{position:static;width:100%;height:190px}.collection-size-control>span{display:none}}
@media(max-width:600px){.public-collection .collection-summary-row{display:flex;flex-direction:column}.public-profile-summary{width:100%}.collection-view-tools{margin-inline:8px}.collection-view-modes{margin-left:0}.public-card-statuses{width:100%}.public-card-statuses button{flex:1;padding:4px;font-size:11px}.collection-window[data-view=list] .desktop-card{grid-template-columns:80px minmax(0,1fr);height:155px}.collection-window[data-view=list] .desktop-card-price{grid-column:2;grid-row:3;margin:3px 8px}.collection-window[data-view=list] .desktop-card .photo-placeholder{grid-row:1/4;height:135px}.collection-window[data-view=list] .desktop-card-collection{grid-row:2}.collection-window[data-view=list] .desktop-card-name{grid-row:1}}

.public-collection .collection-header-surface{display:block}.public-history-empty{display:flex!important;align-items:center;justify-content:center;color:var(--muted,#9aa4b2);font-size:12px;border:1px solid var(--border,#2b3442)}
.collection-window[data-view=list] .desktop-card{height:var(--list-height,160px);min-height:var(--list-height,160px);grid-template-columns:var(--list-photo-width,100px) minmax(0,1fr) 140px}.collection-window[data-view=list] .desktop-card .photo-placeholder{height:calc(var(--list-height,160px) - 20px)}
@media(max-width:600px){.collection-window[data-view=list] .desktop-card{grid-template-columns:var(--list-photo-width,100px) minmax(0,1fr)}}

/* Let Research use the complete space between the header and Beta footer. */
@media(min-width:601px){
 body.desktop-research{display:flex;flex-direction:column;min-height:100dvh}
 body.desktop-research .layout{flex:1;min-height:0}
 body.desktop-research .layout>main{display:flex;flex-direction:column;min-height:0}
 body.desktop-research #content,body.desktop-research #content>.retained-section:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}
 body.desktop-research .research-root{flex:1;height:auto;min-height:420px}
 body.desktop-research>.site-footer{margin-top:0;padding:16px}
}

/* Public storefront badges attach to the upper left card edge. */
.public-collection .desktop-card{overflow:visible}
.public-collection .desktop-card-name{padding-left:28px;padding-right:8px}
.collection-window .public-card-status{display:grid;place-items:center;position:absolute;left:-6px;top:12px;bottom:auto;width:30px;height:30px;padding:0;border:1px solid #69788c;border-radius:5px;background:#1c2430;color:#e7edf7;box-shadow:2px 2px 5px #0006;z-index:2;cursor:help}
.public-card-status svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.public-card-status:focus-visible{outline:2px solid #aecbff;outline-offset:3px}
.collection-window .public-card-status[data-status=sale]~.public-card-status[data-status=exchange]{top:48px}
.public-collection .desktop-card:has(.public-card-status:hover),.public-collection .desktop-card:has(.public-card-status:focus-visible){z-index:3}

.public-collection .collection-summary-row{grid-template-columns:minmax(190px,1fr) 280px;min-height:180px}
.public-collection .collection-controls{grid-column:2}
.public-collection .public-profile-summary{justify-self:start;min-width:0;max-width:100%}
.public-profile-location{display:flex;align-items:center;justify-content:center;gap:7px}
.public-profile-location svg{width:24px;height:16px;flex-shrink:0;border-radius:2px}
@media(max-width:600px){.public-collection .public-profile-summary{align-self:center}}

.public-profile-page .page-head{display:none}
.research-root>.research-search{width:100%;align-items:center;gap:12px;min-height:48px;background:transparent;border:0;padding:6px 12px}
.research-connection{min-width:0;align-self:center;padding:0;border:0;background:transparent;display:block}
.research-connection .connector-status{align-items:flex-start;gap:2px;min-height:0;padding:4px 10px;border-left:1px solid #344050}
.research-connection .connector-summary,.research-connection .connector-meta{justify-content:flex-start;gap:5px}
.research-connection .connector-summary{font-size:12px;line-height:18px}
.research-connection .connector-summary button{height:23px;padding:1px 7px;font-size:11px;min-width:0}
.research-connection .connector-meta{font-size:10px;line-height:15px}
.research-connection .connector-meta a{font-size:10px}
.research-result-table td.research-lot-photo{height:clamp(76px,calc((100dvh - 420px)/4),134px);padding:4px 8px}
.research-lot-photo img{height:clamp(66px,calc((100dvh - 460px)/4),124px);width:120px;object-fit:contain}
@media(max-width:800px){.research-root>.research-search{grid-template-columns:minmax(0,1fr) 110px;gap:8px;min-height:0}.research-root>.research-search>input{grid-column:1;grid-row:1}.research-root>.research-search>button{grid-column:2;grid-row:1}.research-connection{grid-column:1/-1}.research-connection .connector-status{flex-direction:row;align-items:center;gap:5px 12px;border-left:0;padding:0}.research-result-table td.research-lot-photo{height:112px}.research-lot-photo img{height:102px}}

.research-connection .connector-status [hidden]{display:none!important}
.research-root>.research-search{padding-block:6px}

/* Compact query field, connection stays directly beside Search. */

#content>.loading,.retained-section>.loading{display:grid;place-items:center;text-align:center;min-height:calc(100dvh - 220px)}

.research-search-progress{display:block;min-width:0;max-width:240px;font-size:11px;line-height:16px;color:#a8b5c8;overflow-wrap:anywhere}.research-search-progress[hidden]{display:none}
@media(min-width:801px){.research-root>.research-search{grid-template-columns:minmax(0,1fr) 320px 126px minmax(0,1fr);justify-self:stretch}.research-root>.research-search>input{grid-column:2;grid-row:1}.research-root>.research-search>button{grid-column:3;grid-row:1}.research-root>.research-search>.research-search-progress{grid-column:1;grid-row:1;justify-self:end;text-align:right;max-width:220px}.research-root>.research-search>.research-connection{grid-column:4;grid-row:1;justify-self:start;width:max-content;max-width:100%}.research-connection .connector-status{padding:0 0 0 8px}.research-connection .connector-summary,.research-connection .connector-meta{max-width:210px}.research-connection .connector-summary button{max-width:100%;white-space:normal;height:auto;min-height:23px}}
@media(max-width:800px){.research-search-progress{grid-column:1/-1;grid-row:3;max-width:none;padding-inline:4px}.research-connection{grid-row:2}}

.collection-window .public-card-status[data-status=sale]{color:#e6bc66;border-color:#806638;background:#29251b}
.collection-window .public-card-status[data-status=exchange]{color:#79bed7;border-color:#426d80;background:#1b2932}

/* Connector always occupies exactly two compact rows. */
.research-connection .connector-status{flex-direction:column;align-items:flex-start;gap:2px}
.research-connection .connector-summary,.research-connection .connector-meta{flex-wrap:nowrap;white-space:nowrap;max-width:none}
.research-connection .connector-summary{height:18px}
.research-connection .connector-summary button{height:18px;min-height:18px;padding:0 4px}
.research-connection .connector-meta{height:18px}
.research-connection .connector-meta a{padding:0 3px}
.connector-help{width:min(520px,calc(100vw - 32px));max-height:85dvh;overflow:auto;box-sizing:border-box;padding:22px}
.connector-help h2{font-size:18px;margin:0 0 16px}
.connector-help ol{padding-left:22px;margin:0 0 18px}
.connector-help li{margin-bottom:12px;line-height:1.5}

.research-connection .connector-summary [hidden],.research-connection .connector-meta [hidden]{display:none!important}
.collection-window .desktop-card>.desktop-card-grade{border-radius:0;opacity:1;background:#fff;color:#222;border:2px solid #555;font-weight:700}
.collection-window .desktop-card>.desktop-card-grade[data-company=PSA]{background:#fff;color:#c8202c;border-color:#c8202c}
.collection-window .desktop-card>.desktop-card-grade[data-company=BGS],.collection-window .desktop-card>.desktop-card-grade[data-company=BECKETT]{background:#111;color:#fff;border-color:#fff}
.collection-window .desktop-card>.desktop-card-grade[data-company=CGC]{background:#153d64;color:#fff;border-color:#c8a85b}
.collection-window .desktop-card>.desktop-card-grade[data-company=SGC]{background:#111;color:#fff;border-color:#358768}

.research-connection .connector-meta button{order:1;height:18px;min-height:18px;padding:0 4px;font-size:10px}
.research-connection .connector-meta a{order:2}

.connector-help h2{text-align:center}
.connector-help>button{display:block;margin-inline:auto}
.connector-address-hint{display:block;margin-top:6px}
.connector-address-hint[hidden]{display:none}
.research-connection .connector-meta a{background:#4f86ed;color:#fff;border-color:#a9c8ff;font-weight:700;padding-inline:7px}.research-connection .connector-meta a:hover{background:#689bff;border-color:#fff}
.account-profile-dialog{width:440px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border:4px double #747475;border-radius:0;background:#1c2430;box-shadow:none;text-align:center;overflow:auto}
.account-profile-dialog .dialog-head{padding:10px 14px;margin:0;border-bottom:1px solid #34404e}
.account-profile-dialog .dialog-head h2{font-size:15px;padding:0;text-align:center}
.account-profile-body{padding:18px;display:grid;gap:10px;text-align:center}
.account-profile-body p{margin:0;font-size:13px;overflow-wrap:anywhere;text-align:center}
.account-profile-body .field{gap:6px;text-align:center}
.account-profile-body input{text-align:center;border-radius:0;padding:6px 8px;min-height:30px}
.account-profile-body .actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.account-profile-body .avatar-controls{justify-content:center}
.account-profile-body .avatar-result{justify-self:center}
.account-profile-body button,.profile-menu>div>button{min-height:29px;min-width:101px;border:2px solid #e7edf7;border-radius:0;background:#1c2430;padding:4px 12px;text-align:center;font-weight:400}
.profile-menu>div{display:grid;gap:6px;left:auto;right:0;max-width:calc(100vw - 24px);border:4px double #747475;box-shadow:none}
.profile-menu>summary{text-align:center}

.account-profile-dialog{width:460px;border:2px solid #2b3442;border-radius:0;background:#0f1115;box-shadow:none}
.account-profile-dialog .dialog-head{height:42px;padding:0 11px;background:#1c2430;border:0}
.account-profile-dialog .dialog-head h2{font-size:14.666px;font-weight:700}
.account-profile-body{padding:18px;gap:12px}
.account-profile-body input{height:29px;min-height:29px;border:1px solid #34404e;border-radius:0;padding:3px 7px;font-size:13.333px;background:#1c2531}
.account-profile-body p{font-size:13px;line-height:1.4}
.account-profile-body [role=status]:empty,.account-profile-body [role=alert]:empty{display:none}
.account-profile-body .nickname-invalid{color:#ff9292;text-decoration:underline;text-underline-offset:3px;font-weight:600}
.account-profile-body button.provider-connected{color:#a3e2b2;border-color:#69bd83;background:#203a2b;opacity:1}
.account-profile-body .avatar-source{justify-self:center}
.account-profile-body .actions button{height:29px;min-height:29px;min-width:101px;border:2px solid #e7edf7;border-radius:0;background:#1c2430;color:#e7edf7;padding:3px 9px;font:13.333px 'Segoe UI';text-align:center}

/* Same logo and wordmark as the header and extension popup, at compact scale. */
.research-connection .connector-summary{height:24px;gap:6px}
.connector-brand{order:-1;display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:#f1f5fc;font-size:12px;font-weight:600;letter-spacing:.1px}
.connector-wordmark{display:block;position:relative;width:79px;height:20px;overflow:hidden;line-height:0;flex-shrink:0}
.connector-wordmark img{position:absolute;width:109.5px;height:auto;max-width:none;left:-15.3px;top:-7.9px}

/* Public cards have no price row or reserved list price column. */
.collection-window.public-collection[data-view=grid] .desktop-card{grid-template-rows:auto auto minmax(0,1fr)}
.collection-window.public-collection[data-view=list] .desktop-card{grid-template-columns:var(--list-photo-width,100px) minmax(0,1fr);grid-template-rows:1fr 1fr}
.collection-window.public-collection[data-view=list] .desktop-card .photo-placeholder{grid-row:1/3}

.account-profile-dialog{max-height:calc(100dvh - 24px);overflow:auto}
.avatar-editor{display:grid;gap:9px}.avatar-controls{display:flex;flex-wrap:wrap;gap:6px}.avatar-controls button{font-size:12px;padding:5px 8px}.avatar-result{width:86px;height:86px;object-fit:cover;border-radius:50%}.avatar-source{position:relative;justify-self:start;max-width:100%;line-height:0}.avatar-source img{display:block;max-width:100%;max-height:230px;width:auto;height:auto}.avatar-source svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none}.avatar-source svg polygon{fill:#77b3ff22;stroke:#8ab4ff;stroke-width:.006}.avatar-source svg circle{fill:#e7edf7;stroke:#4f86ed;stroke-width:.006;cursor:move}.avatar-source[hidden],.avatar-result[hidden]{display:none}
.research-view-options{display:flex;gap:4px}.research-view-options button[aria-pressed=true]{background:#304a70;border-color:#a9c8ff}.research-photo-icon{display:none;font-size:23px;color:#a9c8ff}
.research-root[data-results-view=list] .research-lot-photo{height:34px;padding:3px 8px;width:40px;text-align:center}.research-root[data-results-view=list] .research-lot-photo img{display:none}.research-root[data-results-view=list] .research-photo-icon{display:inline}.research-root[data-results-view=list] .research-result-table td{height:34px;max-height:34px;padding-block:4px}.research-root[data-results-view=list] .research-result-table td:nth-child(3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:450px}.research-root[data-results-view=list] .research-result-table td .research-bid-count{display:inline;margin-left:5px}
@media(max-width:600px){
.research-results-shell,.research-table-scroll,.research-table-surface{width:100%;min-width:0;max-width:100%}.research-table-scroll{overflow-x:hidden}.research-table-surface .research-result-table{display:block;min-width:0!important;width:100%!important;table-layout:auto}.research-result-table colgroup,.research-result-table thead{display:none}.research-result-table tbody{display:block;width:100%}.research-result-table tbody tr{display:grid;grid-template-columns:82px minmax(0,1fr);gap:4px 9px;width:100%;padding:10px;border-bottom:1px solid #344050}.research-result-table tbody td{display:block;width:auto!important;min-width:0;height:auto!important;max-height:none!important;padding:2px!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left}.research-result-table td:nth-child(3){grid-column:1/-1;font-weight:600}.research-result-table td:nth-child(1){grid-column:1;grid-row:2/6;align-self:start}.research-result-table td:nth-child(2){grid-column:1/-1;grid-row:7;display:flex;gap:16px}.research-result-table td:nth-child(n+4){grid-column:2}.research-result-table td[data-label]:not(:nth-child(3))::before{content:attr(data-label) ': ';color:#97a4b7;font-size:11px}.research-result-table .research-lot-photo img{width:78px;max-width:100%;height:108px;object-fit:contain}.research-table-horizontal{display:none}.research-root[data-results-view=list] .research-result-table tbody tr{grid-template-columns:28px minmax(0,1fr) minmax(0,1fr);gap:5px}.research-root[data-results-view=list] .research-result-table td:nth-child(1){grid-column:1;grid-row:1/4}.research-root[data-results-view=list] .research-result-table td:nth-child(3){grid-column:2/-1;grid-row:1;max-width:none}.research-root[data-results-view=list] .research-result-table td:nth-child(4){grid-column:2;grid-row:2}.research-root[data-results-view=list] .research-result-table td:nth-child(5){grid-column:3;grid-row:2}.research-root[data-results-view=list] .research-result-table td:nth-child(6){grid-column:2;grid-row:3}.research-root[data-results-view=list] .research-result-table td:nth-child(7){grid-column:3;grid-row:3}.research-root[data-results-view=list] .research-result-table td:nth-child(2){grid-column:2/-1;grid-row:4}.research-result-table td[colspan]{grid-column:1/-1!important;grid-row:auto!important}
.trading-table,.trading-lower-table,.trading-totals{width:100%;max-width:100%;min-width:0!important;overflow-x:hidden!important}.trading-table table,.trading-lower-table table,.trading-totals table{display:block;width:100%!important;min-width:0!important;table-layout:auto}.trading-table thead,.trading-lower-table thead{display:none}.trading-table tbody,.trading-lower-table tbody,.trading-totals tbody{display:block}.trading-table tbody tr,.trading-lower-table tbody tr,.trading-totals tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px;border-bottom:1px solid #344050;height:auto!important;min-height:0!important}.trading-table tbody td,.trading-lower-table tbody td,.trading-totals tbody td{display:flex;flex-direction:column;align-items:flex-start;width:auto!important;min-width:0;height:auto!important;white-space:normal!important;overflow-wrap:anywhere;padding:0!important;border:0}.trading-table td[data-label]::before,.trading-lower-table td[data-label]::before{content:attr(data-label);color:#97a4b7;font-size:11px;margin-bottom:3px}.trading-table td:first-child,.trading-lower-table td:first-child{grid-column:1/-1}.trading-table .trade-journal-preview{max-width:100%}.trading-lower-details{display:flex!important;flex-direction:column;min-width:0}.trading-detail-column{width:100%!important;min-width:0!important}.trading-details{min-width:0;overflow-x:hidden}.trading-window{min-width:0}.trading-item-thumbnail{max-width:100%}
}

.research-mobile-sort{display:none}
@media(max-width:600px){.research-mobile-sort{display:flex;gap:4px;max-width:100%}.research-mobile-sort select{width:150px;padding:3px}.trading-totals td[data-label]::before{content:attr(data-label);color:#97a4b7;font-size:11px}.trading-totals td:nth-child(2){display:none}.trading-table .trade-journal-sheet{max-width:100%}.trading-table tbody tr[aria-selected=true]{outline:2px solid #8ab4ff;outline-offset:-2px}}

.research-photo-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;vertical-align:middle}
@media(max-width:600px){section.native-trading-window .native-trading-body{height:auto;min-height:0;overflow:visible}section.native-trading-window .trading-table{height:auto;max-height:none;min-height:0;overflow:visible!important}section.native-trading-window .trading-details{height:auto;min-height:0;overflow:visible}section.native-trading-window .trading-lower-table{height:auto;max-height:none;min-height:0;overflow:visible!important}.trading-lower-table .journal-photo-cell{margin-inline:0}.research-table-horizontal{display:none!important}}

/* Badges follow the actual card width, including slider and viewport changes. */
.collection-window .desktop-card>.desktop-card-grade{height:auto;min-height:0;line-height:1.2;min-width:0;font-size:calc(10px * var(--badge-scale,1));padding:calc(2px * var(--badge-scale,1)) calc(4px * var(--badge-scale,1));bottom:10px;right:8px;border-width:1px}
.collection-window .public-card-status{width:calc(26px * var(--badge-scale,1));height:calc(26px * var(--badge-scale,1))}
.collection-window .public-card-status svg{width:70%;height:70%}
.collection-window .public-card-status[data-status=sale]~.public-card-status[data-status=exchange]{top:calc(16px + 26px * var(--badge-scale,1))}
.manual-perspective .perspective-source{overflow:hidden;touch-action:none}
.perspective-layer{position:relative;transform-origin:0 0;will-change:transform}
.perspective-zoom{display:flex;gap:4px}.perspective-zoom button{min-width:32px;padding:3px 7px}

/* Document scrolling: results and collection cards share the browser viewport. */
body.desktop-research .research-root{height:auto;min-height:0;display:block}
body.desktop-research .research-results-shell{min-height:0;height:auto;overflow:visible;margin-top:8px}
body.desktop-research .research-table-scroll{position:relative;inset:auto;max-height:none;height:auto;overflow:visible;margin:0}
body.desktop-research .research-table-surface{min-height:0;min-width:0;width:100%}
body.desktop-research .research-result-table{width:100%;min-width:0}
body.desktop-research .research-horizontal-scroll{display:none}
body.desktop-research .research-root>.research-search{position:relative;margin:12px auto}
body.desktop-research .research-result-filters{position:sticky;top:0;z-index:8;background:#171e29;margin:0;padding:6px}
.collection-grid-viewport{max-height:none;height:auto;overflow:visible;scrollbar-gutter:auto;min-height:0}
.collection-grid{content-visibility:visible}
.collection-window[data-view=grid] .desktop-card{display:grid;grid-template-rows:40px 34px 24px minmax(0,1fr);align-content:stretch}
.collection-window[data-view=grid] .desktop-card-name{height:40px;max-height:40px;min-height:0;overflow:hidden}
.collection-window[data-view=grid] .desktop-card-collection{height:34px;max-height:34px;overflow:hidden}
.collection-window[data-view=grid] .desktop-card-price{height:24px;margin:0}
.collection-window[data-view=grid] .desktop-card .photo-placeholder{min-height:0;height:auto;align-self:stretch}
.collection-window .photo-placeholder img{object-fit:contain;max-width:100%;max-height:100%;width:100%;height:100%}
.public-profile-avatar{border:2px solid #283b55;padding:2px;background:#0c1420}
.auth-provider-dialog .provider-connected{cursor:default}
.connector-brand[hidden]{display:none!important}
.manual-perspective .perspective-controls select{border:2px solid #e7edf7;border-radius:0;background:#1c2430;height:29px;padding:2px 8px;font-size:13px}
.perspective-actions .perspective-zoom{order:-1;flex-basis:100%;justify-content:center}
.research-result-table a{text-decoration:none}
.research-result-table a:hover{text-decoration:underline}
.research-mark-collection[data-linked=true]{background:#234d3a;border-color:#67c28d}
.research-mark-collection[data-linked=true] span{filter:none!important;background-color:#67c28d}
@media(max-width:800px){
 .research-root>.research-search{gap:5px!important;margin-block:6px!important}
 .research-result-filters{gap:5px!important;position:relative!important}
 .research-result-table tbody tr[data-item-url]{min-height:116px!important;margin-bottom:4px!important;padding:5px!important;border-width:0 0 1px!important}
 .research-result-table td.research-lot-photo{height:104px!important;width:76px!important}
 .research-result-table .research-lot-photo img{max-height:100px!important;height:100px!important}
 .research-type-badge,.research-grade-badge{font-size:11px;padding:2px 4px;line-height:1.2;white-space:normal}
 .research-result-table td{font-size:12px!important;padding:2px 4px!important}
 .research-result-table td[data-label=Название]{line-height:1.25!important}
}

.collection-photo-hover{position:fixed;z-index:1000;right:20px;top:50%;transform:translateY(-50%);padding:8px;background:#111923;border:1px solid #60738c;box-shadow:0 5px 30px #000b;pointer-events:none;max-width:45vw;max-height:85dvh}
.collection-photo-hover img{display:block;max-width:100%;max-height:80dvh;width:auto;height:auto}
.research-clear{border-color:#a6bfd7!important;background:#293747!important}

.desktop-card[data-corner-style=rounded] .photo-placeholder img{border-radius:4%}
.perspective-actions select{width:auto;border-radius:0;padding:3px 7px;height:29px}
.collection-search-sort:has(select[aria-label=Грейд]){grid-template-columns:1fr 1fr}.collection-search-sort select[aria-label=Грейд]{grid-column:1/-1}

.sale-chart-tooltip{position:absolute;padding:6px 8px;background:#263242;border:1px solid #60738c;border-radius:2px;color:#e7edf7;font-size:12px;pointer-events:none;z-index:2;white-space:nowrap}
.public-collection .collection-header-surface>.collection-history{position:relative;inset:auto;width:100%;max-width:none;margin:10px 0 0}
.collection-window.public-collection[data-view=grid] .desktop-card{grid-template-rows:minmax(74px,auto) 24px minmax(0,1fr)}

.trade-result-tooltip{position:fixed;z-index:1100;padding:7px 10px;background:#263242;color:#e7edf7;border:1px solid #60738c;border-radius:2px;font-size:12px;pointer-events:none;max-width:calc(100vw - 16px)}

.collection-share-row{position:relative;display:flex;align-items:center;gap:8px;margin-bottom:8px}.collection-share-row .collection-share{width:30px;min-width:30px;padding:0;font-size:22px}.collection-share-tooltip{position:absolute;left:0;bottom:calc(100% + 6px);background:#263242;border:1px solid #60738c;padding:6px 8px;font-size:12px;white-space:nowrap;z-index:12}.collection-share-feedback{font-size:11px;color:#8ed0b2}

.research-root>.research-result-paging{display:flex;justify-content:center;padding:12px;gap:8px}.research-root>.research-result-paging:empty{display:none}.research-root .research-result-paging button{height:29px;padding:3px 14px}.research-clear{display:inline-flex;align-items:center;justify-content:center;gap:6px}

@media(max-width:800px){
 .research-root .research-result-table tbody tr[data-item-url]{display:grid!important;grid-template-columns:78px minmax(0,1fr) 82px!important;grid-template-rows:32px 20px 18px 29px!important;gap:1px 4px!important;min-height:116px!important;height:116px!important;padding:5px!important;overflow:hidden;}
 .research-root .research-result-table tbody tr[data-item-url]>td{border:0!important;margin:0!important;min-height:0!important;height:auto!important;align-self:center;min-width:0;}
 .research-root .research-result-table td::before{display:none!important}
 .research-root .research-result-table td.research-lot-photo{grid-column:1!important;grid-row:1/5!important;width:78px!important;height:104px!important;align-self:center;}
 .research-root .research-result-table td.research-lot-photo img{display:block!important;max-width:74px!important;width:100%!important;height:100px!important;object-fit:contain;}
 .research-root .research-result-table td[data-label=Название]{grid-column:2/4!important;grid-row:1!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-height:32px;}
 .research-root .research-result-table td[data-label=Цена]{grid-column:2!important;grid-row:2!important;display:block!important;text-align:left;font-size:13px!important;font-weight:700;}
 .research-root .research-result-table td[data-label="Дата продажи"]{grid-column:2!important;grid-row:3!important;display:block!important;text-align:left;font-size:10px!important;}
 .research-root .research-result-table td[data-label="Тип лота"]{grid-column:3!important;grid-row:2/4!important;display:flex!important;flex-direction:column;align-items:center;font-size:10px!important;}
 .research-root .research-result-table td[data-label=Грейд]{grid-column:3!important;grid-row:4!important;display:block!important;text-align:center;}
 .research-root .research-result-table td.research-result-marks{grid-column:2!important;grid-row:4!important;display:flex!important;align-items:center;justify-content:flex-start;padding:0!important;gap:5px;}
 .research-root .research-type-badge,.research-root .research-grade-badge{font-size:10px!important;padding:2px 4px!important;white-space:normal;line-height:1.1;}
 .research-root .research-result-filters>button{height:25px!important;font-size:11px!important;padding:2px 6px!important;}
 .research-root .research-result-filters{padding:5px!important;gap:4px!important;}
}

.auth-provider-dialog button:disabled{cursor:not-allowed}
.research-root[data-results-view=list] .research-result-table td.research-lot-photo img{display:none!important}

.collection-photo-hover[data-corner-style=rounded] img{border-radius:4%}
@media(min-width:1001px){.public-collection .collection-header-surface{display:grid;grid-template-columns:190px minmax(0,1fr) 280px;gap:16px;align-items:center}.public-collection .collection-summary-row{display:contents}.public-collection .public-profile-summary{grid-column:1;grid-row:1}.public-collection .collection-controls{grid-column:3;grid-row:1}.public-collection .collection-header-surface>.collection-history{grid-column:2;grid-row:1;margin:0;width:100%;max-width:720px;height:225px;position:static;justify-self:center;}}

.collection-window.public-collection[data-has-prices=false][data-view=grid] .desktop-card{grid-template-rows:40px 34px minmax(0,1fr)}
.manual-perspective .perspective-lot{grid-template-columns:minmax(0,1fr);min-height:48px}.manual-perspective .perspective-lot>span{grid-column:1}.manual-perspective .perspective-lot::after{display:none}.manual-perspective .perspective-lot-list{grid-auto-rows:minmax(48px,auto)}

.public-profile-avatar,.avatar-result{box-sizing:border-box;border:2px solid #405775;box-shadow:0 0 0 1px #090e16;padding:2px;background:#0c1420}
.public-profile-avatar img{display:block;border:1px solid #101827;box-sizing:border-box}
.collection-window[data-view=grid] .desktop-card-name,.collection-window[data-view=grid] .desktop-card-collection{margin:0;box-sizing:border-box;padding:0 8px;width:100%;text-align:center;display:flex;justify-content:center;align-items:center;align-content:center;}
.collection-window[data-view=grid] .desktop-card-price{text-align:center;justify-self:stretch}
.desktop-card-info{display:contents}
.collection-window[data-view=grid] .desktop-card{grid-template-rows:minmax(74px,auto) 24px minmax(0,1fr)}
.collection-window.public-collection[data-has-prices=false][data-view=grid] .desktop-card{grid-template-rows:minmax(74px,auto) minmax(0,1fr)}
.collection-window[data-view=grid] .desktop-card-info{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:3px;min-width:0}
.collection-window[data-view=grid] .desktop-card-info .desktop-card-name{height:auto;min-height:0;max-height:36px;flex-shrink:0}
.collection-window[data-view=grid] .desktop-card-info .desktop-card-collection{height:auto;min-height:0;max-height:32px;flex-shrink:0}
@media(max-width:800px){body.desktop-research .research-root>.research-search input{height:46px!important;min-height:46px!important;font-size:17px!important;padding:7px 10px!important;box-sizing:border-box}body.desktop-research .research-root .research-search-primary{height:46px!important;min-height:46px!important;font-size:17px!important;font-weight:700!important;padding:7px 12px!important;}}
@media(max-width:800px){
 .research-root[data-results-view=list] .research-result-table tbody tr[data-item-url]{grid-template-columns:minmax(0,1fr) 86px 90px!important;grid-template-rows:32px 20px 24px!important;min-height:88px!important;height:88px!important;gap:1px 5px!important;}
 .research-root[data-results-view=list] .research-result-table td.research-lot-photo{display:none!important;}
 .research-root[data-results-view=list] .research-result-table td:nth-child(3){grid-column:1/-1!important;grid-row:1!important;}
 .research-root[data-results-view=list] .research-result-table td:nth-child(4){grid-column:1!important;grid-row:2!important;}
 .research-root[data-results-view=list] .research-result-table td:nth-child(5){grid-column:2/4!important;grid-row:2!important;text-align:right!important;}
 .research-root[data-results-view=list] .research-result-table td[data-label="Тип лота"]{grid-column:1!important;grid-row:3!important;flex-direction:row!important;gap:4px;justify-content:flex-start!important;}
 .research-root[data-results-view=list] .research-result-table td[data-label="Грейд"]{grid-column:2!important;grid-row:3!important;text-align:right!important;}
 .research-root[data-results-view=list] .research-result-table td.research-result-marks{grid-column:3!important;grid-row:3!important;justify-content:flex-end!important;}
}

.public-collection .collection-header-surface>.collection-history{max-width:720px;height:225px;margin-inline:auto}
.public-profile-summary .public-profile-seen{white-space:nowrap;overflow-wrap:normal;font-size:11px}

.collection-classifiers{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
.collection-classifiers>.readonly-choices{min-width:0;width:100%}
.collection-classifiers>.collection-grade-filter{grid-column:1;min-width:0;width:100%;height:24px;min-height:24px;padding:2px 18px 2px 5px;font:inherit;font-size:12px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.collection-grade-filter::after{content:"▾";position:absolute;right:5px}

.country-flag{display:inline-block;width:24px;height:18px;flex:0 0 24px;vertical-align:middle;margin-right:6px}
.country-picker{display:flex;align-items:center;gap:6px;min-width:0;width:100%}.country-picker input{min-width:0;flex:1}.country-picker-flag:empty{display:none}

.collection-window[data-view=grid] .desktop-card-info{min-height:74px;padding:6px 0 3px;box-sizing:border-box}
.collection-window[data-view=grid] .desktop-card-info .desktop-card-name{display:block;max-height:none;overflow:visible;line-height:18px}
.collection-window[data-view=grid] .desktop-card-info .desktop-card-collection{max-height:none;overflow:visible;line-height:16px}
.collection-window[data-view=grid] .desktop-card-info .desktop-card-base,.collection-window[data-view=grid] .desktop-card-info .desktop-card-edition{display:inline;white-space:normal;overflow-wrap:anywhere}

.collection-share-row .collection-share{display:grid;place-items:center;box-sizing:border-box;flex:0 0 26px;width:26px;min-width:26px;max-width:26px;height:26px;min-height:26px;max-height:26px;padding:0;line-height:1;aspect-ratio:1}
.collection-share svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

.desktop-card-overlay>p:only-of-type{width:100%;text-align:center;margin-block:auto}

/* Let short titles give their unused space back to the photo in either profile. */
.collection-window[data-view=grid] .desktop-card{grid-template-rows:auto 24px minmax(0,1fr)}
.collection-window[data-view=grid] .desktop-card-info{min-height:0;padding:8px 0 3px;justify-content:flex-start}
.collection-window.public-collection[data-view=grid] .desktop-card{grid-template-rows:auto 24px minmax(0,1fr)}
.collection-window.public-collection[data-has-prices=false][data-view=grid] .desktop-card{grid-template-rows:auto minmax(0,1fr)}

.perspective-source.is-panning,.perspective-source.is-panning *{cursor:grabbing!important}

/* Persisted links have a filled folder; selection keeps its own check mark. */
.research-result-marks .research-mark-collection[data-linked=true]{background:#123b2d;border:3px solid #79c59c}
.research-mark-collection[data-linked=true]>span{background:transparent url('./native-research-glyphs.png') -56px 0 no-repeat;position:relative}
.research-mark-collection[data-linked=true]:has(input:checked)>span::after{content:"✓";position:absolute;right:0;bottom:0;font:bold 13px/14px Arial;color:#10261c;background:#fff;border-radius:50%;width:14px;height:14px;text-align:center}

.research-mark-collection[data-linked=true]:has(input:checked)>span{background-position:-56px 0}
.research-result-marks .research-mark-collection[data-linked=true]:has(input:checked){background:#123b2d;border-color:#79c59c}

/* Draw the linked frame above the opaque native glyph tile. */
.research-result-marks .research-mark-collection[data-linked=true]::after{content:"";position:absolute;inset:-3px;border:3px solid #79c59c;pointer-events:none;z-index:1}
