/* Entity profiles reuse the genre hero, collection controls and discovery cards (tagsmod-genre.css, tagsmod-discovery.css).
 * Each entity also gets a decorative hue (--entity-hue, set inline) that tints its avatar, initial and hero glow;
 * interactive colours stay the site's primary. */
.zbui.tagsmod-entity { --tagsmod-entity-header: 0px; --tagsmod-entity-sticky-ease: cubic-bezier(.77, 0, .175, 1); }
body:has(.site-header.navbar-sticky:not(.navbar-now)) .zbui.tagsmod-entity { --tagsmod-entity-header: 60px; }
.tagsmod-entity .tagsmod-role-badge .tagsmod-ico { width: 13px; height: 13px; }

/* Hero: an ambient wash in the entity's hue, a faint dot texture, and a large initial when no covers fill the right side. */
.tagsmod-entity-hero { background: radial-gradient(55% 120% at 84% 28%, hsl(var(--entity-hue) 92% 62% / 16%), transparent 70%), radial-gradient(38% 80% at 6% 0%, hsl(var(--entity-hue) 90% 70% / 10%), transparent 72%), var(--zb-surface); }
.tagsmod-entity-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(hsl(var(--entity-hue) 40% 45% / 16%) 1px, transparent 1.3px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(100deg, transparent 38%, #000 88%); mask-image: linear-gradient(100deg, transparent 38%, #000 88%); pointer-events: none; }
.tagsmod-entity-watermark { position: absolute; top: 50%; right: max(24px, calc(50% - 590px)); z-index: -1; font-size: clamp(170px, 21vw, 290px); font-weight: 800; line-height: 1; letter-spacing: -.04em; background: linear-gradient(165deg, hsl(var(--entity-hue) 90% 62% / 34%), hsl(calc(var(--entity-hue) + 40) 90% 70% / 4%) 78%); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translateY(-42%) rotate(-6deg); pointer-events: none; user-select: none; animation: tagsmod-entity-watermark 1100ms var(--zb-ease-out) 120ms backwards; }
.tagsmod-entity .tagsmod-entity-intro { animation: none; }
.tagsmod-entity-intro > * { animation: tagsmod-entity-rise 560ms var(--zb-ease-out) backwards; }
.tagsmod-entity-intro > :nth-child(2) { animation-delay: 70ms; }
.tagsmod-entity-intro > :nth-child(3) { animation-delay: 120ms; }
.tagsmod-entity-intro > :nth-child(4) { animation-delay: 170ms; }
.tagsmod-entity-intro > :nth-child(n+5) { animation-delay: 220ms; }

/* Identity: avatar beside the name. The initial sits under any image, so a failed image falls back to it. */
.tagsmod-entity-identity { display: flex; align-items: center; gap: 24px; min-width: 0; }
.tagsmod-entity-identity:has(.tagsmod-entity-name.is-long) { align-items: flex-start; }
.tagsmod-entity-heading { flex: 1; min-width: 0; }
.tagsmod-entity-avatar { position: relative; display: grid; flex: none; place-items: center; width: 104px; height: 104px; overflow: hidden; border-radius: 50%; background: linear-gradient(140deg, hsl(var(--entity-hue) 95% 93%), hsl(calc(var(--entity-hue) + 32) 88% 84%)); color: hsl(var(--entity-hue) 60% 32%); font-size: 44px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 4px var(--zb-surface), 0 0 0 5px hsl(var(--entity-hue) 55% 82%), 0 22px 40px -22px hsl(var(--entity-hue) 70% 35% / 55%); isolation: isolate; animation: tagsmod-entity-pop 680ms var(--zb-ease-spring) backwards; }
.tagsmod-entity-avatar::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / 45%) 50%, transparent 65%); opacity: 0; transform: translateX(-60%); transition: transform 900ms var(--zb-ease-out), opacity 300ms var(--zb-ease); pointer-events: none; }
.tagsmod-entity-avatar img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.tagsmod-entity--square .tagsmod-entity-avatar { border-radius: 28px; }
a.tagsmod-entity-avatar { cursor: zoom-in; transition: transform var(--zb-duration-slow) var(--zb-ease-out), box-shadow var(--zb-duration-slow) var(--zb-ease-out); }
.tagsmod-entity-eyebrow { gap: 8px; margin-bottom: 10px; }
.tagsmod-entity-eyebrow > :is(.tagsmod-entity-type, .tagsmod-entity-archived) { height: 24px; padding: 0 9px; border-radius: var(--zb-radius-pill); font-size: 12px; font-weight: 600; }
.tagsmod-entity-type { background: hsl(var(--entity-hue) 90% 94%); color: hsl(var(--entity-hue) 55% 30%); }
.tagsmod-entity-archived { background: var(--zb-muted); color: var(--zb-text-muted); }
.tagsmod-entity .tagsmod-entity-name { font-size: clamp(30px, 3.4vw, 46px); text-wrap: balance; }
.tagsmod-entity .tagsmod-entity-name.is-long { font-size: clamp(24px, 2.5vw, 34px); line-height: 1.3; }
.tagsmod-entity :is(.tagsmod-entity-summary, .tagsmod-entity-description, .tagsmod-entity-feature-excerpt) { text-wrap: pretty; }
.tagsmod-entity .tagsmod-entity-subtitle { margin-top: 6px; }

