.mgr{max-width:928px;margin:0 auto;padding:16px 24px 64px;color:var(--ink)}
.mgr-crumb,.mgr-back,.mgr-provider{font-size:13px}.mgr-crumb{margin-bottom:24px}
.mgr h1{font-size:24px;line-height:1.4}.mgr h2{font-size:21px}.mgr h3{font-size:18px}
.mgr-note,.mgr-status,.mgr-count,.mgr-identity p,.mgr-field small,.mgr-tags>small,.mgr-matches small{color:var(--quiet);font-size:13px;line-height:1.6}
.mgr-note{margin-top:8px}.mgr-content{margin-top:24px}
.mgr-box{border:1px solid var(--line);border-radius:12px;background:white;padding:24px}
.mgr-search-label{display:block;font-size:14px;font-weight:700;margin:20px 0 7px}
.mgr-search{display:flex;align-items:center;gap:10px;border:1px solid #bbb;border-radius:6px;min-height:46px;padding:0 12px}
.mgr-search:focus-within{outline:2px solid var(--blue);outline-offset:1px}.mgr-search input{min-width:0;flex:1;min-height:44px;border:0;outline:none;background:white}
.mgr-count{margin:16px 0 4px}.mgr-matches{list-style:none;padding:0;margin:0}
.mgr-matches li+li{border-top:1px solid var(--line)}.mgr-matches li>a{display:flex;align-items:center;gap:10px;padding:14px 4px;color:var(--ink)}
.mgr-matches li>a:hover{background:#f7f9fa;text-decoration:none}.mgr-matches a>span{flex:1;min-width:0}.mgr-matches b,.mgr-identity h2,.mgr-summary dd{overflow-wrap:anywhere}
.mgr-matches small{display:block}.mgr-matches .mgr-draft{color:var(--blue);font-weight:700}
.mgr-btn{min-height:44px;border:1px solid #d2d2d2;background:white;border-radius:6px;padding:9px 16px;font-size:14px;font-weight:700}
.mgr-primary{color:white;background:var(--blue);border-color:var(--blue)}
.mgr-more{display:flex;justify-content:center}.mgr-more:not(:empty){margin-top:20px}
.mgr-back{display:inline-block;margin-bottom:16px}.mgr-identity{margin:0 0 16px}.mgr-identity p{margin-top:4px}.mgr-status{margin:8px 0 16px}
.mgr-field{display:grid;gap:6px;margin:18px 0}.mgr-field b,.mgr-tags legend{font-size:14px;font-weight:700}
.mgr-field textarea{min-width:0;width:100%;resize:vertical;border:1px solid #bbb;border-radius:6px;padding:10px 12px;background:white;font-size:15px}
.mgr-tags{border:0;margin:20px 0 0;padding:0}.mgr-tags legend{padding:0}.mgr-tags>div{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}
.mgr-tags label{display:flex;align-items:center;gap:6px;border:1px solid #d5d5d5;border-radius:6px;padding:7px 10px;font-size:14px;cursor:pointer}
.mgr-tags input{accent-color:var(--blue);margin:0}.mgr-tags label:has(:checked){border-color:var(--blue);color:var(--blue)}
.mgr-actions{border-top:1px solid var(--line);padding-top:18px;margin-top:20px;display:flex;flex-wrap:wrap;gap:8px}
.mgr-summary{margin:14px 0}.mgr-summary>div{display:grid;grid-template-columns:minmax(125px,23%) minmax(0,1fr);gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.mgr-summary dt{font-weight:700;font-size:14px}.mgr-summary dd{margin:0;white-space:pre-wrap}
.mgr-provider{margin-top:20px}.mgr-provider a{display:inline-flex;align-items:center;gap:4px}
@media(max-width:639px){
 .mgr{padding:12px 16px 48px}.mgr-crumb{margin-bottom:16px}.mgr h1{font-size:21px}.mgr h2{font-size:18px}.mgr-box{padding:16px}
 .mgr-field textarea,.mgr-search input{font-size:16px}.mgr-actions .mgr-btn{flex:1 1 auto}.mgr-content{margin-top:18px}
 .mgr-summary>div{display:block}.mgr-summary dd{margin-top:4px}
}


.mgr-source{border:1px solid var(--line);border-radius:8px;background:#f8fafb;padding:16px;margin:16px 0 20px}
.mgr-source h3{font-size:16px}.mgr-permission{display:flex;align-items:flex-start;gap:7px;font-size:14px;margin-top:12px}
.mgr-permission input{flex:none;margin:4px 0 0;accent-color:var(--blue)}
.mgr-import-actions{display:flex;flex-wrap:wrap;gap:8px}.mgr-provenance{font-size:13px;color:var(--quiet);margin-top:14px;overflow-wrap:anywhere}
.mgr-photos{margin-top:20px}.mgr-photos h4{font-size:15px;margin:0 0 10px}
.mgr-photos-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.mgr-photo{min-width:0;display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px}
.mgr-photo-frame{width:100%;aspect-ratio:4/3;display:grid;place-items:center;background:#f1f3f4;color:var(--quiet);font-size:12px}.mgr-photo-frame img{width:100%;height:100%;object-fit:cover}
.mgr-photo label,.mgr-file{display:grid;gap:4px;font-size:13px}.mgr-photo input{width:100%;min-width:0;border:1px solid #bbb;border-radius:5px;padding:5px}
.mgr-photo small{font-size:12px;color:var(--quiet)}.mgr-photo p{font-size:14px;overflow-wrap:anywhere}
.mgr-photo button{border:0;color:var(--blue);padding:4px 0;background:white;font-size:13px}
.mgr-file{margin-top:14px}.mgr-file input{max-width:100%;padding:7px 0}
@media(max-width:639px){.mgr-photos-grid{grid-template-columns:1fr}.mgr-source{padding:12px}.mgr-import-actions .mgr-primary{width:100%}.mgr-photo input{font-size:16px}}

.mgr-photo-frame{grid-template: minmax(0,1fr) / minmax(0,1fr)}
.mgr-photo-frame img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.mgr-import-warnings{margin-top:12px;padding:10px;border:1px solid #d5d5d5;border-radius:6px;background:#fff;font-size:13px}
.mgr-import-warnings ul{margin:4px 0 0;padding-left:20px}
.mgr-details{margin:18px 0;border:1px solid var(--line);border-radius:6px;padding:12px}
.mgr-details summary{cursor:pointer;font-weight:700;font-size:14px}
.mgr-preview-notice{margin:16px auto;width:min(1232px,calc(100% - 48px));border:1px solid var(--line);border-radius:8px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.mgr-preview-notice p,.mgr-preview-contact{font-size:13px;color:var(--quiet);margin:3px 0 0}
.mgr-preview-back,.mgr-preview-link{display:inline-flex;align-items:center;justify-content:center;color:var(--blue);flex-shrink:0}
.mgr-preview-page .rec-gallery-photo,.mgr-preview-page .rec-gallery-thumb{display:grid;place-items:center;grid-template:minmax(0,1fr) / minmax(0,1fr);background:var(--rec-surface)}
.mgr-preview-page .rec-gallery img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.mgr-preview-page .rec-detail-actions:empty{display:none}
.mgr-preview-empty {margin:40px auto}
.mgr-gallery-dialog{width:min(880px,calc(100vw - 32px));padding:16px;max-height:92dvh;overflow:auto;border:1px solid var(--line);border-radius:12px;background:white}
.mgr-gallery-dialog header,.mgr-gallery-dialog nav{display:flex;justify-content:space-between;align-items:center;gap:12px}
.mgr-gallery-dialog button{min-height:40px;padding:7px 12px}
.mgr-gallery-dialog figure{margin:12px 0}
.mgr-gallery-dialog figure img{display:block;margin:0 auto;width:auto;height:auto;max-width:100%;max-height:62dvh;object-fit:contain}
.mgr-gallery-dialog figcaption{margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:639px){
 .mgr-preview-notice{width:calc(100% - 32px);margin:12px auto;padding:10px;gap:8px}
 .mgr-preview-notice .mgr-btn{padding:6px 10px;min-height:40px}
 .mgr-preview-page .rec-gallery-photo:not(:first-child){display:none}
 .mgr-gallery-dialog{margin:auto;max-width:calc(100vw - 24px)}
}
