.hem{padding:24px 18px!important;color:#243448;background:#fff}.hem h1{font-size:2rem}.hem h2{font-size:1.3rem;margin:18px 0}.hem h3{font-size:1.15rem}.hem-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;background:#edf4fa;padding:18px;border-radius:6px}.hem-wide{grid-column:1/-1}.hem-form label{font-weight:600;margin:0}.hem-form input,.hem-form select{display:block;width:100%;min-width:0;padding:9px;border:1px solid #aab9c8;border-radius:4px;background:white}.hem-form button{background:#235b9d;color:white;border:0;border-radius:4px;padding:9px 24px}.hem-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:24px}.hem-result{display:flex;gap:15px;border-bottom:1px solid #ddd;padding:16px 0}.hem-result img{width:150px;aspect-ratio:7/5;object-fit:cover}.hem-result h3{margin:5px 0}.hem-result p{margin:0}.hem-result small{color:#526477}.hem aside{background:#f5f8fb;padding:12px;margin-top:18px;align-self:start}.hem-tags{display:flex;flex-wrap:wrap;gap:6px}.hem-tags a{font-size:.85rem;background:#e3edf6;padding:5px 8px;border-radius:4px;overflow-wrap:anywhere}.hem-month{display:block}.hem-pages{display:flex;gap:16px;justify-content:center;margin:20px 0}@media(max-width:767px){.hem-layout{grid-template-columns:1fr}.hem-form{grid-template-columns:repeat(2,minmax(0,1fr))}.hem-result img{width:105px}.hem-result h3{font-size:1rem}}@media(max-width:380px){.hem-form{grid-template-columns:1fr}.hem-result{flex-direction:column}.hem-result img{width:100%}}

.hem-page.container{border:2px solid #173c65;box-sizing:border-box;background:#fff;min-height:100vh;display:flex;flex-direction:column;padding:0!important}.hem-page #cabecera,.hem-page #pie{width:100%;max-width:none;margin:0;border:0!important}.hem-page #pie{margin-top:auto}.hem-page .hem{width:100%;min-width:0;flex:1}.hem-scope{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:12px}.hem-scope legend{font-size:1rem;font-weight:600}.hem-scope label{display:flex;align-items:center;gap:6px}.hem-scope input[type=radio]{width:auto;display:inline}.hem-range{text-align:center;margin:16px 0 0}.hem-pages{align-items:center;flex-wrap:wrap;gap:8px}.hem-num{padding:5px 10px;border:1px solid #aab9c8;border-radius:4px}.hem-num.actual{background:#235b9d;color:white}.hem-letters{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}.hem-letters a{padding:3px 6px;background:#e3edf6}.hem-tag-search input{width:100%;min-width:0}.hem-tag-search{margin:10px 0}.hem-tag-list{max-height:280px;overflow:auto}.hem aside summary{cursor:pointer}.hem-page .hem-result>div{min-width:0;overflow-wrap:anywhere}@media(max-width:575px){.hem-page.container{width:calc(100% - 12px);margin:0 auto}.hem-page .hem{padding:16px 10px!important}}

/* Ajustes finales de formulario e índice */
.hem-form label,.hem-form fieldset,.hem-tag-search label{min-width:0;max-width:100%}
.hem-form input:not([type=radio]),.hem-form select,.hem-tag-search input{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
.hem-form input[type=date]{display:block;-webkit-appearance:none;appearance:none;min-height:44px}
.hem-tag-search label{display:block;margin-bottom:6px}
.hem-tag-search input{display:block;padding:8px;border:1px solid #aab9c8;border-radius:4px;background:#fff}
.hem-tag-search button{background:#235b9d;color:#fff;border:0;border-radius:4px;padding:8px 16px}
.hem-letters a,.hem-letter-disabled{padding:3px 6px;border-radius:3px}
.hem-letters a.actual{background:#235b9d;color:#fff}
.hem-letter-disabled{color:#718096;background:#e9edf1}
.hem-empty-tags{font-size:.9rem;margin:10px 0 0}
.hem-active-filters{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.hem-active-filters:empty{display:none}
.hem-active-filters a{background:#e3edf6;border:1px solid #aab9c8;border-radius:4px;padding:4px 8px;color:#235b9d;font-size:.9rem;overflow-wrap:anywhere}
.hem-active-filters span{font-weight:bold;margin-left:4px}
@media(max-width:575px){.hem-form{grid-template-columns:minmax(0,1fr)}.hem-form input[type=date]{width:100%;max-width:100%;min-width:0}}
