.phantom-panel{display:block;color:#000;font:16px/1.65 system-ui,-apple-system,'Segoe UI',sans-serif}
#db-material-popover:has(.phantom-panel){width:440px;padding:20px;background:linear-gradient(145deg,#fff,#faf6f0);border:1px solid #d9c3aa;border-radius:18px}
.phantom-heading{position:static!important;background:none!important;border:0!important;box-shadow:none!important;padding:0!important}
.phantom-heading>strong{font-size:22px;line-height:1.4}.phantom-heading p{font-size:15px;line-height:1.7;margin:8px 0 15px;white-space:pre-wrap}
.phantom-tabs{display:flex;gap:8px;padding:5px;background:#eee5d9;border-radius:12px;margin:14px 0}
.phantom-tabs>button{flex:1;font:600 16px/1.5 inherit;min-height:44px;border:1px solid transparent;background:transparent;border-radius:9px;color:#000}
.phantom-tabs>button[aria-selected=true]{background:#fff;border-color:#cbb193;box-shadow:0 2px 6px #76523812}
.phantom-form[hidden],.phantom-skill-detail[hidden]{display:none!important}
.phantom-model{height:220px;display:grid;place-items:center;background:radial-gradient(ellipse,#e9dfef88,transparent 70%);border-radius:14px}
.phantom-model>img{display:block;width:100%!important;height:100%!important;max-height:220px!important;object-fit:contain!important;border-radius:0!important}
.phantom-model>span,.phantom-empty{font-size:14px;color:#64594e;text-align:center}
.phantom-skills{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding:16px 0 6px;border-top:1px solid #e5d8c8;margin-top:10px}
.phantom-skills>button{display:flex;flex-direction:column;align-items:center;gap:6px;width:82px;padding:4px;border:0;background:transparent;color:#000;font:13px/1.4 system-ui,sans-serif}
.phantom-skills>button>img,.phantom-skills>button>span:first-child{width:54px!important;height:54px!important;object-fit:contain;border-radius:50%;border:2px solid #ccb28f;background:#fff;box-sizing:border-box}
.phantom-skills>button[aria-expanded=true]>img{border-color:#9a7950;box-shadow:0 0 0 3px #e9dcc9}
.phantom-skill-detail{padding:15px;margin-top:12px;background:#fff;border:1px solid #e0cfb9;border-radius:12px}
.phantom-skill-detail .db-tip-content{display:block}.phantom-skill-detail .db-skill-media img{max-width:100%;object-fit:contain}
.phantom-icon{display:inline-flex!important;align-items:center;justify-content:center;width:1.4em!important;height:1.4em!important;min-width:0!important;min-height:0!important;flex-shrink:0;vertical-align:middle;padding:0!important;font:inherit;line-height:1;border:1px solid #ccb28f;border-radius:50%!important;background:#f8f2e9;box-sizing:border-box}
.phantom-icon>img{max-width:100%!important;max-height:100%!important;width:100%!important;height:100%!important;object-fit:contain;border-radius:50%!important}
.phantom-record{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px;background:#fffaf4;border:1px solid #e1cfb9;border-radius:14px}.phantom-record>.phantom-icon{width:86px!important;height:86px!important}.phantom-record>strong{font-size:16px;text-align:center}
.phantom-editor fieldset{border:1px solid #d8c6af;border-radius:12px;padding:16px;margin:20px 0}.phantom-editor legend{font-size:18px;font-weight:650}.phantom-upload{display:flex;align-items:center;gap:16px;width:100%;min-height:100px;margin:10px 0 18px;border:1px dashed #bda586;background:#fffaf4;border-radius:10px}.phantom-upload img{width:100px;height:100px;object-fit:contain}.phantom-editor select{width:100%;margin:8px 0}.phantom-editor small{display:block;font-size:14px}
@media(max-width:500px){.phantom-model{height:180px}.phantom-model>img{max-height:180px!important}.phantom-skills{gap:6px}.phantom-heading>strong{font-size:20px}}

/* Selected categories belong below the name in both catalogue and hover card. */
.phantom-tags{display:block;margin:10px 0 12px}
.phantom-tags .db-item-badges{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;margin:0;padding:0}
.phantom-tags .db-item-badges>span{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;background:#f6f0e8;border:1px solid #d8c7b3;border-radius:7px;font:500 14px/1.5 system-ui,sans-serif;color:#000}
.phantom-tags .db-item-badges>span>img{width:18px;height:18px;object-fit:contain}
.phantom-record>.phantom-tags{margin:0}.phantom-record>.phantom-tags .db-item-badges{justify-content:center}

/* Match the icon and its frame in text, tables and dedicated icon groups. */
:is(.article-table,.direct-table-editor) .phantom-icon{width:44px!important;height:44px!important}
.material-icon-group .phantom-icon{width:64px!important;height:64px!important}
