/* Catalog controls use native details and remain usable without JavaScript. */
.catalog-form { padding: 20px; margin-bottom: 24px; background: var(--surface, #f5fbff); border: 1px solid var(--border); border-radius: 16px; }
.catalog-form label, .catalog-form legend { font-weight: 700; }
.catalog-keyword, .catalog-filter-grid select { display: block; width: 100%; max-width: 100%; min-height: 44px; margin-top: 6px; padding: 8px; border: 1px solid #648899; border-radius: 8px; background: #fff; color: var(--text); }
.catalog-filters summary { padding: 12px 0; cursor: pointer; font-weight: 700; }
.catalog-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 12px 0; }
.catalog-filter-grid > * { min-width: 0; }
.catalog-formats { border: 0; padding: 0; margin: 0; }
.catalog-formats label { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; margin-right: 16px; }
.catalog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 16px; }
.catalog-pagination ul { display: flex; flex-wrap: wrap; list-style: none; gap: 8px; padding: 0; justify-content: center; margin: 32px 0; }
.catalog-pagination a, .catalog-pagination span { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 8px; border-radius: 8px; }
.catalog-pagination [aria-current] { background: var(--border); font-weight: 700; }
@media (max-width: 767px) { .catalog-filter-grid { grid-template-columns: 1fr; } .catalog-form { padding: 14px; } .catalog-actions .button { width: 100%; } }

/* Applied conditions and recovery actions. Long terms/keywords wrap at 320px. */
.catalog-applied { margin: 24px 0; }
.catalog-applied h2 { font-size: 1rem; }
.catalog-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.catalog-chips li { min-width: 0; max-width: 100%; }
.catalog-chip { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #648899; border-radius: 16px; background: #f5fbff; }
.catalog-chip span:first-child { min-width: 0; overflow-wrap: anywhere; }
.catalog-chip span:last-child { flex: 0 0 auto; font-size: 1.2em; }
.catalog-chip:focus-visible, .catalog-clear-all:focus-visible, .catalog-empty a:focus-visible { outline: 3px solid #135d82; outline-offset: 3px; }
.catalog-clear-all, .catalog-empty a { display: inline-flex; align-items: center; min-height: 44px; }
.catalog-result-count { overflow-wrap: anywhere; }
.catalog-current-page { display: inline-block; }
.catalog-empty ul { text-align: left; padding-left: 1.25em; }
.catalog-empty li { margin: 12px 0; overflow-wrap: anywhere; }

/* Navigation */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / 97%); border-bottom: 1px solid var(--border); }
.header-row { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; max-width: 100%; }
.brand-text { min-width: 0; overflow-wrap: anywhere; }
.header-row > .brand { flex-shrink: 1; }
.header-actions { flex-shrink: 0; }
.header-row .desktop-nav { min-width: 0; max-width: 60%; flex-shrink: 0; }
.brand-drop { flex-shrink: 0; }
.footer-top > *, .section-heading > * { min-width: 0; }
.site-footer, .about-section, .feature-card .eyebrow, #features-title, .placeholder > span { overflow-wrap: anywhere; }
.placeholder > span { max-width: 100%; text-align: center; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; font-size: 1.45rem; line-height: 1.2; letter-spacing: .045em; font-weight: 800; }
.brand small { display: block; font-size: .62rem; letter-spacing: .08em; margin-top: 4px; }
.brand-drop { width: 27px; height: 34px; background: linear-gradient(145deg, #a1e1fc, var(--cta-blue)); border-radius: 60% 40% 60% 50%; transform: rotate(25deg); }
.header-actions, .desktop-nav { display: flex; align-items: center; gap: 8px; }
.desktop-nav { display: none; gap: 24px; margin-left: auto; font-size: .85rem; font-weight: 700; }
.desktop-nav .menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 24px; }
.desktop-nav a { color: var(--text); text-decoration: none; }
.icon-button { width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; color: var(--text); border: 1px solid var(--border); border-radius: 50%; background: #fff; text-decoration: none; font-size: 1.6rem; }
.icon-button:hover { background: var(--soft-background); text-decoration: none; }
#mobile-menu { position: fixed; inset: 0 0 0 auto; width: min(88vw, 390px); height: 100dvh; max-height: 100dvh; margin: 0; padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); border: none; color: var(--text); background: white; box-shadow: -10px 0 40px rgb(0 50 80 / 12%); }
#mobile-menu::backdrop { background: rgb(27 52 68 / 35%); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.menu { list-style: none; margin: 0; padding: 0; }
#mobile-menu .menu a { display: block; padding: 15px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.no-js-nav .menu { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; }
body.menu-open { overflow: hidden; }
.bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; min-height: 68px; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: white; box-shadow: 0 -5px 20px rgb(45 90 110 / 5%); }
.bottom-nav a { min-height: 54px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: .65rem; font-weight: 700; color: var(--muted); text-decoration: none; border-radius: 8px; }
.bottom-nav a span { font-size: 1.35rem; line-height: 1.4; }
.bottom-nav a[aria-current], .bottom-nav a:hover { color: var(--link); background: var(--soft-background); }
/* Hero */
.eyebrow { font-size: .65rem; letter-spacing: .18em; font-weight: 800; color: var(--link); margin-bottom: 10px; }
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 95% 10%, #d9f4ff, transparent 55%), linear-gradient(120deg, #f5fbff, #edf9ff); border-bottom: 1px solid var(--border); }
.hero::after { content: ""; position: absolute; width: 140%; height: 130px; bottom: -100px; left: -20%; border-radius: 50%; background: white; transform: rotate(-3deg); }
.hero-inner { position: relative; padding-block: 48px 60px; }
.hero-copy { position: relative; z-index: 2; overflow-wrap: anywhere; }
.hero h1 { display: inline-block; font-size: clamp(1.6rem, 4vw, 2.7rem); margin-bottom: 20px; }
.hero-description { font-size: .95rem; line-height: 1.95; margin-bottom: 24px; }
.search-form { display: flex; width: 100%; border: 1px solid #aed9eb; border-radius: var(--radius-input); background: white; box-shadow: var(--shadow); padding: 5px; gap: 5px; }
.search-form input { width: 100%; min-width: 0; border: 0; padding: 12px 8px; background: transparent; color: var(--text); font-size: .8rem; border-radius: 8px; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form button { border: 0; border-radius: 8px; background: var(--cta-readable); color: white; font-size: .9rem; font-weight: 800; padding: 8px 14px; min-height: 48px; flex-shrink: 0; }
.search-form button:hover { background: var(--cta-readable-hover); }
.popular-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: .72rem; }
.popular-tags > span { color: var(--muted); margin-right: 4px; }
.popular-tags a { padding: 5px 12px; background: rgb(255 255 255 / 80%); border: 1px solid var(--border); border-radius: 100px; text-decoration: none; font-weight: 600; }
.hero-art { display: none; }
.demo-notice { border-left: 3px solid var(--primary-aqua); margin: 22px 0 0; padding: 8px 12px; color: var(--muted); background: var(--soft-background); font-size: .72rem; }
.demo-notice span { margin-left: 10px; }
/* Cards */
.card { position: relative; border: 1px solid var(--border); background: white; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.work-card { display: flex; flex-direction: column; }
.image-link { display: block; }
.placeholder, .card-image { aspect-ratio: 8 / 5; width: 100%; object-fit: cover; }
.placeholder { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #276582; background: linear-gradient(145deg, #e8f8ff, #aedcef); }
.placeholder::before, .placeholder::after { content: ""; z-index: -1; position: absolute; width: 150%; height: 100%; border: 1px solid rgb(255 255 255 / 80%); border-radius: 45%; transform: rotate(-18deg); }
.placeholder::before { top: 52%; left: -20%; background: rgb(255 255 255 / 30%); }
.placeholder::after { top: 68%; left: -10%; background: rgb(255 255 255 / 40%); }
.placeholder > span { font-size: 1.2rem; letter-spacing: .2em; font-weight: 700; }
.placeholder > small { font-size: .45rem; letter-spacing: .22em; margin-top: 6px; }
.tone-2 { background: linear-gradient(145deg, #e4f5f5, #c4e0dd); }
.tone-3 { background: linear-gradient(145deg, #edf0fb, #cddcee); }
.tone-4 { background: linear-gradient(145deg, #f4f7ec, #dce9cf); }
.card-body { padding: 12px; }
.work-card .card-body { display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 9px 0 6px; }
.card h3 a, .creator-card h3 { color: var(--text); text-decoration: none; }
.work-card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; list-style: none; margin: 0; padding: 0; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: .65rem; font-weight: 600; background: var(--soft-background); color: var(--link); border: 1px solid var(--border); text-decoration: none; }
.byline { color: var(--muted); font-size: .75rem; margin-bottom: 8px; }
.rating { font-weight: 700; font-size: .95rem; margin-bottom: 12px; }
.rating > span { color: #99720e; }
.rating small { color: var(--muted); font-size: .63rem; font-weight: 400; }
.card-actions { display: grid; gap: 8px; margin-top: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 10px 12px; border-radius: var(--radius-button); font-weight: 700; line-height: 1.45; text-decoration: none; width: 100%; }
.button-secondary { border: 1px solid var(--primary-aqua); background: white; color: var(--link); font-size: .8rem; }
.button-secondary:hover { background: var(--soft-background); }
.button-primary { border: 1px solid var(--cta-readable); background: var(--cta-readable); color: white; font-size: .8rem; box-shadow: var(--shadow); }
.button-primary:hover { background: var(--cta-readable-hover); border-color: var(--cta-readable-hover); }
.text-link { font-size: .85rem; font-weight: 700; text-decoration: none; }
.section-note { color: var(--muted); font-size: .8rem; }
.condition-card { display: flex; align-items: center; gap: 10px; padding: 16px 12px; min-height: 76px; border: 1px solid var(--border); border-radius: 12px; background: white; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.condition-card > span:first-child { color: var(--link); font-size: 1.6rem; font-weight: 400; }
.condition-card strong { font-size: .9rem; }
.condition-arrow { margin-left: auto; color: var(--link); }
.maker-directory { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.maker-directory h3 { font-size: .8rem; margin-bottom: 8px; }
.maker-directory p { margin: 0; color: var(--muted); font-size: .75rem; }
.creator-card { min-width: 0; text-align: center; padding: 16px; border: 1px solid var(--border); background: white; border-radius: 12px; }
.creator-card a { display: flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }
.portrait { aspect-ratio: 1; border-radius: 50%; }
.portrait > span { font-size: 2.4rem; }
.creator-card h3 { font-size: .9rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.creator-card p { font-size: .72rem; color: var(--muted); margin: 0; }
.ranking-card { display: grid; grid-template-columns: 34% 1fr; }
.rank-image { position: relative; }
.rank-image .placeholder, .rank-image .card-image { height: 100%; min-height: 145px; }
.rank-image .placeholder > span { font-size: .6rem; }
.rank-image .placeholder > small { display: none; }
.rank-badge { position: absolute; z-index: 2; top: 8px; left: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: white; color: var(--link); font-size: 1rem; font-weight: 800; box-shadow: var(--shadow); }
.ranking-card h3 { margin-top: 0; }
.ranking-card .rating { margin: 4px 0; }
.ranking-first { display: block; }
.ranking-first .placeholder, .ranking-first .card-image { min-height: 0; height: auto; aspect-ratio: 8 / 5; }
.ranking-first .placeholder > span { font-size: 1.5rem; }
.ranking-first .rank-badge { top: 16px; left: 16px; width: 42px; height: 42px; background: var(--cta-readable); color: white; font-size: 1.5rem; }
.ranking-first h3 { font-size: 1.25rem; }
.feature-card { padding: 22px 16px; border-radius: var(--radius-card); position: relative; min-height: 195px; border: 1px solid var(--border); }
.feature-card .eyebrow { font-size: .5rem; }
.feature-card h3 { margin-block: 12px 8px; font-size: 1.05rem; }
.feature-card h3 a { color: var(--text); text-decoration: none; }
.feature-card h3 a::after { content: ""; position: absolute; inset: 0; }
.feature-card p { font-size: .73rem; margin-bottom: 20px; color: #405868; }
.feature-arrow { position: absolute; right: 16px; bottom: 10px; color: var(--link); }
.review-card time { font-size: .7rem; color: var(--muted); }
.review-card p { font-size: .8rem; color: var(--muted); }
.empty-state { padding: 24px; background: var(--soft-background); border: 1px dashed var(--border); border-radius: 12px; margin-block: 20px; }
.empty-state .button { margin-top: 20px; }
.about-section { text-align: center; padding-bottom: 80px; }
.about-section h2 { line-height: 1.7; letter-spacing: .05em; }
.about-section > p:not(.eyebrow) { font-size: .88rem; color: var(--muted); }
.work-facts > div { display: grid; grid-template-columns: 100px 1fr; padding-block: 10px; border-bottom: 1px solid var(--border); }
.work-facts dt { color: var(--muted); }
.work-facts dd { margin: 0; }
.work-detail > *, .work-facts dd { min-width: 0; }
.detail-media { align-self: start; }
.detail-image { width: 100%; height: auto; border-radius: var(--radius-card); }
.detail-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.work-facts a { display: inline-block; padding-block: 8px; }
.work-official-cta { min-height: 48px; width: 100%; margin-top: 16px; }
.work-detail .work-facts > div { grid-template-columns: minmax(0, 110px) minmax(0, 1fr); gap: 12px; }
@media (max-width: 479px) {
	.work-detail .work-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.nav-links { display: flex; flex-wrap: wrap; gap: 10px; padding-block: 24px; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; }
.page-numbers.current { background: var(--soft-background); }
/* Footer */
.site-footer { background: var(--soft-background); padding-block: 40px 24px; border-top: 1px solid var(--border); }
.footer-top { display: grid; gap: 24px; }
.footer-top p { font-size: .78rem; color: var(--muted); margin: 16px 0; }
.site-footer .menu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; font-size: .8rem; }
.site-footer .menu a { text-decoration: none; color: var(--text); }
.legal-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .65rem; color: var(--muted); }
.copyright { margin: 24px 0 0; color: var(--muted); font-size: .65rem; }
@media (min-width: 700px) {
	.hero-inner { padding-block: 64px 80px; }
	.hero-copy { max-width: 70%; }
	.hero-art { display: block; position: absolute; right: -5%; top: 40px; width: 35%; height: 320px; }
	.hero-drop { position: absolute; top: 15px; left: 35px; width: 140px; height: 195px; transform: rotate(25deg); border-radius: 55% 45% 55% 45%; background: linear-gradient(135deg, rgb(255 255 255 / 95%), #90d7f6 65%, #b7eaff); box-shadow: inset 4px 8px 14px #fff, 14px 18px 40px rgb(37 143 193 / 12%); }
	.orbit { position: absolute; border: 1px solid #a4d9ef; width: 260px; height: 100px; top: 135px; left: -20px; border-radius: 50%; transform: rotate(-25deg); }
	.orbit-two { width: 300px; top: 160px; left: -40px; opacity: .5; }
	.art-caption { position: absolute; top: 265px; left: 70px; font-size: .65rem; letter-spacing: .12em; color: var(--link); }
	.hero-description { font-size: 1rem; }
	.card-body { padding: 18px; }
	.ranking-card .card-body { padding: 10px 16px; }
	.ranking-first .card-body { padding: 24px; }
	.ranking-first .rank-image .placeholder { min-height: 300px; }
	.ranking-first .rating { margin-block: 14px; font-size: 1.2rem; }
	.footer-top { grid-template-columns: 1fr 1.2fr; }
	.site-footer .menu { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
	.desktop-nav { display: flex; }
	.menu-toggle, .bottom-nav { display: none; }
	.hero-inner { padding-block: 76px 88px; }
	.hero-copy { max-width: 690px; }
	.hero-art { right: 0; width: 30%; }
	.hero-drop { left: 85px; width: 170px; height: 230px; }
	.orbit { left: 20px; width: 300px; top: 160px; }
	.orbit-two { left: 0; width: 340px; top: 185px; }
	.art-caption { left: 135px; top: 295px; }
	.condition-card { padding-inline: 16px; }
}
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
@media (min-width: 601px) and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.work-offers { min-width: 0; margin-top: 1.5rem; }
.work-actions--image { display: none; }
@media (max-width: 768px) {
	.work-detail { grid-template-columns: minmax(0, 1fr); }
	.work-actions--image { display: block; }
}
.work-offers h2 { font-size: 1.25rem; }
.work-offer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.work-offer-links li { min-width: 0; max-width: 100%; }
.work-offer-links .work-offer-cta { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; }

/* Compact work browsing; desktop styles above remain the source of truth. */
.card-tag-count { display: none; }
@media (max-width: 768px) {
	.work-card .card-image, .work-card .placeholder { aspect-ratio: 16 / 9; height: auto; }
	.work-card .card-body { padding: 12px; gap: 6px; }
	.work-card h3, .ranking-card h3 { font-size: 1rem; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
	.work-card h3 a:focus-visible, .ranking-card h3 a:focus-visible { outline-offset: -3px; }
	.work-card .byline { margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
	.work-card .rating { margin: 0 0 4px; }
	.work-card .tags, .ranking-card .tags { flex-wrap: nowrap; min-width: 0; }
	.work-card .tag, .ranking-card .tag { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	/* Tags are text, not controls: keep every name available to assistive technology. */
	.work-card .tag:nth-child(n+3), .ranking-card .tag:nth-child(n+3) { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; clip-path: inset(50%); }
	.card-tag-count { display: inline; flex: 0 0 auto; font-size: .65rem; color: var(--muted); }
	.work-card .card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 4px; }
	.work-card .card-actions > :only-child { grid-column: 1 / -1; }
	.work-card .button { min-width: 0; min-height: 44px; padding: 8px; overflow-wrap: anywhere; }
	.single-work .page-main { padding-top: 24px; }
	.single-work article > h1 { font-size: clamp(1.25rem, 1rem + 1.25vw, 1.6rem); line-height: 1.55; letter-spacing: .015em; max-width: 32em; margin-block: 0 20px; padding: 0 0 .4em .5em; overflow-wrap: anywhere; }
	.work-offer-links { display: grid; grid-template-columns: minmax(0, 1fr); }
	.work-offer-links li, .work-offer-links .button { width: 100%; }
}
