/* Whole chibi artwork and a continuous list of level bonuses. */
.companion-progress-wrap{border:1px solid #e4d7c6;border-radius:12px;overflow:hidden;background:#fffdfa}.companion-level-note{display:flex;align-items:center;gap:8px;margin:0 0 14px;color:#75604a;font-size:12px;line-height:1.5}.companion-level-note>span{color:#b58742;font-size:10px}
body.site-theme .companion-progress-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0;text-align:left;font-size:14px;color:#30271e;background:transparent}
body.site-theme .companion-progress-table th,body.site-theme .companion-progress-table td{padding:10px 16px;border:0;border-bottom:1px solid #eee4d6;background:transparent;vertical-align:middle;overflow-wrap:anywhere;line-height:1.5}
body.site-theme .companion-progress-table thead th{background:#f5eee4;font-size:11px;letter-spacing:.03em;font-weight:600;color:#75604c}
body.site-theme .companion-progress-table th:first-child{width:30%}body.site-theme .companion-progress-table th:last-child{width:24%;text-align:right}body.site-theme .companion-progress-table tbody th{font-weight:500;color:#6b5e50}
body.site-theme .companion-progress-table .companion-bonus{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;color:#30271e}
body.site-theme .companion-progress-table tr.is-milestone>*{background:#f5ead6!important;border-bottom-color:#e5d3b5!important;color:#5c3e1f;font-weight:700}body.site-theme .companion-progress-table tr.is-milestone>th{box-shadow:inset 3px 0 #b58b48}
body.site-theme .companion-progress-table tr:last-child>*{border-bottom:0}.companion-milestone-label{display:inline-block;font-size:9px;font-weight:600;color:#8b622e;border:1px solid #d9bf91;border-radius:4px;padding:1px 5px;margin-left:9px;vertical-align:middle;white-space:nowrap}.companion-unfilled{color:#9a8d7c;font-size:12px;font-weight:400}
body.site-theme .companion-editor-table th:first-child{width:24%}body.site-theme .companion-editor-table th:last-child{width:30%;text-align:left}body.site-theme .companion-editor-table td{padding:7px 10px}body.site-theme .companion-editor-table input{width:100%;min-width:0;padding:9px 10px;box-sizing:border-box;font-size:14px;background:#fffefa;color:#30271e}
.companion-progress-table caption.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){body.site-theme .companion-progress-table th,body.site-theme .companion-progress-table td{padding:9px 10px;font-size:13px}body.site-theme .companion-progress-table thead th{font-size:10px}.companion-milestone-label{display:block;width:max-content;font-size:8px;margin:3px 0 0}.companion-level-note{font-size:11px}body.site-theme .companion-editor-table td{padding:5px}body.site-theme .companion-editor-table input{font-size:13px;padding:8px 6px}}
body.site-theme .companion-card{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 12px 14px;border:1px solid #e6d7c6;border-radius:16px;background:linear-gradient(155deg,#fffefa,#f6eee3);color:#251f1a;text-align:center;cursor:pointer;transition:border-color .18s,box-shadow .18s}
body.site-theme .companion-card:hover,body.site-theme .companion-card:focus-visible{border-color:#b98555;box-shadow:0 5px 20px #75523118;outline:2px solid transparent}
body.site-theme .companion-card-art{height:142px;width:100%;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 85%,#d5b38c40,transparent 65%)}
body.site-theme .companion-card-art img{height:100%;width:100%;object-fit:contain;filter:drop-shadow(0 6px 5px #765c3b22)}
body.site-theme .companion-card>strong{font-size:17px;line-height:1.35}.companion-tags{display:flex;flex-wrap:wrap;justify-content:inherit;gap:6px;color:#695443;font-size:12px}.companion-tags:empty{display:none}.companion-tags>span{background:#ede1d1;padding:3px 8px;border-radius:5px}
body.site-theme .companion-card-link{font-size:12px;color:#795334;margin-top:auto;display:flex;gap:18px;padding-top:5px}
body.site-theme dialog:has(.companion-panel){width:min(760px,calc(100vw - 28px));max-width:760px;padding:32px;border:1px solid #ddcbb5;border-radius:20px;background:#fffdf9;color:#251f1a}
body.site-theme dialog:has(.companion-panel)::backdrop{background:#201b16a6;backdrop-filter:blur(3px)}
.companion-panel{color:#251f1a;min-width:0}.companion-hero{display:grid;grid-template-columns:180px minmax(0,1fr);gap:28px;align-items:center;margin-bottom:26px}.companion-model{height:210px;display:grid;place-items:center;border-radius:18px;background:radial-gradient(ellipse at 50% 80%,#ecdbbf,#f7f0e5 55%,#fffaf2)}.companion-model img{width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box}.companion-model>span{font-size:13px;text-align:center;color:#7b6b5b;padding:15px}.companion-heading>small{font-size:10px;letter-spacing:.15em;color:#806247}.companion-heading h2{font-size:30px;line-height:1.2;margin:8px 0 12px;overflow-wrap:anywhere}.companion-heading p,.companion-source p{font-size:14px;line-height:1.7;white-space:pre-line;color:#54483c}.companion-development h3,.companion-source h3{font-size:16px;margin:0 0 14px}.companion-empty{padding:18px;background:#f7f1e7;border-radius:10px;font-size:14px;color:#6a5948}.companion-source{margin-top:24px;padding-top:20px;border-top:1px solid #e9dfd2}.companion-import-preview{max-height:280px;overflow:auto}.companion-import-dialog{width:min(680px,calc(100vw - 28px));max-height:90vh;overflow:auto;padding:28px}.companion-inline img{object-fit:contain!important;border-radius:0!important}.db-popover:has(.companion-panel){max-width:620px!important}.db-popover .companion-hero{grid-template-columns:100px 1fr;gap:16px}.db-popover .companion-model{height:130px}.db-popover .companion-heading h2{font-size:22px}
@media(max-width:600px){body.site-theme dialog:has(.companion-panel){padding:24px 18px}.companion-hero{grid-template-columns:100px minmax(0,1fr);gap:16px;margin-top:12px}.companion-model{height:150px}.companion-heading h2{font-size:24px}.companion-heading p{font-size:13px}}
@media(prefers-reduced-motion:reduce){body.site-theme .companion-card{transition:none}}
body.site-theme .db-page .db-items:not(.db-items-list):has(>.companion-record),body.site-theme .db-items:not(.db-items-list):has(>.companion-record){grid-template-columns:repeat(auto-fill,minmax(180px,1fr));align-items:stretch;gap:16px}
body.site-theme .db-items-list .companion-card{display:grid;grid-template-columns:90px minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;justify-items:start;text-align:left;padding:12px 18px;column-gap:18px}
body.site-theme .db-items-list .companion-card-art{grid-column:1;grid-row:1/3;height:100px}.db-items-list .companion-card>strong{grid-column:2;grid-row:1;align-self:end}.db-items-list .companion-card .companion-tags{grid-column:2;grid-row:2;align-self:start}.db-items-list .companion-card .companion-card-link{grid-column:3;grid-row:1/3;margin:0}
body.site-theme #cat-item-form:has(.companion-editor) #cat-item-image img{object-fit:contain!important}
.db-material-popover:has(.companion-panel){max-width:620px!important}.db-material-popover .companion-hero{grid-template-columns:100px 1fr;gap:16px}.db-material-popover .companion-model{height:130px}.db-material-popover .companion-heading h2{font-size:22px}
@media(max-width:600px){body.site-theme .db-page .db-items:not(.db-items-list):has(>.companion-record){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.site-theme .companion-card{padding:14px 8px}body.site-theme .companion-card>strong{font-size:15px}body.site-theme .companion-card-art{height:125px}body.site-theme .db-items-list .companion-card{grid-template-columns:70px minmax(0,1fr);padding:10px;gap:10px}body.site-theme .db-items-list .companion-card-art{height:85px}.db-items-list .companion-card .companion-card-link{grid-column:2;grid-row:3}}

/* Reader list is intentionally separate from the editable three-column table. */
body.site-theme dialog:has(.companion-panel)>.close{position:absolute!important;top:14px!important;right:14px!important;margin:0!important;z-index:1}
body.site-theme dialog:has(.companion-panel) .db-detail{padding:0!important}
body.site-theme dialog:has(.companion-panel){padding:28px 32px;max-height:calc(100dvh - 32px);box-sizing:border-box;box-shadow:0 24px 100px #2a1d1233;scrollbar-width:thin;scrollbar-color:#cdbba5 transparent}
body.site-theme .companion-panel .companion-hero{grid-template-columns:126px minmax(0,1fr);gap:22px;margin:0 0 24px;padding:0 26px 22px 0;border-bottom:1px solid #eadfd0;align-items:center}
body.site-theme .companion-panel .companion-model{height:142px;border-radius:0;background:radial-gradient(ellipse at 50% 78%,#e6d0ac55,transparent 68%)}
body.site-theme .companion-panel .companion-model img{padding:0 6px;filter:drop-shadow(0 8px 7px #805f3320)}
body.site-theme .companion-panel .companion-heading>small{font-size:9px;letter-spacing:.18em;color:#8b6b48;font-weight:600}
body.site-theme .companion-panel .companion-heading h2{font-size:26px;color:#28221b;margin:7px 0 10px;line-height:1.2}
body.site-theme .companion-panel .companion-heading p{font-size:13px;line-height:1.6;color:#6b5c4d;margin:12px 0 0}
body.site-theme .companion-panel .companion-tags{gap:6px;font-size:11px;color:#7b634b}
body.site-theme .companion-panel .companion-tags>span{background:transparent;border:1px solid #e4d6c4;padding:2px 7px;border-radius:5px}
.companion-section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:7px}.companion-section-heading>span{font-size:11px;color:#a08a70;white-space:nowrap}body.site-theme .companion-section-heading h3{font-size:17px;color:#30271e;letter-spacing:-.3px;margin:0}
body.site-theme .companion-panel .companion-level-note{font-size:11px;color:#92816d;margin:0 0 12px;gap:7px}.companion-panel .companion-level-note>span{width:6px;height:6px;border-radius:50%;background:#c09a57;flex-shrink:0}
body.site-theme table.companion-bonus-list{background:transparent!important;border-collapse:separate;border-spacing:0 3px;table-layout:fixed;width:100%;color:#4f4437;font-size:13px}
body.site-theme .companion-bonus-list :is(th,td){border:0!important;background:transparent!important;padding:5px 14px;line-height:1.4;box-shadow:none!important}
body.site-theme .companion-bonus-list thead th{font-size:10px;letter-spacing:.04em;font-weight:500;color:#a08c75;padding-top:0;padding-bottom:6px}
body.site-theme .companion-bonus-list th:first-child{width:88px;text-align:center}
body.site-theme .companion-bonus-list th:last-child{width:auto;text-align:left}
body.site-theme .companion-bonus-list tbody th{border-radius:8px 0 0 8px;color:#a48e74;font-weight:500}
body.site-theme .companion-bonus-list tbody td{border-radius:0 8px 8px 0}
.companion-bonus-line{display:flex;align-items:baseline;justify-content:space-between;gap:18px;min-width:0}.companion-stat-name{color:#6b5c4c;overflow-wrap:anywhere}.companion-bonus-value{color:#31271d;font-weight:600;font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
body.site-theme .companion-bonus-list tr.is-milestone>*{background:#f4ead8!important;color:#805d28;font-weight:500}
body.site-theme .companion-bonus-list tr.is-milestone .companion-level-number{color:#805d28;font-weight:700}
.companion-bonus-list .is-milestone .companion-stat-name{color:#785a33;font-weight:600}.companion-bonus-list .is-milestone .companion-bonus-value{color:#78521d;font-weight:700}
body.site-theme .companion-panel .companion-source{margin-top:18px;padding-top:16px;border-top:1px solid #eadfd0}body.site-theme .companion-panel .companion-source h3{font-size:12px;font-weight:600;color:#80664a;margin:0 0 5px}body.site-theme .companion-panel .companion-source p{font-size:12px;color:#8b7863;line-height:1.6;margin:0}
.companion-panel .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){body.site-theme dialog:has(.companion-panel){padding:24px 20px}body.site-theme .companion-panel .companion-hero{grid-template-columns:76px minmax(0,1fr);gap:15px;padding:16px 24px 18px 0;margin-bottom:19px}body.site-theme .companion-panel .companion-model{height:105px}body.site-theme .companion-panel .companion-heading h2{font-size:22px}body.site-theme .companion-panel .companion-heading p{font-size:12px}body.site-theme .companion-bonus-list th:first-child{width:72px}body.site-theme .companion-bonus-list :is(th,td){padding:6px 10px;font-size:13px}body.site-theme .companion-bonus-list thead th{font-size:10px;white-space:nowrap}.companion-bonus-line{gap:10px}.companion-section-heading>span{font-size:10px}}
