/* Remix credit and comparisons extend the existing builder and community UI. */
#deck-builder .db-header:has(.dc-remix-credit) #db-owner-avatar { flex-shrink:0; }
#deck-builder .db-header:has(.dc-remix-credit) #db-owner { min-width:0;overflow-wrap:anywhere; }
#deck-builder[data-readonly=true] .db-header:has(.dc-remix-credit) .db-owner-line { padding-right:0; }
.dc-remix-icon { flex:none;vertical-align:middle; }
.dc-remix-credit { display:flex;align-items:flex-start;gap:10px;max-width:75ch;margin:14px 0 0;font-size:13px;line-height:1.6;color:#c8c3d2; }
.dc-remix-credit>.dc-remix-icon { color:var(--db-accent,#c9a84c);margin-top:2px; }
.dc-remix-credit-copy { display:flex;flex-wrap:wrap;align-items:baseline;column-gap:5px;min-width:0; }
.dc-remix-source { min-width:0;overflow-wrap:anywhere; }
#deck-builder .dc-remix-credit .dc-remix-source a,#deck-builder .dc-remix-earlier .dc-remix-source a { color:#f0eef8;font-weight:600; }
.dc-remix-creator { flex-basis:100%;color:#c8c3d2;font-size:12px;overflow-wrap:anywhere; }
#deck-builder .dc-remix-creator a { color:inherit; }
.dc-remix-credit a,.dc-remix-earlier a { text-decoration:none;text-underline-offset:3px; }
#deck-builder .dc-remix-credit a:hover,#deck-builder .dc-remix-earlier a:hover { color:var(--db-accent,#c9a84c);text-decoration:underline; }
.dc-remix-earlier { max-width:75ch;margin:4px 0 0 28px;font-size:12px;line-height:1.6;color:#c8c3d2;overflow-wrap:anywhere; }
.dc-remix-earlier summary { cursor:pointer;min-height:36px;align-content:center; }
.dc-remix-earlier ol { margin:4px 0 0;padding-left:20px; }
.dc-remix-earlier li { padding:8px 0; }
.dc-remix-earlier .dc-remix-creator { display:block; }
.dc-remix-credit a:focus-visible,.dc-remix-earlier :is(a,summary):focus-visible,.dc-remix-section a:focus-visible { outline:2px solid var(--db-accent,#c9a84c);outline-offset:4px;border-radius:2px; }
#deck-builder .dc-remix-owner-action { display:inline-flex;align-items:center;gap:8px;min-height:40px;margin-top:12px;padding:8px 10px;font-size:12px;background:transparent;color:#e4d096;border:1px solid #81714d; }
#deck-builder .dc-remix-owner-action:hover { background:#c9a84c12;border-color:#c9a84c; }
.dc-remix-section { min-width:0;margin-top:32px;padding-top:24px;border-top:1px solid var(--db-line,#34313d);scroll-margin-top:96px; }
.dc-remix-section-heading { margin-bottom:18px; }
.dc-remix-section h2 { font-size:20px;line-height:1.3;margin:0 0 6px; }
.dc-remix-section-heading>p { margin:0;font-size:13px;line-height:1.6;color:#b5b0bf; }
.dc-remix-section .community-grid { list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr));gap:16px;margin:0;padding:0; }
.dc-remix-section .community-card { display:flex;flex-direction:column;min-width:0;border:1px solid var(--db-line,#34313d);border-radius:12px;overflow:hidden;background:var(--db-panel,#15141b);transition:border-color 160ms ease-out; }
.dc-remix-section .community-card:hover,.dc-remix-section .community-card:focus-within { border-color:#81714d; }
.dc-remix-section .community-art { display:block;aspect-ratio:16/9;background:var(--db-raised,#1b1922);overflow:hidden; }
.dc-remix-section .community-art img { width:100%;height:100%;object-fit:cover;display:block; }
.dc-remix-section .community-art img[src="/icon.svg"] { object-fit:contain;padding:30px;box-sizing:border-box; }
.dc-remix-section .community-art:focus-visible { outline-offset:-4px; }
.dc-remix-section .dc-remix-card-copy { display:flex;flex-direction:column;flex:1;min-width:0;padding:16px; }
.dc-remix-section h3 { margin:0 0 8px;font-size:15px;line-height:1.45;overflow-wrap:anywhere; }
#deck-builder .dc-remix-section h3 a { color:var(--db-text,#f0eef8);text-decoration:none; }
#deck-builder .dc-remix-section h3 a:hover { color:var(--db-accent,#c9a84c);text-decoration:underline;text-underline-offset:3px; }
.dc-remix-section .lib-meta { margin:0 0 16px;font-size:12px;line-height:1.6;color:#b5b0bf;overflow-wrap:anywhere; }
.dc-remix-card-footer { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-top:auto;font-size:12px;line-height:1.5; }
#deck-builder .dc-remix-card-owner { display:inline-flex;align-items:center;gap:6px;min-width:0;min-height:24px;color:#d8bf79;text-decoration:none; }
.dc-remix-card-owner span { overflow-wrap:anywhere;min-width:0; }
.dc-remix-card-owner .dc-remix-icon { width:14px;height:14px; }
#deck-builder .dc-remix-card-owner:hover { text-decoration:underline;text-underline-offset:3px; }
.dc-remix-card-count { color:#b5b0bf;white-space:nowrap;font-variant-numeric:tabular-nums; }
/* Scope all comparison overrides to this body. Other builder dialogs keep their layout. */
#db-dialog:has(.dc-remix-comparison) #db-dialog-title:focus { outline:none; }
.dc-remix-comparison { font-size:14px;line-height:1.65;color:var(--db-text,#f0eef8);overflow-wrap:anywhere; }
.dc-remix-comparison p { margin:0; }
#deck-builder .dc-remix-comparison h3 { font-size:15px;line-height:1.4;margin:0 0 6px; }
.dc-remix-baselines { display:grid;grid-template-columns:1fr 1fr;padding:4px;gap:4px;border:1px solid var(--db-line,#34313d);border-radius:10px;background:#0e0d12; }
#deck-builder .dc-remix-baselines button { min-width:0;min-height:44px;border:1px solid transparent;border-radius:6px;background:transparent;color:#c8c3d2;font-size:13px;line-height:1.4;padding:10px 12px; }
#deck-builder .dc-remix-baselines button[aria-pressed=true] { color:#efd58b;background:#c9a84c16;border-color:#81714d;opacity:1;cursor:default; }
#deck-builder .dc-remix-baselines button:hover:not(:disabled) { color:#f0eef8;background:#ffffff08; }
#deck-builder .dc-remix-baselines button:disabled:not([aria-pressed=true]) { opacity:.55;cursor:not-allowed; }
.dc-remix-baseline-info { margin:20px 0; }
.dc-remix-baseline-info>p { color:#c8c3d2;font-size:13px;max-width:70ch; }
.dc-remix-context { display:flex;gap:8px;align-items:flex-start;color:#c8c3d2;font-size:12px;margin:0 0 20px!important;max-width:75ch; }
.dc-remix-context[hidden] { display:none; }
.dc-remix-context .dc-remix-icon { margin-top:2px;width:16px;height:16px; }
.dc-remix-diff-heading { display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 12px;margin-top:24px; }
#deck-builder .dc-remix-diff-heading h3 { margin:0; }
.dc-remix-diff-heading>span { color:#b5b0bf;font-size:12px;font-variant-numeric:tabular-nums; }
.dc-remix-diff { list-style:none;margin:12px 0 0;padding:0;border-top:1px solid var(--db-line,#34313d); }
.dc-remix-difference { padding:16px 0;border-bottom:1px solid var(--db-line,#34313d); }
.dc-remix-change-heading { display:flex;align-items:flex-start;gap:10px; }
.dc-remix-change-heading .dc-remix-icon { margin-top:2px;color:#d8bf79; }
#deck-builder .dc-remix-change-heading h4 { margin:0;font-size:14px;line-height:1.6;font-weight:600; }
.dc-remix-change-heading p { min-width:0; }
.dc-remix-difference[data-kind=added] .dc-remix-icon { color:#b9d5b2; }
.dc-remix-difference[data-kind=removed] .dc-remix-icon { color:#e9abb2; }
.dc-remix-title-diff { margin:14px 0 0 28px;display:grid;gap:12px; }
.dc-remix-title-diff>div { display:grid;grid-template-columns:76px minmax(0,1fr);column-gap:14px; }
.dc-remix-title-diff dt { color:#b5b0bf;font-size:12px; }
.dc-remix-title-diff dd { margin:0;line-height:1.6;min-width:0; }
.dc-remix-title-diff>div:last-child dd { color:#efd58b; }
.dc-remix-preview-note { margin-top:20px!important;color:#b5b0bf;font-size:12px; }
.dc-remix-state { display:flex;align-items:flex-start;gap:12px;margin:24px 0; }
.dc-remix-state>.dc-remix-icon { width:22px;height:22px;color:#d8bf79; }
.dc-remix-state p { font-size:13px;color:#c8c3d2;max-width:65ch; }
.dc-remix-identical>.dc-remix-icon { color:#b9d5b2; }
.dc-remix-compare-actions { display:flex;gap:12px;flex-wrap:wrap;margin-top:20px; }
.dc-remix-compare-actions button { min-height:44px; }
.dc-remix-skeleton { display:grid;gap:12px;margin-top:24px; }
.dc-remix-skeleton i { display:block;height:12px;background:#292630;border-radius:4px; }
.dc-remix-skeleton i:nth-child(2) { width:78%; }
.dc-remix-skeleton i:nth-child(3) { width:54%; }
@media(max-width:600px){
 .dc-remix-section .community-grid { grid-template-columns:minmax(0,1fr);gap:12px; }
 .dc-remix-section .community-card { display:grid;grid-template-columns:96px minmax(0,1fr); }
 .dc-remix-section .community-art { aspect-ratio:auto;min-height:140px;height:100%; }
 .dc-remix-section .community-art img[src="/icon.svg"] { padding:24px; }
 .dc-remix-section .dc-remix-card-copy { padding:14px; }
 .dc-remix-section h3 { font-size:14px;margin-bottom:6px; }
 .dc-remix-section .lib-meta { margin-bottom:12px; }
 .dc-remix-card-footer { gap:4px 10px; }
 .dc-remix-credit { font-size:12px;gap:8px; }
 .dc-remix-earlier { margin-left:26px; }
 .dc-remix-baselines { gap:2px; }
 #deck-builder .dc-remix-baselines button { font-size:12px;padding:10px 6px; }
 .dc-remix-title-diff { margin-left:28px; }
 .dc-remix-title-diff>div { grid-template-columns:minmax(0,1fr);gap:4px; }
}
@media(prefers-reduced-motion:reduce){.dc-remix-section .community-card{transition:none}}