/* Aliases and IDs copy on click. The copy glyph turns into a check; without the script they read as plain chips. */
.tagsmod-entity :is(.tagsmod-entity-alias, .tagsmod-entity-ref--id) { cursor: default; }
.tagsmod-entity.has-copy :is(.tagsmod-entity-alias, .tagsmod-entity-ref--id) { cursor: copy; }
.tagsmod-entity .tagsmod-entity-alias { gap: 6px; }
.tagsmod-entity .tagsmod-entity-alias:hover { border-color: var(--zb-primary-soft-border-strong); color: var(--zb-text); }
.tagsmod-entity .tagsmod-entity-alias.is-copied { border-color: var(--zb-success-soft-border, transparent); background: var(--zb-success-soft); color: var(--zb-success-soft-text); }
.tagsmod-entity .tagsmod-entity-alias--subtitle { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; margin-left: -8px; padding: 3px 8px; border: 0; border-radius: var(--zb-radius-sm); background: transparent; color: var(--zb-text-soft); font-size: 16px; font-weight: 500; line-height: 1.5; text-align: left; overflow-wrap: anywhere; transition: background-color var(--zb-duration-fast) var(--zb-ease), color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity .tagsmod-entity-alias--subtitle:hover { background: var(--zb-muted); color: var(--zb-text); }
.tagsmod-entity .tagsmod-entity-alias--subtitle.is-copied { background: var(--zb-success-soft); color: var(--zb-success-soft-text); }
.tagsmod-entity-alias--subtitle small { flex: none; color: var(--zb-text-subtle); font-size: 12px; font-weight: 400; }
.tagsmod-entity-copy-icon { display: none; place-items: center; flex: none; width: 15px; height: 15px; color: var(--zb-text-subtle); opacity: 0; transform: scale(.8); transition: opacity var(--zb-duration-fast) var(--zb-ease), transform var(--zb-duration-base) var(--zb-ease-spring), color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity.has-copy .tagsmod-entity-copy-icon { display: inline-grid; }
.tagsmod-entity .tagsmod-entity-copy-icon .tagsmod-ico { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity var(--zb-duration-fast) var(--zb-ease), transform var(--zb-duration-base) var(--zb-ease-spring); }
.tagsmod-entity-copy-icon .tagsmod-ico:last-child { opacity: 0; transform: scale(.4) rotate(-30deg); }
:is(.tagsmod-entity-alias, .tagsmod-entity-ref--id):is(:hover, :focus-visible) .tagsmod-entity-copy-icon, .is-copied .tagsmod-entity-copy-icon { opacity: 1; transform: none; }
.is-copied .tagsmod-entity-copy-icon { color: currentColor; }
.is-copied .tagsmod-entity-copy-icon .tagsmod-ico:first-child { opacity: 0; transform: scale(.4) rotate(30deg); }
.is-copied .tagsmod-entity-copy-icon .tagsmod-ico:last-child { opacity: 1; transform: none; }

/* Description or the derived summary. */
.tagsmod-entity .tagsmod-entity-description :is(ul, ol) { margin: 0 0 8px; padding-left: 1.4em; list-style: revert; }
.tagsmod-entity .tagsmod-entity-summary { max-width: 64ch; }
.tagsmod-entity-summary-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 7px; background: hsl(var(--entity-hue) 90% 93%); color: hsl(var(--entity-hue) 60% 38%); vertical-align: -5px; }
.tagsmod-entity .tagsmod-entity-summary-mark .tagsmod-ico { width: 13px; height: 13px; }
.tagsmod-entity-summary strong { margin: 0 2px; color: var(--zb-text); font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tagsmod-entity-summary a { color: var(--zb-text); font-weight: 600; text-decoration: underline; text-decoration-color: hsl(var(--entity-hue) 70% 60% / 55%); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color var(--zb-duration-fast) var(--zb-ease), text-decoration-color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity-summary a:hover { color: var(--tagsmod-accent-text); text-decoration-color: currentColor; }

/* Website and external identities. Linked IDs lift; ID-only ones are dashed copy buttons. */
.tagsmod-entity-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.tagsmod-entity .tagsmod-entity-website { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 0 16px 0 14px; border-radius: var(--zb-radius-pill); background: var(--zb-primary); color: var(--zb-on-primary); font-size: 13.5px; font-weight: 600; box-shadow: var(--zb-shadow-action); transition: background-color var(--zb-duration-fast) var(--zb-ease), transform var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity .tagsmod-entity-website:hover { background: var(--zb-primary-hover); transform: translateY(-1px); }
.tagsmod-entity-website small { overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; opacity: .82; }
.tagsmod-entity .tagsmod-entity-website .tagsmod-ico { width: 16px; height: 16px; }
.tagsmod-entity .tagsmod-entity-website .tagsmod-ico:last-of-type { width: 14px; height: 14px; opacity: .85; }
.tagsmod-entity .tagsmod-entity-ref { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; max-width: 100%; padding: 0 14px 0 5px; border: 1px solid var(--zb-border); border-radius: var(--zb-radius-pill); background: var(--zb-surface); color: var(--zb-text-soft); font-size: 13px; text-align: left; box-shadow: var(--zb-shadow-card); transition: border-color var(--zb-duration-fast) var(--zb-ease), transform var(--zb-duration-fast) var(--zb-ease), box-shadow var(--zb-duration-slow) var(--zb-ease-out), background-color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity .tagsmod-entity-ref:hover { border-color: var(--zb-primary-soft-border-strong); transform: translateY(-1px); box-shadow: var(--tagsmod-lift-shadow); }
.tagsmod-entity .tagsmod-entity-ref--id { border-style: dashed; border-color: var(--zb-field-border); background: color-mix(in srgb, var(--zb-surface) 72%, transparent); box-shadow: none; }
.tagsmod-entity .tagsmod-entity-ref--id:hover { background: var(--zb-surface); box-shadow: none; }
.tagsmod-entity .tagsmod-entity-ref--id.is-copied { border-color: var(--zb-success); background: var(--zb-success-soft); color: var(--zb-success-soft-text); }
.tagsmod-entity .tagsmod-entity-ref > .tagsmod-ico { width: 14px; height: 14px; color: var(--zb-text-muted); transition: transform var(--zb-duration-base) var(--zb-ease-out); }
.tagsmod-entity .tagsmod-entity-ref:hover > .tagsmod-ico { transform: translate(2px, -2px); color: var(--tagsmod-accent-text); }
.tagsmod-entity-mark { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--zb-primary-soft); color: var(--zb-primary-soft-text); font-size: 12.5px; font-weight: 800; line-height: 1; }
.tagsmod-entity-mark[data-provider="dlsite"] { background: #1f5fbf; color: #fff; }
.tagsmod-entity-mark[data-provider="wikipedia"] { background: var(--zb-text); color: var(--zb-surface); font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.tagsmod-entity-mark[data-provider="wikidata"] { background: linear-gradient(90deg, #990000 0 33%, #339966 33% 66%, #006699 66%); color: #fff; }
.tagsmod-entity-mark[data-provider="steam"] { background: #1b2838; color: #fff; }
.tagsmod-entity-mark[data-provider="vndb"] { background: #0b3a5c; color: #fff; }
.tagsmod-entity-mark[data-provider="bangumi"] { background: #f09199; color: #fff; }
.tagsmod-entity-ref-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.tagsmod-entity-ref-text > span { color: var(--zb-text); font-weight: 600; white-space: nowrap; }
.tagsmod-entity-ref-text code { min-width: 0; overflow: hidden; padding: 0; border: 0; background: transparent; color: var(--zb-text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tagsmod-entity-refs .tagsmod-genre-links-more { flex-basis: auto; }
.tagsmod-entity-refs .tagsmod-genre-links-more[open] { flex-basis: 100%; }

/* Works: a sticky toolbar (it gives way to the theme header like the catalog's), then cards. */
.tagsmod-entity .tagsmod-entity-body { padding-top: 36px; }
.tagsmod-entity-works-head h2 { display: flex; align-items: center; }
.tagsmod-entity-works-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; margin-left: 10px; padding: 0 8px; border-radius: var(--zb-radius-pill); background: var(--zb-primary-soft); color: var(--tagsmod-accent-text); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tagsmod-entity-controls { position: sticky; top: var(--tagsmod-entity-header); z-index: 5; margin: 0 -16px; padding: 12px 16px; border-bottom: 1px solid transparent; background: var(--zb-surface); transition: top .3s var(--tagsmod-entity-sticky-ease), border-color var(--zb-duration-base) var(--zb-ease), box-shadow var(--zb-duration-base) var(--zb-ease); }
@supports (backdrop-filter: blur(1px)) {
    .tagsmod-entity-controls { background: color-mix(in srgb, var(--zb-surface) 86%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); }
}
.tagsmod-entity-controls.is-stuck { border-bottom-color: var(--zb-border); box-shadow: 0 12px 24px -22px rgb(15 23 42 / 55%); }
.tagsmod-entity-controls-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.tagsmod-entity .tagsmod-entity-controls-title { display: flex; flex: none; align-items: center; font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.tagsmod-entity .tagsmod-entity-tabs { flex: 0 1 auto; }
.tagsmod-entity .tagsmod-entity-tabs .tagsmod-seg-item { min-height: 40px; padding-inline: 14px; font-size: 13.5px; }
.tagsmod-entity .tagsmod-entity-toolbar { flex: 1 1 520px; }
.tagsmod-entity .tagsmod-entity-search { max-width: 400px; }
.tagsmod-entity-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.tagsmod-entity .tagsmod-entity-search .tagsmod-entity-search-clear { display: inline-grid; flex: none; place-items: center; width: 28px; min-height: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--zb-muted); color: var(--zb-text-muted) !important; box-shadow: none; animation: tagsmod-entity-pop 220ms var(--zb-ease-spring); }
.tagsmod-entity .tagsmod-entity-search .tagsmod-entity-search-clear:hover { background: var(--zb-border); color: var(--zb-text) !important; }
.tagsmod-entity .tagsmod-entity-search-clear .tagsmod-ico { width: 14px; height: 14px; }
.tagsmod-entity .tagsmod-entity-views { flex: none; }
.tagsmod-entity .tagsmod-entity-views .tagsmod-seg-item { width: 40px; min-height: 38px; padding: 0; border: 0; background: transparent; }
.tagsmod-entity .tagsmod-entity-views .tagsmod-seg-item[aria-pressed="true"] { background: var(--zb-primary-soft); color: var(--tagsmod-accent-text); }
.tagsmod-entity .tagsmod-entity-views .tagsmod-ico { width: 17px; height: 17px; }
.tagsmod-entity .tagsmod-entity-result-heading { margin: 18px 0 18px; }
.tagsmod-entity .tagsmod-entity-result-summary { color: var(--zb-text); font-size: 14.5px; font-weight: 650; line-height: 1.6; overflow-wrap: anywhere; scroll-margin-top: calc(var(--tagsmod-entity-header) + 96px); }
.tagsmod-entity .tagsmod-entity-result-summary:focus { outline: none; }
.tagsmod-entity.is-loading .tagsmod-entity-features { opacity: .5; transition: opacity var(--zb-duration-base) var(--zb-ease); }

/* Cards: the shared discovery card. Role badges join the credit line, and list view lays a card out as a row. */
.tagsmod-entity .tagsmod-entity-card-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tagsmod-entity .tagsmod-entity-card-roles .tagsmod-role-badge { height: 20px; padding: 0 7px; font-size: 11px; }
.tagsmod-entity .tagsmod-entity-card-roles .tagsmod-role-badge .tagsmod-ico { width: 11px; height: 11px; }
.tagsmod-entity-card-dates { display: none; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable { grid-template-columns: minmax(0, 1fr); gap: 0; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-card { display: grid; grid-template-columns: 176px minmax(0, 1fr); align-content: start; align-items: start; column-gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--zb-border); }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-card > * { grid-column: 2; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-card:first-child { padding-top: 0; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-card > .tagsmod-discovery-cover { grid-column: 1; grid-row: 1 / span 5; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-name { margin-top: 2px; font-size: 16px; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-date { display: none; }
.tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-entity-card-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--zb-text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tagsmod-entity-card-dates > span, .tagsmod-entity-feature-dates > span { display: inline-flex; align-items: center; gap: 5px; }
.tagsmod-entity :is(.tagsmod-entity-card-dates, .tagsmod-entity-feature-dates) .tagsmod-ico { width: 13px; height: 13px; }
.tagsmod-entity-grid { transition: opacity var(--zb-duration-base) var(--zb-ease); }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > *, .tagsmod-entity-results.is-arriving .tagsmod-entity-features > *, .tagsmod-entity-results.is-arriving .tagsmod-genre-empty { animation: tagsmod-entity-rise 480ms var(--zb-ease-out) backwards; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(2) { animation-delay: 40ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(3) { animation-delay: 80ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(4) { animation-delay: 120ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(5) { animation-delay: 160ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(6) { animation-delay: 200ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(7) { animation-delay: 240ms; }
.tagsmod-entity-results.is-arriving .tagsmod-entity-grid > :nth-child(n+8) { animation-delay: 280ms; }
.tagsmod-entity.is-switching .tagsmod-entity-grid--switchable { animation: tagsmod-entity-fade 360ms var(--zb-ease-out); }

/* Up to three games: large cards. One reads as a wide spread; two or three stand side by side. */
.tagsmod-entity-features { display: grid; gap: 20px; }
.tagsmod-entity-features[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tagsmod-entity-features[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tagsmod-entity-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 28px; min-width: 0; padding: 14px; border: 1px solid var(--zb-border); border-radius: var(--zb-radius-2xl); background: var(--zb-surface); box-shadow: var(--zb-shadow-card); transition: border-color var(--zb-duration-base) var(--zb-ease), box-shadow var(--zb-duration-slow) var(--zb-ease-out), transform var(--zb-duration-slow) var(--zb-ease-out); }
.tagsmod-entity-features:not([data-count="1"]) .tagsmod-entity-feature { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 14px; padding: 12px; }
.tagsmod-entity .tagsmod-entity-feature-cover { border-radius: var(--zb-radius-xl); }
.tagsmod-entity-feature-badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--zb-radius-pill); background: rgb(12 14 20 / 62%); color: #fff; font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tagsmod-entity .tagsmod-entity-feature-badge .tagsmod-ico { width: 13px; height: 13px; }
.tagsmod-entity-feature-body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 6px 10px 6px 0; }
.tagsmod-entity-features:not([data-count="1"]) .tagsmod-entity-feature-body { padding: 2px 6px 6px; }
.tagsmod-entity-feature-dates { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--zb-text-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tagsmod-entity .tagsmod-entity-feature-name { margin-top: 8px; font-size: 22px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.tagsmod-entity-features:not([data-count="1"]) .tagsmod-entity-feature-name { font-size: 17px; }
.tagsmod-entity-feature-name a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; transition: color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity .tagsmod-entity-feature-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; color: var(--zb-text-soft); font-size: 13px; }
.tagsmod-entity-feature-makers { min-width: 0; overflow-wrap: anywhere; }
.tagsmod-entity-feature-makers a:hover { color: var(--tagsmod-accent-text); }
.tagsmod-entity-feature-label { margin-right: 6px; color: var(--zb-text-muted); }
.tagsmod-entity .tagsmod-entity-feature-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin-top: 12px; overflow: hidden; color: var(--zb-text-soft); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.tagsmod-entity .tagsmod-entity-feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tagsmod-entity-feature-tags a { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: var(--zb-radius-pill); background: var(--zb-muted); color: var(--zb-text-soft); font-size: 12.5px; transition: background-color var(--zb-duration-fast) var(--zb-ease), color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity-feature-tags a span { margin-right: 1px; color: var(--zb-text-subtle); }
.tagsmod-entity-feature-tags a:hover { background: var(--zb-primary-soft); color: var(--tagsmod-accent-text); }
.tagsmod-entity .tagsmod-entity-feature-more { margin: 12px 0 0 -12px; }

/* Around the works: collaborators and tags. */
.tagsmod-entity-section { margin-top: var(--tagsmod-section-gap); }
.tagsmod-entity-people-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tagsmod-entity-people-list > li { min-width: 0; }
.tagsmod-entity .tagsmod-entity-person { display: flex; align-items: center; gap: 12px; height: 100%; min-height: 72px; padding: 12px 12px 12px 14px; border: 1px solid var(--zb-border); border-radius: var(--zb-radius-xl); background: var(--zb-surface); transition: border-color var(--zb-duration-base) var(--zb-ease), box-shadow var(--zb-duration-slow) var(--zb-ease-out), transform var(--zb-duration-slow) var(--zb-ease-out); }
.tagsmod-entity-person-avatar { position: relative; display: grid; flex: none; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; background: linear-gradient(140deg, hsl(var(--entity-hue) 95% 93%), hsl(calc(var(--entity-hue) + 32) 88% 84%)); color: hsl(var(--entity-hue) 60% 32%); font-size: 18px; font-weight: 700; line-height: 1; }
.tagsmod-entity-person-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tagsmod-entity-person-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.tagsmod-entity-person-name { overflow: hidden; color: var(--zb-text); font-size: 14.5px; font-weight: 600; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; transition: color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity-person-meta { overflow: hidden; color: var(--zb-text-muted); font-size: 12.5px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.tagsmod-entity .tagsmod-entity-person > .tagsmod-ico { width: 16px; height: 16px; color: var(--zb-text-subtle); transition: transform var(--zb-duration-base) var(--zb-ease-out), color var(--zb-duration-fast) var(--zb-ease); }
.tagsmod-entity .tagsmod-entity-tags .tagsmod-tag-cloud .tagsmod-chip { padding-right: 6px; }

/* Images: a square wall; every tile opens the shared lightbox. */
.tagsmod-entity-gallery-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.tagsmod-entity-gallery-list a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--zb-radius-lg); background: var(--zb-surface-sunken); box-shadow: var(--zb-shadow-card); cursor: zoom-in; }
.tagsmod-entity-gallery-list a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--tagsmod-cover-ring); pointer-events: none; }
.tagsmod-entity-gallery-list img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--zb-ease-out); }

/* Copy feedback. It lives under <body> with its own .zbui scope, above the theme's header and phone tab bar. */
.zbui.tagsmod-entity-toast { position: fixed; bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px)); left: 50%; z-index: var(--zb-z-toast, 1080); display: inline-flex; align-items: center; gap: 8px; max-width: min(92vw, 440px); padding: 10px 18px 10px 14px; border-radius: var(--zb-radius-pill); background: var(--zb-text); color: var(--zb-surface); font-family: var(--zb-font-sans, system-ui, sans-serif); font-size: 13.5px; font-weight: 500; line-height: 1.4; box-shadow: 0 18px 40px -16px rgb(15 23 42 / 60%); pointer-events: none; opacity: 0; transform: translate(-50%, 18px) scale(.96); transition: opacity var(--zb-duration-base) var(--zb-ease), transform 380ms var(--zb-ease-spring); }
.zbui.tagsmod-entity-toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }
.zbui.tagsmod-entity-toast .tagsmod-ico { flex: none; width: 16px; height: 16px; }
.zbui.tagsmod-entity-toast > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@keyframes tagsmod-entity-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes tagsmod-entity-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: none; } }
@keyframes tagsmod-entity-fade { from { opacity: .35; } to { opacity: 1; } }
@keyframes tagsmod-entity-watermark { from { opacity: 0; transform: translateY(-36%) rotate(-2deg) scale(.94); } }

@media (hover: hover) and (pointer: fine) {
    a.tagsmod-entity-avatar:hover { transform: translateY(-2px) scale(1.03); }
    a.tagsmod-entity-avatar:hover::after { opacity: 1; transform: translateX(60%); }
    .tagsmod-entity-feature:hover { border-color: var(--zb-primary-soft-border); box-shadow: var(--tagsmod-lift-shadow); transform: translateY(-3px); }
    .tagsmod-entity-feature:hover .tagsmod-entity-feature-cover img { transform: scale(1.04); }
    .tagsmod-entity-feature:hover .tagsmod-entity-feature-name a { color: var(--tagsmod-accent-text); }
    .tagsmod-entity .tagsmod-entity-person:hover { border-color: var(--zb-primary-soft-border-strong); box-shadow: var(--tagsmod-lift-shadow); transform: translateY(-2px); }
    .tagsmod-entity .tagsmod-entity-person:hover .tagsmod-entity-person-name { color: var(--tagsmod-accent-text); }
    .tagsmod-entity .tagsmod-entity-person:hover > .tagsmod-ico { color: var(--tagsmod-accent-text); transform: translateX(3px); }
    .tagsmod-entity-gallery-list a:hover img { transform: scale(1.06); }
}
@media (hover: none) {
    .tagsmod-entity-copy-icon { opacity: .75; transform: none; }
}

/* Dark: deeper hue washes, lighter ink. */
[data-bs-theme="dark"] .tagsmod-entity-hero { background: radial-gradient(55% 120% at 84% 28%, hsl(var(--entity-hue) 80% 55% / 15%), transparent 70%), radial-gradient(38% 80% at 6% 0%, hsl(var(--entity-hue) 80% 60% / 8%), transparent 72%), var(--zb-surface); }
[data-bs-theme="dark"] .tagsmod-entity-hero::before { background-image: radial-gradient(hsl(var(--entity-hue) 50% 75% / 13%) 1px, transparent 1.3px); }
[data-bs-theme="dark"] .tagsmod-entity-watermark { background: linear-gradient(165deg, hsl(var(--entity-hue) 85% 70% / 22%), hsl(calc(var(--entity-hue) + 40) 85% 70% / 2%) 78%); -webkit-background-clip: text; background-clip: text; }
[data-bs-theme="dark"] :is(.tagsmod-entity-avatar, .tagsmod-entity-person-avatar) { background: linear-gradient(140deg, hsl(var(--entity-hue) 45% 30%), hsl(calc(var(--entity-hue) + 32) 48% 21%)); color: hsl(var(--entity-hue) 90% 86%); }
[data-bs-theme="dark"] .tagsmod-entity-avatar { box-shadow: 0 0 0 4px var(--zb-surface), 0 0 0 5px hsl(var(--entity-hue) 40% 38%), 0 22px 40px -22px rgb(0 0 0 / 70%); }
[data-bs-theme="dark"] .tagsmod-entity-type { background: hsl(var(--entity-hue) 40% 22%); color: hsl(var(--entity-hue) 85% 84%); }
[data-bs-theme="dark"] .tagsmod-entity-summary-mark { background: hsl(var(--entity-hue) 40% 22%); color: hsl(var(--entity-hue) 85% 78%); }
[data-bs-theme="dark"] .tagsmod-entity-summary a { text-decoration-color: hsl(var(--entity-hue) 70% 70% / 55%); }
[data-bs-theme="dark"] .tagsmod-entity-controls.is-stuck { box-shadow: 0 12px 24px -20px rgb(0 0 0 / 80%); }
[data-bs-theme="dark"] .tagsmod-entity-feature-badge { background: rgb(0 0 0 / 60%); }

@media (max-width: 1099.98px) {
    .tagsmod-entity-avatar { width: 92px; height: 92px; font-size: 40px; }
    .tagsmod-entity-people-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tagsmod-entity-features[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tagsmod-entity-features[data-count="3"] > :first-child { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
@media (max-width: 767.98px) {
    .tagsmod-entity-watermark { top: 64px; right: -12px; font-size: 150px; opacity: .55; transform: rotate(-6deg); animation: none; }
    .tagsmod-entity-hero::before { -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%); }
    .tagsmod-entity-identity { gap: 14px; }
    .tagsmod-entity-avatar { width: 68px; height: 68px; font-size: 28px; box-shadow: 0 0 0 3px var(--zb-surface), 0 0 0 4px hsl(var(--entity-hue) 55% 82%), 0 14px 28px -16px hsl(var(--entity-hue) 70% 35% / 55%); }
    .tagsmod-entity--square .tagsmod-entity-avatar { border-radius: 20px; }
    .tagsmod-entity .tagsmod-entity-name { font-size: clamp(24px, 7vw, 32px); }
    .tagsmod-entity .tagsmod-entity-name.is-long { font-size: clamp(19px, 5.4vw, 24px); }
    .tagsmod-entity .tagsmod-entity-eyebrow { margin-bottom: 6px; }
    .tagsmod-entity .tagsmod-entity-alias--subtitle { font-size: 14.5px; }
    .tagsmod-entity-fan { display: none; }
    .tagsmod-entity .tagsmod-entity-hero-grid { padding-bottom: 28px; }
    .tagsmod-entity-refs { gap: 8px; }
    .tagsmod-entity .tagsmod-entity-ref, .tagsmod-entity .tagsmod-entity-website { min-height: 42px; }
    .tagsmod-entity .tagsmod-entity-body { padding-top: 24px; }
    .tagsmod-entity-controls { position: static; margin: 0 0 4px; padding: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .tagsmod-entity-controls-inner { gap: 12px; }
    .tagsmod-entity .tagsmod-entity-controls-title { width: 100%; font-size: 20px; }
    .tagsmod-entity .tagsmod-entity-tabs { width: 100%; }
    .tagsmod-entity .tagsmod-entity-toolbar { flex-basis: 100%; }
    .tagsmod-entity .tagsmod-entity-search { max-width: none; }
    .tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-card { grid-template-columns: 116px minmax(0, 1fr); column-gap: 14px; padding: 12px 0; }
    .tagsmod-entity[data-view="list"] .tagsmod-entity-grid--switchable .tagsmod-discovery-name { font-size: 14.5px; }
    .tagsmod-entity-features, .tagsmod-entity-features[data-count="2"], .tagsmod-entity-features[data-count="3"] { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .tagsmod-entity-feature, .tagsmod-entity-features[data-count="3"] > :first-child { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; padding: 10px; }
    .tagsmod-entity-feature-body, .tagsmod-entity-features:not([data-count="1"]) .tagsmod-entity-feature-body { padding: 2px 6px 6px; }
    .tagsmod-entity .tagsmod-entity-feature-name, .tagsmod-entity-features:not([data-count="1"]) .tagsmod-entity-feature-name { font-size: 18px; }
    /* Collaborators and images scroll sideways; positioned so hidden text clips with the scroller. */
    .tagsmod-entity-people-list, .tagsmod-entity-gallery-list { position: relative; grid-auto-flow: column; grid-template-columns: none; margin-inline: -16px; padding: 2px 16px 10px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-padding-inline: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .tagsmod-entity-people-list { grid-auto-columns: min(74vw, 270px); }
    .tagsmod-entity-gallery-list { grid-auto-columns: min(42vw, 180px); }
    :is(.tagsmod-entity-people-list, .tagsmod-entity-gallery-list)::-webkit-scrollbar { display: none; }
    :is(.tagsmod-entity-people-list, .tagsmod-entity-gallery-list) > li { scroll-snap-align: start; }
    .zbui.tagsmod-entity-toast { bottom: calc(env(safe-area-inset-bottom) + 72px); }
}
@media (prefers-reduced-motion: reduce) {
    .tagsmod-entity-watermark, .tagsmod-entity-avatar, .tagsmod-entity-intro > *, .zbui.tagsmod-entity-toast { animation: none !important; transition: none !important; }
    a.tagsmod-entity-avatar:hover, .tagsmod-entity-feature:hover, .tagsmod-entity .tagsmod-entity-person:hover, .tagsmod-entity .tagsmod-entity-ref:hover, .tagsmod-entity .tagsmod-entity-website:hover { transform: none; }
    .zbui.tagsmod-entity-toast, .zbui.tagsmod-entity-toast.is-visible { transform: translate(-50%, 0); }
}
@media (forced-colors: active) {
    :is(.tagsmod-entity-avatar, .tagsmod-entity-person-avatar, .tagsmod-entity-mark) { border: 1px solid CanvasText; }
    .tagsmod-entity .tagsmod-entity-ref, .tagsmod-entity-feature, .tagsmod-entity .tagsmod-entity-person { border-color: CanvasText; }
    .tagsmod-entity-watermark { display: none; }
    .zbui.tagsmod-entity-toast { border: 1px solid CanvasText; }
}
